struct smb2_create_blob and function smb2_create_blob_add not flexible enough

Richard Sharpe realrichardsharpe at gmail.com
Sun Oct 5 15:09:19 MDT 2014


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;
 };

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


More information about the samba-technical mailing list