diff --git a/source3/smbd/open.c b/source3/smbd/open.c index b1d90412bf1..fc15e66ea0a 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -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 |