s3: smbd: In posix_fget_nt_acl() remove the fall-back to path based operations.
authorJeremy Allison <jra@samba.org>
Tue, 14 Apr 2020 21:07:23 +0000 (14:07 -0700)
committerRalph Boehme <slow@samba.org>
Thu, 30 Apr 2020 07:33:40 +0000 (07:33 +0000)
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 <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/posix_acls.c

index 97caa47dde923eb0959a9d1124309c5333cfcf99..c7356f96736f2fdf99240e322069601390e31f1b 100644 (file)
@@ -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);