git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a726b8
)
s3:smb2_server: return BAD_NETWORK_NAME if the path is terminated in SMB2_TCON
author
Stefan Metzmacher
<metze@samba.org>
Tue, 6 Sep 2011 12:14:52 +0000
(14:14 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Wed, 7 Sep 2011 08:38:08 +0000
(10:38 +0200)
metze
source3/smbd/smb2_tcon.c
patch
|
blob
|
history
diff --git
a/source3/smbd/smb2_tcon.c
b/source3/smbd/smb2_tcon.c
index 4992d18bcc4d8b0a84ab30413f827952ff8cd3b8..bf98d254e02d9368b1c6335a9726d3d22350cfd5 100644
(file)
--- 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,