From: Jeremy Allison Date: Tue, 14 Apr 2020 21:07:23 +0000 (-0700) Subject: s3: smbd: In posix_fget_nt_acl() remove the fall-back to path based operations. X-Git-Tag: ldb-2.2.0~806 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7288e9a445e1bed74d6c99bdd3125ebe383bbf49;p=thirdparty%2Fsamba.git s3: smbd: In posix_fget_nt_acl() remove the fall-back to path based operations. Previously we'd do this for directory opens, but directory opens now always have an open fd. stat opens don't have permissions to read a security descriptor anyway. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 97caa47dde9..c7356f96736 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -3489,14 +3489,6 @@ NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info, DEBUG(10,("posix_fget_nt_acl: called for file %s\n", fsp_str_dbg(fsp))); - /* can it happen that fsp_name == NULL ? */ - if (fsp->fsp_flags.is_directory || fsp->fh->fd == -1) { - status = posix_get_nt_acl(fsp->conn, fsp->fsp_name, - security_info, mem_ctx, ppdesc); - TALLOC_FREE(frame); - return status; - } - /* Get the stat struct for the owner info. */ if(SMB_VFS_FSTAT(fsp, &sbuf) != 0) { TALLOC_FREE(frame);