summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2015-10-13 08:09:26 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2015-10-13 08:09:26 +0000
commit768e4ad6250178b007dd8c47ed6248c270497ea6 (patch)
treed5443ec8bfe57c8692538efa5c667c9c84cce915
parentd8d345b2561a22a3a2ce6895aaf831ce4dc7ed8e (diff)
pledge("stdio") the scheduler process
-rw-r--r--usr.sbin/smtpd/scheduler.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/scheduler.c b/usr.sbin/smtpd/scheduler.c
index 539de4b83b3..171b99d3de1 100644
--- a/usr.sbin/smtpd/scheduler.c
+++ b/usr.sbin/smtpd/scheduler.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scheduler.c,v 1.48 2015/01/20 17:37:54 deraadt Exp $ */
+/* $OpenBSD: scheduler.c,v 1.49 2015/10/13 08:09:25 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -462,6 +462,10 @@ scheduler(void)
evtimer_set(&ev, scheduler_timeout, NULL);
scheduler_reset_events();
+
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
if (event_dispatch() < 0)
fatal("event_dispatch");
scheduler_shutdown();