diff options
author | netblue30 <netblue30@yahoo.com> | 2017-12-18 09:40:14 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2017-12-18 09:40:14 -0500 |
commit | a51c369b8cb8d0bbb22abedc10c86747e5af5b37 (patch) | |
tree | 01ac307e76d0cd92ea53b9799a3786521fbcd562 /src | |
parent | Add Figaro's Password Manager 2 to disable-passwdmgr.inc (diff) | |
download | firejail-a51c369b8cb8d0bbb22abedc10c86747e5af5b37.tar.gz firejail-a51c369b8cb8d0bbb22abedc10c86747e5af5b37.tar.zst firejail-a51c369b8cb8d0bbb22abedc10c86747e5af5b37.zip |
firemon fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/firemon/firemon.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/firemon/firemon.c b/src/firemon/firemon.c index 6f7356729..3a35e98ce 100644 --- a/src/firemon/firemon.c +++ b/src/firemon/firemon.c | |||
@@ -232,9 +232,13 @@ int main(int argc, char **argv) { | |||
232 | netstats(); // print all sandboxes, --name disregarded | 232 | netstats(); // print all sandboxes, --name disregarded |
233 | return 0; | 233 | return 0; |
234 | } | 234 | } |
235 | if (arg_tree) { | ||
236 | tree(0); | ||
237 | return 0; | ||
238 | } | ||
235 | 239 | ||
236 | // if --name requested without other options, print all data | 240 | // if --name requested without other options, print all data |
237 | if (pid && !arg_tree && !arg_cpu && !arg_seccomp && !arg_caps && | 241 | if (pid && !arg_cpu && !arg_seccomp && !arg_caps && |
238 | !arg_cgroup && !arg_x11 && !arg_interface && !arg_route && !arg_arp) { | 242 | !arg_cgroup && !arg_x11 && !arg_interface && !arg_route && !arg_arp) { |
239 | arg_tree = 1; | 243 | arg_tree = 1; |
240 | arg_cpu = 1; | 244 | arg_cpu = 1; |
@@ -249,10 +253,6 @@ int main(int argc, char **argv) { | |||
249 | 253 | ||
250 | // cumulative options | 254 | // cumulative options |
251 | int print_procs = 1; | 255 | int print_procs = 1; |
252 | if (arg_tree) { | ||
253 | tree((pid_t) pid); | ||
254 | print_procs = 0; | ||
255 | } | ||
256 | if (arg_cpu) { | 256 | if (arg_cpu) { |
257 | cpu((pid_t) pid, print_procs); | 257 | cpu((pid_t) pid, print_procs); |
258 | print_procs = 0; | 258 | print_procs = 0; |
@@ -285,10 +285,10 @@ int main(int argc, char **argv) { | |||
285 | arp((pid_t) pid, print_procs); | 285 | arp((pid_t) pid, print_procs); |
286 | print_procs = 0; | 286 | print_procs = 0; |
287 | } | 287 | } |
288 | (void) print_procs; | ||
288 | 289 | ||
289 | if (getuid() == 0) { | 290 | if (getuid() == 0) { |
290 | if (!arg_tree) | 291 | tree((pid_t) pid); // pid initialized as zero, will print the tree for all processes if a specific pid was not requested |
291 | tree((pid_t) pid); | ||
292 | procevent((pid_t) pid); | 292 | procevent((pid_t) pid); |
293 | } | 293 | } |
294 | 294 | ||