diff options
author | 2020-12-15 19:05:54 +0000 | |
---|---|---|
committer | 2020-12-15 19:05:54 +0000 | |
commit | 4a40e2a5f2009cf282dd783e73e1fb860ac758ba (patch) | |
tree | 98ab549570bd67a4987bb2b1ad019b372c205f54 /etc/profile-a-l | |
parent | Runuser fixes (#3826) (diff) | |
download | firejail-4a40e2a5f2009cf282dd783e73e1fb860ac758ba.tar.gz firejail-4a40e2a5f2009cf282dd783e73e1fb860ac758ba.tar.zst firejail-4a40e2a5f2009cf282dd783e73e1fb860ac758ba.zip |
Refactor archivers (#3820)
* Create archiver-common.inc
* add apparmor to archiver-common.inc
* refactor 7z.profile
* refactor ar.profile
* refactor atool.profile
* refactor bsdtar.profile
* refactor cpio.profile
* refactor gzip.profile
* refactor tar.profile
* refactor unrar.profile
* refactor unzip.profile
* refactor xzdec.profile
* refactor zstd.profile
* rewording
* blacklist ${RUNUSER} in archiver-common.inc
Thanks to @rusty-snake for suggesting this.
* drop non-sensical ${RUNUSER}/wayland-* blacklisting in archiver-common.inc
See discussion in https://github.com/netblue30/firejail/pull/3820#discussion_r543523343
Diffstat (limited to 'etc/profile-a-l')
-rw-r--r-- | etc/profile-a-l/7z.profile | 39 | ||||
-rw-r--r-- | etc/profile-a-l/ar.profile | 38 | ||||
-rw-r--r-- | etc/profile-a-l/atool.profile | 38 | ||||
-rw-r--r-- | etc/profile-a-l/bsdtar.profile | 39 | ||||
-rw-r--r-- | etc/profile-a-l/cpio.profile | 38 | ||||
-rw-r--r-- | etc/profile-a-l/gzip.profile | 39 |
6 files changed, 16 insertions, 215 deletions
diff --git a/etc/profile-a-l/7z.profile b/etc/profile-a-l/7z.profile index 02a2e7ea0..c7bed93ce 100644 --- a/etc/profile-a-l/7z.profile +++ b/etc/profile-a-l/7z.profile | |||
@@ -7,41 +7,8 @@ include 7z.local | |||
7 | # Persistent global definitions | 7 | # Persistent global definitions |
8 | include globals.local | 8 | include globals.local |
9 | 9 | ||
10 | blacklist ${RUNUSER}/wayland-* | 10 | ignore include disable-shell.inc |
11 | 11 | ignore nogroups | |
12 | include disable-common.inc | 12 | include archiver-common.inc |
13 | include disable-devel.inc | ||
14 | include disable-exec.inc | ||
15 | include disable-interpreters.inc | ||
16 | include disable-passwdmgr.inc | ||
17 | include disable-programs.inc | ||
18 | |||
19 | apparmor | ||
20 | caps.drop all | ||
21 | hostname 7z | ||
22 | ipc-namespace | ||
23 | machine-id | ||
24 | net none | ||
25 | no3d | ||
26 | nodvd | ||
27 | #nogroups | ||
28 | nonewprivs | ||
29 | #noroot | ||
30 | nosound | ||
31 | notv | ||
32 | nou2f | ||
33 | novideo | ||
34 | protocol unix | ||
35 | seccomp | ||
36 | shell none | ||
37 | tracelog | ||
38 | x11 none | ||
39 | 13 | ||
40 | #private-bin 7z,7z*,p7zip | 14 | #private-bin 7z,7z*,p7zip |
41 | private-cache | ||
42 | private-dev | ||
43 | |||
44 | dbus-user none | ||
45 | dbus-system none | ||
46 | |||
47 | memory-deny-write-execute | ||
diff --git a/etc/profile-a-l/ar.profile b/etc/profile-a-l/ar.profile index 183587ff8..a600eddef 100644 --- a/etc/profile-a-l/ar.profile +++ b/etc/profile-a-l/ar.profile | |||
@@ -7,42 +7,6 @@ include ar.local | |||
7 | # Persistent global definitions | 7 | # Persistent global definitions |
8 | include globals.local | 8 | include globals.local |
9 | 9 | ||
10 | blacklist ${RUNUSER}/wayland-* | 10 | include archiver-common.inc |
11 | |||
12 | include disable-common.inc | ||
13 | include disable-devel.inc | ||
14 | include disable-exec.inc | ||
15 | include disable-interpreters.inc | ||
16 | include disable-passwdmgr.inc | ||
17 | include disable-programs.inc | ||
18 | include disable-shell.inc | ||
19 | |||
20 | apparmor | ||
21 | caps.drop all | ||
22 | hostname ar | ||
23 | ipc-namespace | ||
24 | machine-id | ||
25 | net none | ||
26 | no3d | ||
27 | nodvd | ||
28 | nogroups | ||
29 | nonewprivs | ||
30 | #noroot | ||
31 | nosound | ||
32 | notv | ||
33 | nou2f | ||
34 | novideo | ||
35 | protocol unix | ||
36 | seccomp | ||
37 | shell none | ||
38 | tracelog | ||
39 | x11 none | ||
40 | 11 | ||
41 | private-bin ar | 12 | private-bin ar |
42 | private-cache | ||
43 | private-dev | ||
44 | |||
45 | dbus-user none | ||
46 | dbus-system none | ||
47 | |||
48 | memory-deny-write-execute | ||
diff --git a/etc/profile-a-l/atool.profile b/etc/profile-a-l/atool.profile index e501e956c..d8b6bbaaf 100644 --- a/etc/profile-a-l/atool.profile +++ b/etc/profile-a-l/atool.profile | |||
@@ -7,47 +7,15 @@ include atool.local | |||
7 | # Persistent global definitions | 7 | # Persistent global definitions |
8 | include globals.local | 8 | include globals.local |
9 | 9 | ||
10 | blacklist ${RUNUSER}/wayland-* | ||
11 | |||
12 | # Allow perl (blacklisted by disable-interpreters.inc) | 10 | # Allow perl (blacklisted by disable-interpreters.inc) |
13 | include allow-perl.inc | 11 | include allow-perl.inc |
12 | ignore include disable-devel.inc | ||
13 | ignore include disable-shell.inc | ||
14 | include archiver-common.inc | ||
14 | 15 | ||
15 | include disable-common.inc | ||
16 | # include disable-devel.inc | ||
17 | include disable-exec.inc | ||
18 | include disable-interpreters.inc | ||
19 | include disable-passwdmgr.inc | ||
20 | include disable-programs.inc | ||
21 | |||
22 | apparmor | ||
23 | caps.drop all | ||
24 | hostname atool | ||
25 | ipc-namespace | ||
26 | machine-id | ||
27 | net none | ||
28 | no3d | ||
29 | nodvd | ||
30 | nogroups | ||
31 | nonewprivs | ||
32 | noroot | 16 | noroot |
33 | nosound | ||
34 | notv | ||
35 | nou2f | ||
36 | novideo | ||
37 | protocol unix | ||
38 | seccomp | ||
39 | shell none | ||
40 | tracelog | ||
41 | x11 none | ||
42 | 17 | ||
43 | # private-bin atool,perl | 18 | # private-bin atool,perl |
44 | private-cache | ||
45 | private-dev | ||
46 | # without login.defs atool complains and uses UID/GID 1000 by default | 19 | # without login.defs atool complains and uses UID/GID 1000 by default |
47 | private-etc alternatives,group,login.defs,passwd | 20 | private-etc alternatives,group,login.defs,passwd |
48 | private-tmp | 21 | private-tmp |
49 | |||
50 | dbus-user none | ||
51 | dbus-system none | ||
52 | |||
53 | memory-deny-write-execute | ||
diff --git a/etc/profile-a-l/bsdtar.profile b/etc/profile-a-l/bsdtar.profile index 08e51f3c1..75e13e7e8 100644 --- a/etc/profile-a-l/bsdtar.profile +++ b/etc/profile-a-l/bsdtar.profile | |||
@@ -6,43 +6,10 @@ include bsdtar.local | |||
6 | # Persistent global definitions | 6 | # Persistent global definitions |
7 | include globals.local | 7 | include globals.local |
8 | 8 | ||
9 | blacklist ${RUNUSER}/wayland-* | 9 | ignore include disable-devel.inc |
10 | 10 | ignore include disable-shell.inc | |
11 | include disable-common.inc | 11 | include archiver-common.inc |
12 | # include disable-devel.inc | ||
13 | include disable-exec.inc | ||
14 | include disable-interpreters.inc | ||
15 | include disable-passwdmgr.inc | ||
16 | include disable-programs.inc | ||
17 | |||
18 | apparmor | ||
19 | caps.drop all | ||
20 | hostname bsdtar | ||
21 | ipc-namespace | ||
22 | machine-id | ||
23 | net none | ||
24 | no3d | ||
25 | nodvd | ||
26 | nogroups | ||
27 | nonewprivs | ||
28 | # noroot | ||
29 | nosound | ||
30 | notv | ||
31 | nou2f | ||
32 | novideo | ||
33 | protocol unix | ||
34 | seccomp | ||
35 | shell none | ||
36 | tracelog | ||
37 | x11 none | ||
38 | 12 | ||
39 | # support compressed archives | 13 | # support compressed archives |
40 | private-bin bash,bsdcat,bsdcpio,bsdtar,bzip2,compress,gtar,gzip,lbzip2,libarchive,lz4,lzip,lzma,lzop,sh,xz | 14 | private-bin bash,bsdcat,bsdcpio,bsdtar,bzip2,compress,gtar,gzip,lbzip2,libarchive,lz4,lzip,lzma,lzop,sh,xz |
41 | private-cache | ||
42 | private-dev | ||
43 | private-etc alternatives,group,localtime,passwd | 15 | private-etc alternatives,group,localtime,passwd |
44 | |||
45 | dbus-user none | ||
46 | dbus-system none | ||
47 | |||
48 | memory-deny-write-execute | ||
diff --git a/etc/profile-a-l/cpio.profile b/etc/profile-a-l/cpio.profile index 087a5b2bb..5e01952b4 100644 --- a/etc/profile-a-l/cpio.profile +++ b/etc/profile-a-l/cpio.profile | |||
@@ -7,40 +7,10 @@ include cpio.local | |||
7 | # Persistent global definitions | 7 | # Persistent global definitions |
8 | include globals.local | 8 | include globals.local |
9 | 9 | ||
10 | blacklist ${RUNUSER}/wayland-* | ||
11 | |||
12 | noblacklist /sbin | 10 | noblacklist /sbin |
13 | noblacklist /usr/sbin | 11 | noblacklist /usr/sbin |
14 | 12 | ||
15 | include disable-common.inc | 13 | ignore include disable-devel.inc |
16 | # include disable-devel.inc | 14 | ignore include disable-interpreters.inc |
17 | include disable-exec.inc | 15 | ignore include disable-shell.inc |
18 | include disable-passwdmgr.inc | 16 | include archiver-common.inc |
19 | include disable-programs.inc | ||
20 | |||
21 | apparmor | ||
22 | caps.drop all | ||
23 | hostname cpio | ||
24 | ipc-namespace | ||
25 | machine-id | ||
26 | net none | ||
27 | no3d | ||
28 | nodvd | ||
29 | nogroups | ||
30 | nonewprivs | ||
31 | nosound | ||
32 | notv | ||
33 | nou2f | ||
34 | novideo | ||
35 | seccomp | ||
36 | shell none | ||
37 | tracelog | ||
38 | x11 none | ||
39 | |||
40 | private-cache | ||
41 | private-dev | ||
42 | |||
43 | dbus-user none | ||
44 | dbus-system none | ||
45 | |||
46 | memory-deny-write-execute | ||
diff --git a/etc/profile-a-l/gzip.profile b/etc/profile-a-l/gzip.profile index 8ec39d8ca..96c1743e3 100644 --- a/etc/profile-a-l/gzip.profile +++ b/etc/profile-a-l/gzip.profile | |||
@@ -7,43 +7,8 @@ include gzip.local | |||
7 | # Persistent global definitions | 7 | # Persistent global definitions |
8 | include globals.local | 8 | include globals.local |
9 | 9 | ||
10 | blacklist ${RUNUSER}/wayland-* | ||
11 | |||
12 | # Arch Linux (based distributions) need access to /var/lib/pacman. As we drop all capabilities this is automatically read-only. | 10 | # Arch Linux (based distributions) need access to /var/lib/pacman. As we drop all capabilities this is automatically read-only. |
13 | noblacklist /var/lib/pacman | 11 | noblacklist /var/lib/pacman |
14 | 12 | ||
15 | include disable-common.inc | 13 | ignore include disable-shell.inc |
16 | include disable-devel.inc | 14 | include archiver-common.inc |
17 | include disable-exec.inc | ||
18 | include disable-interpreters.inc | ||
19 | include disable-passwdmgr.inc | ||
20 | include disable-programs.inc | ||
21 | |||
22 | apparmor | ||
23 | caps.drop all | ||
24 | hostname gzip | ||
25 | ipc-namespace | ||
26 | machine-id | ||
27 | net none | ||
28 | no3d | ||
29 | nodvd | ||
30 | nogroups | ||
31 | nonewprivs | ||
32 | #noroot | ||
33 | nosound | ||
34 | notv | ||
35 | nou2f | ||
36 | novideo | ||
37 | protocol unix | ||
38 | seccomp | ||
39 | shell none | ||
40 | tracelog | ||
41 | x11 none | ||
42 | |||
43 | private-cache | ||
44 | private-dev | ||
45 | |||
46 | dbus-user none | ||
47 | dbus-system none | ||
48 | |||
49 | memory-deny-write-execute | ||