1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-27 07:42:04 +03:00

s4-s3upgrade: Do not ever set a domain-wide maxPwdAge of 0

This means no-expiry in s3, and so we must treat it like -1.

Andrew Bartlett
This commit is contained in:
Andrew Bartlett
2012-04-19 10:42:05 +10:00
parent a5905bfb39
commit a2b7a9e2a2

View File

@ -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 == -1:
if max_pw_age_unix == -1 || max_pw_age_unix == 0:
max_pw_age_nt = -0x8000000000000000
else:
max_pw_age_nt = int(-max_pw_age_unix * (1e7 * 60 * 60 * 24))