Eventually we can replace OpenDir() with OpenDir_ntatatus().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
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;
}