summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2017-03-27 00:33:16 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2017-03-27 00:33:16 +0000
commitfc031baea7a9443a8a5d84119657dca7dc543779 (patch)
tree9c713d1ae9f2287ef2163d01074e6948088ff655
parent43b46ecd361841f8d354af755fedc7bfacab767d (diff)
wrap bpf pledge code in #if BPFFILTER
-rw-r--r--sys/kern/kern_pledge.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c
index 2f178622df9..1fcbcefe101 100644
--- a/sys/kern/kern_pledge.c
+++ b/sys/kern/kern_pledge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_pledge.c,v 1.198 2017/03/26 22:47:45 deraadt Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.199 2017/03/27 00:33:15 deraadt Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -65,6 +65,7 @@
#include <sys/pledge.h>
#include "audio.h"
+#include "bpfilter.h"
#include "pf.h"
#include "pty.h"
@@ -1136,6 +1137,7 @@ pledge_ioctl(struct proc *p, long com, struct file *fp)
}
}
+#if BPFFILTER > 0
if ((p->p_p->ps_pledge & PLEDGE_BPF)) {
switch (com) {
case BIOCGSTATS: /* bpf: tcpdump privsep on ^C */
@@ -1145,6 +1147,7 @@ pledge_ioctl(struct proc *p, long com, struct file *fp)
break;
}
}
+#endif /* BPFFILTER > 0 */
if ((p->p_p->ps_pledge & PLEDGE_TAPE)) {
switch (com) {