The branch, v4-21-test has been updated
       via  bf3c99e70f6 Revert "s3/rpc_server/dfs: fix creating a DFS link"
       via  22ac145743a Revert "vfs_xattr_tdb: fix dangling symlink detection"
       via  fbdc6c6da73 Revert "pylibsmb: add SMB2_FIND_ID_BOTH_DIRECTORY_INFO"
       via  a3d7a2a82a2 Revert "python/tests: also populate self.server in 
calls LibsmbTests setup()"
       via  8755a16858b Revert "CI: add Python test 
samba.tests.dcerpc.dfs.DfsTests.test_dfs_reparse_tag"
       via  1f0bdf8873a Revert "smbd: return correct reparse tag DFS when 
listing directories"
      from  13587f415c9 VERSION: Bump version up to Samba 4.21.10...

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-21-test


- Log -----------------------------------------------------------------
commit bf3c99e70f65023e7fb548d0f3c10bf9807bb8eb
Author: Jule Anger <[email protected]>
Date:   Wed Oct 15 15:33:03 2025 +0200

    Revert "s3/rpc_server/dfs: fix creating a DFS link"
    
    This reverts commit a2ad8f49cfe0039b67300243e6033613b5301df5.
    
    Pushed incorrectly.
    
    Signed-off-by: Jule Anger <[email protected]>
    
    Autobuild-User(v4-21-test): Jule Anger <[email protected]>
    Autobuild-Date(v4-21-test): Wed Oct 15 15:07:02 UTC 2025 on atb-devel-224

commit 22ac145743a0ffd2e4a584836b693a0a68b4a47d
Author: Jule Anger <[email protected]>
Date:   Wed Oct 15 15:32:41 2025 +0200

    Revert "vfs_xattr_tdb: fix dangling symlink detection"
    
    This reverts commit 2de3b8ec09cf3dcd6d17ccf5b025477b338f51cc.
    
    Pushed incorrectly.
    
    Signed-off-by: Jule Anger <[email protected]>

commit fbdc6c6da73f3e411d2a26737650b1167c7d0a4c
Author: Jule Anger <[email protected]>
Date:   Wed Oct 15 15:32:31 2025 +0200

    Revert "pylibsmb: add SMB2_FIND_ID_BOTH_DIRECTORY_INFO"
    
    This reverts commit 3c7b596f1bbf26f5378446391e1c1f6dcd4bc912.
    
    Pushed incorrectly.
    
    Signed-off-by: Jule Anger <[email protected]>

commit a3d7a2a82a2873c01d73f79ecd3e34e4f16faa20
Author: Jule Anger <[email protected]>
Date:   Wed Oct 15 15:32:03 2025 +0200

    Revert "python/tests: also populate self.server in calls LibsmbTests 
setup()"
    
    This reverts commit 327fd68521380aa55b7407ad1189612024756384.
    
    Pushed incorrectly.
    
    Signed-off-by: Jule Anger <[email protected]>

commit 8755a16858b317f3de812788e4349961474182e1
Author: Jule Anger <[email protected]>
Date:   Wed Oct 15 15:31:50 2025 +0200

    Revert "CI: add Python test 
samba.tests.dcerpc.dfs.DfsTests.test_dfs_reparse_tag"
    
    This reverts commit c9f671230717754912cbdc77ee262bb5afa5ffc6.
    
    Pushed incorrectly.
    
    Signed-off-by: Jule Anger <[email protected]>

commit 1f0bdf8873a568dc68b3ffd9a035c41ff420dbd1
Author: Jule Anger <[email protected]>
Date:   Wed Oct 15 15:31:31 2025 +0200

    Revert "smbd: return correct reparse tag DFS when listing directories"
    
    This reverts commit a200d4720ee4dd8f26753436a63ccb58c7c1f0f0.
    
    Pushed incorrectly.
    
    Signed-off-by: Jule Anger <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 python/samba/tests/dcerpc/dfs.py    | 48 -------------------------------------
 python/samba/tests/libsmb.py        |  1 -
 source3/libsmb/pylibsmb.c           |  1 -
 source3/modules/vfs_xattr_tdb.c     | 13 +++++-----
 source3/rpc_server/dfs/srv_dfs_nt.c |  4 +---
 source3/smbd/dir.c                  |  2 --
 source4/selftest/tests.py           |  1 -
 7 files changed, 8 insertions(+), 62 deletions(-)
 delete mode 100644 python/samba/tests/dcerpc/dfs.py


Changeset truncated at 500 lines:

diff --git a/python/samba/tests/dcerpc/dfs.py b/python/samba/tests/dcerpc/dfs.py
deleted file mode 100644
index 0fcce324e55..00000000000
--- a/python/samba/tests/dcerpc/dfs.py
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# Unix SMB/CIFS implementation.
-# Copyright Ralph Boehme <[email protected]> 2025
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-"""Tests for samba.dcerpc.dfs"""
-
-import os
-import logging
-import samba
-from samba.dcerpc import dfs
-from samba.tests import RpcInterfaceTestCase
-from samba.logger import get_samba_logger
-from samba.credentials import Credentials
-from samba.samba3 import libsmb_samba_internal as libsmb
-import samba.tests.libsmb
-from samba.samba3 import param as s3param
-
-logger = get_samba_logger(name=__name__)
-
-class DfsTests(samba.tests.libsmb.LibsmbTests):
-    def setUp(self):
-        super().setUp()
-        self.dfs = dfs.netdfs('ncacn_np:%s[/pipe/netdfs]' % self.server, 
self.lp, self.creds)
-        self.c = libsmb.Conn(self.server_ip, "msdfs-share", self.lp, 
self.creds)
-
-    def tearDown(self):
-        super().tearDown()
-
-    def test_dfs_reparse_tag(self):
-        self.dfs.Add('\\\\%s\\msdfs-share\\dfslink' % self.server, 
self.server, 'tmp', 'comment', 0)
-        l = self.c.list('', info_level=libsmb.SMB2_FIND_ID_BOTH_DIRECTORY_INFO)
-        files = {i['name']: i for i in l}
-        self.assertEqual(files['dfslink']['reparse_tag'], 
libsmb.IO_REPARSE_TAG_DFS)
-        self.dfs.Remove('\\\\%s\\msdfs-share\\dfslink' % self.server, 
self.server, 'tmp')
diff --git a/python/samba/tests/libsmb.py b/python/samba/tests/libsmb.py
index 11564d44b65..cb632d0e3a7 100644
--- a/python/samba/tests/libsmb.py
+++ b/python/samba/tests/libsmb.py
@@ -42,7 +42,6 @@ class LibsmbTests(samba.tests.TestCase):
         server_conf_dir = os.path.dirname(server_conf)
         self.global_inject = os.path.join(server_conf_dir, 
"global_inject.conf")
 
-        self.server = samba.tests.env_get_var_value("SERVER")
         self.server_ip = samba.tests.env_get_var_value("SERVER_IP")
 
     def clean_file(self, conn, filename):
diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c
index f41c18e8983..8dbef93834b 100644
--- a/source3/libsmb/pylibsmb.c
+++ b/source3/libsmb/pylibsmb.c
@@ -3140,7 +3140,6 @@ MODULE_INIT_FUNC(libsmb_samba_cwrapper)
        ADD_STRING(SMB2_CREATE_TAG_APP_INSTANCE_ID);
        ADD_STRING(SVHDX_OPEN_DEVICE_CONTEXT);
        ADD_STRING(SMB2_CREATE_TAG_POSIX);
-       ADD_FLAGS(SMB2_FIND_ID_BOTH_DIRECTORY_INFO);
        ADD_FLAGS(SMB2_FIND_POSIX_INFORMATION);
        ADD_FLAGS(FILE_SUPERSEDE);
        ADD_FLAGS(FILE_OPEN);
diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c
index 19331d0de4f..447d868924d 100644
--- a/source3/modules/vfs_xattr_tdb.c
+++ b/source3/modules/vfs_xattr_tdb.c
@@ -604,12 +604,13 @@ static int xattr_tdb_unlinkat(vfs_handle_struct *handle,
        } else {
                ret = SMB_VFS_NEXT_STAT(handle, full_fname);
                if (ret == -1 && (errno == ENOENT || errno == ELOOP)) {
-                       /*
-                        * Could be trying to remove a dangling symlink.
-                        */
-                       ret = SMB_VFS_NEXT_LSTAT(handle, full_fname);
-                       if (ret == 0 && !S_ISLNK(full_fname->st.st_ex_mode)) {
-                               ret = -1;
+                       if (VALID_STAT(smb_fname->st) &&
+                                       S_ISLNK(smb_fname->st.st_ex_mode)) {
+                               /*
+                                * Original name was a link - Could be
+                                * trying to remove a dangling symlink.
+                                */
+                               ret = SMB_VFS_NEXT_LSTAT(handle, full_fname);
                        }
                }
        }
diff --git a/source3/rpc_server/dfs/srv_dfs_nt.c 
b/source3/rpc_server/dfs/srv_dfs_nt.c
index d8aeb76a1fb..8eaa59a8b0e 100644
--- a/source3/rpc_server/dfs/srv_dfs_nt.c
+++ b/source3/rpc_server/dfs/srv_dfs_nt.c
@@ -97,9 +97,7 @@ WERROR _dfs_Add(struct pipes_struct *p, struct dfs_Add *r)
                                   remote_address,
                                   local_address,
                                   jn, &consumedcnt, &self_ref);
-       if(!NT_STATUS_IS_OK(status) &&
-          !NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_PATH_NOT_FOUND))
-       {
+       if(!NT_STATUS_IS_OK(status)) {
                return ntstatus_to_werror(status);
        }
 
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index ba8164408b4..76eb5756dc8 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -640,8 +640,6 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
                        smb_fname->st.st_ex_mode = (smb_fname->st.st_ex_mode &
                                                    ~S_IFMT) |
                                                   S_IFDIR;
-                       smb_fname->fsp->fsp_name->st.st_ex_mode =
-                               smb_fname->st.st_ex_mode;
 
                        mode = dos_mode_msdfs(conn, dname, &smb_fname->st);
                        get_dosmode = false;
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index 2fd94367bbd..a77a3d8f780 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -2225,7 +2225,6 @@ planoldpythontestsuite("proclimitdc",
 
 planoldpythontestsuite("none", "samba.tests.usage")
 planpythontestsuite("fileserver", "samba.tests.dcerpc.mdssvc")
-planpythontestsuite("fileserver", "samba.tests.dcerpc.dfs")
 planoldpythontestsuite("none", "samba.tests.compression")
 planpythontestsuite("none", "samba.tests.security_descriptors")
 


-- 
Samba Shared Repository

Reply via email to