summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-06 14:14:52 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-07 10:38:08 +0200
commit1bc93c2605e14104237bb100db1d8acb1e7fe389 (patch)
tree3e61a57c080a5c921dfcb50223bbf2a6ae8c62b3 /source3
parent68b33aa61ac393c2737969f8449adce3e3096d73 (diff)
downloadsamba-1bc93c2605e14104237bb100db1d8acb1e7fe389.tar.gz
samba-1bc93c2605e14104237bb100db1d8acb1e7fe389.tar.xz
samba-1bc93c2605e14104237bb100db1d8acb1e7fe389.zip
s3:smb2_server: return OBJECT_NAME_INVALID if the path is terminated in SMB2_CREATE
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/smb2_create.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index 2cdc8b55fe1..fad80a21c17 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -212,6 +212,14 @@ NTSTATUS smbd_smb2_request_process_create(struct smbd_smb2_request *smb2req)
return smbd_smb2_request_error(smb2req, NT_STATUS_ILLEGAL_CHARACTER);
}
+ if (in_name_buffer.length == 0) {
+ in_name_string_size = 0;
+ }
+
+ if (strlen(in_name_string) != in_name_string_size) {
+ return smbd_smb2_request_error(smb2req, NT_STATUS_OBJECT_NAME_INVALID);
+ }
+
ZERO_STRUCT(in_context_blobs);
status = smb2_create_blob_parse(smb2req, in_context_buffer, &in_context_blobs);
if (!NT_STATUS_IS_OK(status)) {