Skip to content

Commit

Permalink
Add profiles for tar (gtar), unzip and unrar
Browse files Browse the repository at this point in the history
I've tested compression and uncompression of
various tar formats and also straced unzip/unrar
regarding their file access in /etc.

-> should be fine.

If you want to unpack files in /usr/bin,
then use the --ignore=private-bin switch.

Same for /etc: --ignore=private-etc
  • Loading branch information
thomasjfox committed Jul 30, 2016
1 parent 8643c07 commit 2d60937
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ realinstall:
install -c -m 0644 .etc/google-chrome.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/google-play-music-desktop-player.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/gpredict.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/gtar.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/gthumb.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/gwenview.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/gzip.profile $(DESTDIR)/$(sysconfdir)/firejail/.
Expand Down Expand Up @@ -201,13 +202,16 @@ realinstall:
install -c -m 0644 .etc/steam.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/stellarium.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/strings.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/tar.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/telegram.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/thunderbird.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/totem.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/transmission-gtk.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/transmission-qt.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/uget-gtk.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/unbound.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/unrar.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/unzip.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/uudeview.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/vivaldi-beta.profile $(DESTDIR)/$(sysconfdir)/firejail/.
install -c -m 0644 .etc/vivaldi.profile $(DESTDIR)/$(sysconfdir)/firejail/.
Expand Down
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Peter Hogg (https://github.com/pigmonkey)
Thomas Jarosch (https://github.com/thomasjfox)
- disable keepassx in disable-passwdmgr.inc
- added uudeview profile
- added tar (gtar), unzip and unrar profile
- improved profile list
Niklas Haas (https://github.com/haasn)
- blacklisting for keybase.io's client
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,5 @@ Browsers: Palemoon
## New security profiles

Gitter, gThumb, mpv, Franz messenger, LibreOffice, pix, audacity, strings, xz, xzdec, gzip, cpio, less, Atom Beta, Atom, jitsi, eom, uudeview
tar (gtar), unzip, unrar

1 change: 1 addition & 0 deletions etc/gtar.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include /etc/firejail/tar.profile
13 changes: 13 additions & 0 deletions etc/tar.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# tar profile
include /etc/firejail/default.profile

tracelog
net none
shell none

# support compressed archives
private-bin tar,gtar,compress,gzip,lzma,xz,bzip2,lbzip2,lzip,lzop
private-dev
private-etc passwd,group,localtime
hostname tar
nosound
11 changes: 11 additions & 0 deletions etc/unrar.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# unrar profile
include /etc/firejail/default.profile

tracelog
net none
shell none
private-bin unrar
private-dev
private-etc passwd,group,localtime
hostname unrar
nosound
11 changes: 11 additions & 0 deletions etc/unzip.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# unzip profile
include /etc/firejail/default.profile

tracelog
net none
shell none
private-bin unzip
private-dev
private-etc passwd,group,localtime
hostname unzip
nosound
4 changes: 4 additions & 0 deletions platform/debian/conffiles
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
/etc/firejail/google-chrome.profile
/etc/firejail/google-play-music-desktop-player.profile
/etc/firejail/gpredict.profile
/etc/firejail/gtar.profile
/etc/firejail/gthumb.profile
/etc/firejail/gwenview.profile
/etc/firejail/gzip.profile
Expand Down Expand Up @@ -108,13 +109,16 @@
/etc/firejail/steam.profile
/etc/firejail/stellarium.profile
/etc/firejail/strings.profile
/etc/firejail/tar.profile
/etc/firejail/telegram.profile
/etc/firejail/thunderbird.profile
/etc/firejail/totem.profile
/etc/firejail/transmission-gtk.profile
/etc/firejail/transmission-qt.profile
/etc/firejail/uget-gtk.profile
/etc/firejail/unbound.profile
/etc/firejail/unrar.profile
/etc/firejail/unzip.profile
/etc/firejail/uudeview.profile
/etc/firejail/vivaldi-beta.profile
/etc/firejail/vivaldi.profile
Expand Down

0 comments on commit 2d60937

Please sign in to comment.