summaryrefslogtreecommitdiffstats
path: root/run-as
diff options
context:
space:
mode:
authorAlex Klyubin <klyubin@google.com>2013-08-20 15:16:31 -0700
committerAlex Klyubin <klyubin@google.com>2013-08-20 15:16:31 -0700
commit18860c524915bc991a9015bdbab32e918f5298d7 (patch)
treef93eb371b9c642db237035162ddf102784c23529 /run-as
parent0d872d8bb4f5371200601b7615ea48993383befb (diff)
downloadsystem_core-18860c524915bc991a9015bdbab32e918f5298d7.zip
system_core-18860c524915bc991a9015bdbab32e918f5298d7.tar.gz
system_core-18860c524915bc991a9015bdbab32e918f5298d7.tar.bz2
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 977a9f3b1a05e6168e8245a1e2061225b68b2b41 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
Diffstat (limited to 'run-as')
-rw-r--r--run-as/package.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/run-as/package.c b/run-as/package.c
index 4762c5f..901e9e3 100644
--- a/run-as/package.c
+++ b/run-as/package.c
@@ -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;
}