summaryrefslogtreecommitdiff
path: root/source4/libcli/smb2
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-09-07 12:06:36 +0200
committerStefan Metzmacher <metze@samba.org>2012-09-19 21:21:37 +0200
commita397c8516467b83d7e2cb5b4a15dea26798786d5 (patch)
tree7bf2fcf604e0155ea3fe66c90d3fc826dd3d9cc2 /source4/libcli/smb2
parent562719f75f9868d13f4838b36cc263ef5d3541b1 (diff)
downloadsamba-a397c8516467b83d7e2cb5b4a15dea26798786d5.tar.gz
samba-a397c8516467b83d7e2cb5b4a15dea26798786d5.tar.bz2
samba-a397c8516467b83d7e2cb5b4a15dea26798786d5.zip
s4:libci: add a SMB2_CREATE_APP_INSTANCE_ID blob to the request if the in.app_instance_id is present
Diffstat (limited to 'source4/libcli/smb2')
-rw-r--r--source4/libcli/smb2/create.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/source4/libcli/smb2/create.c b/source4/libcli/smb2/create.c
index c8424dc482..db9abbee69 100644
--- a/source4/libcli/smb2/create.c
+++ b/source4/libcli/smb2/create.c
@@ -226,6 +226,31 @@ struct smb2_request *smb2_create_send(struct smb2_tree *tree, struct smb2_create
}
}
+ if (io->in.app_instance_id) {
+ uint8_t data[20];
+ DATA_BLOB guid_blob;
+
+ SSVAL(data, 0, 20); /* structure size */
+ SSVAL(data, 2, 0); /* reserved */
+
+ status = GUID_to_ndr_blob(io->in.app_instance_id,
+ req, /* TALLOC_CTX */
+ &guid_blob);
+ if (!NT_STATUS_IS_OK(status)) {
+ talloc_free(req);
+ return NULL;
+ }
+ memcpy(data+4, guid_blob.data, 16);
+
+ status = smb2_create_blob_add(req, &blobs,
+ SMB2_CREATE_TAG_APP_INSTANCE_ID,
+ data_blob_const(data, 20));
+ if (!NT_STATUS_IS_OK(status)) {
+ talloc_free(req);
+ return NULL;
+ }
+ }
+
/* and any custom blobs */
for (i=0;i<io->in.blobs.num_blobs;i++) {
status = smb2_create_blob_add(req, &blobs,