Lines 809-820
def password_sync_s4_to_ucs(s4connector, key, ucs_object, modifyUserPassword=Tru
|
Link Here
|
---|
|
809 |
if pwexp_value: |
809 |
if pwexp_value: |
810 |
new_shadowMax = pwexp_value |
810 |
new_shadowMax = pwexp_value |
811 |
new_krb5end = time.strftime("%Y%m%d000000Z", time.gmtime((pwdLastSet_unix + (int(pwexp_value) * 3600 * 24)))) |
811 |
new_krb5end = time.strftime("%Y%m%d000000Z", time.gmtime((pwdLastSet_unix + (int(pwexp_value) * 3600 * 24)))) |
|
|
812 |
|
813 |
if pwdLastSet == 0: |
814 |
new_shadowMax = new_shadowMax or '1' |
815 |
if new_krb5end is None: |
816 |
expiry = long(time.time()) |
817 |
new_krb5end = time.strftime("%Y%m%d000000Z", time.gmtime(expiry)) |
818 |
|
812 |
if old_shadowMax or new_shadowMax: |
819 |
if old_shadowMax or new_shadowMax: |
813 |
ud.debug(ud.LDAP, ud.INFO, "password_sync_s4_to_ucs: update shadowMax to %s for %s" % (new_shadowMax, ucs_object['dn'])) |
820 |
if old_shadowMax != new_shadowMax: |
814 |
modlist.append(('shadowMax', old_shadowMax, new_shadowMax)) |
821 |
ud.debug(ud.LDAP, ud.INFO, "password_sync_s4_to_ucs: update shadowMax to %s for %s" % (new_shadowMax, ucs_object['dn'])) |
|
|
822 |
modlist.append(('shadowMax', old_shadowMax, new_shadowMax)) |
815 |
if old_krb5end or new_krb5end: |
823 |
if old_krb5end or new_krb5end: |
816 |
ud.debug(ud.LDAP, ud.INFO, "password_sync_s4_to_ucs: update krb5PasswordEnd to %s for %s" % (new_krb5end, ucs_object['dn'])) |
824 |
if old_krb5end != new_krb5end: |
817 |
modlist.append(('krb5PasswordEnd', old_krb5end, new_krb5end)) |
825 |
ud.debug(ud.LDAP, ud.INFO, "password_sync_s4_to_ucs: update krb5PasswordEnd to %s for %s" % (new_krb5end, ucs_object['dn'])) |
|
|
826 |
modlist.append(('krb5PasswordEnd', old_krb5end, new_krb5end)) |
818 |
|
827 |
|
819 |
if sambaPwdLastSet: |
828 |
if sambaPwdLastSet: |
820 |
if sambaPwdLastSet != newSambaPwdLastSet: |
829 |
if sambaPwdLastSet != newSambaPwdLastSet: |