[MS-SMB2], 2.2.13 says: In the request, the Buffer field MUST be at least one
byte in length. Implement that for the 0-length filename without create blobs.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
return NULL;
}
+ if (((io->in.fname == NULL) || (strlen(io->in.fname) == 0)) &&
+ (blob.length == 0)) {
+ struct smb2_request_buffer *buf = &req->out;
+
+ status = smb2_grow_buffer(buf, 1);
+ if (!NT_STATUS_IS_OK(status)) {
+ talloc_free(req);
+ return NULL;
+ }
+ buf->dynamic[0] = 0;
+ buf->dynamic += 1;
+ buf->body_size += 1;
+ buf->size += 1;
+ }
+
data_blob_free(&blob);
smb2_transport_send(req);