summaryrefslogtreecommitdiff
path: root/libexec/spamd
diff options
context:
space:
mode:
authorMike Frantzen <frantzen@cvs.openbsd.org>2005-05-23 21:08:44 +0000
committerMike Frantzen <frantzen@cvs.openbsd.org>2005-05-23 21:08:44 +0000
commit8816bce47efd31aa22fa883dc432a3c0d2866f7c (patch)
treec906b6643f41985aae6635d147e176f0249fd9d2 /libexec/spamd
parent033bf428c98f77525cfc55a33a05a2916c0b58b4 (diff)
have to ignore SIGPIPE in the child too or a spammer can kill spamd just by
closing the connection while we're trying to write to it
Diffstat (limited to 'libexec/spamd')
-rw-r--r--libexec/spamd/spamd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c
index fc14ff8a104..2f26d302a33 100644
--- a/libexec/spamd/spamd.c
+++ b/libexec/spamd/spamd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd.c,v 1.77 2005/04/16 14:23:35 deraadt Exp $ */
+/* $OpenBSD: spamd.c,v 1.78 2005/05/23 21:08:43 frantzen Exp $ */
/*
* Copyright (c) 2002 Theo de Raadt. All rights reserved.
@@ -1125,6 +1125,7 @@ main(int argc, char *argv[])
exit(1);
case 0:
/* child - continue */
+ signal(SIGPIPE, SIG_IGN);
grey = fdopen(greypipe[1], "w");
if (grey == NULL) {
syslog(LOG_ERR, "fdopen (%m)");