summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2016-09-17 00:42:36 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2016-09-17 00:42:36 +0000
commit140f95ef87bd76890e44a2c94b5e5ee2bea7efd5 (patch)
treef920d021cac03fe429d8708da7d138b974f0e1b7
parent9599ba3593bae293f893b3f0f38c27a6b8b65b8a (diff)
NPF > 0 is a better test than SMALL for presence of pf.
ok deraadt
-rw-r--r--sys/kern/kern_pledge.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c
index 6de36a6d4c5..a94a9865de9 100644
--- a/sys/kern/kern_pledge.c
+++ b/sys/kern/kern_pledge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_pledge.c,v 1.182 2016/09/04 17:22:40 jsing Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.183 2016/09/17 00:42:35 tedu Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -65,6 +65,7 @@
#include <sys/pledge.h>
#include "audio.h"
+#include "pf.h"
#include "pty.h"
#if defined(__amd64__)
@@ -1211,7 +1212,7 @@ pledge_ioctl(struct proc *p, long com, struct file *fp)
}
if ((p->p_p->ps_pledge & PLEDGE_PF)) {
-#ifndef SMALL_KERNEL
+#if NPF > 0
switch (com) {
case DIOCADDRULE:
case DIOCGETSTATUS:
@@ -1231,7 +1232,7 @@ pledge_ioctl(struct proc *p, long com, struct file *fp)
return (0);
break;
}
-#endif /* !SMALL_KERNEL */
+#endif
}
if ((p->p_p->ps_pledge & PLEDGE_TTY)) {