CVS update: samba/source/rpcclient
Andrew Bartlett
abartlet at samba.org
Sat Jan 18 13:52:42 EST 2003
On Sat, 2003-01-18 at 09:47, tridge at samba.org 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 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team abartlet at samba.org
Student Network Administrator, Hawker College abartlet at hawkerc.net
http://samba.org http://build.samba.org http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-cvs/attachments/20030118/27ed4519/attachment.bin
More information about the samba-cvs
mailing list