From: Jeremy Allison Date: Sat, 30 May 2020 00:56:58 +0000 (-0700) Subject: s3: VFS: default. Ensure read_dfs_pathat() returns stat info. X-Git-Tag: ldb-2.2.0~227 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab018150e6822b0e5dd7b63e4449fe38b6b0ef01;p=thirdparty%2Fsamba.git s3: VFS: default. Ensure read_dfs_pathat() returns stat info. Remove the knownfail.d/msdfs-attr file. Everything now passes. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14391 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Wed Jun 3 06:19:21 UTC 2020 on sn-devel-184 --- diff --git a/selftest/knownfail.d/msdfs-attr b/selftest/knownfail.d/msdfs-attr deleted file mode 100644 index a8a77ec2719..00000000000 --- a/selftest/knownfail.d/msdfs-attr +++ /dev/null @@ -1,3 +0,0 @@ -samba3.smbtorture_s3.smb2.MSDFS-ATTRIBUTE -samba3.smbtorture_s3.smb1.MSDFS-ATTRIBUTE - diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index f00255914f3..a4910b4882d 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -434,9 +434,15 @@ static NTSTATUS vfswrap_read_dfs_pathat(struct vfs_handle_struct *handle, #else char link_target_buf[7]; #endif + int ret; SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp); + if (is_named_stream(smb_fname)) { + status = NT_STATUS_OBJECT_NAME_NOT_FOUND; + goto err; + } + if (ppreflist == NULL && preferral_count == NULL) { /* * We're only checking if this is a DFS @@ -485,6 +491,14 @@ static NTSTATUS vfswrap_read_dfs_pathat(struct vfs_handle_struct *handle, goto err; } + ret = sys_lstat(smb_fname->base_name, + &smb_fname->st, + lp_fake_directory_create_times(SNUM(handle->conn))); + if (ret < 0) { + status = map_nt_error_from_unix(errno); + goto err; + } + if (ppreflist == NULL && preferral_count == NULL) { /* Early return for checking if this is a DFS link. */ return NT_STATUS_OK;