summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2014-06-10 14:41:45 -0700
committerJeremy Allison <jra@samba.org>2014-06-11 18:47:14 +0200
commitb297583dfdeeaef0a9f2a0c8f22b3d22ef187c76 (patch)
tree70f3c48df9e388d30226ee82f798a24bd0c2212b
parentba4467ca65d5f85a2732da27d88760b684c6e30d (diff)
downloadsamba-b297583dfdeeaef0a9f2a0c8f22b3d22ef187c76.tar.gz
samba-b297583dfdeeaef0a9f2a0c8f22b3d22ef187c76.tar.xz
samba-b297583dfdeeaef0a9f2a0c8f22b3d22ef187c76.zip
s3: smbd - SMB[2|3]. Ensure a \ or / can't be found anywhere in a search path, not just at the start.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Reviewed-by: Ira Cooper <ira@samba.org>
-rw-r--r--source3/smbd/smb2_find.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/smb2_find.c b/source3/smbd/smb2_find.c
index 3f779b87ae8..d66c093a882 100644
--- a/source3/smbd/smb2_find.c
+++ b/source3/smbd/smb2_find.c
@@ -252,11 +252,11 @@ static struct tevent_req *smbd_smb2_find_send(TALLOC_CTX *mem_ctx,
tevent_req_nterror(req, NT_STATUS_OBJECT_NAME_INVALID);
return tevent_req_post(req, ev);
}
- if (strcmp(in_file_name, "\\") == 0) {
+ if (strchr_m(in_file_name, '\\') != NULL) {
tevent_req_nterror(req, NT_STATUS_OBJECT_NAME_INVALID);
return tevent_req_post(req, ev);
}
- if (strcmp(in_file_name, "/") == 0) {
+ if (strchr_m(in_file_name, '/') != NULL) {
tevent_req_nterror(req, NT_STATUS_OBJECT_NAME_INVALID);
return tevent_req_post(req, ev);
}