summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-09-02 17:23:41 +0000
committerJeremy Allison <jra@samba.org>1998-09-02 17:23:41 +0000
commit0067ea1b5a634db442ed8f89558dc4d43d9f3fe6 (patch)
tree0c07580e18df36d5c6dc08e22974430ac42e869d /source3/smbd
parent148691b1c5e8e93b02762757345a54c82e6fdadc (diff)
downloadsamba-0067ea1b5a634db442ed8f89558dc4d43d9f3fe6.tar.gz
samba-0067ea1b5a634db442ed8f89558dc4d43d9f3fe6.tar.bz2
samba-0067ea1b5a634db442ed8f89558dc4d43d9f3fe6.zip
Fix for PR#9497 - not waiting for child.
Jeremy. (This used to be commit e817d836bba3aaf0f732d66bc5a4383a7f7005db)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/chgpasswd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c
index aebdde6d34..c9478166c4 100644
--- a/source3/smbd/chgpasswd.c
+++ b/source3/smbd/chgpasswd.c
@@ -319,12 +319,14 @@ BOOL chat_with_program(char *passwordprogram,char *name,char *chatsequence, BOOL
kill(pid, SIGKILL); /* be sure to end this process */
}
- close(master);
-
if ((wpid = sys_waitpid(pid, &wstat, 0)) < 0) {
DEBUG(3,("The process is no longer waiting!\n\n"));
+ close(master);
return(False);
}
+
+ close(master);
+
if (pid != wpid) {
DEBUG(3,("We were waiting for the wrong process ID\n"));
return(False);