]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: In count_dfs_links(), Move one more use of OpenDir() -> OpenDir_nstatus()
authorJeremy Allison <jra@samba.org>
Mon, 28 Feb 2022 22:24:19 +0000 (14:24 -0800)
committerVolker Lendecke <vl@samba.org>
Wed, 2 Mar 2022 21:04:34 +0000 (21:04 +0000)
Eventually we can replace OpenDir() with OpenDir_ntatatus().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/msdfs.c

index c003b442baa50245208f1423c009a4e0e18d4d5a..3b4c51806db6f7f89c699c16da91d85799e803d0 100644 (file)
@@ -1647,8 +1647,14 @@ static size_t count_dfs_links(TALLOC_CTX *ctx,
        }
 
        /* Now enumerate all dfs links */
-       dir_hnd = OpenDir(frame, conn, smb_fname, NULL, 0);
-       if (dir_hnd == NULL) {
+       status = OpenDir_ntstatus(frame,
+                                 conn,
+                                 smb_fname,
+                                 NULL,
+                                 0,
+                                 &dir_hnd);
+       if (!NT_STATUS_IS_OK(status)) {
+               errno = map_errno_from_nt_status(status);
                goto out;
        }