]> git.apps.os.sepia.ceph.com Git - fscrypt.git/commit
cmd/fscrypt: fix race condition in getPassphraseKey()
authorEric Biggers <ebiggers@google.com>
Sun, 8 Nov 2020 04:30:51 +0000 (20:30 -0800)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 8 Nov 2020 04:46:57 +0000 (20:46 -0800)
commit7381e5937209178fa94694888d6a721ab0d5a124
tree5b52c381b7506639a60edbc3bd9b8eb7e9fd785b
parent4d37d7eaedae964cf72e82ec959a2482916faa1b
cmd/fscrypt: fix race condition in getPassphraseKey()

Set the terminal to raw mode *before* printing the prompt.
Otherwise the user (or the automated test) might enter the
passphrase before the terminal gets put into raw mode.

This is needed for some of the CLI tests to pass reliably in Travis CI.
cmd/fscrypt/keys.go