OSDN Git Service

am 0f05445a: am b411bcc1: Move crypt commands to a different listener in vold
[android-x86/system-extras.git] / ext4_utils / ext4_crypt_init_extensions.cpp
index 6564d74..7bcfc65 100644 (file)
@@ -163,3 +163,13 @@ int e4crypt_set_directory_policy(const char* dir)
 
     return 0;
 }
+
+int e4crypt_set_user_crypto_policies(const char* dir)
+{
+    auto command = std::string() + "cryptfs setusercryptopolicies " + dir;
+    auto result = vold_command(command);
+    // ext4enc:TODO proper error handling
+    KLOG_INFO(TAG, "setusercryptopolicies returned with result %s\n",
+              result.c_str());
+    return 0;
+}