From 219a44ee5fff168c40c0f26b29a54453c3017674 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Sat, 17 Oct 2020 17:00:53 +0200 Subject: [PATCH] vfs_streams_depot: only assert AT_FDCWD for streams Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/modules/vfs_streams_depot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c index dca814f5df0..bd2ad48656d 100644 --- a/source3/modules/vfs_streams_depot.c +++ b/source3/modules/vfs_streams_depot.c @@ -627,11 +627,6 @@ static int streams_depot_openat(struct vfs_handle_struct *handle, NTSTATUS status; int ret = -1; - /* - * For now assert this so the below SMB_VFS_STAT() is ok. - */ - SMB_ASSERT(dirfsp->fh->fd == AT_FDCWD); - if (!is_named_stream(smb_fname)) { return SMB_VFS_NEXT_OPENAT(handle, dirfsp, @@ -641,6 +636,11 @@ static int streams_depot_openat(struct vfs_handle_struct *handle, mode); } + /* + * For now assert this so the below SMB_VFS_STAT() is ok. + */ + SMB_ASSERT(dirfsp->fh->fd == AT_FDCWD); + /* Ensure the base file still exists. */ smb_fname_base = synthetic_smb_fname(talloc_tos(), smb_fname->base_name, -- 2.47.3