From: Jeremy Allison Date: Mon, 28 Feb 2022 22:25:25 +0000 (-0800) Subject: s3: smbd: In form_junctions(), Move one more use of OpenDir() -> OpenDir_nstatus() X-Git-Tag: tevent-0.12.0~588 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e66be49a52e19551edea6b336fbbb46f6a97f3c7;p=thirdparty%2Fsamba.git s3: smbd: In form_junctions(), Move one more use of OpenDir() -> OpenDir_nstatus() Eventually we can replace OpenDir() with OpenDir_ntatatus(). Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke --- diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index 3b4c51806db..c9969d334d1 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -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; }