diff options
author | Janis Danisevskis <jdanis@google.com> | 2017-03-29 15:19:23 -0700 |
---|---|---|
committer | Tom Cherry <tomcherry@google.com> | 2017-03-31 09:59:05 -0700 |
commit | 1f3273ff4638175a3dbccded99d020d5f550419c (patch) | |
tree | 439ba27847391fbc8691519d9e73f24abcd30e53 | |
parent | 68b15e1f28c172ca60b0eb443c9f5809136eff8f (diff) | |
download | extras-1f3273ff4638175a3dbccded99d020d5f550419c.tar.gz |
Removed e4crypt_create_device_key
Init was the only user of e4crypt_create_device_key and
it is not using it any more.
Bug: 36278706
Test: Removed unused code, and codebase still builds.
(cherry picked from commit d151a583479f475fcfb5d016d7d39dadec97ee72)
Change-Id: I5033dc5d315ea6be84fa9d286615c94a057dc1f0
-rw-r--r-- | ext4_utils/ext4_crypt_init_extensions.cpp | 17 | ||||
-rw-r--r-- | ext4_utils/include/ext4_utils/ext4_crypt_init_extensions.h | 2 |
2 files changed, 0 insertions, 19 deletions
diff --git a/ext4_utils/ext4_crypt_init_extensions.cpp b/ext4_utils/ext4_crypt_init_extensions.cpp index 55a1c1cd..ee8bfbed 100644 --- a/ext4_utils/ext4_crypt_init_extensions.cpp +++ b/ext4_utils/ext4_crypt_init_extensions.cpp @@ -41,23 +41,6 @@ static const std::string arbitrary_sequence_number = "42"; static const int vold_command_timeout_ms = 60 * 1000; -int e4crypt_create_device_key(const char* dir, - int ensure_dir_exists(const char*)) -{ - // Make sure folder exists. Use make_dir to set selinux permissions. - std::string unencrypted_dir = std::string(dir) + e4crypt_unencrypted_folder; - if (ensure_dir_exists(unencrypted_dir.c_str())) { - PLOG(ERROR) << "Failed to create " << unencrypted_dir; - return -1; - } - - const char* argv[] = { "/system/bin/vdc", "--wait", "cryptfs", "enablefilecrypto" }; - int rc = android_fork_execvp_ext(arraysize(argv), (char**) argv, NULL, false, - LOG_KLOG, false, NULL, NULL, 0); - LOG(INFO) << "enablefilecrypto result: " << rc; - return rc; -} - int e4crypt_install_keyring() { key_serial_t device_keyring = add_key("keyring", "e4crypt", 0, 0, diff --git a/ext4_utils/include/ext4_utils/ext4_crypt_init_extensions.h b/ext4_utils/include/ext4_utils/ext4_crypt_init_extensions.h index 2cf98de4..e208b451 100644 --- a/ext4_utils/include/ext4_utils/ext4_crypt_init_extensions.h +++ b/ext4_utils/include/ext4_utils/ext4_crypt_init_extensions.h @@ -26,8 +26,6 @@ __BEGIN_DECLS // These functions assume they are being called from init // They will not operate properly outside of init int e4crypt_install_keyring(); -int e4crypt_create_device_key(const char* path, - int ensure_dir_exists(const char* dir)); int e4crypt_set_directory_policy(const char* path); int e4crypt_do_init_user0(); |