Bug 945562 - Camera also needs AID_SDCARD_R and AID_MEDIA_RW groups. r=dhylands

This commit is contained in:
Indrajeet Kumar 2013-12-04 17:04:18 -08:00
parent fa3865f20c
commit 89dc2c68f2

View File

@ -303,7 +303,7 @@ void SetCurrentProcessPrivileges(ChildPrivileges privs) {
uid += getpid();
}
if (privs == PRIVILEGES_CAMERA) {
gid_t groups[] = { AID_SDCARD_RW };
gid_t groups[] = { AID_SDCARD_R, AID_SDCARD_RW, AID_MEDIA_RW };
if (setgroups(sizeof(groups) / sizeof(groups[0]), groups) != 0) {
DLOG(ERROR) << "FAILED TO setgroups() CHILD PROCESS";
_exit(127);