From fc031baea7a9443a8a5d84119657dca7dc543779 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Mon, 27 Mar 2017 00:33:16 +0000 Subject: wrap bpf pledge code in #if BPFFILTER --- sys/kern/kern_pledge.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/kern') 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 @@ -65,6 +65,7 @@ #include #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) { -- cgit v1.2.3