summaryrefslogtreecommitdiff
path: root/source4/setup/pwsettings
diff options
context:
space:
mode:
authorAndrew Kroeger <andrew@id10ts.net>2009-09-06 22:28:56 -0500
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-09-07 12:29:35 +0200
commit41ce496691c7d2a12cdd9db7ba293f0f7783d88d (patch)
tree10a25496fcc97e8a05538d21371a6b6680e55a57 /source4/setup/pwsettings
parent7837768c134a9bb67d6cf53eb95c77feaf826026 (diff)
downloadsamba-41ce496691c7d2a12cdd9db7ba293f0f7783d88d.tar.gz
samba-41ce496691c7d2a12cdd9db7ba293f0f7783d88d.tar.bz2
samba-41ce496691c7d2a12cdd9db7ba293f0f7783d88d.zip
s4:pwsettings: Correct off by factor of 10 for ticks.
The tick conversion math was off by a factor of 10 due to the incorrect usage of the "e" notation. The expression "XeY" means "X * (10^Y)", so the correct expression is 1e7 to get the correct adjustment for ticks.
Diffstat (limited to 'source4/setup/pwsettings')
-rwxr-xr-xsource4/setup/pwsettings8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/setup/pwsettings b/source4/setup/pwsettings
index 49bb5519b3..f26bcf75f4 100755
--- a/source4/setup/pwsettings
+++ b/source4/setup/pwsettings
@@ -74,8 +74,8 @@ try:
pwd_hist_len = int(res[0]["pwdHistoryLength"][0])
min_pwd_len = int(res[0]["minPwdLength"][0])
# ticks -> days
- min_pwd_age = int(abs(int(res[0]["minPwdAge"][0])) / (10e7 * 60 * 60 * 24))
- max_pwd_age = int(abs(int(res[0]["maxPwdAge"][0])) / (10e7 * 60 * 60 * 24))
+ min_pwd_age = int(abs(int(res[0]["minPwdAge"][0])) / (1e7 * 60 * 60 * 24))
+ max_pwd_age = int(abs(int(res[0]["maxPwdAge"][0])) / (1e7 * 60 * 60 * 24))
except:
if args[0] == "show":
print "ERROR: Password informations missing in your AD domain object!"
@@ -153,7 +153,7 @@ elif args[0] == "set":
else:
min_pwd_age = int(opts.min_pwd_age)
# days -> ticks
- min_pwd_age = -int(min_pwd_age * (24 * 60 * 60 * 10e7))
+ min_pwd_age = -int(min_pwd_age * (24 * 60 * 60 * 1e7))
m = ldb.Message()
m.dn = ldb.Dn(samdb, domain_dn)
@@ -168,7 +168,7 @@ elif args[0] == "set":
else:
max_pwd_age = int(opts.max_pwd_age)
# days -> ticks
- max_pwd_age = -int(max_pwd_age * (24 * 60 * 60 * 10e7))
+ max_pwd_age = -int(max_pwd_age * (24 * 60 * 60 * 1e7))
m = ldb.Message()
m.dn = ldb.Dn(samdb, domain_dn)