Architcecture for winbindd client character conversion.

simo idra at samba.org
Tue Aug 28 16:34:18 GMT 2007


On Tue, 2007-08-28 at 09:05 -0700, Jeremy Allison wrote:
> On Tue, Aug 28, 2007 at 09:59:35AM -0400, simo wrote:
> > 
> > Honestly,
> > I think it is an error we shouldn't commit.
> > 
> > The file system uses the same locale regardless of what the user sets.
> > If you use unix charset = utf8 in smbd then all files are saved in utf8
> > This means that returning the home directory in ISO8859-1 is just wrong
> > as any user that has a non-ASCII character in the name will not be able
> > to access his home directory.
> > 
> > Locale is a per-system thing, the fact that someone like to play tricks
> > setting a different locale just in some shells is not a good reason to
> > make thing break subtly.
> > 
> > People should move to utf8 system wide, or they MUST set the correct
> > unix charset parameter, anything else is just broken and will led to
> > horrible hacks and bugs IMO.
> > 
> > Please don't do this to winbindd or, at least, make it an option that is
> > very difficult to activate.
> 
> Wow - people don't seem to be getting this :-).

I think I get this perfectly well.

> Right now, on Ubuntu for example, USA English users can't
> log in with usernames that contain characters in the charset
> greater than 127.
> 
> Why ? Because the default locale is en_US, and winbindd defaults
> to unix charset of utf8.

The bug is in Ubuntu not using utf8 as their default locale or in Ubuntu
not setting unix charset = iso8859-1 in smb.conf

> When we marshall the given string from the client, we mess it
> up - we're assuming it's utf8, and it's ISO8859-1.

Yes and this is correct as winbind clients are local process, no
networking is involved and we assume unix charset _has_ to be set up
with the right value for your system if your system does not use utf8.

> If any client sets it's locale to anything other than what
> we have set in smb.conf then we break *RIGHT NOW*.

No, it's not WE that break, it's THEM, the clients are broken, or the
sysadmin not competent, or the distribution has broken defaults.
It is the same if you use nss_ldap or nis, you have to use the right
locale.

> This is clearly an unacceptable bug for winbindd.

I think it is wrong to consider this a winbindd bug.
But we can argue on this point if you want, but don't assume people do
not understand, people here simply do not agree with you, which is
different.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: idra at samba.org
http://samba.org



More information about the samba-technical mailing list