aboutsummaryrefslogtreecommitdiffstats
path: root/src/firemon/firemon.c
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2023-03-08 11:13:02 -0500
committerLibravatar netblue30 <netblue30@protonmail.com>2023-03-08 11:13:02 -0500
commit0e48f9933c19e297b9d629b4416c7f94d411d333 (patch)
treec2e3b3840174410da34a63ea8de1739fd189b3d0 /src/firemon/firemon.c
parentadd ipv6 support in --net.print (diff)
downloadfirejail-0e48f9933c19e297b9d629b4416c7f94d411d333.tar.gz
firejail-0e48f9933c19e297b9d629b4416c7f94d411d333.tar.zst
firejail-0e48f9933c19e297b9d629b4416c7f94d411d333.zip
remove firemon --interface option - it is a duplication of firejail --net.print
Diffstat (limited to 'src/firemon/firemon.c')
-rw-r--r--src/firemon/firemon.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/firemon/firemon.c b/src/firemon/firemon.c
index 01167e555..d82f387ff 100644
--- a/src/firemon/firemon.c
+++ b/src/firemon/firemon.c
@@ -30,7 +30,6 @@ int arg_debug = 0;
30static int arg_route = 0; 30static int arg_route = 0;
31static int arg_arp = 0; 31static int arg_arp = 0;
32static int arg_tree = 0; 32static int arg_tree = 0;
33static int arg_interface = 0;
34static int arg_seccomp = 0; 33static int arg_seccomp = 0;
35static int arg_caps = 0; 34static int arg_caps = 0;
36static int arg_cpu = 0; 35static int arg_cpu = 0;
@@ -178,13 +177,6 @@ int main(int argc, char **argv) {
178 arg_seccomp = 1; 177 arg_seccomp = 1;
179 else if (strcmp(argv[i], "--caps") == 0) 178 else if (strcmp(argv[i], "--caps") == 0)
180 arg_caps = 1; 179 arg_caps = 1;
181 else if (strcmp(argv[i], "--interface") == 0) {
182 if (getuid() != 0) {
183 fprintf(stderr, "Error: you need to be root to run this command\n");
184 exit(1);
185 }
186 arg_interface = 1;
187 }
188#ifdef HAVE_NETWORK 180#ifdef HAVE_NETWORK
189 else if (strcmp(argv[i], "--route") == 0) 181 else if (strcmp(argv[i], "--route") == 0)
190 arg_route = 1; 182 arg_route = 1;
@@ -261,13 +253,12 @@ int main(int argc, char **argv) {
261 253
262 // if --name requested without other options, print all data 254 // if --name requested without other options, print all data
263 if (pid && !arg_cpu && !arg_seccomp && !arg_caps && !arg_apparmor && 255 if (pid && !arg_cpu && !arg_seccomp && !arg_caps && !arg_apparmor &&
264 !arg_x11 && !arg_interface && !arg_route && !arg_arp) { 256 !arg_x11 && !arg_route && !arg_arp) {
265 arg_tree = 1; 257 arg_tree = 1;
266 arg_cpu = 1; 258 arg_cpu = 1;
267 arg_seccomp = 1; 259 arg_seccomp = 1;
268 arg_caps = 1; 260 arg_caps = 1;
269 arg_x11 = 1; 261 arg_x11 = 1;
270 arg_interface = 1;
271 arg_route = 1; 262 arg_route = 1;
272 arg_arp = 1; 263 arg_arp = 1;
273 arg_apparmor = 1; 264 arg_apparmor = 1;
@@ -295,10 +286,6 @@ int main(int argc, char **argv) {
295 x11((pid_t) pid, print_procs); 286 x11((pid_t) pid, print_procs);
296 print_procs = 0; 287 print_procs = 0;
297 } 288 }
298 if (arg_interface && getuid() == 0) {
299 interface((pid_t) pid, print_procs);
300 print_procs = 0;
301 }
302 if (arg_route) { 289 if (arg_route) {
303 route((pid_t) pid, print_procs); 290 route((pid_t) pid, print_procs);
304 print_procs = 0; 291 print_procs = 0;