On Sat, 2003-01-18 at 09:47, [EMAIL PROTECTED] wrote: > > tridge, you're sure of what you're doing here ? > > no, and thats why I have reverted the patch until I get it sorted > out. > > I do know that nearly all the existing uses of init_unistr2() are > incorrect for many non-ascii charsets. I also am sure that it should > not be the caller that determines the length of the string as > determining the character length of a string is actually quite > expensive and very error prone so it should be done as part of the > push_*(). > > I'm currently thinking of having a 'flags' parameter, allowing the > caller to specify whether the string should be null terminated or > not. This will be similar to (or even idential to) the STR_TERMINATE > flag we already use. > > The 2nd major problem is the unihdr stuff. In all our init_*() > routines we tend to init the header before we init the unistr2. This > follows the order that the string is on the wire, but it is the wrong > order from a string handling point of view. We really should init the > header after initialising the unistr2, because the lengths in the > header are determined by the lengths in the unistr2, and we don't know > those till after we've done the push_*().
I would *love* to see this work properly - it was one of the first things I tried when started on the team, before jfm pointed out this particular problem... This is the approach I tried to take, before I vowed never to touch RPC again :-). I'm glad to leave it to much more experienced individuals than I! Andrew Bartlett -- Andrew Bartlett [EMAIL PROTECTED] Manager, Authentication Subsystems, Samba Team [EMAIL PROTECTED] Student Network Administrator, Hawker College [EMAIL PROTECTED] http://samba.org http://build.samba.org http://hawkerc.net
signature.asc
Description: This is a digitally signed message part