Skip to content

Commit

Permalink
test: avoid TEST-70 passphrase and password file mode complaints
Browse files Browse the repository at this point in the history
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."
  • Loading branch information
ddstreet authored and bluca committed Jul 16, 2023
1 parent f230572 commit d980371
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/units/testsuite-70.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d980371

Please sign in to comment.