summaryrefslogtreecommitdiff
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
commit68b33aa61ac393c2737969f8449adce3e3096d73 (patch)
treec41c7dc3cfdaaaf35b72485e696eacf53c155e0c /source3
parent1a726b88ec74962d0317740bbdf576ddcffb52bc (diff)
downloadsamba-68b33aa61ac393c2737969f8449adce3e3096d73.tar.gz
samba-68b33aa61ac393c2737969f8449adce3e3096d73.tar.bz2
samba-68b33aa61ac393c2737969f8449adce3e3096d73.zip
s3:smb2_server: return BAD_NETWORK_NAME if the path is terminated in SMB2_TCON
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/smb2_tcon.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c
index 4992d18bcc..bf98d254e0 100644
--- a/source3/smbd/smb2_tcon.c
+++ b/source3/smbd/smb2_tcon.c
@@ -82,6 +82,14 @@ NTSTATUS smbd_smb2_request_process_tcon(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_ILLEGAL_CHARACTER);
}
+ if (in_path_buffer.length == 0) {
+ in_path_string_size = 0;
+ }
+
+ if (strlen(in_path_string) != in_path_string_size) {
+ return smbd_smb2_request_error(req, NT_STATUS_BAD_NETWORK_NAME);
+ }
+
status = smbd_smb2_tree_connect(req, in_path_string,
&out_share_type,
&out_share_flags,