connection_struct in a call to OpenDir.
JF, you fixed a similar bug in printing/nt_printing.c, I think your fix
is incorrect as global configuration files should not go through a VFS.
int master;
#ifndef HAVE_GRANTPT
static fstring line;
int master;
#ifndef HAVE_GRANTPT
static fstring line;
+ DIR *dirp;
+ struct dirent *dentry;
char *dpname;
#endif /* !HAVE_GRANTPT */
char *dpname;
#endif /* !HAVE_GRANTPT */
#else /* HAVE_GRANTPT */
fstrcpy( line, "/dev/ptyXX" );
#else /* HAVE_GRANTPT */
fstrcpy( line, "/dev/ptyXX" );
- dirp = OpenDir(NULL, "/dev", False);
+ dirp = opendir("/dev");
- while ((dpname = ReadDirName(dirp)) != NULL) {
+ while ((dentry = readdir(dirp)) != NULL) {
+ dpname = dentry->d_name;
if (strncmp(dpname, "pty", 3) == 0 && strlen(dpname) == 5) {
DEBUG(3,("pty: try to open %s, line was %s\n", dpname, line ) );
line[8] = dpname[3];
if (strncmp(dpname, "pty", 3) == 0 && strlen(dpname) == 5) {
DEBUG(3,("pty: try to open %s, line was %s\n", dpname, line ) );
line[8] = dpname[3];
DEBUG(3,("pty: opened %s\n", line ) );
line[5] = 't';
*slave = line;
DEBUG(3,("pty: opened %s\n", line ) );
line[5] = 't';
*slave = line;
#endif /* HAVE_GRANTPT */
return (-1);
}
#endif /* HAVE_GRANTPT */
return (-1);
}