OSDN Git Service

am 0f05445a: am b411bcc1: Move crypt commands to a different listener in vold
authorPaul Lawrence <paullawrence@google.com>
Thu, 4 Jun 2015 22:10:33 +0000 (22:10 +0000)
committerAndroid Git Automerger <android-git-automerger@android.com>
Thu, 4 Jun 2015 22:10:33 +0000 (22:10 +0000)
* commit '0f05445ac427a5fd5494c68e7d0d9125a02d619f':
  Move crypt commands to a different listener in vold

ext4_utils/ext4_crypt_init_extensions.cpp
ext4_utils/ext4_crypt_init_extensions.h
tests/workloads/atrace-uncompress.py

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;
+}
index 7931124..d02d181 100644 (file)
@@ -11,5 +11,6 @@ int e4crypt_create_device_key(const char* path,
 int e4crypt_set_directory_policy(const char* path);
 bool e4crypt_non_default_key(const char* path);
 int do_policy_set(const char *directory, const char *policy, int policy_length);
+int e4crypt_set_user_crypto_policies(const char* path);
 
 __END_DECLS
index 5efb698..d478e74 100644 (file)
@@ -6,7 +6,7 @@
 import sys, zlib
 
 def main():
-
+       
        if len(sys.argv) != 2:
                print >> sys.stderr, ('Usage: %s inputfile' % sys.argv[0])
                sys.exit(1)