]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: syncops: Move one more use of OpenDir() -> OpenDir_nstatus().
authorJeremy Allison <jra@samba.org>
Mon, 28 Feb 2022 22:13:04 +0000 (14:13 -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/modules/vfs_syncops.c

index 679d8b06dcb9b684bbcf7172ae7a242f09a7c20d..680d59c3c22ba2294458b272ede93912e5dbe8e5 100644 (file)
@@ -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;
        }