From 925a98da0ce84cbfa3101834cc1aa58f2d0dc89b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 10 Jun 2014 14:41:45 -0700 Subject: [PATCH] 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 --- source3/smbd/smb2_find.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/smbd/smb2_find.c b/source3/smbd/smb2_find.c index c39a35d526c..374af93741d 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); } -- 2.11.4.GIT