From: Volker Lendecke Date: Mon, 24 Jan 2022 16:32:08 +0000 (+0100) Subject: smbd: Make directory_has_default_posix_acl() just take "dirfsp" X-Git-Tag: tevent-0.12.0~798 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea8a653754350f7a3e28dd3c62fc1796017b125f;p=thirdparty%2Fsamba.git 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 Reviewed-by: Jeremy Allison --- 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);