From 9bd077b39c10b0646bcf0739a107848b0962830b Mon Sep 17 00:00:00 2001 From: powerjungle Date: Sat, 28 Dec 2024 16:41:56 +0100 Subject: [PATCH] bugfix: parse --debug before using it (#6579) The `arg_debug` flag is being set after some functions check for it, such as `check_kernel_procs()`. --- src/firejail/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/firejail/main.c b/src/firejail/main.c index 27ae68eb0fe..e989a5ead30 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c @@ -1110,6 +1110,12 @@ int main(int argc, char **argv, char **envp) { if (check_arg(argc, argv, "--quiet", 1) || (env_quiet && strcmp(env_quiet, "yes") == 0)) arg_quiet = 1; + // process --debug + if (check_arg(argc, argv, "--debug", 1)) { + arg_debug = 1; + arg_quiet = 0; + } + // check if the user is allowed to use firejail init_cfg(argc, argv);