summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2023-08-30 17:40:09 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2023-08-30 17:40:09 +0000
commitd669d2a0e0390385dae42c29ef4e4fa5de23cde7 (patch)
treef443ea7cbe36cea3a017f4be6be6335fcaba10cf /regress
parentd094d7d0bd2b416bcb16f0bb2c11c55145f0563d (diff)
cover failure on insecure passfiles
Diffstat (limited to 'regress')
-rw-r--r--regress/sbin/bioctl/Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/regress/sbin/bioctl/Makefile b/regress/sbin/bioctl/Makefile
index 81b726d92e4..8b76ba15a0d 100644
--- a/regress/sbin/bioctl/Makefile
+++ b/regress/sbin/bioctl/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.8 2023/08/30 17:21:40 kn Exp $
+# $OpenBSD: Makefile,v 1.9 2023/08/30 17:40:08 kn Exp $
BIOCTL ?= /sbin/bioctl
@@ -42,7 +42,7 @@ scripted-recreate-volume: detach-volume
${SUDO} ${BIOCTL} -s -Cforce -r${NROUNDS} -cC -l"$$(<${CHUNKDEVFILE})a" -- softraid0 | \
grep -o 'sd[0-9]*$$' -- 1>${VOLDEVFILE}
-reopen-volume-with-passfile: detach-volume create-passfile
+reopen-volume-with-passfile: detach-volume
${SUDO} ${BIOCTL} -p${PASSFILE} -cC -l"$$(<${CHUNKDEVFILE})a" -- softraid0 | \
grep -o 'sd[0-9]*$$' -- 1>${VOLDEVFILE}
@@ -59,6 +59,8 @@ verify-increased-rounds:
FAILURE_TESTS = reuse-active-chunk \
+ use-public-passfile \
+ use-foreign-passfile \
set-empty-passphrase
REGRESS_EXPECTED_FAILURES += ${FAILURE_TESTS}
REGRESS_TARGETS += ${FAILURE_TESTS}
@@ -67,6 +69,14 @@ REGRESS_ROOT_TARGETS += ${FAILURE_TESTS}
reuse-active-chunk:
${SUDO} ${BIOCTL} -cC -l"$$(<${CHUNKDEVFILE})a" -- softraid0
+use-public-passfile:
+ ${SUDO} chmod a=rwx ${PASSFILE}
+ ${SUDO} ${BIOCTL} -p${PASSFILE} -P -- "$$(<${VOLDEVFILE})"
+
+use-foreign-passfile:
+ ${SUDO} chown build ${PASSFILE}
+ ${SUDO} ${BIOCTL} -p${PASSFILE} -P -- "$$(<${VOLDEVFILE})"
+
set-empty-passphrase:
printf '\n' | ${SUDO} ${BIOCTL} -s -P -- "$$(<${VOLDEVFILE})"