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

s3: Fix bug 8102

We can't allow open with access that has been denied via the share
security descriptor

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul  5 16:21:54 CEST 2011 on sn-devel-104
This commit is contained in:
Volker Lendecke 2011-07-05 11:13:07 +02:00 committed by Stefan Metzmacher
parent 720fa46f94
commit 4deca5d728

View File

@ -76,6 +76,14 @@ NTSTATUS smbd_check_open_rights(struct connection_struct *conn,
/* Check if we have rights to open. */
NTSTATUS status;
struct security_descriptor *sd = NULL;
uint32_t rejected_share_access;
rejected_share_access = access_mask & ~(conn->share_access);
if (rejected_share_access) {
*access_granted = rejected_share_access;
return NT_STATUS_ACCESS_DENIED;
}
if ((access_mask & DELETE_ACCESS) && !lp_acl_check_permissions(SNUM(conn))) {
*access_granted = access_mask;