diff options
author | 2022-10-23 07:38:29 -0400 | |
---|---|---|
committer | 2022-10-23 07:38:29 -0400 | |
commit | a0985a135392c0776d45cf8e27ebf15bc7fff198 (patch) | |
tree | f796ca075c61e103abfd54c01872655c9610e8dc /src/firejail/main.c | |
parent | Merge branch 'master' of ssh://github.com/netblue30/firejail (diff) | |
download | firejail-a0985a135392c0776d45cf8e27ebf15bc7fff198.tar.gz firejail-a0985a135392c0776d45cf8e27ebf15bc7fff198.tar.zst firejail-a0985a135392c0776d45cf8e27ebf15bc7fff198.zip |
dnstrace and snitrace
Diffstat (limited to 'src/firejail/main.c')
-rw-r--r-- | src/firejail/main.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index b6e076dfc..fe80c5e2e 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -438,10 +438,10 @@ static void run_cmd_and_exit(int i, int argc, char **argv) { | |||
438 | exit_err_feature("networking"); | 438 | exit_err_feature("networking"); |
439 | exit(0); | 439 | exit(0); |
440 | } | 440 | } |
441 | else if (strcmp(argv[i], "--nettrace-dns") == 0) { | 441 | else if (strcmp(argv[i], "--dnstrace") == 0) { |
442 | if (checkcfg(CFG_NETWORK)) { | 442 | if (checkcfg(CFG_NETWORK)) { |
443 | if (getuid() != 0) { | 443 | if (getuid() != 0) { |
444 | fprintf(stderr, "Error: --nettrace-dns is only available to root user\n"); | 444 | fprintf(stderr, "Error: --dnstrace is only available to root user\n"); |
445 | exit(1); | 445 | exit(1); |
446 | } | 446 | } |
447 | netfilter_trace(0, LIBDIR "/firejail/fnettrace-dns"); | 447 | netfilter_trace(0, LIBDIR "/firejail/fnettrace-dns"); |
@@ -450,10 +450,10 @@ static void run_cmd_and_exit(int i, int argc, char **argv) { | |||
450 | exit_err_feature("networking"); | 450 | exit_err_feature("networking"); |
451 | exit(0); | 451 | exit(0); |
452 | } | 452 | } |
453 | else if (strncmp(argv[i], "--nettrace-dns=", 15) == 0) { | 453 | else if (strncmp(argv[i], "--dnstrace=", 15) == 0) { |
454 | if (checkcfg(CFG_NETWORK)) { | 454 | if (checkcfg(CFG_NETWORK)) { |
455 | if (getuid() != 0) { | 455 | if (getuid() != 0) { |
456 | fprintf(stderr, "Error: --nettrace is only available to root user\n"); | 456 | fprintf(stderr, "Error: --dnstrace is only available to root user\n"); |
457 | exit(1); | 457 | exit(1); |
458 | } | 458 | } |
459 | pid_t pid = require_pid(argv[i] + 15); | 459 | pid_t pid = require_pid(argv[i] + 15); |
@@ -463,10 +463,10 @@ static void run_cmd_and_exit(int i, int argc, char **argv) { | |||
463 | exit_err_feature("networking"); | 463 | exit_err_feature("networking"); |
464 | exit(0); | 464 | exit(0); |
465 | } | 465 | } |
466 | else if (strcmp(argv[i], "--nettrace-sni") == 0) { | 466 | else if (strcmp(argv[i], "--snitrace") == 0) { |
467 | if (checkcfg(CFG_NETWORK)) { | 467 | if (checkcfg(CFG_NETWORK)) { |
468 | if (getuid() != 0) { | 468 | if (getuid() != 0) { |
469 | fprintf(stderr, "Error: --nettrace is only available to root user\n"); | 469 | fprintf(stderr, "Error: --snitrace is only available to root user\n"); |
470 | exit(1); | 470 | exit(1); |
471 | } | 471 | } |
472 | netfilter_trace(0, LIBDIR "/firejail/fnettrace-sni"); | 472 | netfilter_trace(0, LIBDIR "/firejail/fnettrace-sni"); |
@@ -475,10 +475,10 @@ static void run_cmd_and_exit(int i, int argc, char **argv) { | |||
475 | exit_err_feature("networking"); | 475 | exit_err_feature("networking"); |
476 | exit(0); | 476 | exit(0); |
477 | } | 477 | } |
478 | else if (strncmp(argv[i], "--nettrace-sni=", 15) == 0) { | 478 | else if (strncmp(argv[i], "--snitrace=", 15) == 0) { |
479 | if (checkcfg(CFG_NETWORK)) { | 479 | if (checkcfg(CFG_NETWORK)) { |
480 | if (getuid() != 0) { | 480 | if (getuid() != 0) { |
481 | fprintf(stderr, "Error: --nettrace is only available to root user\n"); | 481 | fprintf(stderr, "Error: --snitrace is only available to root user\n"); |
482 | exit(1); | 482 | exit(1); |
483 | } | 483 | } |
484 | pid_t pid = require_pid(argv[i] + 15); | 484 | pid_t pid = require_pid(argv[i] + 15); |