mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
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>
This commit is contained in:
parent
ba4467ca65
commit
b297583dfd
@ -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);
|
tevent_req_nterror(req, NT_STATUS_OBJECT_NAME_INVALID);
|
||||||
return tevent_req_post(req, ev);
|
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);
|
tevent_req_nterror(req, NT_STATUS_OBJECT_NAME_INVALID);
|
||||||
return tevent_req_post(req, ev);
|
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);
|
tevent_req_nterror(req, NT_STATUS_OBJECT_NAME_INVALID);
|
||||||
return tevent_req_post(req, ev);
|
return tevent_req_post(req, ev);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user