Univention Bugzilla – Bug 38704
sync of objects with umlaut in dn does not work
Last modified: 2015-07-02 13:27:44 CEST
+++ This bug was initially created as a clone of Bug #38614 +++ Ticket#2015061221000391 Bug #38614 introduced problems with umlauts as sqlite wants them to be unicode strings instead of bytestrings for parameter substitution to work correctly: sqlite: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings. 12.06.2015 16:47:14,707 LDAP (WARNING): sync to ucs was not successfull, save rejected 12.06.2015 16:47:14,707 LDAP (WARNING): object was: CN=Gäste,CN=Builtin,DC=custo-mer,DC=local 12.06.2015 16:47:14,707 LDAP (WARNING): sqlite: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unic ode strings. 12.06.2015 16:47:14,707 LDAP (WARNING): sqlite: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unic ode strings. 12.06.2015 16:47:14,709 LDAP (PROCESS): sync to ucs: [ group] [ modify] cn=Domänen-Admins,cn=groups,dc=custo-mer,dc=local 12.06.2015 16:47:14,728 LDAP (ERROR ): Unknown Exception during sync_to_ucs 12.06.2015 16:47:14,728 LDAP (ERROR ): Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 1440, in sync_to_ucs self._check_dn_mapping(object['dn'], premapped_s4_dn) File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 609, in _check_dn_mapping self._remove_dn_mapping(dn_ucs.lower(), dn_con_mapped.lower()) AttributeError: 'NoneType' object has no attribute 'lower' 12.06.2015 16:47:14,728 LDAP (WARNING): sync to ucs was not successfull, save rejected 12.06.2015 16:47:14,728 LDAP (WARNING): object was: CN=Domänen-Admins,CN=Users,DC=custo-mer,DC=local 12.06.2015 16:47:14,728 LDAP (WARNING): sqlite: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unic ode strings. 12.06.2015 16:47:14,729 LDAP (WARNING): sqlite: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unic ode strings. 12.06.2015 16:47:14,729 LDAP (PROCESS): sync from ucs: Resync rejected file: /var/lib/univention-connector/s4/1434099906.056564 12.06.2015 16:47:14,731 LDAP (PROCESS): sync from ucs: [ user] [ add] CN=Gast,cn=users,DC=custo-mer,DC=local 12.06.2015 16:47:14,882 LDAP (WARNING): sync failed, saved as rejected /var/lib/univention-connector/s4/1434099906.056564 12.06.2015 16:47:14,882 LDAP (WARNING): Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 801, in __sync_file_from_ucs or (not old_dn and not self.sync_from_ucs(key, object, premapped_ucs_dn, old_dn, old, new))): File "/usr/lib/pymodules/python2.7/univention/s4connector/s4/__init__.py", line 2527, in sync_from_ucs f(self, property_type, object) File "/usr/lib/pymodules/python2.7/univention/s4connector/s4/__init__.py", line 76, in primary_group_sync_from_ucs return s4connector.primary_group_sync_from_ucs(key, object) File "/usr/lib/pymodules/python2.7/univention/s4connector/s4/__init__.py", line 1297, in primary_group_sync_from_ucs s4_group_object = self._object_mapping(member_key, {'dn':ucs_group_ldap[0][0], 'attributes': ucs_group_ldap[0][1]}, 'ucs') File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 1700, in _object_mapping object[dntype] = self.dn_mapped_to_base(object[dntype], self.lo_s4.base) File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 448, in dn_mapped_to_base if dn.endswith(base): AttributeError: 'NoneType' object has no attribute 'endswith'
I've tested several umlaut scenarios - creating S4 users and groups with umlauts via samba-tools - creating UDM users and groups with umlauts It works without problems. Next, I'll try to takeover a German AD maybe it will show the error case.
I'm now able to reproduce it. It seems to happen if the primary group has an umlaut or the nested groups contain umlauts: 52_s4connector/174sync_nested_umalut_groups
(In reply to Stefan Gohmann from comment #2) > I'm now able to reproduce it. It seems to happen if the primary group has an > umlaut or the nested groups contain umlauts: > 52_s4connector/174sync_nested_umalut_groups I guess I got it now. It's a duplicate of Bug #38645. *** This bug has been marked as a duplicate of bug 38645 ***