diff options
author | Paul Lawrence <paullawrence@google.com> | 2015-05-01 05:24:04 -0700 |
---|---|---|
committer | Paul Lawrence <paullawrence@google.com> | 2015-05-05 11:13:12 -0700 |
commit | b01dc1c52ec0a4ec5e07a18ffb5b105a997cc329 (patch) | |
tree | c36070c947fac6939e34a781fa63cecb4b146af7 | |
parent | 2adbe38fada256e0fae039c3a6e869441266597e (diff) | |
download | extras-b01dc1c52ec0a4ec5e07a18ffb5b105a997cc329.tar.gz |
New faster file open kernel
Bug: 18151196
Change-Id: Icdb3d9afa1db125102d01cd06f45dbc99ca78021
-rw-r--r-- | ext4_utils/ext4_crypt.cpp | 5 | ||||
-rw-r--r-- | ext4_utils/ext4_crypt_init_extensions.cpp | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/ext4_utils/ext4_crypt.cpp b/ext4_utils/ext4_crypt.cpp index 69358ba8..886d17a1 100644 --- a/ext4_utils/ext4_crypt.cpp +++ b/ext4_utils/ext4_crypt.cpp @@ -31,6 +31,7 @@ struct ext4_encryption_policy { char version; char contents_encryption_mode; char filenames_encryption_mode; + char flags; char master_key_descriptor[EXT4_KEY_DESCRIPTOR_SIZE]; } __attribute__((__packed__)); @@ -106,6 +107,7 @@ int do_policy_set(const char *directory, const char *policy, int policy_length) eep.version = 0; eep.contents_encryption_mode = EXT4_ENCRYPTION_MODE_AES_256_XTS; eep.filenames_encryption_mode = EXT4_ENCRYPTION_MODE_AES_256_CTS; + eep.flags = 0; memcpy(eep.master_key_descriptor, policy, EXT4_KEY_DESCRIPTOR_SIZE); ret = ioctl(fd, EXT4_IOC_SET_ENCRYPTION_POLICY, &eep); auto preserve_errno = errno; @@ -117,7 +119,8 @@ int do_policy_set(const char *directory, const char *policy, int policy_length) return -EINVAL; } - KLOG_INFO(TAG, "Encryption policy for %s is set to %s\n", directory, policy); + KLOG_INFO(TAG, "Encryption policy for %s is set to %02x%02x%02x%02x\n", + directory, policy[0], policy[1], policy[2], policy[3]); return 0; } diff --git a/ext4_utils/ext4_crypt_init_extensions.cpp b/ext4_utils/ext4_crypt_init_extensions.cpp index cd0a02ac..57fc53e6 100644 --- a/ext4_utils/ext4_crypt_init_extensions.cpp +++ b/ext4_utils/ext4_crypt_init_extensions.cpp @@ -155,7 +155,7 @@ int e4crypt_set_directory_policy(const char* dir) return 0; } - KLOG_INFO(TAG, "Setting policy %s\n", policy.c_str()); + KLOG_INFO(TAG, "Setting policy on %s\n", dir); int result = do_policy_set(dir, policy.c_str(), policy.size()); if (result) { KLOG_ERROR(TAG, "Setting %s policy on %s failed!\n", |