mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s4-s3-upgrade now look for -1 as the special 'not set' value
this is possible because we know the py_passdb will always set -1 here, not passing though 0xFFFFFFFF. Andrew Bartlett
This commit is contained in:
parent
32e825d60d
commit
e80dbdcab1
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user