s3: smbd: Reformat definition and callers of can_delete_file_in_directory().
authorJeremy Allison <jra@samba.org>
Thu, 30 Apr 2020 22:20:34 +0000 (15:20 -0700)
committerRalph Boehme <slow@samba.org>
Mon, 4 May 2020 13:55:32 +0000 (13:55 +0000)
Makes future addition of parameter easier to see.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/file_access.c
source3/smbd/open.c
source3/smbd/proto.h

index 42936478f92a2adb609638fe73875a8ab72ccb73..6c4f38b6a9cf612d8b0913b7ade8b042221fbff0 100644 (file)
@@ -33,7 +33,7 @@
 ****************************************************************************/
 
 bool can_delete_file_in_directory(connection_struct *conn,
-                                 const struct smb_filename *smb_fname)
+                       const struct smb_filename *smb_fname)
 {
        TALLOC_CTX *ctx = talloc_tos();
        struct smb_filename *smb_fname_parent = NULL;
index 8383fe1df5c90ccea0f6743bc7223b3d7d430a39..039e9f4786b2a1237b579d2f32aacec176202aed 100644 (file)
@@ -81,7 +81,9 @@ static bool parent_override_delete(connection_struct *conn,
 {
        if ((access_mask & DELETE_ACCESS) &&
                    (rejected_mask & DELETE_ACCESS) &&
-                   can_delete_file_in_directory(conn, smb_fname)) {
+                   can_delete_file_in_directory(conn,
+                               smb_fname))
+       {
                return true;
        }
        return false;
@@ -3071,7 +3073,9 @@ static NTSTATUS smbd_calculate_maximum_allowed_access(
        *p_access_mask = (access_granted | FILE_READ_ATTRIBUTES);
 
        if (!(access_granted & DELETE_ACCESS)) {
-               if (can_delete_file_in_directory(conn, smb_fname)) {
+               if (can_delete_file_in_directory(conn,
+                               smb_fname))
+               {
                        *p_access_mask |= DELETE_ACCESS;
                }
        }
index dadccf189bb1d7e75c995a6ec47eb558455d9144..5e81670b5fab99d3d6e1e32973ff9a748095ab9e 100644 (file)
@@ -331,7 +331,7 @@ void reply_openerror(struct smb_request *req, NTSTATUS status);
 /* The following definitions come from smbd/file_access.c  */
 
 bool can_delete_file_in_directory(connection_struct *conn,
-                                 const struct smb_filename *smb_fname);
+                       const struct smb_filename *smb_fname);
 bool can_write_to_file(connection_struct *conn,
                       const struct smb_filename *smb_fname);
 bool directory_has_default_acl(connection_struct *conn,