* Revert default initialisation of volume key in crypt_init_by_name().

* Do not allow key retrieval while suspended (key could be wiped).
* Do not allow suspend for non-LUKS devices.
* Support retries and timeout parameters for luksSuspend.

Add luksSuspend/Resume test.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@574 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
Milan Broz
2011-07-19 13:55:34 +00:00
parent 261d0d05a5
commit 1bf26b9a90
7 changed files with 60 additions and 32 deletions

View File

@@ -958,8 +958,8 @@ static int action_luksResume(int arg __attribute__((unused)))
if ((r = crypt_init_by_name(&cd, action_argv[0])))
goto out;
if ((r = crypt_load(cd, CRYPT_LUKS1, NULL)))
goto out;
crypt_set_timeout(cd, opt_timeout);
crypt_set_password_retry(cd, opt_tries);
if (opt_key_file)
r = crypt_resume_by_keyfile(cd, action_argv[0], CRYPT_ANY_SLOT,