diff options
author | rob <rob@cvs.openbsd.org> | 2017-08-12 04:29:58 +0000 |
---|---|---|
committer | rob <rob@cvs.openbsd.org> | 2017-08-12 04:29:58 +0000 |
commit | d4219bc7fdb4080940d8453b1ebe1388cddbc9c2 (patch) | |
tree | b40097fbb51cb46a609fe850ee264aa30ec7f001 /usr.sbin/snmpd/snmpd.c | |
parent | 651829018bab5677881a36e597b11d651ee60f52 (diff) |
Initial pledge for snmpd. snmpe remains unpledged. Regression tests pass.
Ok benno@, jca@.
Diffstat (limited to 'usr.sbin/snmpd/snmpd.c')
-rw-r--r-- | usr.sbin/snmpd/snmpd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/snmpd/snmpd.c b/usr.sbin/snmpd/snmpd.c index ba5661a2223..f600791618e 100644 --- a/usr.sbin/snmpd/snmpd.c +++ b/usr.sbin/snmpd/snmpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: snmpd.c,v 1.36 2017/04/04 02:37:15 millert Exp $ */ +/* $OpenBSD: snmpd.c,v 1.37 2017/08/12 04:29:57 rob Exp $ */ /* * Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org> @@ -255,6 +255,9 @@ main(int argc, char *argv[]) proc_connect(ps); + if (pledge("stdio rpath cpath dns id proc sendfd exec", NULL) == -1) + fatal("pledge"); + event_dispatch(); log_debug("%d parent exiting", getpid()); |