Managing DNs in libads only in utf8

simo idra at
Tue Feb 27 14:21:25 GMT 2007

On Tue, 2007-02-27 at 15:06 +0100, Volker Lendecke wrote:
> On Tue, Feb 27, 2007 at 08:54:29AM -0500, simo wrote:
> > If everybody agrees I will proceed in converting the code to use
> > something like:
> As this is going to be a significantly large patch, can you
> do it in a bzr tree where we can see the history of it? I
> would propose to start converting the low-level wrappers
> around the LDAP functions that take DNs, provide CH_UNIX
> wrappers and test this. Then the callers can be step by step
> converted.

I don't think it will be much larger than the current patch.
And I'd rather not provide CH_UNIX wrappers, or we would find people
doing again the same mistake of using them because easier and end up
again with a utf8->locale->utf8 conversion of a DN that breaks

By forcing people to think DNs are only utf8 we make it difficult to
make mistakes.
Also I will need to provide an escaping function for DN components, as
right now we don't escape components that embed invalid characters like
',' or '=' and this can cause other problems (In windows you can have a
user name joe with a DN of CN=joe\,smith,CN=Users, ... etc. We must
escape the ',' in joe,smith or we will just fail any query that uses
such DN.

> Doing it in one huge lump would make review much harder than
> necessary.

I can certainly make it in a bzr tree if people prefer I do it this way.

If I get another ack, I will take the challenge.


Simo Sorce
Samba Team GPL Compliance Officer
email: idra at

More information about the samba-technical mailing list