summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-04-19 10:42:05 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-04-19 14:19:09 +1000
commita2b7a9e2a23e395a06700dd0968f4916bde56cdf (patch)
tree18d9537c6ff411bbdbd10b27530e54bd6d6d0b4b
parenta5905bfb39e297ed6ac453faa5518ba5ff47640a (diff)
downloadsamba-a2b7a9e2a23e395a06700dd0968f4916bde56cdf.tar.gz
samba-a2b7a9e2a23e395a06700dd0968f4916bde56cdf.tar.bz2
samba-a2b7a9e2a23e395a06700dd0968f4916bde56cdf.zip
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
-rw-r--r--source4/scripting/python/samba/upgrade.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py
index ab9d9374d5..62cba23af7 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 == -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))