]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/rpc_server/dfs: fix creating a DFS link
authorRalph Boehme <slow@samba.org>
Thu, 14 Aug 2025 17:20:02 +0000 (19:20 +0200)
committerJule Anger <janger@samba.org>
Thu, 11 Sep 2025 10:07:08 +0000 (10:07 +0000)
If there's no existing link, get_referred_path() returns NT_STATUS_OBJECT_PATH_NOT_FOUND.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15843

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 2cb2991ccdd5d4f63e4c5b3ccc4454a6b39d6afe)

source3/rpc_server/dfs/srv_dfs_nt.c

index 8eaa59a8b0e033f9947bb153c90e884c483c0c1d..d8aeb76a1fb8c6db7b1b1adca4bdad2b8ddea335 100644 (file)
@@ -97,7 +97,9 @@ 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)) {
+       if(!NT_STATUS_IS_OK(status) &&
+          !NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_PATH_NOT_FOUND))
+       {
                return ntstatus_to_werror(status);
        }