Remove the order dependency in parent_override_delete(), just check for & not ==.
authorJeremy Allison <jra@samba.org>
Thu, 27 Oct 2011 23:48:13 +0000 (16:48 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 28 Oct 2011 19:16:42 +0000 (12:16 -0700)
source3/smbd/open.c

index 6dab55d100f7fc830aaf58e29d517fabc0823168..42edddcaf9cb9bbfa75e2a5e527850b8754370af 100644 (file)
@@ -65,7 +65,7 @@ NTSTATUS smb1_file_se_access_check(struct connection_struct *conn,
 }
 
 /****************************************************************************
- If the requester wanted DELETE_ACCESS and was only rejected because
+ If the requester wanted DELETE_ACCESS and was rejected because
  the file ACL didn't include DELETE_ACCESS, see if the parent ACL
  ovverrides this.
 ****************************************************************************/
@@ -76,7 +76,7 @@ static bool parent_override_delete(connection_struct *conn,
                                        uint32_t rejected_mask)
 {
        if ((access_mask & DELETE_ACCESS) &&
-                   (rejected_mask == DELETE_ACCESS) &&
+                   (rejected_mask & DELETE_ACCESS) &&
                    can_delete_file_in_directory(conn, smb_fname)) {
                return true;
        }