From b297583dfdeeaef0a9f2a0c8f22b3d22ef187c76 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 10 Jun 2014 14:41:45 -0700 Subject: 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 Reviewed-by: Volker Lendecke Reviewed-by: Ira Cooper --- 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 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); } -- cgit