From: Jeremy Allison Date: Wed, 23 Jun 2021 00:23:32 +0000 (-0700) Subject: s3: VFS: streams_xattr: In streams_xattr_openat() we can assume fsp->base_fsp !=... X-Git-Tag: tevent-0.11.0~168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c0594d42ebaa90b4322b9e672987bcd6315805d;p=thirdparty%2Fsamba.git s3: VFS: streams_xattr: In streams_xattr_openat() we can assume fsp->base_fsp != NULL. It should have been opened/created by this point. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index 52db425615e..a23a7488848 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -398,8 +398,12 @@ static int streams_xattr_openat(struct vfs_handle_struct *handle, goto fail; } - status = get_ea_value(talloc_tos(), handle->conn, NULL, - smb_fname, xattr_name, &ea); + status = get_ea_value(talloc_tos(), + handle->conn, + fsp->base_fsp, + NULL, + xattr_name, + &ea); DEBUG(10, ("get_ea_value returned %s\n", nt_errstr(status))); @@ -441,7 +445,7 @@ static int streams_xattr_openat(struct vfs_handle_struct *handle, DEBUG(10, ("creating or truncating attribute %s on file %s\n", xattr_name, smb_fname->base_name)); - ret = SMB_VFS_FSETXATTR(fsp->base_fsp ? fsp->base_fsp : fsp, + ret = SMB_VFS_FSETXATTR(fsp->base_fsp, xattr_name, &null, sizeof(null), flags & O_EXCL ? XATTR_CREATE : 0);