Managing DNs in libads only in utf8

simo idra at
Tue Feb 27 18:46:48 GMT 2007

On Tue, 2007-02-27 at 12:29 -0600, Gerald (Jerry) Carter wrote:
> Hash: SHA1
> simo wrote:
> >> Your extra code is simply not needed in this
> >> case. Under what case do we not tell people
> >> to change to "unix charset = utf8" ?
> > 
> > In any case they can't ?
> > Why do we have the option at all ?
> I think Jeremy is looking for a practical example
> to justify why the code should be changed at all.

The practical example is the group membership bug I posted to this
thread with also a bug report we have in our bugzilla.

> If the change can't be justified, then the risk
> is generally not considered to be worth it.  Even
> if it is a valid academic problem.  All change has
> a risk associated with it as you know.

I know, that's why I raised a discussion here instead of just committing
a patch without raising the problem.

> So I think you have to answer Jeremy's question with
> more than a "Because we can't."  :-)  why can't we
> just say "known issue, the workaround is to set
> 'unix charset = UTF8'" ?  There's lots of interesting
> bugs besides this one :-) :-)

I'll do that after Jeremy shows he has read the thread :-)

No, just kidding, if we are providing the "unix charset" parameter I
believe we should also make things work when possible.

It is obvious we can't make miracles, if you use a KOIR set of
characters on disk and you are sent a japanese chracter in the file name
we have no choice but drop it and tell to switch to utf8 to fix such

But there are cases when we never hit the disk or any syscall, and in
these cases I don't see why we should be lazy and not fix an easily
fixable problem. The ldap DN stuff is such a thing, and using a struct
to hold the string making it evident it is not just another char * will
make it possible to use utf8 strings without easily be mistaken and mix
unix charset stuff with utf8 stuff.

I understand Jeremy may still find such patches uncomfortable, and
reject them.
I'll take the risk, being prudent is ok for me, being conservative just
for the sake of it just sucks.


Simo Sorce
Samba Team GPL Compliance Officer
email: idra at

More information about the samba-technical mailing list