Skip to content

Commit

Permalink
bugfix: parse --debug before using it (#6579)
Browse files Browse the repository at this point in the history
The `arg_debug` flag is being set after some functions check for it,
such as `check_kernel_procs()`.
  • Loading branch information
powerjungle authored Dec 28, 2024
1 parent afce467 commit 9bd077b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/firejail/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 9bd077b

Please sign in to comment.