]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: streams_xattr: In streams_xattr_openat() we can assume fsp->base_fsp !=...
authorJeremy Allison <jra@samba.org>
Wed, 23 Jun 2021 00:23:32 +0000 (17:23 -0700)
committerRalph Boehme <slow@samba.org>
Fri, 25 Jun 2021 15:53:31 +0000 (15:53 +0000)
It should have been opened/created by this point.

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

index 52db425615e9f98a5edd16b74be73793022eb801..a23a748884838f14391ac00fd39376d1be6f8168 100644 (file)
@@ -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);