diff options
author | Jeremy Allison <jra@samba.org> | 1998-08-20 19:28:37 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-08-20 19:28:37 +0000 |
commit | dc76502cd8a950f6aff84ce4eedfd9d2b30d3dcc (patch) | |
tree | 8d8aead30371fec7fa6b191468098d631a6002af /source3/smbd/chgpasswd.c | |
parent | 852519282d43d7d12c103c01ca979952f041d683 (diff) | |
download | samba-dc76502cd8a950f6aff84ce4eedfd9d2b30d3dcc.tar.gz samba-dc76502cd8a950f6aff84ce4eedfd9d2b30d3dcc.tar.xz samba-dc76502cd8a950f6aff84ce4eedfd9d2b30d3dcc.zip |
Turning on blocking locking code. NB. Blocking lock requests that are not
the head of an SMB request (ie. are part of a chain) will not be queued -
this will be fixed when we move to the new chain code. In practice, this
doesn't seem to cause much of a problem (in my admittedly limited testing)
bug a debug level zero message will be placed in the log when this
happens to help determine how real the problem is.
smbd/locking.c: New debug messages.
smbd/blocking.c: New blocking code - handles SMBlock, SMBlockread and SMBlockingX
smbd/chgpasswd.c: Fix for master fd leak.
smbd/files.c: Tidyup comment.
smbd/nttrans.c: Added fnum to debug message.
smbd/process.c: Made chain_reply() use construct_reply_common(). Added blocking
lock queue processing into idle loop.
smbd/reply.c: Added queue pushes for SMBlock, SMBlockread and SMBlockingX.
Jeremy.
(This used to be commit e1dd03ecda0bc6d7eaa31070c83774bb5679fd1b)
Diffstat (limited to 'source3/smbd/chgpasswd.c')
-rw-r--r-- | source3/smbd/chgpasswd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index bd7d28b11f2..ee6a2d14f42 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -308,6 +308,7 @@ BOOL chat_with_program(char *passwordprogram,char *name,char *chatsequence, BOOL if ((pid = fork()) < 0) { DEBUG(3,("Cannot fork() child for password change: %s",name)); + close(master); return(False); } @@ -317,6 +318,9 @@ BOOL chat_with_program(char *passwordprogram,char *name,char *chatsequence, BOOL DEBUG(3,("Child failed to change password: %s\n",name)); 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")); return(False); |