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.
gugelfrei
Paul Crowley 9 years ago committed by Android Git Automerger
commit 34c02173c8

@ -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 @@ int e4crypt_create_new_user_dir(const char *user_handle, const char *path) {
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);

Loading…
Cancel
Save