summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-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;
}