Activate devices privately.

This commit is contained in:
Milan Broz
2012-05-02 17:14:02 +02:00
parent 2fcb521c77
commit c333108c61

View File

@@ -350,7 +350,7 @@ static int activate_luks_headers(void)
if ((r = crypt_activate_by_passphrase(cd, rnc.header_file_org, if ((r = crypt_activate_by_passphrase(cd, rnc.header_file_org,
CRYPT_ANY_SLOT, rnc.password, rnc.passwordLen, CRYPT_ANY_SLOT, rnc.password, rnc.passwordLen,
CRYPT_ACTIVATE_READONLY)) < 0) CRYPT_ACTIVATE_READONLY|CRYPT_ACTIVATE_PRIVATE)) < 0)
goto out; goto out;
if ((r = crypt_init(&cd_new, rnc.header_file_new)) || if ((r = crypt_init(&cd_new, rnc.header_file_new)) ||
@@ -360,7 +360,7 @@ static int activate_luks_headers(void)
if ((r = crypt_activate_by_passphrase(cd_new, rnc.header_file_new, if ((r = crypt_activate_by_passphrase(cd_new, rnc.header_file_new,
CRYPT_ANY_SLOT, rnc.password, rnc.passwordLen, CRYPT_ANY_SLOT, rnc.password, rnc.passwordLen,
CRYPT_ACTIVATE_SHARED)) < 0) CRYPT_ACTIVATE_SHARED|CRYPT_ACTIVATE_PRIVATE)) < 0)
goto out; goto out;
out: out:
crypt_free(cd); crypt_free(cd);