Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ebiggers committed Nov 7, 2020
1 parent 438564b commit 95d49df
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cli-tests/t_change_passphrase.out
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ mkdir: cannot create directory 'MNT/dir/subdir': Required key not available

# Unlock with new passphrase

# Debug
/dev/pts/0
spawn readlink /proc/self/fd/0
/dev/pts/0

# Try to change passphrase (interactively, mismatch)
spawn fscrypt metadata change-passphrase --protector=MNT:desc1
Enter old custom passphrase for protector "prot":
Expand Down
9 changes: 9 additions & 0 deletions cli-tests/t_change_passphrase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ echo pass2 | fscrypt unlock --quiet "$dir"
mkdir "$dir/subdir"
rmdir "$dir/subdir"

# XXX: the following is needed to make the change-passphrase command below
# recognize stdin as a terminal on Travis CI. No idea why this works...
_print_header "Debug"
readlink /proc/self/fd/0 | sed -E 's/[0-9]+/0/'
expect << EOF | sed -E 's/[0-9]+/0/'
spawn readlink /proc/self/fd/0
expect eof
EOF

_print_header "Try to change passphrase (interactively, mismatch)"
expect << EOF
spawn fscrypt metadata change-passphrase --protector=$MNT:$protector
Expand Down

0 comments on commit 95d49df

Please sign in to comment.