1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 19:21:53 +03:00

cryptsetup: ask for password, if key file cannot be accessed

If the key file cannot be accessed, we can at least ask for the
password.
This commit is contained in:
Harald Hoyer 2013-04-18 09:41:23 +02:00 committed by Lennart Poettering
parent 4befe2eba0
commit 8d768d9962

View File

@ -500,6 +500,11 @@ int main(int argc, char *argv[]) {
if (key_file)
k = crypt_activate_by_keyfile_offset(cd, argv[2], CRYPT_ANY_SLOT, key_file, opt_keyfile_size,
opt_keyfile_offset, flags);
if (k < 0) {
log_error("Failed to activate with key file '%s': %s", key_file, strerror(-k));
key_file = NULL;
continue;
}
else {
char **p;