summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-05-22 10:40:48 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-05-22 10:40:48 -0700
commit9d892a8e3037fd2f6d692137cd5d91acc46ddf5a (patch)
treefc2694801c99d786cc868378c83d2fbc9546f645
parent9681a5e06badbd817342e8f6be4ffbe9102c1e98 (diff)
parent472be48007f8c3a9b462b8c9024cb4a0a0beac04 (diff)
downloadframeworks_base-9d892a8e3037fd2f6d692137cd5d91acc46ddf5a.zip
frameworks_base-9d892a8e3037fd2f6d692137cd5d91acc46ddf5a.tar.gz
frameworks_base-9d892a8e3037fd2f6d692137cd5d91acc46ddf5a.tar.bz2
Merge change 2336 into donut
* changes: dumpstate: Add to AID_SDCARD_RW group to fix saving bugreports to the SD card.
-rw-r--r--cmds/dumpstate/dumpstate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c
index eabf98e..cc951c1 100644
--- a/cmds/dumpstate/dumpstate.c
+++ b/cmds/dumpstate/dumpstate.c
@@ -165,6 +165,7 @@ int main(int argc, char *argv[]) {
int c, fd, vibrate_fd, fds[2];
char path[PATH_MAX];
pid_t pid;
+ gid_t groups[] = { AID_LOG, AID_SDCARD_RW };
/* set as high priority, and protect from OOM killer */
setpriority(PRIO_PROCESS, 0, -20);
@@ -207,7 +208,7 @@ int main(int argc, char *argv[]) {
vibrate_fd = -1;
/* switch to non-root user and group */
- setgid(AID_LOG);
+ setgroups(sizeof(groups)/sizeof(groups[0]), groups);
setuid(AID_SHELL);
/* make it safe to use both printf and STDOUT_FILENO */