Skip to content

Commit c797b8a

Browse files
committed
Dump xt_qtaguid stats to using GID instead of su.
Change-Id: I77a956cf37c1f1f792f6939b2f32a47f1cbe14c0
1 parent 4d6da86 commit c797b8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmds/dumpstate/dumpstate.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static void dumpstate() {
122122
dump_file("NETWORK DEV INFO", "/proc/net/dev");
123123
dump_file("QTAGUID NETWORK INTERFACES INFO", "/proc/net/xt_qtaguid/iface_stat_all");
124124
dump_file("QTAGUID CTRL INFO", "/proc/net/xt_qtaguid/ctrl");
125-
run_command("QTAGUID STATS INFO", 10, "su", "root", "cat", "/proc/net/xt_qtaguid/stats", NULL);
125+
dump_file("QTAGUID STATS INFO", "/proc/net/xt_qtaguid/stats");
126126

127127
dump_file("NETWORK ROUTES", "/proc/net/route");
128128
dump_file("NETWORK ROUTES IPV6", "/proc/net/ipv6_route");
@@ -334,7 +334,7 @@ int main(int argc, char *argv[]) {
334334
}
335335

336336
/* switch to non-root user and group */
337-
gid_t groups[] = { AID_LOG, AID_SDCARD_RW, AID_MOUNT, AID_INET };
337+
gid_t groups[] = { AID_LOG, AID_SDCARD_RW, AID_MOUNT, AID_INET, AID_NET_BW_STATS };
338338
if (setgroups(sizeof(groups)/sizeof(groups[0]), groups) != 0) {
339339
ALOGE("Unable to setgroups, aborting: %s\n", strerror(errno));
340340
return -1;

0 commit comments

Comments
 (0)