samdb: use int for get and set methods instead of digit str
authorJoe Guo <joeg@catalyst.net.nz>
Thu, 12 Jul 2018 04:57:43 +0000 (16:57 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 12 Jul 2018 23:12:24 +0000 (01:12 +0200)
commit9b164637f03b5d19054d286f883b9ce3bc30d76d
tree33b121968c20c0eecce980b9d44ac68a45a633ed
parentf3358f048d7583bb63cb0f09efdd68fbbe49d32e
samdb: use int for get and set methods instead of digit str

This will make the API work in a nature way.

Also, because of a defect in ldb API, code like `res[0]["maxPwdAge"][0]`
will return bytes even in Python3, which will cause trouble. By casting
the value to int, we avoid the str/bytes issue.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/gp_sec_ext.py
python/samba/samdb.py
python/samba/tests/samba_tool/passwordsettings.py