Download | Plain Text | Line Numbers
--- qmail-smtpd.c.orig Sat Jan 18 09:13:50 2003
+++ qmail-smtpd.c Sat Jan 18 19:51:09 2003
@@ -459,14 +459,13 @@
if (!stralloc_0(&resp)) die_nomem();
if (fd_copy(2,1) == -1) return err_pipe();
- close(3);
if (pipe(pi) == -1) return err_pipe();
- if (pi[0] != 3) return err_pipe();
switch(child = fork()) {
case -1:
return err_fork();
case 0:
close(pi[1]);
+ if (0 > fd_copy(3,pi[0])) _exit(1);
sig_pipedefault();
execvp(*childargs, childargs);
_exit(1);