summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2004-02-11 04:17:19 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2004-02-11 04:17:19 +0000
commit041e10d4f18d4810ea47db3dd48551b8eabf554b (patch)
treeab7a603564e257993696967090d91a74460cd4c1 /regress
parent0c89d46895bd14d19f67e7adcec5e033eab947df (diff)
Deal with pfctl always needing root by adding ${SUDO} where it's needed.
Diffstat (limited to 'regress')
-rw-r--r--regress/sbin/pfctl/Makefile23
1 files changed, 12 insertions, 11 deletions
diff --git a/regress/sbin/pfctl/Makefile b/regress/sbin/pfctl/Makefile
index 7810a54fa37..77860eb39f6 100644
--- a/regress/sbin/pfctl/Makefile
+++ b/regress/sbin/pfctl/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.174 2004/02/04 18:30:32 mcbride Exp $
+# $OpenBSD: Makefile,v 1.175 2004/02/11 04:17:18 mcbride Exp $
# TARGETS
# pf: feed pfNN.in through pfctl and check wether the output matches pfNN.ok
@@ -47,11 +47,11 @@ PFAIL_TARGETS+=pfail${n}
PFAIL_UPDATES+=pfail${n}-update
pfail${n}:
- pfctl -nv -f - < ${.CURDIR}/pfail${n}.in 2>&1 | \
+ ${SUDO} pfctl -nv -f - < ${.CURDIR}/pfail${n}.in 2>&1 | \
diff -u ${.CURDIR}/pfail${n}.ok /dev/stdin
pfail${n}-update:
- if pfctl -nv -f - < ${.CURDIR}/pfail${n}.in > \
+ if ${SUDO} pfctl -nv -f - < ${.CURDIR}/pfail${n}.in > \
${.CURDIR}/pfail${n}.ok 2>&1; then \
true; \
fi;
@@ -68,15 +68,15 @@ PF_TARGETS+=pf${n}
PF_UPDATES+=pf${n}-update
pf${n}:
- pfctl -nv -f - < ${.CURDIR}/pf${n}.in | \
+ ${SUDO} pfctl -nv -f - < ${.CURDIR}/pf${n}.in | \
diff -u ${.CURDIR}/pf${n}.ok /dev/stdin
pf${n}-update:
- pfctl -nv -f - < ${.CURDIR}/pf${n}.in > ${.CURDIR}/pf${n}.ok
+ ${SUDO} pfctl -nv -f - < ${.CURDIR}/pf${n}.in > ${.CURDIR}/pf${n}.ok
SELFPF_TARGETS+=selfpf${n}
selfpf${n}:
- pfctl -nv -f - < ${.CURDIR}/pf${n}.ok | \
+ ${SUDO} pfctl -nv -f - < ${.CURDIR}/pf${n}.ok | \
diff -u ${.CURDIR}/pf${n}.ok /dev/stdin
.endfor
@@ -92,7 +92,7 @@ UPDATE_TARGETS+=pf-update
PFSIMPLE_TARGETS+=pfsimple${n}
pfsimple${n}:
- pfctl -nf - < ${.CURDIR}/pfsimple${n}.in
+ ${SUDO} pfctl -nf - < ${.CURDIR}/pfsimple${n}.in
.endfor
@@ -167,12 +167,12 @@ PFOPT_TARGETS+=pfopt${n}
PFOPT_UPDATES+=pfopt${n}-update
pfopt${n}:
- pfctl -nv -f - `cat ${.CURDIR}/pfopt${n}.opts` \
+ ${SUDO} pfctl -nv -f - `cat ${.CURDIR}/pfopt${n}.opts` \
< ${.CURDIR}/pfopt${n}.in | \
diff -u ${.CURDIR}/pfopt${n}.ok /dev/stdin
pfopt${n}-update:
- pfctl -nv -f - `cat ${.CURDIR}/pfopt${n}.opts` \
+ ${SUDO} pfctl -nv -f - `cat ${.CURDIR}/pfopt${n}.opts` \
< ${.CURDIR}/pfopt${n}.in > ${.CURDIR}/pfopt${n}.ok
.endfor
@@ -188,13 +188,14 @@ PFSETUP_UPDATES+=pfsetup${n}-update
pfsetup${n}:
${SUDO} ${SHELL} ${.CURDIR}/pfsetup${n}.setup
- pfctl -nv -f - < ${.CURDIR}/pfsetup${n}.in | \
+ ${SUDO} pfctl -nv -f - < ${.CURDIR}/pfsetup${n}.in | \
diff -u ${.CURDIR}/pfsetup${n}.ok /dev/stdin
${SUDO} ${SHELL} ${.CURDIR}/pfsetup${n}.clean
pfsetup${n}-update:
${SUDO} ${SHELL} ${.CURDIR}/pfsetup${n}.setup
- pfctl -nv -f - < ${.CURDIR}/pfsetup${n}.in > ${.CURDIR}/pfsetup${n}.ok
+ ${SUDO} pfctl -nv -f - < ${.CURDIR}/pfsetup${n}.in \
+ > ${.CURDIR}/pfsetup${n}.ok
${SUDO} ${SHELL} ${.CURDIR}/pfsetup${n}.clean
.endfor