From aef862c7b0f9c4c00f08f57f04d3ccdd859b5b18 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 20 Sep 2012 12:32:10 -0700 Subject: 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. --- source3/smbd/open.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; } -- cgit