diff options
author | 2021-05-30 11:53:31 -0400 | |
---|---|---|
committer | 2021-05-30 11:53:31 -0400 | |
commit | 9fd3560768a0e90f4469ae0679aba5fe632161d5 (patch) | |
tree | 4e1ecf61127e0c85e5d4d4ab023e1ff7e0ebfa27 /src | |
parent | fix fcoy error message (#2743) (diff) | |
download | firejail-9fd3560768a0e90f4469ae0679aba5fe632161d5.tar.gz firejail-9fd3560768a0e90f4469ae0679aba5fe632161d5.tar.zst firejail-9fd3560768a0e90f4469ae0679aba5fe632161d5.zip |
--debug takes precedence over --quiet (#2743)
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/main.c | 8 | ||||
-rw-r--r-- | src/firejail/profile.c | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index c0b2fca3c..089d80a68 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -1256,8 +1256,10 @@ int main(int argc, char **argv, char **envp) { | |||
1256 | for (i = 1; i < argc; i++) { | 1256 | for (i = 1; i < argc; i++) { |
1257 | run_cmd_and_exit(i, argc, argv); // will exit if the command is recognized | 1257 | run_cmd_and_exit(i, argc, argv); // will exit if the command is recognized |
1258 | 1258 | ||
1259 | if (strcmp(argv[i], "--debug") == 0) | 1259 | if (strcmp(argv[i], "--debug") == 0) { |
1260 | arg_debug = 1; | 1260 | arg_debug = 1; |
1261 | arg_quiet = 0; | ||
1262 | } | ||
1261 | else if (strcmp(argv[i], "--debug-blacklists") == 0) | 1263 | else if (strcmp(argv[i], "--debug-blacklists") == 0) |
1262 | arg_debug_blacklists = 1; | 1264 | arg_debug_blacklists = 1; |
1263 | else if (strcmp(argv[i], "--debug-whitelists") == 0) | 1265 | else if (strcmp(argv[i], "--debug-whitelists") == 0) |
@@ -1265,8 +1267,8 @@ int main(int argc, char **argv, char **envp) { | |||
1265 | else if (strcmp(argv[i], "--debug-private-lib") == 0) | 1267 | else if (strcmp(argv[i], "--debug-private-lib") == 0) |
1266 | arg_debug_private_lib = 1; | 1268 | arg_debug_private_lib = 1; |
1267 | else if (strcmp(argv[i], "--quiet") == 0) { | 1269 | else if (strcmp(argv[i], "--quiet") == 0) { |
1268 | arg_quiet = 1; | 1270 | if (!arg_debug) |
1269 | arg_debug = 0; | 1271 | arg_quiet = 1; |
1270 | } | 1272 | } |
1271 | else if (strcmp(argv[i], "--allow-debuggers") == 0) { | 1273 | else if (strcmp(argv[i], "--allow-debuggers") == 0) { |
1272 | // already handled | 1274 | // already handled |
diff --git a/src/firejail/profile.c b/src/firejail/profile.c index 38e94c074..af28cd488 100644 --- a/src/firejail/profile.c +++ b/src/firejail/profile.c | |||
@@ -1734,7 +1734,7 @@ void profile_read(const char *fname) { | |||
1734 | if (strcmp(ptr, "quiet") == 0) { | 1734 | if (strcmp(ptr, "quiet") == 0) { |
1735 | if (is_in_ignore_list(ptr)) | 1735 | if (is_in_ignore_list(ptr)) |
1736 | arg_quiet = 0; | 1736 | arg_quiet = 0; |
1737 | else | 1737 | else if (!arg_debug) |
1738 | arg_quiet = 1; | 1738 | arg_quiet = 1; |
1739 | free(ptr); | 1739 | free(ptr); |
1740 | continue; | 1740 | continue; |