summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-06-30 13:25:21 +0200
committerStefan Metzmacher <metze@samba.org>2009-07-02 09:10:57 +0200
commit99c1e4f19af9fd88c0cbb19b754c85d2aec2b99c (patch)
treed616ab570fafb123143d548004001d451ea10c26
parentd47bb0a96c8205511e622eacc88de3ec31ddeeab (diff)
downloadsamba-99c1e4f19af9fd88c0cbb19b754c85d2aec2b99c.tar.gz
samba-99c1e4f19af9fd88c0cbb19b754c85d2aec2b99c.tar.bz2
samba-99c1e4f19af9fd88c0cbb19b754c85d2aec2b99c.zip
s3:smbd: allow the offset to the path being 0 in SMB2 create
metze
-rw-r--r--source3/smbd/smb2_create.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index 578dfa7c3b..2c79077507 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -88,7 +88,9 @@ NTSTATUS smbd_smb2_request_process_create(struct smbd_smb2_request *req)
in_name_offset = SVAL(inbody, 0x2C);
in_name_length = SVAL(inbody, 0x2E);
- if (in_name_offset != (SMB2_HDR_BODY + (body_size & 0xFFFFFFFE))) {
+ if (in_name_offset == 0 && in_name_length == 0) {
+ /* This is ok */
+ } else if (in_name_offset != (SMB2_HDR_BODY + (body_size & 0xFFFFFFFE))) {
return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER);
}