From: gilles Date: Tue, 13 Oct 2015 11:03:30 +0000 (+0000) Subject: pledge() queue process X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a539da47bd3b618cc112e6902881d3519de7bfb8;p=openbsd pledge() queue process ok deraadt@ --- diff --git a/usr.sbin/smtpd/queue.c b/usr.sbin/smtpd/queue.c index b264347fdce..66cede63e30 100644 --- a/usr.sbin/smtpd/queue.c +++ b/usr.sbin/smtpd/queue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: queue.c,v 1.166 2015/01/20 17:37:54 deraadt Exp $ */ +/* $OpenBSD: queue.c,v 1.167 2015/10/13 11:03:30 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -643,6 +643,9 @@ queue(void) tv.tv_usec = 10; evtimer_add(&ev_qload, &tv); + if (pledge("stdio rpath wpath cpath recvfd sendfd", NULL) == -1) + err(1, "pledge"); + if (event_dispatch() < 0) fatal("event_dispatch"); queue_shutdown();