aboutsummaryrefslogtreecommitdiffstats
path: root/src/man
diff options
context:
space:
mode:
Diffstat (limited to 'src/man')
-rw-r--r--src/man/firejail-profile.txt24
-rw-r--r--src/man/firejail.txt53
2 files changed, 60 insertions, 17 deletions
diff --git a/src/man/firejail-profile.txt b/src/man/firejail-profile.txt
index 6e75aceed..1f543980e 100644
--- a/src/man/firejail-profile.txt
+++ b/src/man/firejail-profile.txt
@@ -499,23 +499,31 @@ Blacklist all Linux capabilities.
499Whitelist given Linux capabilities. 499Whitelist given Linux capabilities.
500#ifdef HAVE_LANDLOCK 500#ifdef HAVE_LANDLOCK
501.TP 501.TP
502\fBlandlock-read path 502\fBlandlock
503Create a Landlock ruleset (if it doesn't already exist) and add a read access rule for path. Note: if a process doesn't have CAP_SYS_ADMIN and the "No New Privileges" restriction is not enabled, the Landlock self-restriction will fail and Firejail will exit with an error. 503Create a Landlock ruleset (if it doesn't already exist) and add basic access rules to it.
504.br
505.TP
506\fBlandlock.proc no|ro|rw
507Add an access rule for /proc directory (read-only if set to \fBro\fR and read-write if set to \fBrw\fR). The access rule for /proc is added after this directory is set up in the sandbox. Access rules for /proc set up with other Landlock-related profile options have no effect.
508.br
509.TP
510\fBlandlock.read path
511Create a Landlock ruleset (if it doesn't already exist) and add a read access rule for path.
504.br 512.br
505 513
506.TP 514.TP
507\fBlandlock-write path 515\fBlandlock.write path
508Create a Landlock ruleset (if it doesn't already exist) and add a write access rule for path. Note: if a process doesn't have CAP_SYS_ADMIN and the "No New Privileges" restriction is not enabled, the Landlock self-restriction will fail and Firejail will exit with an error. 516Create a Landlock ruleset (if it doesn't already exist) and add a write access rule for path.
509.br 517.br
510 518
511.TP 519.TP
512\fBlandlock-restricted-write path 520\fBlandlock.special path
513Create a Landlock ruleset (if it doesn't already exist) and add a write access rule for path. This type of write access doesn't include the permission to create Unix domain sockets, FIFO pipes and block devices. Note: if a process doesn't have CAP_SYS_ADMIN and the "No New Privileges" restriction is not enabled, the Landlock self-restriction will fail and Firejail will exit with an error. 521Create a Landlock ruleset (if it doesn't already exist) and add an access rule for creation of FIFO pipes, Unix-domain sockets and block devices beneath given path.
514.br 522.br
515 523
516.TP 524.TP
517\fBlandlock-execute path 525\fBlandlock.execute path
518Create a Landlock ruleset (if it doesn't already exist) and add an execution permission rule for path. Note: if a process doesn't have CAP_SYS_ADMIN and the "No New Privileges" restriction is not enabled, the Landlock self-restriction will fail and Firejail will exit with an error. 526Create a Landlock ruleset (if it doesn't already exist) and add an execution permission rule for path.
519.br 527.br
520#endif 528#endif
521.TP 529.TP
diff --git a/src/man/firejail.txt b/src/man/firejail.txt
index 7082fe0ab..7922a53d0 100644
--- a/src/man/firejail.txt
+++ b/src/man/firejail.txt
@@ -1146,29 +1146,37 @@ $ firejail --keep-var-tmp
1146 1146
1147#ifdef HAVE_LANDLOCK 1147#ifdef HAVE_LANDLOCK
1148.TP 1148.TP
1149\fB\-\-landlock-read=path 1149\fB\-\-landlock
1150Create a Landlock ruleset (if it doesn't already exist) and add a read access rule for path. Note: if a process doesn't have CAP_SYS_ADMIN and the "No New Privileges" restriction is not enabled, the Landlock self-restriction will fail and Firejail will exit with an error. 1150Create a Landlock ruleset (if it doesn't already exist) and add basic access rules to it. See \fBLANDLOCK\fR section for more information.
1151.br
1152.TP
1153\fB\-\-landlock.proc=no|ro|rw
1154Add an access rule for /proc directory (read-only if set to \fBro\fR and read-write if set to \fBrw\fR). The access rule for /proc is added after this directory is set up in the sandbox. Access rules for /proc set up with other Landlock-related command-line options have no effect.
1155.br
1156.TP
1157\fB\-\-landlock.read=path
1158Create a Landlock ruleset (if it doesn't already exist) and add a read access rule for path.
1151.br 1159.br
1152 1160
1153.TP 1161.TP
1154\fB\-\-landlock-write=path 1162\fB\-\-landlock.write=path
1155Create a Landlock ruleset (if it doesn't already exist) and add a write access rule for path. Note: if a process doesn't have CAP_SYS_ADMIN and the "No New Privileges" restriction is not enabled, the Landlock self-restriction will fail and Firejail will exit with an error. 1163Create a Landlock ruleset (if it doesn't already exist) and add a write access rule for path.
1156.br 1164.br
1157 1165
1158.TP 1166.TP
1159\fB\-\-landlock-restricted-write=path 1167\fB\-\-landlock.special=path
1160Create a Landlock ruleset (if it doesn't already exist) and add a write access rule for path. This type of write access doesn't include the permission to create Unix domain sockets, FIFO pipes and block devices. Note: if a process doesn't have CAP_SYS_ADMIN and the "No New Privileges" restriction is not enabled, the Landlock self-restriction will fail and Firejail will exit with an error. 1168Create a Landlock ruleset (if it doesn't already exist) and add a permission rule to create FIFO pipes, Unix domain sockets and block devices beneath given path.
1161.br 1169.br
1162 1170
1163.TP 1171.TP
1164\fB\-\-landlock-execute=path 1172\fB\-\-landlock.execute=path
1165Create a Landlock ruleset (if it doesn't already exist) and add an execution permission rule for path. Note: if a process doesn't have CAP_SYS_ADMIN and the "No New Privileges" restriction is not enabled, the Landlock self-restriction will fail and Firejail will exit with an error. 1173Create a Landlock ruleset (if it doesn't already exist) and add an execution permission rule for path.
1166.br 1174.br
1167 1175
1168.br 1176.br
1169Example: 1177Example:
1170.br 1178.br
1171$ firejail \-\-landlock-read=/ \-\-landlock-restricted-write=/home \-\-landlock-execute=/usr 1179$ firejail \-\-landlock.read=/ \-\-landlock.write=/home \-\-landlock.execute=/usr
1172#endif 1180#endif
1173 1181
1174.TP 1182.TP
@@ -3216,7 +3224,34 @@ To enable AppArmor confinement on top of your current Firejail security features
3216.br 3224.br
3217$ firejail --apparmor firefox 3225$ firejail --apparmor firefox
3218#endif 3226#endif
3227#ifdef HAVE_LANDLOCK
3228.SH LANDLOCK
3229.TP
3230Landlock is a Linux security module first introduced in the 5.13 version of Linux kernel. It allows unprivileged processes to restrict their access to the filesystem. Once imposed, these restrictions can never be removed, and all child processes created by a Landlock-restricted processes inherit these restrictions. Firejail supports Landlock as an additional sandboxing feature. It can be used to ensure that a sandboxed application can only access files and directories that it was explicitly allowed to access. Firejail supports populating the ruleset with both basic set of rules and with custom set of rules. Basic set of rules allows read-only access to /bin, /dev, /etc, /lib, /opt, /proc, /usr and /var, read-write access to the home directory, and allows execution of binaries located in /bin, /opt and /usr.
3231.br
3232
3233.TP
3234Important notes:
3235.br
3219 3236
3237.br
3238- A process can install a Landlock ruleset only if it has either \fBCAP_SYS_ADMIN\fR in its effective capability set, or the "No New Privileges" restriction enabled. Because of this, enabling the Landlock feature will also cause Firejail to enable the "No New Privileges" restriction, regardless of the profile or the \fB\-\-no\-new\-privs\fR command line option.
3239.br
3240
3241.br
3242- Access to the /proc directory is managed through the \fB\-\-landlock.proc\fR command line option.
3243
3244.br
3245- Access to the /etc directory is automatically allowed. To override this, use the \fB\-\-writable\-etc\fR command line option. You can also use the \fB\-\-private\-etc\fR option to restrict access to the /etc directory.
3246.br
3247
3248.TP
3249To enable Landlock self-restriction on top of your current Firejail security features, pass \fB\-\-landlock\fR flag to Firejail command line. You can also use \fB\-\-landlock.read\fR, \fB\-\-landlock.write\fR, \fB\-\-landlock.special\fR and \fB\-\-landlock.execute\fR options together with \fB\-\-landlock\fR or instead of it. Example:
3250.br
3251
3252.br
3253$ firejail --landlock --landlock.read=/media --landlock.proc=ro mc
3254#endif
3220.SH DESKTOP INTEGRATION 3255.SH DESKTOP INTEGRATION
3221A symbolic link to /usr/bin/firejail under the name of a program, will start the program in Firejail sandbox. 3256A symbolic link to /usr/bin/firejail under the name of a program, will start the program in Firejail sandbox.
3222The symbolic link should be placed in the first $PATH position. On most systems, a good place 3257The symbolic link should be placed in the first $PATH position. On most systems, a good place