Univention Bugzilla – Attachment 9781 Details for
Bug 48362
Synchronization fails after move in UCS if ldap/base and samba4/ldap/base are different
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposal.diff
proposal.diff (text/plain), 2.24 KB, created by
Arvid Requate
on 2018-12-17 23:35:14 CET
(
hide
)
Description:
proposal.diff
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2018-12-17 23:35:14 CET
Size:
2.24 KB
patch
obsolete
>diff --git a/services/univention-s4-connector/modules/univention/s4connector/s4/__init__.py b/services/univention-s4-connector/modules/univention/s4connector/s4/__init__.py >index 6d5fb6c4d2..aa3f8d155f 100644 >--- a/services/univention-s4-connector/modules/univention/s4connector/s4/__init__.py >+++ b/services/univention-s4-connector/modules/univention/s4connector/s4/__init__.py >@@ -353,12 +353,14 @@ def samaccountname_dn_mapping(s4connector, given_object, dn_mapping_stored, ucso > newdn = unicode(result[0][0], 'utf8') > else: > s4_rdn = ldap.dn.str2dn(result[0][0])[0] >- new_s4_dn = unicode(ldap.dn.dn2str([s4_rdn] + exploded_dn[1:]), 'utf8') >- pos = new_s4_dn.lower().rfind(s4connector.lo_s4.base.lower()) >- newdn = new_s4_dn[:pos] + s4connector.lo.base >+ tmp_dn_string = unicode(ldap.dn.dn2str([s4_rdn] + exploded_dn[1:]), 'utf8') >+ pos = tmp_dn_string.lower().rfind(s4connector.lo.base.lower()) >+ newdn = tmp_dn_string[:pos] + s4connector.lo_s4.base > else: > newdn_rdn = [('cn', fst_rdn_value_utf8, ldap.AVA_STRING)] >- newdn = unicode(ldap.dn.dn2str([newdn_rdn] + exploded_dn[1:]), 'utf8') # new object, don't need to change >+ tmp_dn_string = unicode(ldap.dn.dn2str([newdn_rdn] + exploded_dn[1:]), 'utf8') # new object, don't need to change >+ pos = tmp_dn_string.lower().rfind(s4connector.lo.base.lower()) >+ newdn = tmp_dn_string[:pos] + s4connector.lo_s4.base > ud.debug(ud.LDAP, ud.INFO, "samaccount_dn_mapping: newdn: %s" % newdn) > else: > # get the object to read the sAMAccountName in S4 and use it as name >@@ -408,7 +410,9 @@ def samaccountname_dn_mapping(s4connector, given_object, dn_mapping_stored, ucso > else: > newdn_rdn = [(ucsattrib, unicode_to_utf8(samaccountname), ldap.AVA_STRING)] > >- newdn = unicode(ldap.dn.dn2str([newdn_rdn] + exploded_dn[1:]), 'utf8') # guess the old dn >+ tmp_dn_string = unicode(ldap.dn.dn2str([newdn_rdn] + exploded_dn[1:]), 'utf8') # guess the old dn >+ pos = tmp_dn_string.lower().rfind(s4connector.lo_s4.base.lower()) >+ newdn = tmp_dn_string[:pos] + s4connector.lo.base > try: > ud.debug(ud.LDAP, ud.INFO, "samaccount_dn_mapping: newdn for key %s:" % dn_key) > ud.debug(ud.LDAP, ud.INFO, "samaccount_dn_mapping: olddn: %s" % dn)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 48362
:
9780
| 9781