diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/scripting/python/samba/upgrade.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py index c58364bcfe..53f1206d21 100644 --- a/source4/scripting/python/samba/upgrade.py +++ b/source4/scripting/python/samba/upgrade.py @@ -60,15 +60,15 @@ def import_sam_policy(samdb, policy, logger): ldb.FLAG_MOD_REPLACE, 'pwdHistoryLength') min_pw_age_unix = policy['minimum password age'] - min_pw_age_nt = 0 - unix2nttime(min_pw_age_unix) + min_pw_age_nt = int(-min_pw_age_unix * (1e7 * 60 * 60 * 24)) m['a03'] = ldb.MessageElement(str(min_pw_age_nt), ldb.FLAG_MOD_REPLACE, 'minPwdAge') max_pw_age_unix = policy['maximum password age'] - if (max_pw_age_unix == -1): - max_pw_age_nt = 0 + if max_pw_age_unix == -1: + max_pw_age_nt = -0x8000000000000000 else: - max_pw_age_nt = unix2nttime(max_pw_age_unix) + max_pw_age_nt = int(-max_pw_age_unix * (1e7 * 60 * 60 * 24)) m['a04'] = ldb.MessageElement(str(max_pw_age_nt), ldb.FLAG_MOD_REPLACE, 'maxPwdAge') |