aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--RELNOTES3
-rw-r--r--etc/7za.profile1
-rw-r--r--etc/7zr.profile1
-rw-r--r--etc/Xephyr.profile1
-rw-r--r--etc/Xvfb.profile1
-rw-r--r--etc/acat.profile1
-rw-r--r--etc/adiff.profile1
-rw-r--r--etc/als.profile1
-rw-r--r--etc/apack.profile1
-rw-r--r--etc/arepack.profile1
-rw-r--r--etc/aunpack.profile1
-rw-r--r--etc/conplay.profile2
-rw-r--r--etc/dig.profile2
-rw-r--r--etc/disable-programs.inc2
-rw-r--r--etc/dnscrypt-proxy.profile1
-rw-r--r--etc/dnsmasq.profile1
-rw-r--r--etc/ffmpegthumbnailer.profile1
-rw-r--r--etc/ffplay.profile1
-rw-r--r--etc/ffprobe.profile1
-rw-r--r--etc/kiwix-desktop.profile49
-rw-r--r--etc/lrunzip.profile1
-rw-r--r--etc/lrz.profile1
-rw-r--r--etc/lrzcat.profile1
-rw-r--r--etc/lrzip.profile1
-rw-r--r--etc/lrztar.profile1
-rw-r--r--etc/lrzuntar.profile1
-rw-r--r--etc/nano.profile1
-rw-r--r--etc/p7zip.profile1
-rw-r--r--etc/qt-faststart.profile1
-rw-r--r--etc/rnano.profile1
-rw-r--r--etc/scp.profile1
-rw-r--r--etc/seahorse-daemon.profile1
-rw-r--r--etc/sftp.profile1
-rw-r--r--etc/tb-starter-wrapper.profile2
-rw-r--r--etc/torbrowser-launcher.profile4
-rw-r--r--etc/transmission-create.profile1
-rw-r--r--etc/transmission-edit.profile1
-rw-r--r--etc/transmission-remote-cli.profile1
-rw-r--r--etc/transmission-remote-gtk.profile1
-rw-r--r--etc/whois.profile2
-rw-r--r--etc/xpra.profile1
-rw-r--r--etc/zpaq.profile1
-rw-r--r--src/firecfg/firecfg.config1
-rw-r--r--src/libtrace/libtrace.c154
-rwxr-xr-xtest/fs/whitelist-dev.exp8
46 files changed, 253 insertions, 12 deletions
diff --git a/README.md b/README.md
index 89c4b9c53..9e0116350 100644
--- a/README.md
+++ b/README.md
@@ -116,4 +116,4 @@ We also keep a list of profile fixes for previous released versions in [etc-fixe
116 116
117## New profiles: 117## New profiles:
118 118
119gnome-sound-recorder, godot, jerry, keepassxc-cli, keepassxc-proxy, klatexformula, klatexformula_cmdl, links, newsbeuter, OpenArena, pandoc, qgis, rhythmbox-client, tcpdump, teams-for-linux, tshark, xlinks, zeal, mpg123, conplay, mpg123.bin, mpg123-alsa, mpg123-id3dump, mpg123-jack, mpg123-nas, mpg123-openal, mpg123-oss, mpg123-portaudio, mpg123-pulse, mpg123-strip, out123, pavucontrol-qt, gnome-characters, gnome-character-map, rsync, Whalebird, tor-browser (AUR), Zulip, tb-starter-wrapper, bzcat 119gnome-sound-recorder, godot, jerry, keepassxc-cli, keepassxc-proxy, klatexformula, klatexformula_cmdl, links, newsbeuter, OpenArena, pandoc, qgis, rhythmbox-client, tcpdump, teams-for-linux, tshark, xlinks, zeal, mpg123, conplay, mpg123.bin, mpg123-alsa, mpg123-id3dump, mpg123-jack, mpg123-nas, mpg123-openal, mpg123-oss, mpg123-portaudio, mpg123-pulse, mpg123-strip, out123, pavucontrol-qt, gnome-characters, gnome-character-map, rsync, Whalebird, tor-browser (AUR), Zulip, tb-starter-wrapper, bzcat, kiwix-desktop
diff --git a/RELNOTES b/RELNOTES
index d639940bd..41a288bd0 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -12,7 +12,8 @@ firejail (0.9.61) baseline; urgency=low
12 * new profiles: mpg123-jack, mpg123-nas, mpg123-openal, mpg123-oss 12 * new profiles: mpg123-jack, mpg123-nas, mpg123-openal, mpg123-oss
13 * new profiles: mpg123-portaudio, mpg123-pulse, mpg123-strip, pavucontrol-qt 13 * new profiles: mpg123-portaudio, mpg123-pulse, mpg123-strip, pavucontrol-qt
14 * new profiles: gnome-characters, gnome-character-map, rsync, Whalebird, 14 * new profiles: gnome-characters, gnome-character-map, rsync, Whalebird,
15 * new profiles: tor-browser (AUR), Zulip, tb-starter-wrapper, bzcat 15 * new profiles: tor-browser (AUR), Zulip, tb-starter-wrapper, bzcat,
16 * new profiles: kiwix-desktop
16 -- netblue30 <netblue30@yahoo.com> Sat, 1 Jun 2019 08:00:00 -0500 17 -- netblue30 <netblue30@yahoo.com> Sat, 1 Jun 2019 08:00:00 -0500
17 18
18firejail (0.9.60) baseline; urgency=low 19firejail (0.9.60) baseline; urgency=low
diff --git a/etc/7za.profile b/etc/7za.profile
index 28e483a8c..14188e1f0 100644
--- a/etc/7za.profile
+++ b/etc/7za.profile
@@ -1,5 +1,6 @@
1# Firejail profile for 7za 1# Firejail profile for 7za
2# This file is overwritten after every install/update 2# This file is overwritten after every install/update
3quiet
3# Persistent local customizations 4# Persistent local customizations
4include 7za.local 5include 7za.local
5# Persistent global definitions 6# Persistent global definitions
diff --git a/etc/7zr.profile b/etc/7zr.profile
index 1b85badbc..2cb42fa40 100644
--- a/etc/7zr.profile
+++ b/etc/7zr.profile
@@ -1,5 +1,6 @@
1# Firejail profile for 7zr 1# Firejail profile for 7zr
2# This file is overwritten after every install/update 2# This file is overwritten after every install/update
3quiet
3# Persistent local customizations 4# Persistent local customizations
4include 7zr.local 5include 7zr.local
5# Persistent global definitions 6# Persistent global definitions
diff --git a/etc/Xephyr.profile b/etc/Xephyr.profile
index 5ef75022b..ab5fdf942 100644
--- a/etc/Xephyr.profile
+++ b/etc/Xephyr.profile
@@ -1,6 +1,7 @@
1# Firejail profile for Xephyr 1# Firejail profile for Xephyr
2# This file is overwritten after every install/update 2# This file is overwritten after every install/update
3# Persistent local customizations 3# Persistent local customizations
4quiet
4include Xephyr.local 5include Xephyr.local
5# Persistent global definitions 6# Persistent global definitions
6include globals.local 7include globals.local
diff --git a/etc/Xvfb.profile b/etc/Xvfb.profile
index 3ecda698e..6559be21a 100644
--- a/etc/Xvfb.profile
+++ b/etc/Xvfb.profile
@@ -1,6 +1,7 @@
1# Firejail profile for Xvfb 1# Firejail profile for Xvfb
2# Description: Virtual Framebuffer 'fake' X server 2# Description: Virtual Framebuffer 'fake' X server
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include Xvfb.local 6include Xvfb.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/acat.profile b/etc/acat.profile
index f35adf3dc..522d8db4e 100644
--- a/etc/acat.profile
+++ b/etc/acat.profile
@@ -1,5 +1,6 @@
1# Firejail profile for acat 1# Firejail profile for acat
2# This file is overwritten after every install/update 2# This file is overwritten after every install/update
3quiet
3# Persistent local customizations 4# Persistent local customizations
4include acat.local 5include acat.local
5# Persistent global definitions 6# Persistent global definitions
diff --git a/etc/adiff.profile b/etc/adiff.profile
index f22a27e79..a80886d56 100644
--- a/etc/adiff.profile
+++ b/etc/adiff.profile
@@ -1,5 +1,6 @@
1# Firejail profile for adiff 1# Firejail profile for adiff
2# This file is overwritten after every install/update 2# This file is overwritten after every install/update
3quiet
3# Persistent local customizations 4# Persistent local customizations
4include adiff.local 5include adiff.local
5# Persistent global definitions 6# Persistent global definitions
diff --git a/etc/als.profile b/etc/als.profile
index aa7f29337..5eae228b6 100644
--- a/etc/als.profile
+++ b/etc/als.profile
@@ -1,5 +1,6 @@
1# Firejail profile for als 1# Firejail profile for als
2# This file is overwritten after every install/update 2# This file is overwritten after every install/update
3quiet
3# Persistent local customizations 4# Persistent local customizations
4include als.local 5include als.local
5# Persistent global definitions 6# Persistent global definitions
diff --git a/etc/apack.profile b/etc/apack.profile
index b09d3d718..9fef911af 100644
--- a/etc/apack.profile
+++ b/etc/apack.profile
@@ -1,5 +1,6 @@
1# Firejail profile for apack 1# Firejail profile for apack
2# This file is overwritten after every install/update 2# This file is overwritten after every install/update
3quiet
3# Persistent local customizations 4# Persistent local customizations
4include apack.local 5include apack.local
5# Persistent global definitions 6# Persistent global definitions
diff --git a/etc/arepack.profile b/etc/arepack.profile
index d23fc21db..012f2f049 100644
--- a/etc/arepack.profile
+++ b/etc/arepack.profile
@@ -1,5 +1,6 @@
1# Firejail profile for arepack 1# Firejail profile for arepack
2# This file is overwritten after every install/update 2# This file is overwritten after every install/update
3quiet
3# Persistent local customizations 4# Persistent local customizations
4include arepack.local 5include arepack.local
5# Persistent global definitions 6# Persistent global definitions
diff --git a/etc/aunpack.profile b/etc/aunpack.profile
index c119ed9ad..6ce4aa491 100644
--- a/etc/aunpack.profile
+++ b/etc/aunpack.profile
@@ -1,5 +1,6 @@
1# Firejail profile for aunpack 1# Firejail profile for aunpack
2# This file is overwritten after every install/update 2# This file is overwritten after every install/update
3quiet
3# Persistent local customizations 4# Persistent local customizations
4include aunpack.local 5include aunpack.local
5# Persistent global definitions 6# Persistent global definitions
diff --git a/etc/conplay.profile b/etc/conplay.profile
index 101ce2f17..d0ad7c753 100644
--- a/etc/conplay.profile
+++ b/etc/conplay.profile
@@ -1,4 +1,6 @@
1# Firejail profile for conplay 1# Firejail profile for conplay
2# Description: MPEG audio player/decoder
3# This file is overwritten after every install/update
2# Persistent local customizations 4# Persistent local customizations
3include conplay.local 5include conplay.local
4# Persistent global definitions 6# Persistent global definitions
diff --git a/etc/dig.profile b/etc/dig.profile
index 6f2c1f755..611cbf026 100644
--- a/etc/dig.profile
+++ b/etc/dig.profile
@@ -1,7 +1,7 @@
1# Firejail profile for dig 1# Firejail profile for dig
2# Description: DNS lookup utility 2# Description: DNS lookup utility
3quiet
4# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations 5# Persistent local customizations
6include dig.local 6include dig.local
7# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/disable-programs.inc b/etc/disable-programs.inc
index c0bf1f8d4..a3f7c570b 100644
--- a/etc/disable-programs.inc
+++ b/etc/disable-programs.inc
@@ -509,6 +509,8 @@ blacklist ${HOME}/.local/share/kaffeine
509blacklist ${HOME}/.local/share/kate 509blacklist ${HOME}/.local/share/kate
510blacklist ${HOME}/.local/share/kdenlive 510blacklist ${HOME}/.local/share/kdenlive
511blacklist ${HOME}/.local/share/kget 511blacklist ${HOME}/.local/share/kget
512blacklist ${HOME}/.local/share/kiwix
513blacklist ${HOME}/.local/share/kiwix-desktop
512blacklist ${HOME}/.local/share/klavaro 514blacklist ${HOME}/.local/share/klavaro
513blacklist ${HOME}/.local/share/kmail2 515blacklist ${HOME}/.local/share/kmail2
514blacklist ${HOME}/.local/share/knotes 516blacklist ${HOME}/.local/share/knotes
diff --git a/etc/dnscrypt-proxy.profile b/etc/dnscrypt-proxy.profile
index c04451373..bba94e3cb 100644
--- a/etc/dnscrypt-proxy.profile
+++ b/etc/dnscrypt-proxy.profile
@@ -1,6 +1,7 @@
1# Firejail profile for dnscrypt-proxy 1# Firejail profile for dnscrypt-proxy
2# Description: Tool for securing communications between a client and a DNS resolver 2# Description: Tool for securing communications between a client and a DNS resolver
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include dnscrypt-proxy.local 6include dnscrypt-proxy.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/dnsmasq.profile b/etc/dnsmasq.profile
index daf4795c3..dfb1b61c1 100644
--- a/etc/dnsmasq.profile
+++ b/etc/dnsmasq.profile
@@ -1,6 +1,7 @@
1# Firejail profile for dnsmasq 1# Firejail profile for dnsmasq
2# Description: Small caching DNS proxy and DHCP/TFTP server 2# Description: Small caching DNS proxy and DHCP/TFTP server
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include dnsmasq.local 6include dnsmasq.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/ffmpegthumbnailer.profile b/etc/ffmpegthumbnailer.profile
index 3681c40f1..6d72c3b99 100644
--- a/etc/ffmpegthumbnailer.profile
+++ b/etc/ffmpegthumbnailer.profile
@@ -1,6 +1,7 @@
1# Firejail profile for ffmpegthumbnailer 1# Firejail profile for ffmpegthumbnailer
2# Description: FFmpeg-based video thumbnailer 2# Description: FFmpeg-based video thumbnailer
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include ffmpegthumbnailer.local 6include ffmpegthumbnailer.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/ffplay.profile b/etc/ffplay.profile
index b42cc29bc..71187a5b5 100644
--- a/etc/ffplay.profile
+++ b/etc/ffplay.profile
@@ -1,6 +1,7 @@
1# Firejail profile for ffplay 1# Firejail profile for ffplay
2# Description: FFmpeg-based media player 2# Description: FFmpeg-based media player
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include ffplay.local 6include ffplay.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/ffprobe.profile b/etc/ffprobe.profile
index bd8643206..cb24a7d05 100644
--- a/etc/ffprobe.profile
+++ b/etc/ffprobe.profile
@@ -1,6 +1,7 @@
1# Firejail profile for ffprobe 1# Firejail profile for ffprobe
2# Description: FFmpeg-based media prober 2# Description: FFmpeg-based media prober
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include ffprobe.local 6include ffprobe.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/kiwix-desktop.profile b/etc/kiwix-desktop.profile
new file mode 100644
index 000000000..db8f7880c
--- /dev/null
+++ b/etc/kiwix-desktop.profile
@@ -0,0 +1,49 @@
1# Firejail profile for kiwix-desktop
2# Description: view/manage ZIM files
3# This file is overwritten after every install/update
4# Persistent local customizations
5include kiwix-desktop.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.local/share/kiwix
10noblacklist ${HOME}/.local/share/kiwix-desktop
11
12include disable-common.inc
13include disable-devel.inc
14include disable-exec.inc
15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc
18include disable-xdg.inc
19
20mkdir ${HOME}/.local/share/kiwix
21mkdir ${HOME}/.local/share/kiwix-desktop
22whitelist ${HOME}/.local/share/kiwix
23whitelist ${HOME}/.local/share/kiwix-desktop
24include whitelist-common.inc
25include whitelist-var-common.inc
26
27apparmor
28caps.drop all
29ipc-namespace
30netfilter
31# no3d
32nodbus
33nodvd
34nogroups
35nonewprivs
36noroot
37# nosound
38notv
39nou2f
40novideo
41protocol unix,inet,inet6,netlink
42seccomp.drop @clock,@cpu-emulation,@debug,@module,@obsolete,@raw-io,@reboot,@resources,@swap,acct,add_key,bpf,fanotify_init,io_cancel,io_destroy,io_getevents,io_setup,io_submit,ioprio_set,kcmp,keyctl,mount,name_to_handle_at,nfsservctl,ni_syscall,open_by_handle_at,personality,pivot_root,process_vm_readv,ptrace,remap_file_pages,request_key,setdomainname,sethostname,syslog,umount,umount2,userfaultfd,vhangup,vmsplice
43shell none
44
45disable-mnt
46private-cache
47private-dev
48private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,hostname,hosts,ld.so.cache,machine-id,pki,pulse,resolv.conf,ssl
49private-tmp
diff --git a/etc/lrunzip.profile b/etc/lrunzip.profile
index 72abec8bb..c010cbd96 100644
--- a/etc/lrunzip.profile
+++ b/etc/lrunzip.profile
@@ -1,6 +1,7 @@
1# Firejail profile for lrunzip 1# Firejail profile for lrunzip
2# Description: Multi-threaded compression with rzip/lzma, lzo and zpaq 2# Description: Multi-threaded compression with rzip/lzma, lzo and zpaq
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include lrunzip.local 6include lrunzip.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/lrz.profile b/etc/lrz.profile
index c1f928bde..8077be945 100644
--- a/etc/lrz.profile
+++ b/etc/lrz.profile
@@ -1,6 +1,7 @@
1# Firejail profile for lrz 1# Firejail profile for lrz
2# Description: Multi-threaded compression with rzip/lzma, lzo and zpaq 2# Description: Multi-threaded compression with rzip/lzma, lzo and zpaq
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include lrz.local 6include lrz.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/lrzcat.profile b/etc/lrzcat.profile
index edcd7f8cd..d05ee7aae 100644
--- a/etc/lrzcat.profile
+++ b/etc/lrzcat.profile
@@ -1,6 +1,7 @@
1# Firejail profile for lrzcat 1# Firejail profile for lrzcat
2# Description: Multi-threaded compression with rzip/lzma, lzo and zpaq 2# Description: Multi-threaded compression with rzip/lzma, lzo and zpaq
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include lrzcat.local 6include lrzcat.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/lrzip.profile b/etc/lrzip.profile
index a69096e28..3767767f6 100644
--- a/etc/lrzip.profile
+++ b/etc/lrzip.profile
@@ -1,6 +1,7 @@
1# Firejail profile for lrzip 1# Firejail profile for lrzip
2# Description: Multi-threaded compression with rzip/lzma, lzo and zpaq 2# Description: Multi-threaded compression with rzip/lzma, lzo and zpaq
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include lrzip.local 6include lrzip.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/lrztar.profile b/etc/lrztar.profile
index 54b04b4ec..673e9f62e 100644
--- a/etc/lrztar.profile
+++ b/etc/lrztar.profile
@@ -1,6 +1,7 @@
1# Firejail profile for lrztar 1# Firejail profile for lrztar
2# Description: Multi-threaded compression with rzip/lzma, lzo and zpaq 2# Description: Multi-threaded compression with rzip/lzma, lzo and zpaq
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include lrztar.local 6include lrztar.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/lrzuntar.profile b/etc/lrzuntar.profile
index f21169b24..245d1c669 100644
--- a/etc/lrzuntar.profile
+++ b/etc/lrzuntar.profile
@@ -1,6 +1,7 @@
1# Firejail profile for lrzuntar 1# Firejail profile for lrzuntar
2# Description: Multi-threaded compression with rzip/lzma, lzo and zpaq 2# Description: Multi-threaded compression with rzip/lzma, lzo and zpaq
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include lrzuntar.local 6include lrzuntar.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/nano.profile b/etc/nano.profile
index 30a6e03e7..9965d8a6b 100644
--- a/etc/nano.profile
+++ b/etc/nano.profile
@@ -1,6 +1,7 @@
1# Firejail profile for nano 1# Firejail profile for nano
2# Description: nano is an easy text editor for the terminal 2# Description: nano is an easy text editor for the terminal
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include nano.local 6include nano.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/p7zip.profile b/etc/p7zip.profile
index 644292f2b..7e0069afc 100644
--- a/etc/p7zip.profile
+++ b/etc/p7zip.profile
@@ -1,6 +1,7 @@
1# Firejail profile for p7zip 1# Firejail profile for p7zip
2# Description: 7zr file archiver with high compression ratio 2# Description: 7zr file archiver with high compression ratio
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include p7zip.local 6include p7zip.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/qt-faststart.profile b/etc/qt-faststart.profile
index cf459472a..2cdff33a6 100644
--- a/etc/qt-faststart.profile
+++ b/etc/qt-faststart.profile
@@ -1,6 +1,7 @@
1# Firejail profile for qt-faststart 1# Firejail profile for qt-faststart
2# Description: FFmpeg-based media utility 2# Description: FFmpeg-based media utility
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include qt-faststart.local 6include qt-faststart.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/rnano.profile b/etc/rnano.profile
index 565c957e0..d9048982a 100644
--- a/etc/rnano.profile
+++ b/etc/rnano.profile
@@ -1,6 +1,7 @@
1# Firejail profile for rnano 1# Firejail profile for rnano
2# Description: A restricted nano 2# Description: A restricted nano
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include rnano.local 6include rnano.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/scp.profile b/etc/scp.profile
index ca902061c..287b8029a 100644
--- a/etc/scp.profile
+++ b/etc/scp.profile
@@ -1,6 +1,7 @@
1# Firejail profile for scp 1# Firejail profile for scp
2# Description: Secure shell copy 2# Description: Secure shell copy
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include scp.local 6include scp.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/seahorse-daemon.profile b/etc/seahorse-daemon.profile
index 7c0e59c74..6410da4d8 100644
--- a/etc/seahorse-daemon.profile
+++ b/etc/seahorse-daemon.profile
@@ -1,6 +1,7 @@
1# Firejail profile for seahorse-daemon 1# Firejail profile for seahorse-daemon
2# Description: PGP encryption and signing 2# Description: PGP encryption and signing
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include seahorse-daemon.local 6include seahorse-daemon.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/sftp.profile b/etc/sftp.profile
index c980e1751..66dc2a57b 100644
--- a/etc/sftp.profile
+++ b/etc/sftp.profile
@@ -1,6 +1,7 @@
1# Firejail profile for sftp 1# Firejail profile for sftp
2# Description: Secure file transport protocol 2# Description: Secure file transport protocol
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include sftp.local 6include sftp.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/tb-starter-wrapper.profile b/etc/tb-starter-wrapper.profile
index 8a7d45449..7cf85b387 100644
--- a/etc/tb-starter-wrapper.profile
+++ b/etc/tb-starter-wrapper.profile
@@ -13,7 +13,5 @@ noblacklist ${HOME}/.tb
13mkdir ${HOME}/.tb 13mkdir ${HOME}/.tb
14whitelist ${HOME}/.tb 14whitelist ${HOME}/.tb
15 15
16x11 xorg
17
18# Redirect 16# Redirect
19include torbrowser-launcher.profile 17include torbrowser-launcher.profile
diff --git a/etc/torbrowser-launcher.profile b/etc/torbrowser-launcher.profile
index 00b82e852..8485c0c4c 100644
--- a/etc/torbrowser-launcher.profile
+++ b/etc/torbrowser-launcher.profile
@@ -48,7 +48,7 @@ shell none
48#tracelog 48#tracelog
49 49
50disable-mnt 50disable-mnt
51private-bin bash,cat,cp,cut,dirname,env,expr,file,getconf,gpg,grep,gxmessage,id,kdialog,ln,mkdir,mv,pwd,python*,readlink,realpath,rm,sed,sh,tail,tar,tclsh,test,tor-browser,tor-browser-en,torbrowser-launcher,update-desktop-database,xmessage,xz,zenity 51private-bin bash,cat,cp,cut,dirname,env,expr,file,gpg,grep,gxmessage,kdialog,ln,mkdir,mv,python*,rm,sed,sh,tail,tar,tclsh,test,tor-browser,tor-browser-en,torbrowser-launcher,update-desktop-database,xmessage,xz,zenity
52private-dev 52private-dev
53private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,hostname,hosts,ld.so.cache,machine-id,pki,pulse,resolv.conf,ssl 53private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,ld.so.cache,machine-id,pki,pulse,resolv.conf,ssl
54private-tmp 54private-tmp
diff --git a/etc/transmission-create.profile b/etc/transmission-create.profile
index 9b84bc33a..92a4770e2 100644
--- a/etc/transmission-create.profile
+++ b/etc/transmission-create.profile
@@ -1,6 +1,7 @@
1# Firejail profile for transmission-create 1# Firejail profile for transmission-create
2# Description: CLI utility to create BitTorrent .torrent files 2# Description: CLI utility to create BitTorrent .torrent files
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include transmission-create.local 6include transmission-create.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/transmission-edit.profile b/etc/transmission-edit.profile
index 07990aa15..6d8a98911 100644
--- a/etc/transmission-edit.profile
+++ b/etc/transmission-edit.profile
@@ -1,6 +1,7 @@
1# Firejail profile for transmission-edit 1# Firejail profile for transmission-edit
2# Description: CLI utility to modify BitTorrent .torrent files' announce URLs 2# Description: CLI utility to modify BitTorrent .torrent files' announce URLs
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include transmission-edit.local 6include transmission-edit.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/transmission-remote-cli.profile b/etc/transmission-remote-cli.profile
index 98b875fc5..2e7a31545 100644
--- a/etc/transmission-remote-cli.profile
+++ b/etc/transmission-remote-cli.profile
@@ -1,6 +1,7 @@
1# Firejail profile for transmission-remote-cli 1# Firejail profile for transmission-remote-cli
2# Description: A remote control utility for transmission-daemon (CLI) 2# Description: A remote control utility for transmission-daemon (CLI)
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include transmission-remote-cli.local 6include transmission-remote-cli.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/transmission-remote-gtk.profile b/etc/transmission-remote-gtk.profile
index b7173def5..5a57e4887 100644
--- a/etc/transmission-remote-gtk.profile
+++ b/etc/transmission-remote-gtk.profile
@@ -1,6 +1,7 @@
1# Firejail profile for transmission-remote-gtk 1# Firejail profile for transmission-remote-gtk
2# Description: A remote control utility for transmission-daemon (GTK GUI) 2# Description: A remote control utility for transmission-daemon (GTK GUI)
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include transmission-remote-gtk.local 6include transmission-remote-gtk.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/whois.profile b/etc/whois.profile
index f101ee637..859542533 100644
--- a/etc/whois.profile
+++ b/etc/whois.profile
@@ -1,7 +1,7 @@
1# Firejail profile for whois 1# Firejail profile for whois
2# Description: Intelligent WHOIS client 2# Description: Intelligent WHOIS client
3quiet
4# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations 5# Persistent local customizations
6include whois.local 6include whois.local
7# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/xpra.profile b/etc/xpra.profile
index 6f66b9300..1033a7471 100644
--- a/etc/xpra.profile
+++ b/etc/xpra.profile
@@ -1,6 +1,7 @@
1# Firejail profile for xpra 1# Firejail profile for xpra
2# Description: Tool to detach/reattach running X programs 2# Description: Tool to detach/reattach running X programs
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include xpra.local 6include xpra.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/zpaq.profile b/etc/zpaq.profile
index 6bf3605eb..80329ecfd 100644
--- a/etc/zpaq.profile
+++ b/etc/zpaq.profile
@@ -1,6 +1,7 @@
1# Firejail profile for zpaq 1# Firejail profile for zpaq
2# Description: Programmable file compressor, library and utilities. Based on the PAQ compression algorithm. 2# Description: Programmable file compressor, library and utilities. Based on the PAQ compression algorithm.
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4quiet
4# Persistent local customizations 5# Persistent local customizations
5include zpaq.local 6include zpaq.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/src/firecfg/firecfg.config b/src/firecfg/firecfg.config
index 59d64ceb4..daaa4919e 100644
--- a/src/firecfg/firecfg.config
+++ b/src/firecfg/firecfg.config
@@ -314,6 +314,7 @@ kid3
314kid3-cli 314kid3-cli
315kid3-qt 315kid3-qt
316kino 316kino
317kiwix-desktop
317klatexformula 318klatexformula
318klatexformula_cmdl 319klatexformula_cmdl
319klavaro 320klavaro
diff --git a/src/libtrace/libtrace.c b/src/libtrace/libtrace.c
index 60fdb5470..71a1234cc 100644
--- a/src/libtrace/libtrace.c
+++ b/src/libtrace/libtrace.c
@@ -43,7 +43,16 @@ static orig_fopen64_t orig_fopen64 = NULL;
43// 43//
44// library constructor/destructor 44// library constructor/destructor
45// 45//
46//#define PRINTF_DEVTTY
47#ifdef PRINTF_DEVTTY
48// Replacing printf with fprintf to /dev/tty in order to fix #561
49// In some cases this crashes the program running in the sandbox.
50// Example:
51// $ firejail --trace mkdir ttt
52// logs the following error in syslog:
53// debian kernel: [18521.399073] mkdir[12206]: segfault at 0 ip 00007f77ebf41f6b sp 00007ffe1a0161e0 error 4 in libc-2.24.so[7f77ebe4b000+195000]
46static FILE *ftty = NULL; 54static FILE *ftty = NULL;
55#endif
47static pid_t mypid = 0; 56static pid_t mypid = 0;
48#define MAXNAME 16 57#define MAXNAME 16
49static char myname[MAXNAME] = {'\0', }; 58static char myname[MAXNAME] = {'\0', };
@@ -53,7 +62,10 @@ void init(void) {
53 orig_fopen = (orig_fopen_t)dlsym(RTLD_NEXT, "fopen"); 62 orig_fopen = (orig_fopen_t)dlsym(RTLD_NEXT, "fopen");
54 63
55 // tty 64 // tty
65#ifdef PRINTF_DEVTTY
56 ftty = orig_fopen("/dev/tty", "w"); 66 ftty = orig_fopen("/dev/tty", "w");
67printf("*** ftty %p ***\n", ftty);
68#endif
57 69
58 // pid 70 // pid
59 mypid = getpid(); 71 mypid = getpid();
@@ -79,7 +91,9 @@ void init(void) {
79 91
80static void fini(void) __attribute__((destructor)); 92static void fini(void) __attribute__((destructor));
81void fini(void) { 93void fini(void) {
94#ifdef PRINTF_DEVTTY
82 fclose(ftty); 95 fclose(ftty);
96#endif
83} 97}
84 98
85// 99//
@@ -226,23 +240,43 @@ static char *translate(XTable *table, int val) {
226static void print_sockaddr(int sockfd, const char *call, const struct sockaddr *addr, int rv) { 240static void print_sockaddr(int sockfd, const char *call, const struct sockaddr *addr, int rv) {
227 if (addr->sa_family == AF_INET) { 241 if (addr->sa_family == AF_INET) {
228 struct sockaddr_in *a = (struct sockaddr_in *) addr; 242 struct sockaddr_in *a = (struct sockaddr_in *) addr;
243#ifdef PRINTF_DEVTTY
229 fprintf(ftty, "%u:%s:%s %d %s port %u:%d\n", mypid, myname, call, sockfd, inet_ntoa(a->sin_addr), ntohs(a->sin_port), rv); 244 fprintf(ftty, "%u:%s:%s %d %s port %u:%d\n", mypid, myname, call, sockfd, inet_ntoa(a->sin_addr), ntohs(a->sin_port), rv);
245#else
246 printf("%u:%s:%s %d %s port %u:%d\n", mypid, myname, call, sockfd, inet_ntoa(a->sin_addr), ntohs(a->sin_port), rv);
247#endif
230 } 248 }
231 else if (addr->sa_family == AF_INET6) { 249 else if (addr->sa_family == AF_INET6) {
232 struct sockaddr_in6 *a = (struct sockaddr_in6 *) addr; 250 struct sockaddr_in6 *a = (struct sockaddr_in6 *) addr;
233 char str[INET6_ADDRSTRLEN]; 251 char str[INET6_ADDRSTRLEN];
234 inet_ntop(AF_INET6, &(a->sin6_addr), str, INET6_ADDRSTRLEN); 252 inet_ntop(AF_INET6, &(a->sin6_addr), str, INET6_ADDRSTRLEN);
253#ifdef PRINTF_DEVTTY
235 fprintf(ftty, "%u:%s:%s %d %s:%d\n", mypid, myname, call, sockfd, str, rv); 254 fprintf(ftty, "%u:%s:%s %d %s:%d\n", mypid, myname, call, sockfd, str, rv);
255#else
256 printf("%u:%s:%s %d %s:%d\n", mypid, myname, call, sockfd, str, rv);
257#endif
236 } 258 }
237 else if (addr->sa_family == AF_UNIX) { 259 else if (addr->sa_family == AF_UNIX) {
238 struct sockaddr_un *a = (struct sockaddr_un *) addr; 260 struct sockaddr_un *a = (struct sockaddr_un *) addr;
239 if (a->sun_path[0]) 261 if (a->sun_path[0])
262#ifdef PRINTF_DEVTTY
240 fprintf(ftty, "%u:%s:%s %d %s:%d\n", mypid, myname, call, sockfd, a->sun_path, rv); 263 fprintf(ftty, "%u:%s:%s %d %s:%d\n", mypid, myname, call, sockfd, a->sun_path, rv);
264#else
265 printf("%u:%s:%s %d %s:%d\n", mypid, myname, call, sockfd, a->sun_path, rv);
266#endif
241 else 267 else
268#ifdef PRINTF_DEVTTY
242 fprintf(ftty, "%u:%s:%s %d @%s:%d\n", mypid, myname, call, sockfd, a->sun_path + 1, rv); 269 fprintf(ftty, "%u:%s:%s %d @%s:%d\n", mypid, myname, call, sockfd, a->sun_path + 1, rv);
270#else
271 printf("%u:%s:%s %d @%s:%d\n", mypid, myname, call, sockfd, a->sun_path + 1, rv);
272#endif
243 } 273 }
244 else { 274 else {
275#ifdef PRINTF_DEVTTY
245 fprintf(ftty, "%u:%s:%s %d family %d:%d\n", mypid, myname, call, sockfd, addr->sa_family, rv); 276 fprintf(ftty, "%u:%s:%s %d family %d:%d\n", mypid, myname, call, sockfd, addr->sa_family, rv);
277#else
278 printf("%u:%s:%s %d family %d:%d\n", mypid, myname, call, sockfd, addr->sa_family, rv);
279#endif
246 } 280 }
247} 281}
248 282
@@ -258,7 +292,11 @@ int open(const char *pathname, int flags, mode_t mode) {
258 orig_open = (orig_open_t)dlsym(RTLD_NEXT, "open"); 292 orig_open = (orig_open_t)dlsym(RTLD_NEXT, "open");
259 293
260 int rv = orig_open(pathname, flags, mode); 294 int rv = orig_open(pathname, flags, mode);
295#ifdef PRINTF_DEVTTY
261 fprintf(ftty, "%u:%s:open %s:%d\n", mypid, myname, pathname, rv); 296 fprintf(ftty, "%u:%s:open %s:%d\n", mypid, myname, pathname, rv);
297#else
298 printf("%u:%s:open %s:%d\n", mypid, myname, pathname, rv);
299#endif
262 return rv; 300 return rv;
263} 301}
264 302
@@ -269,7 +307,11 @@ int open64(const char *pathname, int flags, mode_t mode) {
269 orig_open64 = (orig_open64_t)dlsym(RTLD_NEXT, "open64"); 307 orig_open64 = (orig_open64_t)dlsym(RTLD_NEXT, "open64");
270 308
271 int rv = orig_open64(pathname, flags, mode); 309 int rv = orig_open64(pathname, flags, mode);
310#ifdef PRINTF_DEVTTY
272 fprintf(ftty, "%u:%s:open64 %s:%d\n", mypid, myname, pathname, rv); 311 fprintf(ftty, "%u:%s:open64 %s:%d\n", mypid, myname, pathname, rv);
312#else
313 printf("%u:%s:open64 %s:%d\n", mypid, myname, pathname, rv);
314#endif
273 return rv; 315 return rv;
274} 316}
275 317
@@ -281,7 +323,11 @@ int openat(int dirfd, const char *pathname, int flags, mode_t mode) {
281 orig_openat = (orig_openat_t)dlsym(RTLD_NEXT, "openat"); 323 orig_openat = (orig_openat_t)dlsym(RTLD_NEXT, "openat");
282 324
283 int rv = orig_openat(dirfd, pathname, flags, mode); 325 int rv = orig_openat(dirfd, pathname, flags, mode);
326#ifdef PRINTF_DEVTTY
284 fprintf(ftty, "%u:%s:openat %s:%d\n", mypid, myname, pathname, rv); 327 fprintf(ftty, "%u:%s:openat %s:%d\n", mypid, myname, pathname, rv);
328#else
329 printf("%u:%s:openat %s:%d\n", mypid, myname, pathname, rv);
330#endif
285 return rv; 331 return rv;
286} 332}
287 333
@@ -292,7 +338,11 @@ int openat64(int dirfd, const char *pathname, int flags, mode_t mode) {
292 orig_openat64 = (orig_openat64_t)dlsym(RTLD_NEXT, "openat64"); 338 orig_openat64 = (orig_openat64_t)dlsym(RTLD_NEXT, "openat64");
293 339
294 int rv = orig_openat64(dirfd, pathname, flags, mode); 340 int rv = orig_openat64(dirfd, pathname, flags, mode);
341#ifdef PRINTF_DEVTTY
295 fprintf(ftty, "%u:%s:openat64 %s:%d\n", mypid, myname, pathname, rv); 342 fprintf(ftty, "%u:%s:openat64 %s:%d\n", mypid, myname, pathname, rv);
343#else
344 printf("%u:%s:openat64 %s:%d\n", mypid, myname, pathname, rv);
345#endif
296 return rv; 346 return rv;
297} 347}
298 348
@@ -303,7 +353,11 @@ FILE *fopen(const char *pathname, const char *mode) {
303 orig_fopen = (orig_fopen_t)dlsym(RTLD_NEXT, "fopen"); 353 orig_fopen = (orig_fopen_t)dlsym(RTLD_NEXT, "fopen");
304 354
305 FILE *rv = orig_fopen(pathname, mode); 355 FILE *rv = orig_fopen(pathname, mode);
356#ifdef PRINTF_DEVTTY
306 fprintf(ftty, "%u:%s:fopen %s:%p\n", mypid, myname, pathname, rv); 357 fprintf(ftty, "%u:%s:fopen %s:%p\n", mypid, myname, pathname, rv);
358#else
359 printf("%u:%s:fopen %s:%p\n", mypid, myname, pathname, rv);
360#endif
307 return rv; 361 return rv;
308} 362}
309 363
@@ -313,7 +367,11 @@ FILE *fopen64(const char *pathname, const char *mode) {
313 orig_fopen64 = (orig_fopen_t)dlsym(RTLD_NEXT, "fopen64"); 367 orig_fopen64 = (orig_fopen_t)dlsym(RTLD_NEXT, "fopen64");
314 368
315 FILE *rv = orig_fopen64(pathname, mode); 369 FILE *rv = orig_fopen64(pathname, mode);
370#ifdef PRINTF_DEVTTY
316 fprintf(ftty, "%u:%s:fopen64 %s:%p\n", mypid, myname, pathname, rv); 371 fprintf(ftty, "%u:%s:fopen64 %s:%p\n", mypid, myname, pathname, rv);
372#else
373 printf("%u:%s:fopen64 %s:%p\n", mypid, myname, pathname, rv);
374#endif
317 return rv; 375 return rv;
318} 376}
319#endif /* __GLIBC__ */ 377#endif /* __GLIBC__ */
@@ -327,7 +385,11 @@ FILE *freopen(const char *pathname, const char *mode, FILE *stream) {
327 orig_freopen = (orig_freopen_t)dlsym(RTLD_NEXT, "freopen"); 385 orig_freopen = (orig_freopen_t)dlsym(RTLD_NEXT, "freopen");
328 386
329 FILE *rv = orig_freopen(pathname, mode, stream); 387 FILE *rv = orig_freopen(pathname, mode, stream);
388#ifdef PRINTF_DEVTTY
330 fprintf(ftty, "%u:%s:freopen %s:%p\n", mypid, myname, pathname, rv); 389 fprintf(ftty, "%u:%s:freopen %s:%p\n", mypid, myname, pathname, rv);
390#else
391 printf("%u:%s:freopen %s:%p\n", mypid, myname, pathname, rv);
392#endif
331 return rv; 393 return rv;
332} 394}
333 395
@@ -339,7 +401,11 @@ FILE *freopen64(const char *pathname, const char *mode, FILE *stream) {
339 orig_freopen64 = (orig_freopen64_t)dlsym(RTLD_NEXT, "freopen64"); 401 orig_freopen64 = (orig_freopen64_t)dlsym(RTLD_NEXT, "freopen64");
340 402
341 FILE *rv = orig_freopen64(pathname, mode, stream); 403 FILE *rv = orig_freopen64(pathname, mode, stream);
404#ifdef PRINTF_DEVTTY
342 fprintf(ftty, "%u:%s:freopen64 %s:%p\n", mypid, myname, pathname, rv); 405 fprintf(ftty, "%u:%s:freopen64 %s:%p\n", mypid, myname, pathname, rv);
406#else
407 printf("%u:%s:freopen64 %s:%p\n", mypid, myname, pathname, rv);
408#endif
343 return rv; 409 return rv;
344} 410}
345#endif /* __GLIBC__ */ 411#endif /* __GLIBC__ */
@@ -352,7 +418,11 @@ int unlink(const char *pathname) {
352 orig_unlink = (orig_unlink_t)dlsym(RTLD_NEXT, "unlink"); 418 orig_unlink = (orig_unlink_t)dlsym(RTLD_NEXT, "unlink");
353 419
354 int rv = orig_unlink(pathname); 420 int rv = orig_unlink(pathname);
421#ifdef PRINTF_DEVTTY
355 fprintf(ftty, "%u:%s:unlink %s:%d\n", mypid, myname, pathname, rv); 422 fprintf(ftty, "%u:%s:unlink %s:%d\n", mypid, myname, pathname, rv);
423#else
424 printf("%u:%s:unlink %s:%d\n", mypid, myname, pathname, rv);
425#endif
356 return rv; 426 return rv;
357} 427}
358 428
@@ -363,7 +433,11 @@ int unlinkat(int dirfd, const char *pathname, int flags) {
363 orig_unlinkat = (orig_unlinkat_t)dlsym(RTLD_NEXT, "unlinkat"); 433 orig_unlinkat = (orig_unlinkat_t)dlsym(RTLD_NEXT, "unlinkat");
364 434
365 int rv = orig_unlinkat(dirfd, pathname, flags); 435 int rv = orig_unlinkat(dirfd, pathname, flags);
436#ifdef PRINTF_DEVTTY
366 fprintf(ftty, "%u:%s:unlinkat %s:%d\n", mypid, myname, pathname, rv); 437 fprintf(ftty, "%u:%s:unlinkat %s:%d\n", mypid, myname, pathname, rv);
438#else
439 printf("%u:%s:unlinkat %s:%d\n", mypid, myname, pathname, rv);
440#endif
367 return rv; 441 return rv;
368} 442}
369 443
@@ -375,7 +449,11 @@ int mkdir(const char *pathname, mode_t mode) {
375 orig_mkdir = (orig_mkdir_t)dlsym(RTLD_NEXT, "mkdir"); 449 orig_mkdir = (orig_mkdir_t)dlsym(RTLD_NEXT, "mkdir");
376 450
377 int rv = orig_mkdir(pathname, mode); 451 int rv = orig_mkdir(pathname, mode);
452#ifdef PRINTF_DEVTTY
378 fprintf(ftty, "%u:%s:mkdir %s:%d\n", mypid, myname, pathname, rv); 453 fprintf(ftty, "%u:%s:mkdir %s:%d\n", mypid, myname, pathname, rv);
454#else
455 printf("%u:%s:mkdir %s:%d\n", mypid, myname, pathname, rv);
456#endif
379 return rv; 457 return rv;
380} 458}
381 459
@@ -386,7 +464,11 @@ int mkdirat(int dirfd, const char *pathname, mode_t mode) {
386 orig_mkdirat = (orig_mkdirat_t)dlsym(RTLD_NEXT, "mkdirat"); 464 orig_mkdirat = (orig_mkdirat_t)dlsym(RTLD_NEXT, "mkdirat");
387 465
388 int rv = orig_mkdirat(dirfd, pathname, mode); 466 int rv = orig_mkdirat(dirfd, pathname, mode);
467#ifdef PRINTF_DEVTTY
389 fprintf(ftty, "%u:%s:mkdirat %s:%d\n", mypid, myname, pathname, rv); 468 fprintf(ftty, "%u:%s:mkdirat %s:%d\n", mypid, myname, pathname, rv);
469#else
470 printf("%u:%s:mkdirat %s:%d\n", mypid, myname, pathname, rv);
471#endif
390 return rv; 472 return rv;
391} 473}
392 474
@@ -397,7 +479,11 @@ int rmdir(const char *pathname) {
397 orig_rmdir = (orig_rmdir_t)dlsym(RTLD_NEXT, "rmdir"); 479 orig_rmdir = (orig_rmdir_t)dlsym(RTLD_NEXT, "rmdir");
398 480
399 int rv = orig_rmdir(pathname); 481 int rv = orig_rmdir(pathname);
482#ifdef PRINTF_DEVTTY
400 fprintf(ftty, "%u:%s:rmdir %s:%d\n", mypid, myname, pathname, rv); 483 fprintf(ftty, "%u:%s:rmdir %s:%d\n", mypid, myname, pathname, rv);
484#else
485 printf("%u:%s:rmdir %s:%d\n", mypid, myname, pathname, rv);
486#endif
401 return rv; 487 return rv;
402} 488}
403 489
@@ -409,7 +495,11 @@ int stat(const char *pathname, struct stat *statbuf) {
409 orig_stat = (orig_stat_t)dlsym(RTLD_NEXT, "stat"); 495 orig_stat = (orig_stat_t)dlsym(RTLD_NEXT, "stat");
410 496
411 int rv = orig_stat(pathname, statbuf); 497 int rv = orig_stat(pathname, statbuf);
498#ifdef PRINTF_DEVTTY
412 fprintf(ftty, "%u:%s:stat %s:%d\n", mypid, myname, pathname, rv); 499 fprintf(ftty, "%u:%s:stat %s:%d\n", mypid, myname, pathname, rv);
500#else
501 printf("%u:%s:stat %s:%d\n", mypid, myname, pathname, rv);
502#endif
413 return rv; 503 return rv;
414} 504}
415 505
@@ -421,7 +511,11 @@ int stat64(const char *pathname, struct stat64 *statbuf) {
421 orig_stat64 = (orig_stat64_t)dlsym(RTLD_NEXT, "stat64"); 511 orig_stat64 = (orig_stat64_t)dlsym(RTLD_NEXT, "stat64");
422 512
423 int rv = orig_stat64(pathname, statbuf); 513 int rv = orig_stat64(pathname, statbuf);
514#ifdef PRINTF_DEVTTY
424 fprintf(ftty, "%u:%s:stat64 %s:%d\n", mypid, myname, pathname, rv); 515 fprintf(ftty, "%u:%s:stat64 %s:%d\n", mypid, myname, pathname, rv);
516#else
517 printf("%u:%s:stat64 %s:%d\n", mypid, myname, pathname, rv);
518#endif
425 return rv; 519 return rv;
426} 520}
427#endif /* __GLIBC__ */ 521#endif /* __GLIBC__ */
@@ -434,7 +528,11 @@ int lstat(const char *pathname, struct stat *statbuf) {
434 orig_lstat = (orig_lstat_t)dlsym(RTLD_NEXT, "lstat"); 528 orig_lstat = (orig_lstat_t)dlsym(RTLD_NEXT, "lstat");
435 529
436 int rv = orig_lstat(pathname, statbuf); 530 int rv = orig_lstat(pathname, statbuf);
531#ifdef PRINTF_DEVTTY
437 fprintf(ftty, "%u:%s:lstat %s:%d\n", mypid, myname, pathname, rv); 532 fprintf(ftty, "%u:%s:lstat %s:%d\n", mypid, myname, pathname, rv);
533#else
534 printf("%u:%s:lstat %s:%d\n", mypid, myname, pathname, rv);
535#endif
438 return rv; 536 return rv;
439} 537}
440 538
@@ -446,7 +544,11 @@ int lstat64(const char *pathname, struct stat64 *statbuf) {
446 orig_lstat64 = (orig_lstat64_t)dlsym(RTLD_NEXT, "lstat64"); 544 orig_lstat64 = (orig_lstat64_t)dlsym(RTLD_NEXT, "lstat64");
447 545
448 int rv = orig_lstat64(pathname, statbuf); 546 int rv = orig_lstat64(pathname, statbuf);
547#ifdef PRINTF_DEVTTY
449 fprintf(ftty, "%u:%s:lstat64 %s:%d\n", mypid, myname, pathname, rv); 548 fprintf(ftty, "%u:%s:lstat64 %s:%d\n", mypid, myname, pathname, rv);
549#else
550 printf("%u:%s:lstat64 %s:%d\n", mypid, myname, pathname, rv);
551#endif
450 return rv; 552 return rv;
451} 553}
452#endif /* __GLIBC__ */ 554#endif /* __GLIBC__ */
@@ -459,7 +561,11 @@ DIR *opendir(const char *pathname) {
459 orig_opendir = (orig_opendir_t)dlsym(RTLD_NEXT, "opendir"); 561 orig_opendir = (orig_opendir_t)dlsym(RTLD_NEXT, "opendir");
460 562
461 DIR *rv = orig_opendir(pathname); 563 DIR *rv = orig_opendir(pathname);
564#ifdef PRINTF_DEVTTY
462 fprintf(ftty, "%u:%s:opendir %s:%p\n", mypid, myname, pathname, rv); 565 fprintf(ftty, "%u:%s:opendir %s:%p\n", mypid, myname, pathname, rv);
566#else
567 printf("%u:%s:opendir %s:%p\n", mypid, myname, pathname, rv);
568#endif
463 return rv; 569 return rv;
464} 570}
465 571
@@ -471,7 +577,11 @@ int access(const char *pathname, int mode) {
471 orig_access = (orig_access_t)dlsym(RTLD_NEXT, "access"); 577 orig_access = (orig_access_t)dlsym(RTLD_NEXT, "access");
472 578
473 int rv = orig_access(pathname, mode); 579 int rv = orig_access(pathname, mode);
580#ifdef PRINTF_DEVTTY
474 fprintf(ftty, "%u:%s:access %s:%d\n", mypid, myname, pathname, rv); 581 fprintf(ftty, "%u:%s:access %s:%d\n", mypid, myname, pathname, rv);
582#else
583 printf("%u:%s:access %s:%d\n", mypid, myname, pathname, rv);
584#endif
475 return rv; 585 return rv;
476} 586}
477 587
@@ -529,7 +639,11 @@ int socket(int domain, int type, int protocol) {
529 sprintf(ptr, "%s", str); 639 sprintf(ptr, "%s", str);
530 } 640 }
531 641
642#ifdef PRINTF_DEVTTY
532 fprintf(ftty, "%s:%d\n", socketbuf, rv); 643 fprintf(ftty, "%s:%d\n", socketbuf, rv);
644#else
645 printf("%s:%d\n", socketbuf, rv);
646#endif
533 return rv; 647 return rv;
534} 648}
535 649
@@ -567,7 +681,11 @@ int system(const char *command) {
567 orig_system = (orig_system_t)dlsym(RTLD_NEXT, "system"); 681 orig_system = (orig_system_t)dlsym(RTLD_NEXT, "system");
568 682
569 int rv = orig_system(command); 683 int rv = orig_system(command);
684#ifdef PRINTF_DEVTTY
570 fprintf(ftty, "%u:%s:system %s:%d\n", mypid, myname, command, rv); 685 fprintf(ftty, "%u:%s:system %s:%d\n", mypid, myname, command, rv);
686#else
687 printf("%u:%s:system %s:%d\n", mypid, myname, command, rv);
688#endif
571 689
572 return rv; 690 return rv;
573} 691}
@@ -579,7 +697,11 @@ int setuid(uid_t uid) {
579 orig_setuid = (orig_setuid_t)dlsym(RTLD_NEXT, "setuid"); 697 orig_setuid = (orig_setuid_t)dlsym(RTLD_NEXT, "setuid");
580 698
581 int rv = orig_setuid(uid); 699 int rv = orig_setuid(uid);
700#ifdef PRINTF_DEVTTY
582 fprintf(ftty, "%u:%s:setuid %d:%d\n", mypid, myname, uid, rv); 701 fprintf(ftty, "%u:%s:setuid %d:%d\n", mypid, myname, uid, rv);
702#else
703 printf("%u:%s:setuid %d:%d\n", mypid, myname, uid, rv);
704#endif
583 705
584 return rv; 706 return rv;
585} 707}
@@ -591,7 +713,11 @@ int setgid(gid_t gid) {
591 orig_setgid = (orig_setgid_t)dlsym(RTLD_NEXT, "setgid"); 713 orig_setgid = (orig_setgid_t)dlsym(RTLD_NEXT, "setgid");
592 714
593 int rv = orig_setgid(gid); 715 int rv = orig_setgid(gid);
716#ifdef PRINTF_DEVTTY
594 fprintf(ftty, "%u:%s:setgid %d:%d\n", mypid, myname, gid, rv); 717 fprintf(ftty, "%u:%s:setgid %d:%d\n", mypid, myname, gid, rv);
718#else
719 printf("%u:%s:setgid %d:%d\n", mypid, myname, gid, rv);
720#endif
595 721
596 return rv; 722 return rv;
597} 723}
@@ -603,7 +729,11 @@ int setfsuid(uid_t uid) {
603 orig_setfsuid = (orig_setfsuid_t)dlsym(RTLD_NEXT, "setfsuid"); 729 orig_setfsuid = (orig_setfsuid_t)dlsym(RTLD_NEXT, "setfsuid");
604 730
605 int rv = orig_setfsuid(uid); 731 int rv = orig_setfsuid(uid);
732#ifdef PRINTF_DEVTTY
606 fprintf(ftty, "%u:%s:setfsuid %d:%d\n", mypid, myname, uid, rv); 733 fprintf(ftty, "%u:%s:setfsuid %d:%d\n", mypid, myname, uid, rv);
734#else
735 printf("%u:%s:setfsuid %d:%d\n", mypid, myname, uid, rv);
736#endif
607 737
608 return rv; 738 return rv;
609} 739}
@@ -615,7 +745,11 @@ int setfsgid(gid_t gid) {
615 orig_setfsgid = (orig_setfsgid_t)dlsym(RTLD_NEXT, "setfsgid"); 745 orig_setfsgid = (orig_setfsgid_t)dlsym(RTLD_NEXT, "setfsgid");
616 746
617 int rv = orig_setfsgid(gid); 747 int rv = orig_setfsgid(gid);
748#ifdef PRINTF_DEVTTY
618 fprintf(ftty, "%u:%s:setfsgid %d:%d\n", mypid, myname, gid, rv); 749 fprintf(ftty, "%u:%s:setfsgid %d:%d\n", mypid, myname, gid, rv);
750#else
751 printf("%u:%s:setfsgid %d:%d\n", mypid, myname, gid, rv);
752#endif
619 753
620 return rv; 754 return rv;
621} 755}
@@ -627,7 +761,11 @@ int setreuid(uid_t ruid, uid_t euid) {
627 orig_setreuid = (orig_setreuid_t)dlsym(RTLD_NEXT, "setreuid"); 761 orig_setreuid = (orig_setreuid_t)dlsym(RTLD_NEXT, "setreuid");
628 762
629 int rv = orig_setreuid(ruid, euid); 763 int rv = orig_setreuid(ruid, euid);
764#ifdef PRINTF_DEVTTY
630 fprintf(ftty, "%u:%s:setreuid %d %d:%d\n", mypid, myname, ruid, euid, rv); 765 fprintf(ftty, "%u:%s:setreuid %d %d:%d\n", mypid, myname, ruid, euid, rv);
766#else
767 printf("%u:%s:setreuid %d %d:%d\n", mypid, myname, ruid, euid, rv);
768#endif
631 769
632 return rv; 770 return rv;
633} 771}
@@ -639,7 +777,11 @@ int setregid(gid_t rgid, gid_t egid) {
639 orig_setregid = (orig_setregid_t)dlsym(RTLD_NEXT, "setregid"); 777 orig_setregid = (orig_setregid_t)dlsym(RTLD_NEXT, "setregid");
640 778
641 int rv = orig_setregid(rgid, egid); 779 int rv = orig_setregid(rgid, egid);
780#ifdef PRINTF_DEVTTY
642 fprintf(ftty, "%u:%s:setregid %d %d:%d\n", mypid, myname, rgid, egid, rv); 781 fprintf(ftty, "%u:%s:setregid %d %d:%d\n", mypid, myname, rgid, egid, rv);
782#else
783 printf("%u:%s:setregid %d %d:%d\n", mypid, myname, rgid, egid, rv);
784#endif
643 785
644 return rv; 786 return rv;
645} 787}
@@ -651,7 +793,11 @@ int setresuid(uid_t ruid, uid_t euid, uid_t suid) {
651 orig_setresuid = (orig_setresuid_t)dlsym(RTLD_NEXT, "setresuid"); 793 orig_setresuid = (orig_setresuid_t)dlsym(RTLD_NEXT, "setresuid");
652 794
653 int rv = orig_setresuid(ruid, euid, suid); 795 int rv = orig_setresuid(ruid, euid, suid);
796#ifdef PRINTF_DEVTTY
654 fprintf(ftty, "%u:%s:setresuid %d %d %d:%d\n", mypid, myname, ruid, euid, suid, rv); 797 fprintf(ftty, "%u:%s:setresuid %d %d %d:%d\n", mypid, myname, ruid, euid, suid, rv);
798#else
799 printf("%u:%s:setresuid %d %d %d:%d\n", mypid, myname, ruid, euid, suid, rv);
800#endif
655 801
656 return rv; 802 return rv;
657} 803}
@@ -663,7 +809,11 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid) {
663 orig_setresgid = (orig_setresgid_t)dlsym(RTLD_NEXT, "setresgid"); 809 orig_setresgid = (orig_setresgid_t)dlsym(RTLD_NEXT, "setresgid");
664 810
665 int rv = orig_setresgid(rgid, egid, sgid); 811 int rv = orig_setresgid(rgid, egid, sgid);
812#ifdef PRINTF_DEVTTY
666 fprintf(ftty, "%u:%s:setresgid %d %d %d:%d\n", mypid, myname, rgid, egid, sgid, rv); 813 fprintf(ftty, "%u:%s:setresgid %d %d %d:%d\n", mypid, myname, rgid, egid, sgid, rv);
814#else
815 printf("%u:%s:setresgid %d %d %d:%d\n", mypid, myname, rgid, egid, sgid, rv);
816#endif
667 817
668 return rv; 818 return rv;
669} 819}
@@ -678,6 +828,10 @@ static void log_exec(int argc, char** argv) {
678 int rv = readlink("/proc/self/exe", buf, PATH_MAX); 828 int rv = readlink("/proc/self/exe", buf, PATH_MAX);
679 if (rv != -1) { 829 if (rv != -1) {
680 buf[rv] = '\0'; // readlink does not add a '\0' at the end 830 buf[rv] = '\0'; // readlink does not add a '\0' at the end
831#ifdef PRINTF_DEVTTY
681 fprintf(ftty, "%u:%s:exec %s:0\n", mypid, myname, buf); 832 fprintf(ftty, "%u:%s:exec %s:0\n", mypid, myname, buf);
833#else
834 printf("%u:%s:exec %s:0\n", mypid, myname, buf);
835#endif
682 } 836 }
683} 837}
diff --git a/test/fs/whitelist-dev.exp b/test/fs/whitelist-dev.exp
index d2cb72edd..1df8c361c 100755
--- a/test/fs/whitelist-dev.exp
+++ b/test/fs/whitelist-dev.exp
@@ -14,10 +14,10 @@ expect {
14} 14}
15sleep 1 15sleep 1
16 16
17send -- "find /dev | wc -l\r" 17send -- "ls /dev | wc -l\r"
18expect { 18expect {
19 timeout {puts "TESTING ERROR 1\n";exit} 19 timeout {puts "TESTING ERROR 1\n";exit}
20 "2" 20 "1"
21} 21}
22after 100 22after 100
23send -- "exit\r" 23send -- "exit\r"
@@ -33,7 +33,7 @@ sleep 1
33send -- "find /dev | wc -l\r" 33send -- "find /dev | wc -l\r"
34expect { 34expect {
35 timeout {puts "TESTING ERROR 3\n";exit} 35 timeout {puts "TESTING ERROR 3\n";exit}
36 "4" 36 "1"
37} 37}
38after 100 38after 100
39send -- "exit\r" 39send -- "exit\r"
@@ -46,7 +46,7 @@ expect {
46} 46}
47sleep 1 47sleep 1
48 48
49send -- "ls -l /dev | wc -l\r" 49send -- "ls /dev | wc -l\r"
50expect { 50expect {
51 timeout {puts "TESTING ERROR 5\n";exit} 51 timeout {puts "TESTING ERROR 5\n";exit}
52 "12" {puts "OK\n"} 52 "12" {puts "OK\n"}