From: Jeremy Allison Date: Tue, 22 Jun 2021 18:26:59 +0000 (-0700) Subject: s3: smbd: get_ea_value(). If we have an fsp, *always* use it for SMB_VFS_FGETXATTR(). X-Git-Tag: tevent-0.11.0~198 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2dd7ac6a6eb88443a44564ad12799f05e8be764c;p=thirdparty%2Fsamba.git s3: smbd: get_ea_value(). If we have an fsp, *always* use it for SMB_VFS_FGETXATTR(). If the underlying fd is -1, we want this to fail with EBADF. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 23c13da4c58..5c4f60821c9 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -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,