From: Jeremy Allison Date: Mon, 28 Feb 2022 22:13:04 +0000 (-0800) Subject: s3: VFS: syncops: Move one more use of OpenDir() -> OpenDir_nstatus(). X-Git-Tag: tevent-0.12.0~592 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc9439a41eea66e50ea76275c324596e26999888;p=thirdparty%2Fsamba.git s3: VFS: syncops: 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/modules/vfs_syncops.c b/source3/modules/vfs_syncops.c index 679d8b06dcb..680d59c3c22 100644 --- a/source3/modules/vfs_syncops.c +++ b/source3/modules/vfs_syncops.c @@ -77,13 +77,16 @@ static void syncops_sync_directory(connection_struct *conn, struct smb_Dir *dir_hnd = NULL; struct files_struct *dirfsp = NULL; struct smb_filename smb_dname = { .base_name = dname }; - - dir_hnd = OpenDir(talloc_tos(), - conn, - &smb_dname, - "*", - 0); - if (dir_hnd == NULL) { + NTSTATUS status; + + status = OpenDir_ntstatus(talloc_tos(), + conn, + &smb_dname, + "*", + 0, + &dir_hnd); + if (!NT_STATUS_IS_OK(status)) { + errno = map_errno_from_nt_status(status); return; }