summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/open.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 976bb6fdb4..4d70603f53 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -65,6 +65,25 @@ NTSTATUS smb1_file_se_access_check(struct connection_struct *conn,
}
/****************************************************************************
+ 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.
****************************************************************************/
@@ -192,25 +211,6 @@ static NTSTATUS check_parent_access(struct connection_struct *conn,
}
/****************************************************************************
- 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.
****************************************************************************/