am 2ada9517: am 480fcd27: Set uid/gid of newly created user dirs to system/system.
* commit '2ada95176863c9f73dbaea64e57c46a1a45b632f':
Set uid/gid of newly created user dirs to system/system.
diff --git a/Ext4Crypt.cpp b/Ext4Crypt.cpp
index 95cbfb7..c337dbb 100644
--- a/Ext4Crypt.cpp
+++ b/Ext4Crypt.cpp
@@ -15,6 +15,8 @@
#include <cutils/properties.h>
#include <openssl/sha.h>
+#include <private/android_filesystem_config.h>
+
#include "unencrypted_properties.h"
#include "key_control.h"
#include "cryptfs.h"
@@ -585,6 +587,9 @@
if (chmod(path, S_IRWXU | S_IRWXG | S_IXOTH) < 0) {
return -1;
}
+ if (chown(path, AID_SYSTEM, AID_SYSTEM) < 0) {
+ return -1;
+ }
if (e4crypt_crypto_complete(DATA_MNT_POINT) == 0) {
// ext4enc:TODO handle errors from this.
e4crypt_set_user_policy(DATA_MNT_POINT, user_handle, path, true);