diff options
author | John Denker <jsd@av8n.com> | 2012-07-14 12:03:16 -0700 |
---|---|---|
committer | John Denker <jsd@av8n.com> | 2012-07-14 12:03:16 -0700 |
commit | 1177b12fbc82bfa0aef3ebd761bd4d715dd72cbd (patch) | |
tree | f12536ff677ad47aeefdff4c3884b7f62fdc92d3 /qmail-smtpd.c | |
parent | 19c9ac3977e552670733e119b4cd7d5143da3789 (diff) |
fix bug in auth patch: it was re-assigning stderr,
thereby causing log messages to go astray and break the stmp protocol
Diffstat (limited to 'qmail-smtpd.c')
-rw-r--r-- | qmail-smtpd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qmail-smtpd.c b/qmail-smtpd.c index 90f62d9..0ec6fe9 100644 --- a/qmail-smtpd.c +++ b/qmail-smtpd.c @@ -490,13 +490,15 @@ int authenticate(void) if (!stralloc_0(&pass)) die_nomem(); if (!stralloc_0(&resp)) die_nomem(); - if (fd_copy(2,1) == -1) return err_pipe(); if (pipe(pi) == -1) return err_pipe(); switch(child = fork()) { case -1: return err_fork(); case 0: close(pi[1]); +//xx Not sure why this fd_copy is helpful; +//xx why not let checkpasswd talk to the logfile via stderr? +//xx if (fd_copy(2,1) == -1) _exit(1); if (0 > fd_copy(3,pi[0])) _exit(1); sig_pipedefault(); execvp(*childargs, childargs); |