From 18860c524915bc991a9015bdbab32e918f5298d7 Mon Sep 17 00:00:00 2001 From: Alex Klyubin Date: Tue, 20 Aug 2013 15:16:31 -0700 Subject: [PATCH] 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 --- run-as/package.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-as/package.c b/run-as/package.c index 4762c5f89..901e9e370 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; }