Enable run-as to read packages.list now owned by package_info.

The group ownership of the package database
/data/system/packages.list read by run-as was changed in
977a9f3b1a from "system" to
"package_info". run-as currently changes its effective group to
"system" and is thus unable to read the database.

This CL fixes the issue by making run-as change its effective group
to "package_info" for reading the package database.

Bug: 10411916
Change-Id: Id23059bfb5b43264824917873a31c287f057ce4e
This commit is contained in:
Alex Klyubin 2013-08-20 15:16:31 -07:00
parent 0d872d8bb4
commit 18860c5249

View file

@ -90,7 +90,7 @@ map_file(const char* filename, size_t* filesize)
*/
oldegid = getegid();
if (setegid(AID_SYSTEM) < 0) {
if (setegid(AID_PACKAGE_INFO) < 0) {
return NULL;
}