From b0d27b30311efe32475c5343bc66872a01d8b3c1 Mon Sep 17 00:00:00 2001 From: gilles Date: Tue, 13 Oct 2015 10:59:04 +0000 Subject: [PATCH] pledge() control process ok deraadt@ --- usr.sbin/smtpd/control.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 @@ -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(); -- 2.20.1