summaryrefslogtreecommitdiffstats
path: root/source3/smbd/open.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-09-20 12:32:10 -0700
committerJeremy Allison <jra@samba.org>2012-09-25 03:07:50 +0200
commitaef862c7b0f9c4c00f08f57f04d3ccdd859b5b18 (patch)
treec3f2403fb559bbb211c27af09c4e0dc361feecd4 /source3/smbd/open.c
parentf240a4c2e7e5b05f91ae728334a9aadb4e97351f (diff)
downloadsamba-aef862c7b0f9c4c00f08f57f04d3ccdd859b5b18.tar.gz
samba-aef862c7b0f9c4c00f08f57f04d3ccdd859b5b18.tar.xz
samba-aef862c7b0f9c4c00f08f57f04d3ccdd859b5b18.zip
Fix bug #9189 - SMB2 Create doesn't return correct MAX ACCESS access mask in blob.
If we aren't already granted DELETE access, check if we have DELETE_CHILD in the containing directory.
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r--source3/smbd/open.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index a06a9f2520..73127075bb 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1714,6 +1714,13 @@ static NTSTATUS smbd_calculate_maximum_allowed_access(
return NT_STATUS_ACCESS_DENIED;
}
*p_access_mask = (access_granted | FILE_READ_ATTRIBUTES);
+
+ if (!(access_granted & DELETE_ACCESS)) {
+ if (can_delete_file_in_directory(conn, smb_fname)) {
+ *p_access_mask |= DELETE_ACCESS;
+ }
+ }
+
return NT_STATUS_OK;
}