summaryrefslogtreecommitdiffstats
path: root/source/smbd/chgpasswd.c
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1997-02-23 05:18:09 +0000
committerSamba Release Account <samba-bugs@samba.org>1997-02-23 05:18:09 +0000
commitd8d8a7ee00971fca7a8d079bfb547af107df35a4 (patch)
tree5638173b0f00023cc0e8f41ff0b860fdcccd7758 /source/smbd/chgpasswd.c
parent8851556da7b8795b69fa17cfd799ed328743e654 (diff)
downloadsamba-d8d8a7ee00971fca7a8d079bfb547af107df35a4.tar.gz
samba-d8d8a7ee00971fca7a8d079bfb547af107df35a4.tar.xz
samba-d8d8a7ee00971fca7a8d079bfb547af107df35a4.zip
Makefile: Added cleandir target.
chgpasswd.c: Added patch from Roland Haag <haag@think.de> 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 <rorr@csfp.csfb.com> trans2.h: Defined NT_FILE_ATTRIBUTE_NORMAL for above patch. util.c: Changes calls to gethostbyname to sys_gethostbyname. jra@cygnus.com
Diffstat (limited to 'source/smbd/chgpasswd.c')
-rw-r--r--source/smbd/chgpasswd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/smbd/chgpasswd.c b/source/smbd/chgpasswd.c
index 54b49edf13b..883ad5214a8 100644
--- a/source/smbd/chgpasswd.c
+++ b/source/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);
}