diff options
author | smitsohu <smitsohu@gmail.com> | 2019-01-13 15:21:01 +0100 |
---|---|---|
committer | smitsohu <smitsohu@gmail.com> | 2019-01-13 15:21:01 +0100 |
commit | 84eb9dba512074ccc9ce9f749223b4f2ce57a2c3 (patch) | |
tree | 47df45c1dfafb2d1cd098a1824f52eb7ac9e090a | |
parent | fix parent death signal (diff) | |
download | firejail-84eb9dba512074ccc9ce9f749223b4f2ce57a2c3.tar.gz firejail-84eb9dba512074ccc9ce9f749223b4f2ce57a2c3.tar.zst firejail-84eb9dba512074ccc9ce9f749223b4f2ce57a2c3.zip |
fix error message
as --appimage can be combined with chroot and overlay options, querying
it first makes the error message more correct
-rw-r--r-- | src/firejail/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index 9aff4e4e5..faa4972e2 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -2277,12 +2277,12 @@ int main(int argc, char **argv) { | |||
2277 | // exit chroot, overlay and appimage sandboxes when caps are explicitly specified on command line | 2277 | // exit chroot, overlay and appimage sandboxes when caps are explicitly specified on command line |
2278 | if (getuid() != 0 && arg_caps_cmdline) { | 2278 | if (getuid() != 0 && arg_caps_cmdline) { |
2279 | char *opt = NULL; | 2279 | char *opt = NULL; |
2280 | if (cfg.chrootdir) | 2280 | if (arg_appimage) |
2281 | opt = "chroot"; | 2281 | opt = "appimage"; |
2282 | else if (arg_overlay) | 2282 | else if (arg_overlay) |
2283 | opt = "overlay"; | 2283 | opt = "overlay"; |
2284 | else if (arg_appimage) | 2284 | else if (cfg.chrootdir) |
2285 | opt = "appimage"; | 2285 | opt = "chroot"; |
2286 | 2286 | ||
2287 | if (opt) { | 2287 | if (opt) { |
2288 | fprintf(stderr, "Error: all capabilities are dropped for %s by default.\n" | 2288 | fprintf(stderr, "Error: all capabilities are dropped for %s by default.\n" |