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/snmpe.c | |
parent | 651829018bab5677881a36e597b11d651ee60f52 (diff) |
Initial pledge for snmpd. snmpe remains unpledged. Regression tests pass.
Ok benno@, jca@.
Diffstat (limited to 'usr.sbin/snmpd/snmpe.c')
-rw-r--r-- | usr.sbin/snmpd/snmpe.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/snmpd/snmpe.c b/usr.sbin/snmpd/snmpe.c index 34fe283baa5..a6be72e01ab 100644 --- a/usr.sbin/snmpd/snmpe.c +++ b/usr.sbin/snmpd/snmpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: snmpe.c,v 1.48 2017/07/27 14:04:16 gerhard Exp $ */ +/* $OpenBSD: snmpe.c,v 1.49 2017/08/12 04:29:57 rob Exp $ */ /* * Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org> @@ -105,6 +105,15 @@ snmpe_init(struct privsep *ps, struct privsep_proc *p, void *arg) snmpe_recvmsg, env); event_add(&so->s_ev, NULL); } + +#ifdef notyet + /* + * XXX Refactoring required to move illegal ioctls and sysctls. + * XXX See mps_* and if_mib in mib.c, etc. + */ + if (pledge("stdio inet route recvfd vminfo", NULL) == -1) + fatal("pledge"); +#endif } void |