diff options
| author | 2016-12-15 22:07:13 +0000 | |
|---|---|---|
| committer | 2016-12-15 22:07:13 +0000 | |
| commit | 477601a9ff25e79455778f5756d17818cd00d0f5 (patch) | |
| tree | b15b1fc1e8a1640bbe020d87ed995db3fb8e8f80 | |
| parent | f9312a168ad3ad5669d3150e310a8bd6169de51a (diff) | |
| parent | 788bdeae7858be59192f6a5a2a841170dc1325f7 (diff) | |
Merge "Handle invalid shared GIDs."
am: 788bdeae78
Change-Id: I48c3d8e584a30ed994920f57570344d7736ab183
| -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); } |