From: Ralph Boehme Date: Sat, 17 Oct 2020 14:59:55 +0000 (+0200) Subject: vfs_streams_xattr: only assert AT_FDCWD for streams X-Git-Tag: talloc-2.3.2~147 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac45ce0227d0bdc704b95f650b57da0bdb651251;p=thirdparty%2Fsamba.git vfs_streams_xattr: only assert AT_FDCWD for streams Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index 13ea46b0806..2f786327835 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -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)) {