aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2023-02-24 20:37:35 -0500
committerLibravatar netblue30 <netblue30@protonmail.com>2023-02-24 20:37:35 -0500
commit2531759b80fbfcfbe296bd4bab329c61b7757c92 (patch)
treecc428443a3dbf5578882100ac45a9f6239fb430d
parentNew profiles: qpdf and redirects (#5675) (diff)
downloadfirejail-2531759b80fbfcfbe296bd4bab329c61b7757c92.tar.gz
firejail-2531759b80fbfcfbe296bd4bab329c61b7757c92.tar.zst
firejail-2531759b80fbfcfbe296bd4bab329c61b7757c92.zip
more private-etc
-rw-r--r--etc/profile-a-l/audacity.profile2
-rw-r--r--etc/profile-a-l/gimp.profile2
-rw-r--r--etc/profile-a-l/iagno.profile10
-rw-r--r--etc/profile-m-z/rhythmbox.profile1
-rw-r--r--etc/profile-m-z/totem.profile2
-rw-r--r--src/include/etc_groups.h8
-rwxr-xr-xtest/sysutils/less.exp20
-rwxr-xr-xtest/sysutils/man.exp13
-rwxr-xr-xtest/sysutils/sysutils.sh8
-rwxr-xr-xtest/sysutils/xzdec.exp29
10 files changed, 39 insertions, 56 deletions
diff --git a/etc/profile-a-l/audacity.profile b/etc/profile-a-l/audacity.profile
index 392b189f8..c2a482b61 100644
--- a/etc/profile-a-l/audacity.profile
+++ b/etc/profile-a-l/audacity.profile
@@ -50,7 +50,7 @@ tracelog
50 50
51private-bin audacity 51private-bin audacity
52private-dev 52private-dev
53private-etc @tls-ca,@x11 53private-etc @x11
54private-tmp 54private-tmp
55 55
56# problems on Fedora 27 56# problems on Fedora 27
diff --git a/etc/profile-a-l/gimp.profile b/etc/profile-a-l/gimp.profile
index 717519112..6f350f8ac 100644
--- a/etc/profile-a-l/gimp.profile
+++ b/etc/profile-a-l/gimp.profile
@@ -59,7 +59,7 @@ seccomp !mbind
59tracelog 59tracelog
60 60
61private-dev 61private-dev
62private-etc @tls-ca,@x11,python* 62private-etc @x11,python*
63private-tmp 63private-tmp
64 64
65dbus-user none 65dbus-user none
diff --git a/etc/profile-a-l/iagno.profile b/etc/profile-a-l/iagno.profile
index e16f3f1d5..82cba7887 100644
--- a/etc/profile-a-l/iagno.profile
+++ b/etc/profile-a-l/iagno.profile
@@ -13,6 +13,13 @@ include disable-interpreters.inc
13include disable-programs.inc 13include disable-programs.inc
14include disable-shell.inc 14include disable-shell.inc
15 15
16whitelist ${HOME}/.local/share/glib-2.0/schemas
17include whitelist-common.inc
18
19include whitelist-runuser-common.inc
20whitelist /usr/share/iagno
21whitelist /usr/share/gdm
22include whitelist-usr-share-common.inc
16include whitelist-var-common.inc 23include whitelist-var-common.inc
17 24
18apparmor 25apparmor
@@ -28,11 +35,12 @@ nou2f
28novideo 35novideo
29protocol unix 36protocol unix
30seccomp 37seccomp
38seccomp.block-secondary
31 39
32disable-mnt 40disable-mnt
33private
34private-bin iagno 41private-bin iagno
35private-dev 42private-dev
43private-etc @x11,gconf
36private-tmp 44private-tmp
37 45
38# dbus-user none 46# dbus-user none
diff --git a/etc/profile-m-z/rhythmbox.profile b/etc/profile-m-z/rhythmbox.profile
index dccd93429..77c032a53 100644
--- a/etc/profile-m-z/rhythmbox.profile
+++ b/etc/profile-m-z/rhythmbox.profile
@@ -51,6 +51,7 @@ tracelog
51private-bin rhythmbox,rhythmbox-client 51private-bin rhythmbox,rhythmbox-client
52private-cache 52private-cache
53private-dev 53private-dev
54private-etc @tls-ca,@x11,python*
54private-tmp 55private-tmp
55 56
56dbus-user filter 57dbus-user filter
diff --git a/etc/profile-m-z/totem.profile b/etc/profile-m-z/totem.profile
index e21d37040..a4cb49171 100644
--- a/etc/profile-m-z/totem.profile
+++ b/etc/profile-m-z/totem.profile
@@ -51,7 +51,7 @@ private-bin totem
51# totem needs access to ~/.cache/tracker or it exits 51# totem needs access to ~/.cache/tracker or it exits
52#private-cache 52#private-cache
53private-dev 53private-dev
54# private-etc alternatives,asound.conf,ca-certificates,crypto-policies,fonts,machine-id,pki,pulse,ssl 54private-etc @tls-ca,@x11,python*
55private-tmp 55private-tmp
56 56
57# makes settings immutable 57# makes settings immutable
diff --git a/src/include/etc_groups.h b/src/include/etc_groups.h
index 0ed5d4e32..9e24256c0 100644
--- a/src/include/etc_groups.h
+++ b/src/include/etc_groups.h
@@ -28,6 +28,10 @@
28static char *etc_list[ETC_MAX + 1] = { // plus 1 for ending NULL pointer 28static char *etc_list[ETC_MAX + 1] = { // plus 1 for ending NULL pointer
29 "alternatives", 29 "alternatives",
30 "fonts", 30 "fonts",
31 "gcrypt", // GNU crypto library - it contains configuration for specialized encryption
32 // and random number generators hardware.
33 // The directory is not installed in Debian. On Fedora it is an empty directory.
34 // The defaults in glibc cover the regular PC.
31 "group", 35 "group",
32 "ld.so.cache", 36 "ld.so.cache",
33 "ld.so.conf", 37 "ld.so.conf",
@@ -49,7 +53,6 @@ static char *etc_group_games[] = {
49 "openal", // 3D sound 53 "openal", // 3D sound
50 "timidity", // MIDI 54 "timidity", // MIDI
51 "timidity.cfg", 55 "timidity.cfg",
52 "vulkan", // next generation OpenGL stack
53 NULL 56 NULL
54}; 57};
55 58
@@ -75,8 +78,6 @@ static char *etc_group_sound[] = {
75static char *etc_group_tls_ca[] = { 78static char *etc_group_tls_ca[] = {
76 "ca-certificates", 79 "ca-certificates",
77 "crypto-policies", 80 "crypto-policies",
78 "gcrypt", // GNU crypto library - contains hardware config for various encryption schemes
79 // and random number generators. The file is not installed by Debian.
80 "pki", 81 "pki",
81 "ssl", 82 "ssl",
82 NULL 83 NULL
@@ -95,6 +96,7 @@ static char *etc_group_x11[] = {
95 "nvidia", // 3D 96 "nvidia", // 3D
96 "pango", // text rendering/internationalization 97 "pango", // text rendering/internationalization
97 "Trolltech.conf", // old QT config file 98 "Trolltech.conf", // old QT config file
99 "vulkan", // next generation OpenGL stack
98 "X11", 100 "X11",
99 "xdg", 101 "xdg",
100 NULL 102 NULL
diff --git a/test/sysutils/less.exp b/test/sysutils/less.exp
index 9e19af83a..182e259e1 100755
--- a/test/sysutils/less.exp
+++ b/test/sysutils/less.exp
@@ -7,17 +7,19 @@ set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "firejail less sysutils.sh\r" 10send -- "rm -f /tmp/tt\r"
11after 500
12
13send -- "firejail less sysutils.sh > /tmp/t\r"
14sleep 1
15
16send -- "cat /tmp/t | grep Authors\r"
11expect { 17expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 18 timeout {puts "TESTING ERROR 0\n";exit}
13 "(press RETURN)" {puts "TESTING SKIP: terminal is not fully functional - 1.1\n";exit}
14 "Press RETURN to continue" {puts "TESTING SKIP: terminal is not fully functional - 1.2\n";exit}
15 "Firejail Authors" 19 "Firejail Authors"
16} 20}
17expect {
18 timeout {puts "TESTING ERROR 2\n";exit}
19 "MALLOC_CHECK"
20}
21
22after 100 21after 100
22
23send -- "rm -f /tmp/t\r"
24after 500
23puts "\nall done\n" 25puts "\nall done\n"
diff --git a/test/sysutils/man.exp b/test/sysutils/man.exp
index f4fc5aa2c..0386b2e92 100755
--- a/test/sysutils/man.exp
+++ b/test/sysutils/man.exp
@@ -7,12 +7,19 @@ set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "firejail man firejail\r" 10send -- "rm -f /tmp/t\r"
11after 500
12
13send -- "firejail man firejail > /tmp/t\r"
14sleep 1
15
16send -- "cat /tmp/t\r"
11expect { 17expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 18 timeout {puts "TESTING ERROR 0\n";exit}
13 "(press RETURN)" {puts "TESTING SKIP: terminal is not fully functional - 1.1\n";exit}
14 "Press RETURN to continue" {puts "TESTING SKIP: terminal is not fully functional - 1.2\n";exit}
15 "NAME" 19 "NAME"
16} 20}
17after 100 21after 100
22
23send -- "rm -f /tmp/t\r"
24after 500
18puts "\nall done\n" 25puts "\nall done\n"
diff --git a/test/sysutils/sysutils.sh b/test/sysutils/sysutils.sh
index 34acca07d..231f5afa8 100755
--- a/test/sysutils/sysutils.sh
+++ b/test/sysutils/sysutils.sh
@@ -47,14 +47,6 @@ else
47 echo "TESTING SKIP: gzip not found" 47 echo "TESTING SKIP: gzip not found"
48fi 48fi
49 49
50if command -v xzdec
51then
52 echo "TESTING: xzdec"
53 ./xzdec.exp
54else
55 echo "TESTING SKIP: xzdec not found"
56fi
57
58if command -v xz 50if command -v xz
59then 51then
60 echo "TESTING: xz" 52 echo "TESTING: xz"
diff --git a/test/sysutils/xzdec.exp b/test/sysutils/xzdec.exp
deleted file mode 100755
index 62cc1c225..000000000
--- a/test/sysutils/xzdec.exp
+++ /dev/null
@@ -1,29 +0,0 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2023 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "/usr/bin/xz -c /usr/bin/firejail > firejail_t3\r"
11sleep 1
12
13send -- "/usr/bin/xzdec -c firejail_t3 > firejail_t1\r"
14sleep 1
15
16send -- "firejail /usr/bin/xzdec -c firejail_t3 > firejail_t2\r"
17sleep 1
18
19send -- "diff -s firejail_t1 firejail_t2\r"
20expect {
21 timeout {puts "TESTING ERROR 1\n";exit}
22 "firejail_t1 and firejail_t2 are identical"
23}
24
25send -- "rm firejail_t*\r"
26sleep 1
27
28
29puts "\nall done\n"