diff options
author | Ricardo Cerqueira <ricardo@cyngn.com> | 2015-04-15 17:49:07 +0100 |
---|---|---|
committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2015-04-15 20:22:21 +0000 |
commit | 43295d05f096f54eee7ca0ee7ca48b05d40925e6 (patch) | |
tree | 79493fdd6b98a3f74b556b0eecfff8ec184f7186 | |
parent | 32ee04d7fce3972517034b2979f3739a05487630 (diff) | |
download | android_system_vold-stable/cm-12.0-YNG1T.tar.gz android_system_vold-stable/cm-12.0-YNG1T.tar.bz2 android_system_vold-stable/cm-12.0-YNG1T.zip |
cryptfs: Don't assume a device capable of hw crypto has encrypted with itstable/cm-12.0-YNG1T
This fixes a corner case in which a device capable of dm-req-crypt
could have a dm-crypt device, and it'd fail to decrypt it
Change-Id: I9ed9261953ed58ddf9126a410ba8a1ac1a80f468
(cherry picked from commit 0d269420b85ca536bc77d8c83164354f63b96344)
-rwxr-xr-x | cryptfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1138,7 +1138,8 @@ static int create_crypto_blk_dev(struct crypt_mnt_ftr *crypt_ftr, unsigned char snprintf(crypto_blk_name, MAXPATHLEN, "/dev/block/dm-%u", minor); #ifdef CONFIG_HW_DISK_ENCRYPTION - if (is_hw_fde_enabled()) { + if (is_hw_disk_encryption((char*)crypt_ftr->crypto_type_name) && + is_hw_fde_enabled()) { /* Set fde_enabled if either FDE completed or in-progress */ property_get("ro.crypto.state", encrypted_state, ""); /* FDE completed */ property_get("vold.encrypt_progress", progress, ""); /* FDE in progress */ |