struct smb2_create_blob and function smb2_create_blob_add not flexible enough

Richard Sharpe realrichardsharpe at gmail.com
Mon Oct 6 18:05:16 MDT 2014


On Mon, Oct 6, 2014 at 4:53 PM, Jeremy Allison <jra at samba.org> wrote:
> On Sun, Oct 05, 2014 at 02:09:19PM -0700, Richard Sharpe wrote:
>> On Sun, Oct 5, 2014 at 1:26 PM, Richard Sharpe
>> <realrichardsharpe at gmail.com> wrote:
>> > Hi folks,
>> >
>> > I recently found that Windows inserts Extra Create Parameters (extra
>> > info, I think we call them) into a CREATE request where the tag is a
>> > binary GUID, not the string representation of a GUID. An example
>> > capture is attached.
>> >
>> > Currenly struct smb2_create_blob does not allow for this and neither
>> > does smb2_create_blob_add.
>> >
>> > I think I need to add a tag type to both or an explicit tag length.
>> >
>> > What do people think is the best way around this?
>>
>> So, I think we should move to this model:
>>
>> --- a/libcli/smb/smb2_create_blob.h
>> +++ b/libcli/smb/smb2_create_blob.h
>> @@ -24,7 +24,7 @@
>>  #define _LIBCLI_SMB_SMB2_CREATE_BLOB_H_
>>
>>  struct smb2_create_blob {
>> -       const char *tag;
>> +       DATA_BLOB tag;
>>         DATA_BLOB data;
>>  };
>
> Yeah, that makes sense to me. Wanna create a patch ?

Yes, I will, but I will need to modify a couple of routines and write
a new create_blob creator where you pass it a blob for the tag so that
the existing code can continue to work.

Give me a couple of days. I will need to run the tests as well with
such a change.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list