]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: In form_junctions(), Move one more use of OpenDir() -> OpenDir_nstatus()
authorJeremy Allison <jra@samba.org>
Mon, 28 Feb 2022 22:25:25 +0000 (14:25 -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 3b4c51806db6f7f89c699c16da91d85799e803d0..c9969d334d1f4b45c5da4a0183b8d3f9e4726cf1 100644 (file)
@@ -1790,8 +1790,14 @@ static int form_junctions(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;
        }