summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/passdb/py_passdb.c2
-rw-r--r--source4/scripting/python/samba/upgrade.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c
index de278399b1..39ecf86094 100644
--- a/source3/passdb/py_passdb.c
+++ b/source3/passdb/py_passdb.c
@@ -2317,7 +2317,7 @@ static PyObject *py_pdb_get_account_policy(pytalloc_Object *self)
type = account_policy_name_to_typenum(names[i]);
status = methods->get_account_policy(methods, type, &value);
if (NT_STATUS_IS_OK(status)) {
- PyDict_SetItemString(py_acct_policy, names[i], PyInt_FromLong(value));
+ PyDict_SetItemString(py_acct_policy, names[i], Py_BuildValue("i", value));
}
}
diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py
index 0636d2bac5..c58364bcfe 100644
--- a/source4/scripting/python/samba/upgrade.py
+++ b/source4/scripting/python/samba/upgrade.py
@@ -65,7 +65,7 @@ def import_sam_policy(samdb, policy, logger):
'minPwdAge')
max_pw_age_unix = policy['maximum password age']
- if (max_pw_age_unix == 0xFFFFFFFF):
+ if (max_pw_age_unix == -1):
max_pw_age_nt = 0
else:
max_pw_age_nt = unix2nttime(max_pw_age_unix)