diff options
author | 2023-01-18 10:29:57 -0500 | |
---|---|---|
committer | 2023-01-18 10:29:57 -0500 | |
commit | 70974170c7c83e7f617d9c2920a4073a23fef798 (patch) | |
tree | 2b294fe9fba1e918cefc2570c9b47d7a3e9c1f64 | |
parent | update README.md (diff) | |
parent | refactor: do not show apparmor CLI options if app armor is not supported (diff) | |
download | firejail-70974170c7c83e7f617d9c2920a4073a23fef798.tar.gz firejail-70974170c7c83e7f617d9c2920a4073a23fef798.tar.zst firejail-70974170c7c83e7f617d9c2920a4073a23fef798.zip |
Merge pull request #5589 from nya1/fix/apparmor-invalid-command-line-option
docs: remove apparmor options in --help when building without apparmor support
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/firejail/usage.c | 2 |
3 files changed, 4 insertions, 2 deletions
@@ -26,7 +26,7 @@ $ cd firejail | |||
26 | $ ./configure && make && sudo make install-strip | 26 | $ ./configure && make && sudo make install-strip |
27 | 27 | ||
28 | On Debian/Ubuntu you will need to install git and gcc compiler. AppArmor | 28 | On Debian/Ubuntu you will need to install git and gcc compiler. AppArmor |
29 | development libraries and pkg-config are required when using --apparmor | 29 | development libraries and pkg-config are required when using --enable-apparmor |
30 | ./configure option: | 30 | ./configure option: |
31 | 31 | ||
32 | $ sudo apt-get install git build-essential libapparmor-dev pkg-config gawk | 32 | $ sudo apt-get install git build-essential libapparmor-dev pkg-config gawk |
@@ -115,7 +115,7 @@ $ cd firejail | |||
115 | $ ./configure && make && sudo make install-strip | 115 | $ ./configure && make && sudo make install-strip |
116 | ````` | 116 | ````` |
117 | On Debian/Ubuntu you will need to install git and gcc compiler. AppArmor | 117 | On Debian/Ubuntu you will need to install git and gcc compiler. AppArmor |
118 | development libraries and pkg-config are required when using `--apparmor` | 118 | development libraries and pkg-config are required when using `--enable-apparmor` |
119 | ./configure option: | 119 | ./configure option: |
120 | ````` | 120 | ````` |
121 | $ sudo apt-get install git build-essential libapparmor-dev pkg-config gawk | 121 | $ sudo apt-get install git build-essential libapparmor-dev pkg-config gawk |
diff --git a/src/firejail/usage.c b/src/firejail/usage.c index 0a4c8a483..bf4550dd8 100644 --- a/src/firejail/usage.c +++ b/src/firejail/usage.c | |||
@@ -30,10 +30,12 @@ static char *usage_str = | |||
30 | " -- - signal the end of options and disables further option processing.\n" | 30 | " -- - signal the end of options and disables further option processing.\n" |
31 | " --allow-debuggers - allow tools such as strace and gdb inside the sandbox.\n" | 31 | " --allow-debuggers - allow tools such as strace and gdb inside the sandbox.\n" |
32 | " --allusers - all user home directories are visible inside the sandbox.\n" | 32 | " --allusers - all user home directories are visible inside the sandbox.\n" |
33 | #ifdef HAVE_APPARMOR | ||
33 | " --apparmor - enable AppArmor confinement with the default profile.\n" | 34 | " --apparmor - enable AppArmor confinement with the default profile.\n" |
34 | " --apparmor=profile_name - enable AppArmor confinement with a\n" | 35 | " --apparmor=profile_name - enable AppArmor confinement with a\n" |
35 | "\tcustom profile.\n" | 36 | "\tcustom profile.\n" |
36 | " --apparmor.print=name|pid - print apparmor status.\n" | 37 | " --apparmor.print=name|pid - print apparmor status.\n" |
38 | #endif | ||
37 | " --appimage - sandbox an AppImage application.\n" | 39 | " --appimage - sandbox an AppImage application.\n" |
38 | #ifdef HAVE_NETWORK | 40 | #ifdef HAVE_NETWORK |
39 | " --bandwidth=name|pid - set bandwidth limits.\n" | 41 | " --bandwidth=name|pid - set bandwidth limits.\n" |