Univention Bugzilla – Bug 47013
Rejects for non-ascii Samba/AD accounts are not handled properly due to sqlite encoding problem
Last modified: 2018-06-06 16:16:30 CEST
During QA for Bug 45779 we found that the S4-Connector cannot save a reject for a DN Samba/AD that contains non-ascii characters. Bug #44369 just fixed this for UCS DNs. To test this I simply created and artificial reject by adding a "raise ValueError" to the method univention.s4connector.ucs.sync_to_ucs and then I created an umlaut user in Samba: samba-tool user create üser1 Univention.1 Then I get this error in connector-s4.log: 15.05.2018 18:25:21,114 LDAP (WARNING): sync to ucs was not successfull, save rejected 15.05.2018 18:25:21,115 LDAP (WARNING): object was: CN=üser1,CN=Users,DC=ar41i1,DC=qa 15.05.2018 18:25:21,115 LDAP (ERROR ): 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 t hat you instead just switch your application to Unicode strings. +++ This bug was initially created as a clone of Bug #44369 +++
Felix found a simpler way to generate a reject without patching the python code: root@master10:~# samba-tool user create sc௸ Univention.1 User 'sc௸' created successfully
univention-s4-connector 01447fb6ce571689c207932dd87c2f6af70b17da yaml bb2eef9e83f73321a785f0ff4ff9fd45d6540a9e
Ok, works: ============================================================== root@master10:~# samba-tool user create sd௸ Univention.1 User 'sd௸' created successfully root@master10:~# univention-s4connector-list-rejected UCS rejected S4 rejected 1: S4 DN: CN=sd௸,CN=Users,DC=ar41i1,DC=qa UCS DN: <not found> ============================================================== Advisory is good too.
<http://errata.software-univention.de/ucs/4.3/103.html>