diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-04-13 21:42:46 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-04-13 21:42:46 +0200 |
commit | 7dcda352a609d063098e238db09c03cdc25c564b (patch) | |
tree | 545a8c2f76af39cae406633c5bc181824ae076cc /src/cryptsetup.c | |
parent | d55f4f3f92f56f76bdd06192d6a2ef3ee9fe4772 (diff) |
ask-password: support passwords without timeouts
Diffstat (limited to 'src/cryptsetup.c')
-rw-r--r-- | src/cryptsetup.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cryptsetup.c b/src/cryptsetup.c index 3aa822a1d0..f52a41b995 100644 --- a/src/cryptsetup.c +++ b/src/cryptsetup.c @@ -309,7 +309,10 @@ int main(int argc, char *argv[]) { if (opt_readonly) flags |= CRYPT_ACTIVATE_READONLY; - until = now(CLOCK_MONOTONIC) + (opt_timeout > 0 ? opt_timeout : DEFAULT_TIMEOUT_USEC); + if (opt_timeout > 0) + until = now(CLOCK_MONOTONIC) + opt_timeout; + else + until = 0; opt_tries = opt_tries > 0 ? opt_tries : 3; opt_key_size = (opt_key_size > 0 ? opt_key_size : 256); @@ -404,6 +407,8 @@ int main(int argc, char *argv[]) { } } + k = 0; + if (!opt_type || streq(opt_type, CRYPT_LUKS1)) k = crypt_load(cd, CRYPT_LUKS1, NULL); |