diff options
author | Mike Lockwood <lockwood@android.com> | 2009-05-22 13:31:42 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2009-05-22 13:31:42 -0400 |
commit | 472be48007f8c3a9b462b8c9024cb4a0a0beac04 (patch) | |
tree | 81574ec411a52afa252db883be60b91132bcb33c /cmds | |
parent | 380cd96e5d7018cbf43295c9f2f2a33897affd63 (diff) | |
download | frameworks_base-472be48007f8c3a9b462b8c9024cb4a0a0beac04.zip frameworks_base-472be48007f8c3a9b462b8c9024cb4a0a0beac04.tar.gz frameworks_base-472be48007f8c3a9b462b8c9024cb4a0a0beac04.tar.bz2 |
dumpstate: Add to AID_SDCARD_RW group to fix saving bugreports to the SD card.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/dumpstate/dumpstate.c | 3 |
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 */ |