BUG: https://bugzilla.samba.org/show_bug.cgi?id=12496
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
}
if (dirp->dir == NULL) {
- /* FDOPENDIR didn't work. Use OPENDIR instead. */
- dirp->dir = SMB_VFS_OPENDIR(conn, dirp->dir_path, mask, attr);
- }
-
- if (!dirp->dir) {
- DEBUG(5,("OpenDir_fsp: Can't open %s. %s\n", dirp->dir_path,
- strerror(errno) ));
- goto fail;
+ /* FDOPENDIR is not supported. Use OPENDIR instead. */
+ TALLOC_FREE(dirp);
+ return open_dir_safely(mem_ctx,
+ conn,
+ fsp->fsp_name->base_name,
+ mask,
+ attr);
}
if (sconn && !sconn->using_smb2) {