NTSTATUS status = NT_STATUS_OK;
struct smb_filename *smb_fname_dir = NULL;
TALLOC_CTX *ctx = talloc_tos();
+ int ret;
/* Split up the directory from the filename/mask. */
status = split_fname_dir_mask(ctx, smb_fname->base_name,
goto out;
}
+ ret = vfs_stat(conn, f);
+ if (ret != 0) {
+ status = map_nt_error_from_unix(errno);
+ TALLOC_FREE(dir_hnd);
+ TALLOC_FREE(frame);
+ TALLOC_FREE(talloced);
+ goto out;
+ }
+
status = openat_pathref_fsp(conn->cwd_fsp, f);
if (!NT_STATUS_IS_OK(status) &&
!NT_STATUS_EQUAL(status, NT_STATUS_STOPPED_ON_SYMLINK))