1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3: smbd: Fix smbd_check_access_rights_fsp() to cope with fake/printer fsp's.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Jeremy Allison 2021-06-03 17:37:57 -07:00 committed by Ralph Boehme
parent ae5cb84fae
commit c11f25b7ea

View File

@ -287,6 +287,14 @@ NTSTATUS smbd_check_access_rights_fsp(struct files_struct *fsp,
struct security_descriptor *sd = NULL;
NTSTATUS status;
/* Cope with fake/printer fsp's. */
if (fsp->fake_file_handle != NULL || fsp->print_file != NULL) {
if ((fsp->access_mask & access_mask) != access_mask) {
return NT_STATUS_ACCESS_DENIED;
}
return NT_STATUS_OK;
}
status = SMB_VFS_FGET_NT_ACL(fsp,
(SECINFO_OWNER |
SECINFO_GROUP |