diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-09-06 14:14:52 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-09-07 12:15:51 +0200 |
commit | 9bc4decc1cba701926fc8081c3903aac754a6f51 (patch) | |
tree | a3bf82de382598eb4d9ed12a303107d1d5c4a359 /source3/smbd | |
parent | 1bc93c2605e14104237bb100db1d8acb1e7fe389 (diff) | |
download | samba-9bc4decc1cba701926fc8081c3903aac754a6f51.tar.gz samba-9bc4decc1cba701926fc8081c3903aac754a6f51.tar.bz2 samba-9bc4decc1cba701926fc8081c3903aac754a6f51.zip |
s3:smb2_server: return OBJECT_NAME_INVALID if the path is terminated in SMB2_FIND/QUERY_DIRECTORY
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Sep 7 12:15:51 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/smb2_find.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/smb2_find.c b/source3/smbd/smb2_find.c index 8bfb45b75a..6c68810853 100644 --- a/source3/smbd/smb2_find.c +++ b/source3/smbd/smb2_find.c @@ -107,6 +107,14 @@ NTSTATUS smbd_smb2_request_process_find(struct smbd_smb2_request *req) return smbd_smb2_request_error(req, NT_STATUS_ILLEGAL_CHARACTER); } + if (in_file_name_buffer.length == 0) { + in_file_name_string_size = 0; + } + + if (strlen(in_file_name_string) != in_file_name_string_size) { + return smbd_smb2_request_error(req, NT_STATUS_OBJECT_NAME_INVALID); + } + if (req->compat_chain_fsp) { /* skip check */ } else if (in_file_id_persistent != in_file_id_volatile) { |