]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Reformat uses of directory_has_default_acl().
authorJeremy Allison <jra@samba.org>
Wed, 29 Apr 2020 22:11:33 +0000 (15:11 -0700)
committerRalph Boehme <slow@samba.org>
Thu, 30 Apr 2020 07:33:41 +0000 (07:33 +0000)
Makes it easier to add a dirfsp parameter.

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

index 166fdc9feee71ed7bea9e9ea19c530fae3bcbc29..d7ddb9e0365d45e5db8475cccc5b65377922b839 100644 (file)
@@ -365,7 +365,9 @@ static int cephwrap_mkdirat(struct vfs_handle_struct *handle,
 
        if (lp_inherit_acls(SNUM(handle->conn))) {
                ok = parent_smb_fname(talloc_tos(), smb_fname, &parent, NULL);
-               if (ok && directory_has_default_acl(handle->conn, parent)) {
+               if (ok && directory_has_default_acl(handle->conn,
+                               parent))
+               {
                        mode = 0777;
                }
        }
index a739b17963aa0b939f18055fe8fc7e67bed13668..7cde6384b61bb4b5733f652380149f66090c3c60 100644 (file)
@@ -637,7 +637,9 @@ static int vfswrap_mkdirat(vfs_handle_struct *handle,
 
        if (lp_inherit_acls(SNUM(handle->conn))) {
                ok = parent_smb_fname(talloc_tos(), smb_fname, &parent, NULL);
-               if (ok && directory_has_default_acl(handle->conn, parent)) {
+               if (ok && directory_has_default_acl(handle->conn,
+                               parent))
+               {
                        mode = (0777 & lp_directory_mask(SNUM(handle->conn)));
                }
        }
index 4884301fd4ba4f135e47db32baaa66db05cab2f6..2e114e965908c3d3301a0332a42d15c8a73ada59 100644 (file)
@@ -141,7 +141,7 @@ bool can_write_to_file(connection_struct *conn,
 ****************************************************************************/
 
 bool directory_has_default_acl(connection_struct *conn,
-                              struct smb_filename *smb_fname)
+               struct smb_filename *smb_fname)
 {
        struct security_descriptor *secdesc = NULL;
        unsigned int i;
index ef20b44ea15c6f108e6fd48efad6048e2e899aca..4e35a84e1ab1c513cbb962e4b07ea4f462f664b0 100644 (file)
@@ -3592,7 +3592,9 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
         */
 
         if ((flags2 & O_CREAT) && lp_inherit_acls(SNUM(conn)) &&
-           (def_acl = directory_has_default_acl(conn, parent_dir_fname))) {
+           (def_acl = directory_has_default_acl(conn,
+                               parent_dir_fname)))
+       {
                unx_mode = (0777 & lp_create_mask(SNUM(conn)));
        }
 
index ec4134407a6c933b43f44efe871339c1552d6235..bc365206f276e8755c027c29d8a88bee76c78874 100644 (file)
@@ -335,7 +335,7 @@ bool can_delete_file_in_directory(connection_struct *conn,
 bool can_write_to_file(connection_struct *conn,
                       const struct smb_filename *smb_fname);
 bool directory_has_default_acl(connection_struct *conn,
-                              struct smb_filename *smb_fname);
+                       struct smb_filename *smb_fname);
 NTSTATUS can_set_delete_on_close(files_struct *fsp, uint32_t dosmode);
 
 /* The following definitions come from smbd/fileio.c  */