View | Details | Raw Unified | Return to bug 47391 | Differences between
and this patch

Collapse All | Expand All

(-)a/services/univention-s4-connector/modules/univention/s4connector/s4/password.py (-4 / +13 lines)
 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:
(-)a/test/ucs-ec2-tools (-1 / +1 lines)
Line 1    Link Here 
1
Subproject commit 755b752d461b62ba29666294762e04f00ea9a74f
1
Subproject commit 0b31100265e08b4af576f53ceb9d6b0899cb2f17

Return to bug 47391