}
}
- posix_pathnames = lp_posix_pathnames();
+ posix_pathnames = (lp_posix_pathnames() ||
+ (ucf_flags & UCF_POSIX_PATHNAMES));
/*
* Strip off the stream, and add it back when we're done with the
TALLOC_CTX *mem_ctx, char **found_name)
{
struct smb_Dir *cur_dir;
- char *dname = NULL;
+ const char *dname = NULL;
+ char *talloced = NULL;
char *unmangled_name = NULL;
long curpos;
/* now scan for matching names */
curpos = 0;
- while ((dname = ReadDirName(cur_dir, &curpos, NULL))) {
+ while ((dname = ReadDirName(cur_dir, &curpos, NULL, &talloced))) {
/* Is it dot or dot dot. */
if (ISDOT(dname) || ISDOTDOT(dname)) {
- TALLOC_FREE(dname);
+ TALLOC_FREE(talloced);
continue;
}
TALLOC_FREE(cur_dir);
if (!*found_name) {
errno = ENOMEM;
- TALLOC_FREE(dname);
+ TALLOC_FREE(talloced);
return -1;
}
- TALLOC_FREE(dname);
+ TALLOC_FREE(talloced);
return 0;
}
- TALLOC_FREE(dname);
+ TALLOC_FREE(talloced);
}
TALLOC_FREE(unmangled_name);
}
if (errno != ENOENT) {
+ DEBUG(10, ("vfs_stat failed: %s\n", strerror(errno)));
status = map_nt_error_from_unix(errno);
- DEBUG(10, ("vfs_stat failed: %s\n", nt_errstr(status)));
goto fail;
}