Architcecture for winbindd client character conversion.

simo idra at samba.org
Tue Aug 28 13:59:35 GMT 2007


On Mon, 2007-08-27 at 18:30 -0700, Jeremy Allison wrote:
> Hi all,
> 
> 	Just wanted to give you a heads up that I'm working
> on an architecture for winbindd client character set conversion
> for strings crossing the client <--> winbindd boundary.
> 
> Each client will do a WINBINDD_SETLOCALE call after
> initial connection to the winbindd socket. This will
> be associated with the internal state of that fd, and
> a new type of conversion, CH_WB_CLIENT, will be used
> so we can re-use all our existing charset conversion
> code. The pointers for this conversion will be swapped
> in by an internal set_current_wb_client_charset() call
> made from the parent winbindd once the data is read
> from the client and before dispatch. Each dispatch
> function will then call a winbindd_client_str_pull()
> winbindd_client_str_push() function when reading/returning
> the data structure to the client.
> 
> These functions will be reference counted and cached
> so we're not constantly re-opening the iconv handles.
> 
> Thoughts ? Comments ?

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.

Simo.

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



More information about the samba-technical mailing list