summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2015-10-13 10:59:05 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2015-10-13 10:59:05 +0000
commit16bb95f6ec27b48e7a17e4d7de41643cc46a0190 (patch)
tree1fba5e6d15a082e441b661b679795f9450aeac4b /usr.sbin/smtpd
parent9d528f9d0d4617335a5b7ba7e66b66b76b4a2650 (diff)
pledge() control process
ok deraadt@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/control.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/control.c b/usr.sbin/smtpd/control.c
index 68c2b992798..362a8f9787d 100644
--- a/usr.sbin/smtpd/control.c
+++ b/usr.sbin/smtpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.105 2015/10/02 00:26:45 gilles Exp $ */
+/* $OpenBSD: control.c,v 1.106 2015/10/13 10:59:04 gilles Exp $ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
@@ -296,6 +296,9 @@ control(void)
control_listen();
+ if (pledge("stdio unix recvfd sendfd", NULL) == -1)
+ err(1, "pledge");
+
if (event_dispatch() < 0)
fatal("event_dispatch");
control_shutdown();