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

1  2 
ext4_utils/ext4_crypt_init_extensions.cpp

@@@ -26,7 -26,7 +26,7 @@@ static std::string vold_command(std::st
      int sock = -1;
  
      while (true) {
-         sock = socket_local_client("vold",
+         sock = socket_local_client("cryptd",
                                     ANDROID_SOCKET_NAMESPACE_RESERVED,
                                     SOCK_STREAM);
          if (sock >= 0) {
@@@ -163,13 -163,3 +163,13 @@@ int e4crypt_set_directory_policy(const 
  
      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;
 +}