]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_streams_xattr: only assert AT_FDCWD for streams
authorRalph Boehme <slow@samba.org>
Sat, 17 Oct 2020 14:59:55 +0000 (16:59 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 23 Oct 2020 07:56:32 +0000 (07:56 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_streams_xattr.c

index 13ea46b080663fda952544b292606331bde7f1e7..2f786327835595f61182e372b52977ce9822758d 100644 (file)
@@ -375,11 +375,6 @@ static int streams_xattr_openat(struct vfs_handle_struct *handle,
        bool set_empty_xattr = false;
        int ret;
 
-       /*
-        * For now assert this, so the below SMB_VFS_SETXATTR() works.
-        */
-       SMB_ASSERT(dirfsp->fh->fd == AT_FDCWD);
-
        SMB_VFS_HANDLE_GET_DATA(handle, config, struct streams_xattr_config,
                                return -1);
 
@@ -395,6 +390,11 @@ static int streams_xattr_openat(struct vfs_handle_struct *handle,
                                           mode);
        }
 
+       /*
+        * For now assert this, so the below SMB_VFS_SETXATTR() works.
+        */
+       SMB_ASSERT(dirfsp->fh->fd == AT_FDCWD);
+
        status = streams_xattr_get_name(handle, talloc_tos(),
                                        smb_fname->stream_name, &xattr_name);
        if (!NT_STATUS_IS_OK(status)) {