diff options
author | Nick Kralevich <nnk@google.com> | 2015-10-07 16:38:42 -0700 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-07-20 04:16:16 -0700 |
commit | c91bafb88a3abf50c369637caf79fb027b48c46e (patch) | |
tree | a0191076f90d699a390a318f1f4276f6b1061a53 /cmds | |
parent | 179bd77ab69361f3f26a50e01781be9cad78a4d1 (diff) | |
download | frameworks_native-c91bafb88a3abf50c369637caf79fb027b48c46e.zip frameworks_native-c91bafb88a3abf50c369637caf79fb027b48c46e.tar.gz frameworks_native-c91bafb88a3abf50c369637caf79fb027b48c46e.tar.bz2 |
DO NOT MERGE: dumpstate: execute procrank using su
procrank is a setuid binary which only exists on userdebug/eng
builds. Instead of executing the setuid binary, run the binary using
the su command. This eliminates one more setuid binary, and allows
the tightening of the SELinux policy.
Bug: 18342188
(cherry picked from commit 2b1f88b6ac78e330ff006da6fecf8bc9d976ec67)
Bug: 25951005
Change-Id: I90c86f89974b3878273a29277b2a5d5d7c4b81c7
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/dumpstate/dumpstate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c index 5b9a42f..475f7e3 100644 --- a/cmds/dumpstate/dumpstate.c +++ b/cmds/dumpstate/dumpstate.c @@ -305,7 +305,7 @@ static void dumpstate() { dump_files("UPTIME MMC PERF", mmcblk0, skip_not_stat, dump_stat_from_fd); dump_file("MEMORY INFO", "/proc/meminfo"); run_command("CPU INFO", 10, "top", "-n", "1", "-d", "1", "-m", "30", "-t", NULL); - run_command("PROCRANK", 20, "procrank", NULL); + run_command("PROCRANK", 20, SU_PATH, "root", "procrank", NULL); dump_file("VIRTUAL MEMORY STATS", "/proc/vmstat"); dump_file("VMALLOC INFO", "/proc/vmallocinfo"); dump_file("SLAB INFO", "/proc/slabinfo"); |