]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: get_ea_value(). If we have an fsp, *always* use it for SMB_VFS_FGETXATTR().
authorJeremy Allison <jra@samba.org>
Tue, 22 Jun 2021 18:26:59 +0000 (11:26 -0700)
committerRalph Boehme <slow@samba.org>
Fri, 25 Jun 2021 15:53:31 +0000 (15:53 +0000)
If the underlying fd is -1, we want this to fail with EBADF.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/trans2.c

index 23c13da4c581cfc355299c75847efa048a610ea7..5c4f60821c9670bb18d8d318335ab63303a481c5 100644 (file)
@@ -242,7 +242,7 @@ NTSTATUS get_ea_value(TALLOC_CTX *mem_ctx,
                return NT_STATUS_NO_MEMORY;
        }
 
-       if (fsp && !fsp->fsp_flags.is_pathref && fsp_get_io_fd(fsp) != -1) {
+       if (fsp) {
                sizeret = SMB_VFS_FGETXATTR(fsp, ea_name, val, attr_size);
        } else {
                sizeret = SMB_VFS_GETXATTR(conn, smb_fname,