From e5893535d777f283d75c77236b7f7baec6decf61 Mon Sep 17 00:00:00 2001 From: Lukáš Krejčí Date: Wed, 13 Mar 2019 19:23:29 +0100 Subject: Fix incorrect parsing of --keep-var-tmp command The command was only recognized if it was passed as the first argument. Passing it on any other position on the command line caused the following error: Error: invalid --keep-var-tmp command line option Supplying it as the first argument also resulted in other commands that are parsed after it to be silently ignored. --- src/firejail/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/firejail/main.c b/src/firejail/main.c index 461cba26a..e02554c5e 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c @@ -1626,7 +1626,7 @@ int main(int argc, char **argv) { else if (strcmp(argv[i], "--writable-var") == 0) { arg_writable_var = 1; } - else if (strcmp(argv[1], "--keep-var-tmp") == 0) { + else if (strcmp(argv[i], "--keep-var-tmp") == 0) { arg_keep_var_tmp = 1; } else if (strcmp(argv[i], "--writable-run-user") == 0) { -- cgit v1.2.3-54-g00ecf