From 18df3aedb9dc0b7af0cc4046efb23026708f5d71 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 26 Oct 2011 14:47:52 -0700 Subject: Move parent_override_delete() to before I need to use it. --- source3/smbd/open.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'source3/smbd/open.c') 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 @@ -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. ****************************************************************************/ -- cgit