diff options
author | Jeremy Allison <jra@samba.org> | 2020-06-01 14:09:54 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2020-06-26 11:18:10 +0000 |
commit | 50badbae62f51789a776cd3aa80a80d9aed1d8fe (patch) | |
tree | 31ce5f20b91c6486a6e5a874783465c1a82bfc7a | |
parent | 54d6efeb917ba8e7a69ed4b0e9c94adad1545e5d (diff) | |
download | samba-50badbae62f51789a776cd3aa80a80d9aed1d8fe.tar.gz |
s3: msdfs: Fix missing struct stat return on msdfs links by doing an LSTAT call.
This (unfortunately) re-exposes the fact the msdfs links are symlinks,
bit fixing this correctly requires a VFS ABI change which we can't
do for a released stream.
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 <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(v4-12-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-12-test): Fri Jun 26 11:18:10 UTC 2020 on sn-devel-184
-rw-r--r-- | selftest/knownfail.d/msdfs-attr | 3 | ||||
-rw-r--r-- | source3/smbd/msdfs.c | 7 |
2 files changed, 7 insertions, 3 deletions
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/smbd/msdfs.c b/source3/smbd/msdfs.c index cc32ebc9d29..c57866f7939 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -633,6 +633,13 @@ bool is_msdfs_link(connection_struct *conn, smb_fname, NULL, NULL); + if (NT_STATUS_IS_OK(status)) { + int ret; + ret = SMB_VFS_LSTAT(conn, smb_fname); + if (ret < 0) { + status = map_nt_error_from_unix(errno); + } + } return (NT_STATUS_IS_OK(status)); } |