]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Fix bug #9189 - SMB2 Create doesn't return correct MAX ACCESS access mask in blob.
authorJeremy Allison <jra@samba.org>
Mon, 24 Sep 2012 23:43:12 +0000 (16:43 -0700)
committerKarolin Seeger <kseeger@samba.org>
Fri, 28 Sep 2012 06:39:14 +0000 (08:39 +0200)
If we aren't already granted DELETE access, check if we have
DELETE_CHILD in the containing directory.

source3/smbd/open.c

index 7d6a25ff2965c2995d3531eaff781502536428fb..6b94a6d24739103eff97428a1fd3d778216e0c65 100644 (file)
@@ -1410,6 +1410,12 @@ NTSTATUS smbd_calculate_access_mask(connection_struct *conn,
                                return NT_STATUS_ACCESS_DENIED;
                        }
 
+                       if (!(access_granted & DELETE_ACCESS)) {
+                               if (can_delete_file_in_directory(conn, smb_fname)) {
+                                       access_granted |= DELETE_ACCESS;
+                               }
+                       }
+
                        access_mask = access_granted;
                } else {
                        access_mask = FILE_GENERIC_ALL;