(possible) wrong UTF8 mangling in tdb / ldb

Alessandro Sappia a.sappia at ngi.it
Wed Feb 21 13:06:21 GMT 2007

Building LDB standalone makes this issue appears.
Building LDB as part of Samba4 doesn't show this issue,
as you told me by mail in private
"The issue is that, rightly or wrongly, we don't link in iconv in the
standalone build. Samba4 plugs in it's internal iconv code and
uppercase/lowercase routines. I think we should have some form of iconv
in standalone ldb..."

so, shoud the internal iconv code for samba be linked against ldb when
compiling standalone ?

btw, maybe this was discussed time ago, but why not use the system provided
iconv ? (towupper/towlover.... etc)


Andrew Bartlett ha scritto:
> On Wed, 2007-02-21 at 12:16 +0100, Alessandro Sappia wrote:
>> hi all,
>> i think there is something odd in how ldb checks utf8 fields; I attached
>> a small patch
>> to show it to you.
>> $ export LDB_URL=tdbtest.ldb
>> $ ./bin/ldbadd /path/to/samba4/source/lib/ldb/tests/test.ldif
>> Assuming that the patch is applied
>> ./bin/ldbsearch '(cn=*UTF*)'  gives you two results
>> ./bin/ldbsearch '(cn=*àèìòù*) gives you just one
>> Assuming that cn field definition maybe case sensitive or case
>> insensitive, in any case the two searches must give the same number of
>> results. Against OpenLdap these searches gives both two results.
>> * the patch contains also a simple test against it.
> Are you testing this against LDB built standalone, or as part of Samba4?
> Andrew Bartlett

Alessandro Sappia
GPG Keyserver: keyserver.linux.it

More information about the samba-technical mailing list