From df42b0a7bcdaae96035ecb1d434a66735358fd95 Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Sun, 23 Feb 1997 05:18:09 +0000 Subject: Makefile: Added cleandir target. chgpasswd.c: Added patch from Roland Haag to allow password changes to be done more than once. loadparm.c: Added entries for the "directory mode/directory mask parameters". Changed default file mode to 644. proto.h: Added sys_gethostbyname. server.c: Added directory mode changes. system.c: Added sys_gethostbyname. trans2.c: Added NT_FILE_ATTRIBUTE_NORMAL patch from Roger Orr trans2.h: Defined NT_FILE_ATTRIBUTE_NORMAL for above patch. util.c: Changes calls to gethostbyname to sys_gethostbyname. jra@cygnus.com (This used to be commit d8d8a7ee00971fca7a8d079bfb547af107df35a4) --- source3/smbd/chgpasswd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3/smbd/chgpasswd.c') diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index 54b49edf13..883ad5214a 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -41,7 +41,7 @@ static int findpty(char **slave) #ifdef SVR4 extern char *ptsname(); #else - static char line[12] = "/dev/ptyXX"; + static char line[12]; void *dirp; char *dpname; #endif @@ -54,13 +54,17 @@ static int findpty(char **slave) return (master); } #else + strcpy( line, "/dev/ptyXX" ); + dirp = OpenDir("/dev"); if (!dirp) return(-1); while ((dpname = ReadDirName(dirp)) != NULL) { 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]; line[9] = dpname[4]; if ((master = open(line, O_RDWR)) >= 0) { + DEBUG(3,("pty: opened %s\n", line ) ); line[5] = 't'; *slave = line; CloseDir(dirp); @@ -280,7 +284,7 @@ BOOL chat_with_program(char *passwordprogram,char *name,char *chatsequence) kill(pid, SIGKILL); /* be sure to end this process */ return(False); } - if ((wpid = waitpid(pid, &wstat, 0)) < 0) { + if ((wpid = sys_waitpid(pid, &wstat, 0)) < 0) { DEBUG(3,("The process is no longer waiting!\n\n")); return(False); } -- cgit