From: Jeremy Allison Date: Tue, 10 Jun 2014 21:41:45 +0000 (-0700) Subject: s3: smbd - SMB[2|3]. Ensure a \ or / can't be found anywhere in a search path, not... X-Git-Tag: samba-4.0.22~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a2f945031b685e21f99d118e2ba184587a0f4b7;p=thirdparty%2Fsamba.git 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 --- 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); }