diff options
author | 2015-10-14 19:56:58 +0000 | |
---|---|---|
committer | 2015-10-14 19:56:58 +0000 | |
commit | cc2f8927c147f81657c450847cc86d0b99a90f89 (patch) | |
tree | a4c67f78cabaed5675f2ced97130535142a2e23f | |
parent | pledge() pony and lookup (diff) | |
download | wireguard-openbsd-cc2f8927c147f81657c450847cc86d0b99a90f89.tar.xz wireguard-openbsd-cc2f8927c147f81657c450847cc86d0b99a90f89.zip |
pledge() privileged process
ok deraadt@
-rw-r--r-- | usr.sbin/smtpd/smtpd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c index 4bf1af4bb86..099cd595c9c 100644 --- a/usr.sbin/smtpd/smtpd.c +++ b/usr.sbin/smtpd/smtpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.c,v 1.246 2015/10/14 09:14:11 sunil Exp $ */ +/* $OpenBSD: smtpd.c,v 1.247 2015/10/14 19:56:58 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -690,6 +690,9 @@ main(int argc, char *argv[]) purge_task(); + if (pledge("stdio rpath wpath cpath tmppath getpw sendfd proc exec", NULL) == -1) + err(1, "pledge"); + if (event_dispatch() < 0) fatal("smtpd: event_dispatch"); |