summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeff Sharkey <jsharkey@android.com> 2017-01-03 14:33:50 -0700
committer Jeff Sharkey <jsharkey@android.com> 2017-01-03 14:34:09 -0700
commitadddd9876e145879169369913b5afe469b17c02d (patch)
treee0c9333a8dbbb45003f737ea5c29fe1108a94ade
parent3dfae0c008576c873c4039bb4c2e54a6adf3720a (diff)
Reference profiles use shared GID for user 0.
Test: builds, boots Bug: 33977235 Change-Id: I4de3852b3f230a6dc874a630e3c1b9fff2d83169
-rw-r--r--cmds/installd/InstalldNativeService.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp
index 6efae1b02e..ed5fc4aaee 100644
--- a/cmds/installd/InstalldNativeService.cpp
+++ b/cmds/installd/InstalldNativeService.cpp
@@ -407,7 +407,7 @@ binder::Status InstalldNativeService::createAppData(const std::unique_ptr<std::s
const std::string ref_profile_path = create_data_ref_profile_package_path(pkgname);
// dex2oat/profman runs under the shared app gid and it needs to read/write reference
// profiles.
- int shared_app_gid = multiuser_get_shared_app_gid(uid);
+ int shared_app_gid = multiuser_get_shared_gid(0, appId);
if ((shared_app_gid != -1) && fs_prepare_dir_strict(
ref_profile_path.c_str(), 0700, shared_app_gid, shared_app_gid) != 0) {
return error("Failed to prepare " + ref_profile_path);