aboutsummaryrefslogtreecommitdiffstats
path: root/src/firemon/firemon.c
diff options
context:
space:
mode:
authorLibravatar startx2017 <vradu.startx@yandex.com>2018-09-06 09:02:13 -0400
committerLibravatar startx2017 <vradu.startx@yandex.com>2018-09-06 09:02:13 -0400
commitb98be56e934c9bd52bebbc7d506fbf6f8b75a237 (patch)
treefbc62858525fb67be4c4b14aa7d411c5d6b79592 /src/firemon/firemon.c
parentfinal cleanup (diff)
downloadfirejail-b98be56e934c9bd52bebbc7d506fbf6f8b75a237.tar.gz
firejail-b98be56e934c9bd52bebbc7d506fbf6f8b75a237.tar.zst
firejail-b98be56e934c9bd52bebbc7d506fbf6f8b75a237.zip
final cleanup
Diffstat (limited to 'src/firemon/firemon.c')
-rw-r--r--src/firemon/firemon.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/firemon/firemon.c b/src/firemon/firemon.c
index 147b5073b..6124310b1 100644
--- a/src/firemon/firemon.c
+++ b/src/firemon/firemon.c
@@ -33,8 +33,6 @@ static int arg_interface = 0;
33static int arg_seccomp = 0; 33static int arg_seccomp = 0;
34static int arg_caps = 0; 34static int arg_caps = 0;
35static int arg_cpu = 0; 35static int arg_cpu = 0;
36static int arg_cgroup = 0;
37static int arg_x11 = 0;
38static int arg_top = 0; 36static int arg_top = 0;
39static int arg_list = 0; 37static int arg_list = 0;
40static int arg_netstats = 0; 38static int arg_netstats = 0;
@@ -159,10 +157,6 @@ int main(int argc, char **argv) {
159 157
160 158
161 // cumulative options with or without a pid argument 159 // cumulative options with or without a pid argument
162 else if (strcmp(argv[i], "--x11") == 0)
163 arg_x11 = 1;
164 else if (strcmp(argv[i], "--cgroup") == 0)
165 arg_cgroup = 1;
166 else if (strcmp(argv[i], "--cpu") == 0) 160 else if (strcmp(argv[i], "--cpu") == 0)
167 arg_cpu = 1; 161 arg_cpu = 1;
168 else if (strcmp(argv[i], "--seccomp") == 0) 162 else if (strcmp(argv[i], "--seccomp") == 0)
@@ -250,13 +244,11 @@ int main(int argc, char **argv) {
250 244
251 // if --name requested without other options, print all data 245 // if --name requested without other options, print all data
252 if (pid && !arg_cpu && !arg_seccomp && !arg_caps && !arg_apparmor && 246 if (pid && !arg_cpu && !arg_seccomp && !arg_caps && !arg_apparmor &&
253 !arg_cgroup && !arg_x11 && !arg_interface && !arg_route && !arg_arp) { 247 !arg_interface && !arg_route && !arg_arp) {
254 arg_tree = 1; 248 arg_tree = 1;
255 arg_cpu = 1; 249 arg_cpu = 1;
256 arg_seccomp = 1; 250 arg_seccomp = 1;
257 arg_caps = 1; 251 arg_caps = 1;
258 arg_cgroup = 1;
259 arg_x11 = 1;
260 arg_interface = 1; 252 arg_interface = 1;
261 arg_route = 1; 253 arg_route = 1;
262 arg_arp = 1; 254 arg_arp = 1;
@@ -281,14 +273,6 @@ int main(int argc, char **argv) {
281 apparmor((pid_t) pid, print_procs); 273 apparmor((pid_t) pid, print_procs);
282 print_procs = 0; 274 print_procs = 0;
283 } 275 }
284 if (arg_cgroup) {
285 cgroup((pid_t) pid, print_procs);
286 print_procs = 0;
287 }
288 if (arg_x11) {
289 x11((pid_t) pid, print_procs);
290 print_procs = 0;
291 }
292 if (arg_interface && getuid() == 0) { 276 if (arg_interface && getuid() == 0) {
293 interface((pid_t) pid, print_procs); 277 interface((pid_t) pid, print_procs);
294 print_procs = 0; 278 print_procs = 0;