From d98037166929b87ed119a1560d398a9460113eb7 Mon Sep 17 00:00:00 2001 From: Dan Streetman Date: Sat, 15 Jul 2023 21:33:50 -0400 Subject: [PATCH] test: avoid TEST-70 passphrase and password file mode complaints Minor change, to adjust mode of /tmp/passphrase and /tmp/password test files to avoid repeated warning logs that each file "...has 0644 mode that is too permissive, please adjust the ownership and access mode." --- test/units/testsuite-70.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/units/testsuite-70.sh b/test/units/testsuite-70.sh index e88547a735f..16d6c901f71 100755 --- a/test/units/testsuite-70.sh +++ b/test/units/testsuite-70.sh @@ -41,6 +41,8 @@ tpm_check_failure_with_wrong_pin() { img="/tmp/test.img" truncate -s 20M "$img" echo -n passphrase >/tmp/passphrase +# Change file mode to avoid "/tmp/passphrase has 0644 mode that is too permissive" messages +chmod 0600 /tmp/passphrase cryptsetup luksFormat -q --pbkdf pbkdf2 --pbkdf-force-iterations 1000 --use-urandom "$img" /tmp/passphrase # Unlocking via keyfile @@ -259,6 +261,8 @@ cryptenroll_wipe_and_check() {( img="/tmp/cryptenroll.img" truncate -s 20M "$img" echo -n password >/tmp/password +# Change file mode to avoid "/tmp/password has 0644 mode that is too permissive" messages +chmod 0600 /tmp/password cryptsetup luksFormat -q --pbkdf pbkdf2 --pbkdf-force-iterations 1000 --use-urandom "$img" /tmp/password # Enroll additional tokens, keys, and passwords to exercise the list and wipe stuff