diff options
| author | 2016-12-15 23:21:49 +0000 | |
|---|---|---|
| committer | 2016-12-15 23:21:49 +0000 | |
| commit | 4be16dccfe5b14aa1127ef32ebfaca627c2822b4 (patch) | |
| tree | 6a224b0d125472fa633b98edef0280becf9b277f /cmds | |
| parent | c148af227a68501ab6f0a935fe604932f1b5eec5 (diff) | |
| parent | 477601a9ff25e79455778f5756d17818cd00d0f5 (diff) | |
Merge "Handle invalid shared GIDs." am: 788bdeae78
am: 477601a9ff
Change-Id: Id21818687508092e41a970b9cd18ddbe15b7d740
Diffstat (limited to 'cmds')
| -rw-r--r-- | cmds/installd/InstalldNativeService.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp index bee947f5a1..75e566889c 100644 --- a/cmds/installd/InstalldNativeService.cpp +++ b/cmds/installd/InstalldNativeService.cpp @@ -322,8 +322,8 @@ 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. - appid_t shared_app_gid = multiuser_get_shared_app_gid(uid); - if (fs_prepare_dir_strict( + int shared_app_gid = multiuser_get_shared_app_gid(uid); + 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); } |