From: Jeremy Allison Date: Mon, 28 Feb 2022 22:24:19 +0000 (-0800) Subject: s3: smbd: In count_dfs_links(), Move one more use of OpenDir() -> OpenDir_nstatus() X-Git-Tag: tevent-0.12.0~589 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2aff668e1c5f31d950e30d175b9affe36bb4766f;p=thirdparty%2Fsamba.git s3: smbd: In count_dfs_links(), 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 c003b442baa..3b4c51806db 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -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; }