summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2021-06-22 17:31:41 -0700
committerRalph Boehme <slow@samba.org>2021-06-25 15:53:31 +0000
commit4670cf1da6feb7e7316db42079ce43ff22f7015e (patch)
tree736cb307ff2b148b719dffbd5d4f091950b1d1be /source3
parent2dd7ac6a6eb88443a44564ad12799f05e8be764c (diff)
downloadsamba-4670cf1da6feb7e7316db42079ce43ff22f7015e.tar.gz
s3: smbd: Temporarily add protection to get_ea_value() for fsp==NULL and smb_fname==NULL.
This will go away once get_ea_value() is fully handle-based and renamed to get_ea_value_fsp(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/trans2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 5c4f60821c9..40391a4a9c1 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -245,6 +245,14 @@ NTSTATUS get_ea_value(TALLOC_CTX *mem_ctx,
if (fsp) {
sizeret = SMB_VFS_FGETXATTR(fsp, ea_name, val, attr_size);
} else {
+ if (smb_fname == NULL) {
+ /*
+ * fsp == NULL and smb_fname == NULL.
+ * This check will go away once get_ea_value()
+ * is completely fsp-based.
+ */
+ return NT_STATUS_INVALID_HANDLE;
+ }
sizeret = SMB_VFS_GETXATTR(conn, smb_fname,
ea_name, val, attr_size);
}