From: Harald Hoyer <har...@redhat.com> If the key file cannot be accessed, we can at least ask for the password. --- src/cryptsetup/cryptsetup.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index ae4aa8d..29b0dae 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -390,6 +390,12 @@ int main(int argc, char *argv[]) { strv_free(passwords); passwords = NULL; + /* We can't access the key_file, so ask for the password */ + if (access(key_file, R_OK)) { + log_error("Can't access key file '%s': %m", key_file); + key_file = NULL; + } + if (!key_file) { char *text, **p; -- 1.8.2 _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel