Move parent_override_delete() to before I need to use it.
authorJeremy Allison <jra@samba.org>
Wed, 26 Oct 2011 21:47:52 +0000 (14:47 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 28 Oct 2011 19:16:42 +0000 (12:16 -0700)
source3/smbd/open.c

index 976bb6fdb407b03a7568db7b831de752632c8a64..4d70603f53eba0ce223d756ee7ab6756e75ecb88 100644 (file)
@@ -64,6 +64,25 @@ NTSTATUS smb1_file_se_access_check(struct connection_struct *conn,
                                access_granted);
 }
 
+/****************************************************************************
+ If the requester wanted DELETE_ACCESS and was only rejected because
+ the file ACL didn't include DELETE_ACCESS, see if the parent ACL
+ ovverrides this.
+****************************************************************************/
+
+static bool parent_override_delete(connection_struct *conn,
+                                       struct smb_filename *smb_fname,
+                                       uint32_t access_mask,
+                                       uint32_t rejected_mask)
+{
+       if ((access_mask & DELETE_ACCESS) &&
+                   (rejected_mask == DELETE_ACCESS) &&
+                   can_delete_file_in_directory(conn, smb_fname)) {
+               return true;
+       }
+       return false;
+}
+
 /****************************************************************************
  Check if we have open rights.
 ****************************************************************************/
@@ -191,25 +210,6 @@ static NTSTATUS check_parent_access(struct connection_struct *conn,
        return NT_STATUS_OK;
 }
 
-/****************************************************************************
- If the requester wanted DELETE_ACCESS and was only rejected because
- the file ACL didn't include DELETE_ACCESS, see if the parent ACL
- ovverrides this.
-****************************************************************************/
-
-static bool parent_override_delete(connection_struct *conn,
-                                       struct smb_filename *smb_fname,
-                                       uint32_t access_mask,
-                                       uint32_t rejected_mask)
-{
-       if ((access_mask & DELETE_ACCESS) &&
-                   (rejected_mask == DELETE_ACCESS) &&
-                   can_delete_file_in_directory(conn, smb_fname)) {
-               return true;
-       }
-       return false;
-}
-
 /****************************************************************************
  fd support routines - attempt to do a dos_open.
 ****************************************************************************/