[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Sun May 6 06:50:05 MDT 2012


The branch, master has been updated
       via  c2b094f s4-s3-upgrade: Max/min password age policy is in seconds, not days
      from  db11c1b s4-schema: Validate more class attribute when adding a new class in the schema

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit c2b094ffbc8ace231ed53175c1c694539e3d2e2c
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sun May 6 16:41:18 2012 +1000

    s4-s3-upgrade: Max/min password age policy is in seconds, not days
    
    This cases upgraded domains to have a too-long password expiry, which in extreme
    cases can cause the KDC to misfunction.
    
    Andrew Bartlett
    
    Autobuild-User: Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date: Sun May  6 14:49:39 CEST 2012 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source4/scripting/python/samba/upgrade.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py
index 7d69306..7055d0d 100644
--- a/source4/scripting/python/samba/upgrade.py
+++ b/source4/scripting/python/samba/upgrade.py
@@ -60,7 +60,7 @@ def import_sam_policy(samdb, policy, logger):
         ldb.FLAG_MOD_REPLACE, 'pwdHistoryLength')
 
     min_pw_age_unix = policy['minimum password age']
-    min_pw_age_nt = int(-min_pw_age_unix * (1e7 * 60 * 60 * 24))
+    min_pw_age_nt = int(-min_pw_age_unix * (1e7))
     m['a03'] = ldb.MessageElement(str(min_pw_age_nt), ldb.FLAG_MOD_REPLACE,
         'minPwdAge')
 
@@ -68,7 +68,7 @@ def import_sam_policy(samdb, policy, logger):
     if max_pw_age_unix == -1 or max_pw_age_unix == 0:
         max_pw_age_nt = -0x8000000000000000
     else:
-        max_pw_age_nt = int(-max_pw_age_unix * (1e7 * 60 * 60 * 24))
+        max_pw_age_nt = int(-max_pw_age_unix * (1e7))
 
     m['a04'] = ldb.MessageElement(str(max_pw_age_nt), ldb.FLAG_MOD_REPLACE,
                                   'maxPwdAge')


-- 
Samba Shared Repository


More information about the samba-cvs mailing list