unicode filename in NTCreateAndX
Volker Lendecke
Volker.Lendecke at SerNet.DE
Wed Nov 29 06:21:37 GMT 2006
On Wed, Nov 29, 2006 at 02:26:39PM +1100, Alison Winters wrote:
> 1. What clients send UCS-2-encoded filenames?
This can be negotiated by the client (highest bit in the
flags2 field of the smb header), all clients that are
able to send ntcreate&x are able to negotiate unicode.
Unicode here means UTF-16.
> 2. How do i tell from the server side what to expect?
> (memchr(data + 51, 0, file_name_len) is kinda a lame test)
Look at that flags field.
> 3. Is it possible sometimes the first byte of the UCS-2 string is
> uninitialized? Is this one of those weird freaky alignment things?
Yes, this is alignment. This is done via some wild macro
calls from nttrans.c:576 down in charcnv.c:1193.
> 4. Is there a non-sucking way to cast a byte array input stream to a
> proper unicode string in STL?
No idea, I don't program C++. Ask Jeremy here :-)
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20061129/86422c71/attachment.bin
More information about the samba-technical
mailing list