diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2018-08-10 16:41:36 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2018-08-10 16:41:36 +0000 |
commit | af8683f083643498df54e042732ceef667e50e91 (patch) | |
tree | b1f974152cb4586041e6759a6762b5b0bde5010f /libexec/rpc.rusersd | |
parent | 557c191e8c94b472bf9cd75cb1b39b68a87d4883 (diff) |
Retry on incorrect passphrase for softraid crypto boot.
Historically, the softraid crypto support in the boot loaders has only
given one attempt to provide the correct passphrase. There were a
few reasons for this, including the fact that pkcs5_pbkdf2() allows an
empty passphrase and that returning EPERM allowed for another attempt.
With the event of KARL and the need for bsd.booted with hibernate resumption,
this becomes much more of an issue - if you get the passphrase wrong you
fail to resume. There are also other situations like using /etc/boot.conf
to switch serial console, but an incorrect passphrase results in the config
not being read. Also, bcrypt_pbkdf() does not permit empty passphrases.
This reworks the softraid crypto support in the boot loaders so that it
loops requesting a valid passphrase until one is provided, or an empty
passphrase is entered (at which point it will abort).
ok mortimer@ tb@
Diffstat (limited to 'libexec/rpc.rusersd')
0 files changed, 0 insertions, 0 deletions