Add keyslot option for luksOpen (thanks to okozina).

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@611 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
Milan Broz
2011-09-22 20:26:37 +00:00
parent 538169fb5b
commit 1a8bae8884
4 changed files with 46 additions and 5 deletions

View File

@@ -570,11 +570,11 @@ static int action_luksOpen(int arg __attribute__((unused)))
if (opt_key_file) {
crypt_set_password_retry(cd, 1);
r = crypt_activate_by_keyfile(cd, action_argv[1],
CRYPT_ANY_SLOT, opt_key_file, opt_keyfile_size,
opt_key_slot, opt_key_file, opt_keyfile_size,
flags);
} else
r = crypt_activate_by_passphrase(cd, action_argv[1],
CRYPT_ANY_SLOT, NULL, 0, flags);
opt_key_slot, NULL, 0, flags);
out:
crypt_free(cd);
return r;