From: Mark Wooding Date: Thu, 16 Mar 2006 23:01:38 +0000 (+0000) Subject: addrcheck: Don't spew userv error messages at SMTP clients. X-Git-Tag: mdw/1.03-5^2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/qmail/commitdiff_plain/5373b260c0d8b51ad88c73a4d81017db03e5a998 addrcheck: Don't spew userv error messages at SMTP clients. They don't like it. Whose stupid idea was it to send stderr to the socket in inetd anyway? --- diff --git a/addrcheck.c b/addrcheck.c index 496c5dd..0b189a7 100644 --- a/addrcheck.c +++ b/addrcheck.c @@ -5,6 +5,7 @@ #include "addrcheck.h" #include #include +#include /* #define DEBUG */ #ifdef DEBUG @@ -131,9 +132,10 @@ static int localprobe(int cdb, const char *sender, if (pipe(p) || (kid = fork()) == -1) return (-1); if (!kid) { + close(0); open("/dev/null", O_RDONLY); dup2(p[1], 1); - close(p[0]); - close(p[1]); + close(2); open("/dev/null", O_WRONLY); + close(p[0]); close(p[1]); execl("/usr/bin/userv", "/usr/bin/userv", "-f", "stdin=/dev/null", u.s, serv.s,