]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: msdfs: Fix missing struct stat return on msdfs links by doing an LSTAT call.
authorJeremy Allison <jra@samba.org>
Mon, 1 Jun 2020 21:09:54 +0000 (14:09 -0700)
committerKarolin Seeger <kseeger@samba.org>
Fri, 26 Jun 2020 11:18:10 +0000 (11:18 +0000)
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

selftest/knownfail.d/msdfs-attr [deleted file]
source3/smbd/msdfs.c

diff --git a/selftest/knownfail.d/msdfs-attr b/selftest/knownfail.d/msdfs-attr
deleted file mode 100644 (file)
index a8a77ec..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-samba3.smbtorture_s3.smb2.MSDFS-ATTRIBUTE
-samba3.smbtorture_s3.smb1.MSDFS-ATTRIBUTE
-
index cc32ebc9d29682eadc974e9259d389c1e0957224..c57866f79397b922da754aef98c9c1ca2336e9e5 100644 (file)
@@ -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));
 }