summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2022-01-24 17:32:08 +0100
committerJeremy Allison <jra@samba.org>2022-02-01 19:09:34 +0000
commitea8a653754350f7a3e28dd3c62fc1796017b125f (patch)
tree6b0b24e0b341704d3a0d538d3557fba5e632af34
parent191c15f5ef77ca3d1ea3ac0e0b6ccc3085c8735d (diff)
downloadsamba-ea8a653754350f7a3e28dd3c62fc1796017b125f.tar.gz
smbd: Make directory_has_default_posix_acl() just take "dirfsp"
conn is not referenced anymore, and we only need the files_struct Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/smbd/posix_acls.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 899e7dc3c1e..cc015079327 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -3982,12 +3982,10 @@ static int copy_access_posix_acl(connection_struct *conn,
Check for an existing default POSIX ACL on a directory.
****************************************************************************/
-static bool directory_has_default_posix_acl(connection_struct *conn,
- const struct smb_filename *smb_fname)
+static bool directory_has_default_posix_acl(struct files_struct *dirfsp)
{
- SMB_ACL_T def_acl = SMB_VFS_SYS_ACL_GET_FD(smb_fname->fsp,
- SMB_ACL_TYPE_DEFAULT,
- talloc_tos());
+ SMB_ACL_T def_acl = SMB_VFS_SYS_ACL_GET_FD(
+ dirfsp, SMB_ACL_TYPE_DEFAULT, talloc_tos());
bool has_acl = False;
SMB_ACL_ENTRY_T entry;
@@ -4011,7 +4009,7 @@ int inherit_access_posix_acl(connection_struct *conn,
const struct smb_filename *smb_fname,
mode_t mode)
{
- if (directory_has_default_posix_acl(conn, inherit_from_dir))
+ if (directory_has_default_posix_acl(inherit_from_dir->fsp))
return 0;
return copy_access_posix_acl(conn, inherit_from_dir, smb_fname, mode);