]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: get_acl_group_bits() needs a fsp, not a name
authorVolker Lendecke <vl@samba.org>
Thu, 10 Mar 2022 18:30:28 +0000 (19:30 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 11 Mar 2022 18:22:28 +0000 (18:22 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/dosmode.c
source3/smbd/posix_acls.c
source3/smbd/proto.h

index 43bb48d38c59ebfce4212d0ae122fb20056e45dd..ad0ce63b4e8fd9a80b1caddf86ff5ffc12342f9c 100644 (file)
@@ -939,8 +939,8 @@ int file_set_dosmode(connection_struct *conn,
        unixmode = smb_fname->st.st_ex_mode;
 
        if (smb_fname->fsp != NULL) {
-               get_acl_group_bits(conn, smb_fname,
-                       &smb_fname->st.st_ex_mode);
+               get_acl_group_bits(
+                       conn, smb_fname->fsp, &smb_fname->st.st_ex_mode);
        }
 
        if (S_ISDIR(smb_fname->st.st_ex_mode))
index da3566c1cd93c567109e21fed652606cd2e85dd7..62e399ba2fbd9c827c7c7c0c1001bc073042ffcf 100644 (file)
@@ -3835,16 +3835,16 @@ NTSTATUS set_nt_acl(files_struct *fsp, uint32_t security_info_sent, const struct
  the mask bits, not the real group bits, for a file with an ACL.
 ****************************************************************************/
 
-int get_acl_group_bits( connection_struct *conn,
-                       const struct smb_filename *smb_fname,
-                       mode_t *mode )
+int get_acl_group_bits(connection_struct *conn,
+                      struct files_struct *fsp,
+                      mode_t *mode )
 {
        int entry_id = SMB_ACL_FIRST_ENTRY;
        SMB_ACL_ENTRY_T entry;
        SMB_ACL_T posix_acl;
        int result = -1;
 
-       posix_acl = SMB_VFS_SYS_ACL_GET_FD(smb_fname->fsp,
+       posix_acl = SMB_VFS_SYS_ACL_GET_FD(fsp,
                                           SMB_ACL_TYPE_ACCESS,
                                           talloc_tos());
        if (posix_acl == (SMB_ACL_T)NULL)
index 1b7e2015cac1875dffd5110a383bf840726c581d..88ab4ccf73c7625680b8ee731a653b3e74603f8d 100644 (file)
@@ -856,9 +856,9 @@ NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info,
                           struct security_descriptor **ppdesc);
 NTSTATUS try_chown(files_struct *fsp, uid_t uid, gid_t gid);
 NTSTATUS set_nt_acl(files_struct *fsp, uint32_t security_info_sent, const struct security_descriptor *psd);
-int get_acl_group_bits( connection_struct *conn,
-                       const struct smb_filename *smb_fname,
-                       mode_t *mode);
+int get_acl_group_bits(connection_struct *conn,
+                      struct files_struct *fsp,
+                      mode_t *mode);
 int inherit_access_posix_acl(connection_struct *conn,
                             struct files_struct *inherit_from_dirfsp,
                             const struct smb_filename *smb_fname,