aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.git-blame-ignore-revs4
-rw-r--r--.gitattributes1
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.md97
-rw-r--r--.github/ISSUE_TEMPLATE/config.yml5
-rw-r--r--.github/ISSUE_TEMPLATE/feature_request.md23
-rw-r--r--.github/dependabot.yml7
-rw-r--r--.github/pull_request_template.md1
-rw-r--r--.github/workflows/build-extra.yml16
-rw-r--r--.github/workflows/build.yml6
-rw-r--r--.github/workflows/codeql-analysis.yml8
-rw-r--r--.github/workflows/profile-checks.yml31
-rw-r--r--.github/workflows/sort.yml22
-rw-r--r--.gitignore6
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--CONTRIBUTING.md7
-rw-r--r--COPYING85
-rw-r--r--Makefile.in31
-rw-r--r--README166
-rw-r--r--README.md261
-rw-r--r--RELNOTES110
-rw-r--r--SECURITY.md36
-rwxr-xr-xci/check/profiles/private-etc-always-required.sh15
-rwxr-xr-xci/check/profiles/sort-disable-programs.sh2
-rwxr-xr-xci/check/profiles/sort-firecfg.config.sh2
l---------ci/check/profiles/sort.py1
-rwxr-xr-xconfigure422
-rw-r--r--configure.ac296
-rwxr-xr-xcontrib/firejail-welcome.sh2
-rwxr-xr-xcontrib/fix_private-bin.py2
-rwxr-xr-xcontrib/fj-mkdeb.py2
-rwxr-xr-xcontrib/fjclip.py2
-rwxr-xr-xcontrib/fjdisplay.py2
-rwxr-xr-xcontrib/fjresize.py2
-rwxr-xr-xcontrib/gdb-firejail.sh4
-rwxr-xr-xcontrib/jail_prober.py30
-rwxr-xr-xcontrib/sort.py8
-rwxr-xr-xcontrib/syscalls.sh2
-rwxr-xr-xcontrib/update_deb.sh2
-rw-r--r--contrib/vim/ftdetect/firejail.vim12
-rw-r--r--contrib/vim/syntax/firejail.vim27
-rw-r--r--etc-fixes/0.9.58/atom.profile1
-rw-r--r--etc-fixes/seccomp-join-bug/README1
-rw-r--r--etc/apparmor/firejail-base27
-rw-r--r--etc/apparmor/firejail-default2
-rw-r--r--etc/apparmor/firejail-local3
-rw-r--r--etc/firejail.config43
-rw-r--r--etc/ids.config158
-rw-r--r--etc/inc/allow-common-devel.inc12
-rw-r--r--etc/inc/allow-nodejs.inc4
-rw-r--r--etc/inc/allow-opengl-game.inc4
-rw-r--r--etc/inc/allow-perl.inc3
-rw-r--r--etc/inc/allow-ruby.inc1
-rw-r--r--etc/inc/allow-ssh.inc7
-rw-r--r--etc/inc/disable-X11.inc15
-rw-r--r--etc/inc/disable-common.inc171
-rw-r--r--etc/inc/disable-devel.inc2
-rw-r--r--etc/inc/disable-exec.inc1
-rw-r--r--etc/inc/disable-interpreters.inc10
-rw-r--r--etc/inc/disable-passwdmgr.inc19
-rw-r--r--etc/inc/disable-proc.inc82
-rw-r--r--etc/inc/disable-programs.inc502
-rw-r--r--etc/inc/whitelist-1793-workaround.inc1
-rw-r--r--etc/inc/whitelist-common.inc3
-rw-r--r--etc/inc/whitelist-run-common.inc16
-rw-r--r--etc/inc/whitelist-runuser-common.inc5
-rw-r--r--etc/inc/whitelist-usr-share-common.inc3
-rw-r--r--etc/profile-a-l/0ad.profile3
-rw-r--r--etc/profile-a-l/1password.profile20
-rw-r--r--etc/profile-a-l/2048-qt.profile1
-rw-r--r--etc/profile-a-l/Books.profile5
-rw-r--r--etc/profile-a-l/Cryptocat.profile1
-rw-r--r--etc/profile-a-l/Fritzing.profile1
-rw-r--r--etc/profile-a-l/JDownloader.profile1
-rw-r--r--etc/profile-a-l/abiword.profile3
-rw-r--r--etc/profile-a-l/agetpkg.profile4
-rw-r--r--etc/profile-a-l/akonadi_control.profile3
-rw-r--r--etc/profile-a-l/akregator.profile3
-rw-r--r--etc/profile-a-l/alacarte.profile3
-rw-r--r--etc/profile-a-l/alienarena.profile2
-rw-r--r--etc/profile-a-l/alpine.profile103
-rw-r--r--etc/profile-a-l/alpinef.profile14
-rw-r--r--etc/profile-a-l/amarok.profile9
-rw-r--r--etc/profile-a-l/amule.profile2
-rw-r--r--etc/profile-a-l/android-studio.profile1
-rw-r--r--etc/profile-a-l/anki.profile4
-rw-r--r--etc/profile-a-l/anydesk.profile1
-rw-r--r--etc/profile-a-l/aosp.profile1
-rw-r--r--etc/profile-a-l/apktool.profile1
-rw-r--r--etc/profile-a-l/apostrophe.profile2
-rw-r--r--etc/profile-a-l/arch-audit.profile1
-rw-r--r--etc/profile-a-l/archaudit-report.profile1
-rw-r--r--etc/profile-a-l/archiver-common.profile1
-rw-r--r--etc/profile-a-l/ardour5.profile1
-rw-r--r--etc/profile-a-l/arduino.profile1
-rw-r--r--etc/profile-a-l/aria2c.profile3
-rw-r--r--etc/profile-a-l/ark.profile2
-rw-r--r--etc/profile-a-l/arm.profile3
-rw-r--r--etc/profile-a-l/artha.profile3
-rw-r--r--etc/profile-a-l/assogiate.profile1
-rw-r--r--etc/profile-a-l/asunder.profile1
-rw-r--r--etc/profile-a-l/atom.profile2
-rw-r--r--etc/profile-a-l/atool.profile2
-rw-r--r--etc/profile-a-l/atril.profile3
-rw-r--r--etc/profile-a-l/audacious.profile2
-rw-r--r--etc/profile-a-l/audacity.profile3
-rw-r--r--etc/profile-a-l/audio-recorder.profile1
-rw-r--r--etc/profile-a-l/authenticator-rs.profile3
-rw-r--r--etc/profile-a-l/authenticator.profile3
-rw-r--r--etc/profile-a-l/autokey-common.profile1
-rw-r--r--etc/profile-a-l/avidemux.profile2
-rw-r--r--etc/profile-a-l/aweather.profile1
-rw-r--r--etc/profile-a-l/ballbuster.profile1
-rw-r--r--etc/profile-a-l/baloo_file.profile2
-rw-r--r--etc/profile-a-l/balsa.profile5
-rw-r--r--etc/profile-a-l/baobab.profile1
-rw-r--r--etc/profile-a-l/barrier.profile1
-rw-r--r--etc/profile-a-l/bcompare.profile1
-rw-r--r--etc/profile-a-l/bibletime.profile5
-rw-r--r--etc/profile-a-l/bijiben.profile5
-rw-r--r--etc/profile-a-l/bitcoin-qt.profile1
-rw-r--r--etc/profile-a-l/bitlbee.profile1
-rw-r--r--etc/profile-a-l/bitwarden.profile43
-rw-r--r--etc/profile-a-l/bleachbit.profile2
-rw-r--r--etc/profile-a-l/blender.profile1
-rw-r--r--etc/profile-a-l/bless.profile3
-rw-r--r--etc/profile-a-l/blobby.profile51
-rw-r--r--etc/profile-a-l/blobwars.profile5
-rw-r--r--etc/profile-a-l/bluefish.profile1
-rw-r--r--etc/profile-a-l/bnox.profile1
-rw-r--r--etc/profile-a-l/brackets.profile1
-rw-r--r--etc/profile-a-l/brasero.profile1
-rw-r--r--etc/profile-a-l/bsdtar.profile2
-rw-r--r--etc/profile-a-l/build-systems-common.profile66
-rw-r--r--etc/profile-a-l/bundle.profile23
-rw-r--r--etc/profile-a-l/bzflag.profile1
-rw-r--r--etc/profile-a-l/cachy-browser.profile56
-rw-r--r--etc/profile-a-l/calibre.profile1
-rw-r--r--etc/profile-a-l/calligra.profile1
-rw-r--r--etc/profile-a-l/cameramonitor.profile3
-rw-r--r--etc/profile-a-l/cantata.profile1
-rw-r--r--etc/profile-a-l/cargo.profile24
-rw-r--r--etc/profile-a-l/catfish.profile1
-rw-r--r--etc/profile-a-l/cawbird.profile3
-rw-r--r--etc/profile-a-l/celluloid.profile7
-rw-r--r--etc/profile-a-l/checkbashisms.profile1
-rw-r--r--etc/profile-a-l/cheese.profile14
-rw-r--r--etc/profile-a-l/cherrytree.profile1
-rw-r--r--etc/profile-a-l/chromium-browser-privacy.profile2
-rw-r--r--etc/profile-a-l/chromium-common-hardened.inc.profile3
-rw-r--r--etc/profile-a-l/chromium-common.profile19
-rw-r--r--etc/profile-a-l/chromium.profile1
-rw-r--r--etc/profile-a-l/cin.profile3
-rw-r--r--etc/profile-a-l/clawsker.profile3
-rw-r--r--etc/profile-a-l/clementine.profile1
-rw-r--r--etc/profile-a-l/clion-eap.profile10
-rw-r--r--etc/profile-a-l/clion.profile4
-rw-r--r--etc/profile-a-l/clipgrab.profile5
-rw-r--r--etc/profile-a-l/clipit.profile1
-rw-r--r--etc/profile-a-l/cmake.profile13
-rw-r--r--etc/profile-a-l/cmus.profile3
-rw-r--r--etc/profile-a-l/code.profile41
-rw-r--r--etc/profile-a-l/codium.profile10
-rw-r--r--etc/profile-a-l/cointop.profile63
-rw-r--r--etc/profile-a-l/cola.profile2
-rw-r--r--etc/profile-a-l/colorful.profile1
-rw-r--r--etc/profile-a-l/com.github.bleakgrey.tootle.profile3
-rw-r--r--etc/profile-a-l/com.github.dahenson.agenda.profile3
-rw-r--r--etc/profile-a-l/com.github.johnfactotum.Foliate.profile3
-rw-r--r--etc/profile-a-l/com.github.phase1geo.minder.profile1
-rw-r--r--etc/profile-a-l/com.github.tchx84.Flatseal.profile65
-rw-r--r--etc/profile-a-l/conky.profile1
-rw-r--r--etc/profile-a-l/corebird.profile1
-rw-r--r--etc/profile-a-l/cower.profile1
-rw-r--r--etc/profile-a-l/coyim.profile3
-rw-r--r--etc/profile-a-l/crawl.profile1
-rw-r--r--etc/profile-a-l/crow.profile3
-rw-r--r--etc/profile-a-l/curl.profile1
-rw-r--r--etc/profile-a-l/d-feet.profile3
-rw-r--r--etc/profile-a-l/darktable.profile3
-rw-r--r--etc/profile-a-l/dbus-send.profile3
-rw-r--r--etc/profile-a-l/dconf-editor.profile3
-rw-r--r--etc/profile-a-l/dconf.profile3
-rw-r--r--etc/profile-a-l/ddgr.profile13
-rw-r--r--etc/profile-a-l/ddgtk.profile3
-rw-r--r--etc/profile-a-l/deadbeef.profile1
-rw-r--r--etc/profile-a-l/default.profile7
-rw-r--r--etc/profile-a-l/deluge.profile1
-rw-r--r--etc/profile-a-l/desktopeditors.profile1
-rw-r--r--etc/profile-a-l/devhelp.profile3
-rw-r--r--etc/profile-a-l/devilspie.profile3
-rw-r--r--etc/profile-a-l/dex2jar.profile1
-rw-r--r--etc/profile-a-l/dia.profile1
-rw-r--r--etc/profile-a-l/dig.profile1
-rw-r--r--etc/profile-a-l/digikam.profile1
-rw-r--r--etc/profile-a-l/dillo.profile3
-rw-r--r--etc/profile-a-l/dino.profile21
-rw-r--r--etc/profile-a-l/discord-common.profile6
-rw-r--r--etc/profile-a-l/display.profile4
-rw-r--r--etc/profile-a-l/dnox.profile1
-rw-r--r--etc/profile-a-l/dnscrypt-proxy.profile1
-rw-r--r--etc/profile-a-l/dnsmasq.profile1
-rw-r--r--etc/profile-a-l/dolphin-emu.profile1
-rw-r--r--etc/profile-a-l/dooble.profile1
-rw-r--r--etc/profile-a-l/dosbox.profile1
-rw-r--r--etc/profile-a-l/dragon.profile2
-rw-r--r--etc/profile-a-l/drawio.profile3
-rw-r--r--etc/profile-a-l/drill.profile1
-rw-r--r--etc/profile-a-l/dropbox.profile1
-rw-r--r--etc/profile-a-l/easystroke.profile3
-rw-r--r--etc/profile-a-l/electron-mail.profile3
-rw-r--r--etc/profile-a-l/electron.profile6
-rw-r--r--etc/profile-a-l/electrum.profile3
-rw-r--r--etc/profile-a-l/elinks.profile39
-rw-r--r--etc/profile-a-l/emacs.profile1
-rw-r--r--etc/profile-a-l/email-common.profile6
-rw-r--r--etc/profile-a-l/enchant.profile3
-rw-r--r--etc/profile-a-l/engrampa.profile1
-rw-r--r--etc/profile-a-l/enox.profile1
-rw-r--r--etc/profile-a-l/enpass.profile9
-rw-r--r--etc/profile-a-l/eo-common.profile5
-rw-r--r--etc/profile-a-l/eog.profile12
-rw-r--r--etc/profile-a-l/eom.profile9
-rw-r--r--etc/profile-a-l/ephemeral.profile7
-rw-r--r--etc/profile-a-l/equalx.profile3
-rw-r--r--etc/profile-a-l/etr.profile5
-rw-r--r--etc/profile-a-l/evince.profile10
-rw-r--r--etc/profile-a-l/evolution.profile1
-rw-r--r--etc/profile-a-l/exiftool.profile3
-rw-r--r--etc/profile-a-l/falkon.profile4
-rw-r--r--etc/profile-a-l/fbreader.profile1
-rw-r--r--etc/profile-a-l/fdns.profile3
-rw-r--r--etc/profile-a-l/feedreader.profile1
-rw-r--r--etc/profile-a-l/feh-network.inc.profile2
-rw-r--r--etc/profile-a-l/feh.profile3
-rw-r--r--etc/profile-a-l/ferdi.profile6
-rw-r--r--etc/profile-a-l/fetchmail.profile1
-rw-r--r--etc/profile-a-l/ffmpeg.profile1
-rw-r--r--etc/profile-a-l/ffplay.profile2
-rw-r--r--etc/profile-a-l/file-manager-common.profile1
-rw-r--r--etc/profile-a-l/file-roller.profile5
-rw-r--r--etc/profile-a-l/file.profile1
-rw-r--r--etc/profile-a-l/firefox-common-addons.profile1
-rw-r--r--etc/profile-a-l/firefox-common.profile13
-rw-r--r--etc/profile-a-l/firefox-developer-edition.profile4
-rw-r--r--etc/profile-a-l/firefox.profile9
-rw-r--r--etc/profile-a-l/flameshot.profile7
-rw-r--r--etc/profile-a-l/flashpeak-slimjet.profile1
-rw-r--r--etc/profile-a-l/flowblade.profile1
-rw-r--r--etc/profile-a-l/font-manager.profile1
-rw-r--r--etc/profile-a-l/fontforge.profile1
-rw-r--r--etc/profile-a-l/fractal.profile1
-rw-r--r--etc/profile-a-l/franz.profile6
-rw-r--r--etc/profile-a-l/freecad.profile1
-rw-r--r--etc/profile-a-l/freeciv.profile1
-rw-r--r--etc/profile-a-l/freecol.profile1
-rw-r--r--etc/profile-a-l/freemind.profile1
-rw-r--r--etc/profile-a-l/freetube.profile6
-rw-r--r--etc/profile-a-l/frogatto.profile4
-rw-r--r--etc/profile-a-l/frozen-bubble.profile2
-rw-r--r--etc/profile-a-l/ftp.profile54
-rw-r--r--etc/profile-a-l/funnyboat.profile55
-rw-r--r--etc/profile-a-l/gajim.profile3
-rw-r--r--etc/profile-a-l/galculator.profile3
-rw-r--r--etc/profile-a-l/gallery-dl.profile18
-rw-r--r--etc/profile-a-l/gapplication.profile4
-rw-r--r--etc/profile-a-l/gcloud.profile2
-rw-r--r--etc/profile-a-l/gconf-editor.profile2
-rw-r--r--etc/profile-a-l/gconf.profile3
-rw-r--r--etc/profile-a-l/geany.profile1
-rw-r--r--etc/profile-a-l/geary.profile19
-rw-r--r--etc/profile-a-l/gedit.profile1
-rw-r--r--etc/profile-a-l/geekbench.profile15
-rw-r--r--etc/profile-a-l/geeqie.profile4
-rw-r--r--etc/profile-a-l/gfeeds.profile2
-rw-r--r--etc/profile-a-l/gget.profile3
-rw-r--r--etc/profile-a-l/ghostwriter.profile1
-rw-r--r--etc/profile-a-l/gimp.profile7
-rw-r--r--etc/profile-a-l/gist.profile3
-rw-r--r--etc/profile-a-l/git-cola.profile3
-rw-r--r--etc/profile-a-l/git.profile1
-rw-r--r--etc/profile-a-l/gitg.profile1
-rw-r--r--etc/profile-a-l/github-desktop.profile2
-rw-r--r--etc/profile-a-l/gitter.profile3
-rw-r--r--etc/profile-a-l/gjs.profile1
-rw-r--r--etc/profile-a-l/gl-117.profile2
-rw-r--r--etc/profile-a-l/glaxium.profile2
-rw-r--r--etc/profile-a-l/globaltime.profile1
-rw-r--r--etc/profile-a-l/gmpc.profile3
-rw-r--r--etc/profile-a-l/gnome-books.profile1
-rw-r--r--etc/profile-a-l/gnome-builder.profile1
-rw-r--r--etc/profile-a-l/gnome-calculator.profile1
-rw-r--r--etc/profile-a-l/gnome-calendar.profile3
-rw-r--r--etc/profile-a-l/gnome-characters.profile1
-rw-r--r--etc/profile-a-l/gnome-chess.profile3
-rw-r--r--etc/profile-a-l/gnome-clocks.profile3
-rw-r--r--etc/profile-a-l/gnome-contacts.profile1
-rw-r--r--etc/profile-a-l/gnome-documents.profile1
-rw-r--r--etc/profile-a-l/gnome-font-viewer.profile1
-rw-r--r--etc/profile-a-l/gnome-hexgl.profile3
-rw-r--r--etc/profile-a-l/gnome-keyring.profile1
-rw-r--r--etc/profile-a-l/gnome-latex.profile3
-rw-r--r--etc/profile-a-l/gnome-logs.profile3
-rw-r--r--etc/profile-a-l/gnome-maps.profile3
-rw-r--r--etc/profile-a-l/gnome-mplayer.profile1
-rw-r--r--etc/profile-a-l/gnome-music.profile3
-rw-r--r--etc/profile-a-l/gnome-nettool.profile1
-rw-r--r--etc/profile-a-l/gnome-passwordsafe.profile5
-rw-r--r--etc/profile-a-l/gnome-photos.profile1
-rw-r--r--etc/profile-a-l/gnome-pie.profile3
-rw-r--r--etc/profile-a-l/gnome-pomodoro.profile3
-rw-r--r--etc/profile-a-l/gnome-recipes.profile3
-rw-r--r--etc/profile-a-l/gnome-ring.profile1
-rw-r--r--etc/profile-a-l/gnome-schedule.profile1
-rw-r--r--etc/profile-a-l/gnome-screenshot.profile3
-rw-r--r--etc/profile-a-l/gnome-sound-recorder.profile3
-rw-r--r--etc/profile-a-l/gnome-system-log.profile3
-rw-r--r--etc/profile-a-l/gnome-todo.profile3
-rw-r--r--etc/profile-a-l/gnome-twitch.profile1
-rw-r--r--etc/profile-a-l/gnome-weather.profile1
-rw-r--r--etc/profile-a-l/gnome_games-common.profile3
-rw-r--r--etc/profile-a-l/gnote.profile4
-rw-r--r--etc/profile-a-l/gnubik.profile3
-rw-r--r--etc/profile-a-l/godot.profile3
-rw-r--r--etc/profile-a-l/goldendict.profile58
-rw-r--r--etc/profile-a-l/goobox.profile1
-rw-r--r--etc/profile-a-l/google-chrome-beta.profile1
-rw-r--r--etc/profile-a-l/google-chrome-unstable.profile1
-rw-r--r--etc/profile-a-l/google-chrome.profile1
-rw-r--r--etc/profile-a-l/google-earth.profile1
-rw-r--r--etc/profile-a-l/google-play-music-desktop-player.profile1
-rw-r--r--etc/profile-a-l/googler-common.profile61
-rw-r--r--etc/profile-a-l/googler.profile13
-rw-r--r--etc/profile-a-l/gpa.profile1
-rw-r--r--etc/profile-a-l/gpg-agent.profile1
-rw-r--r--etc/profile-a-l/gpg.profile1
-rw-r--r--etc/profile-a-l/gpicview.profile3
-rw-r--r--etc/profile-a-l/gpredict.profile3
-rw-r--r--etc/profile-a-l/gradio.profile3
-rw-r--r--etc/profile-a-l/gramps.profile1
-rw-r--r--etc/profile-a-l/gravity-beams-and-evaporating-stars.profile3
-rw-r--r--etc/profile-a-l/gthumb.profile1
-rw-r--r--etc/profile-a-l/gtk-pipe-viewer.profile12
-rw-r--r--etc/profile-a-l/gtk-straw-viewer.profile2
-rw-r--r--etc/profile-a-l/gtk-update-icon-cache.profile3
-rw-r--r--etc/profile-a-l/gtk-youtube-viewer.profile2
-rw-r--r--etc/profile-a-l/guayadeque.profile1
-rw-r--r--etc/profile-a-l/gucharmap.profile1
-rw-r--r--etc/profile-a-l/gunzip.profile2
-rw-r--r--etc/profile-a-l/guvcview.profile1
-rw-r--r--etc/profile-a-l/gwenview.profile4
-rw-r--r--etc/profile-a-l/handbrake.profile1
-rw-r--r--etc/profile-a-l/hashcat.profile1
-rw-r--r--etc/profile-a-l/hasher-common.profile1
-rw-r--r--etc/profile-a-l/hedgewars.profile1
-rw-r--r--etc/profile-a-l/hexchat.profile6
-rw-r--r--etc/profile-a-l/highlight.profile4
-rw-r--r--etc/profile-a-l/homebank.profile1
-rw-r--r--etc/profile-a-l/host.profile1
-rw-r--r--etc/profile-a-l/hugin.profile1
-rw-r--r--etc/profile-a-l/hyperrogue.profile5
-rw-r--r--etc/profile-a-l/i2prouter.profile3
-rw-r--r--etc/profile-a-l/iagno.profile1
-rw-r--r--etc/profile-a-l/idea.sh.profile1
-rw-r--r--etc/profile-a-l/imagej.profile1
-rw-r--r--etc/profile-a-l/img2txt.profile2
-rw-r--r--etc/profile-a-l/impressive.profile1
-rw-r--r--etc/profile-a-l/imv.profile57
-rw-r--r--etc/profile-a-l/inkscape.profile3
-rw-r--r--etc/profile-a-l/io.github.lainsce.Notejot.profile60
-rw-r--r--etc/profile-a-l/ipcalc.profile3
-rw-r--r--etc/profile-a-l/iridium.profile5
-rw-r--r--etc/profile-a-l/itch.profile1
-rw-r--r--etc/profile-a-l/jami-gnome.profile1
-rw-r--r--etc/profile-a-l/jd-gui.profile1
-rw-r--r--etc/profile-a-l/jerry.profile3
-rw-r--r--etc/profile-a-l/jitsi.profile1
-rw-r--r--etc/profile-a-l/jumpnbump-menu.profile2
-rw-r--r--etc/profile-a-l/jumpnbump.profile4
-rw-r--r--etc/profile-a-l/k3b.profile1
-rw-r--r--etc/profile-a-l/kaffeine.profile2
-rw-r--r--etc/profile-a-l/kalgebra.profile3
-rw-r--r--etc/profile-a-l/kate.profile2
-rw-r--r--etc/profile-a-l/kazam.profile3
-rw-r--r--etc/profile-a-l/kcalc.profile4
-rw-r--r--etc/profile-a-l/kdeinit4.profile1
-rw-r--r--etc/profile-a-l/kdenlive.profile1
-rw-r--r--etc/profile-a-l/kdiff3.profile5
-rw-r--r--etc/profile-a-l/keepass.profile5
-rw-r--r--etc/profile-a-l/keepassx.profile3
-rw-r--r--etc/profile-a-l/keepassxc-cli.profile1
-rw-r--r--etc/profile-a-l/keepassxc.profile34
-rw-r--r--etc/profile-a-l/kfind.profile1
-rw-r--r--etc/profile-a-l/kget.profile2
-rw-r--r--etc/profile-a-l/kid3.profile3
-rw-r--r--etc/profile-a-l/kino.profile1
-rw-r--r--etc/profile-a-l/kiwix-desktop.profile3
-rw-r--r--etc/profile-a-l/klatexformula.profile1
-rw-r--r--etc/profile-a-l/klavaro.profile3
-rw-r--r--etc/profile-a-l/kmail.profile3
-rw-r--r--etc/profile-a-l/kmplayer.profile1
-rw-r--r--etc/profile-a-l/kodi.profile12
-rw-r--r--etc/profile-a-l/konversation.profile2
-rw-r--r--etc/profile-a-l/kopete.profile1
-rw-r--r--etc/profile-a-l/krita.profile1
-rw-r--r--etc/profile-a-l/krunner.profile1
-rw-r--r--etc/profile-a-l/ktorrent.profile3
-rw-r--r--etc/profile-a-l/ktouch.profile3
-rw-r--r--etc/profile-a-l/kube.profile3
-rw-r--r--etc/profile-a-l/kwin_x11.profile4
-rw-r--r--etc/profile-a-l/kwrite.profile4
-rw-r--r--etc/profile-a-l/latex-common.profile1
-rw-r--r--etc/profile-a-l/leafpad.profile1
-rw-r--r--etc/profile-a-l/less.profile1
-rw-r--r--etc/profile-a-l/librecad.profile50
-rw-r--r--etc/profile-a-l/libreoffice.profile22
-rw-r--r--etc/profile-a-l/librewolf.profile28
-rw-r--r--etc/profile-a-l/lifeograph.profile57
-rw-r--r--etc/profile-a-l/liferea.profile1
-rw-r--r--etc/profile-a-l/lincity-ng.profile1
-rw-r--r--etc/profile-a-l/links-common.profile62
-rw-r--r--etc/profile-a-l/links.profile54
-rw-r--r--etc/profile-a-l/links2.profile18
-rw-r--r--etc/profile-a-l/linphone.profile1
-rw-r--r--etc/profile-a-l/lmms.profile1
-rw-r--r--etc/profile-a-l/lollypop.profile3
-rw-r--r--etc/profile-a-l/lugaru.profile1
-rw-r--r--etc/profile-a-l/luminance-hdr.profile1
-rw-r--r--etc/profile-a-l/lutris.profile12
-rw-r--r--etc/profile-a-l/lximage-qt.profile1
-rw-r--r--etc/profile-a-l/lxmusic.profile1
-rw-r--r--etc/profile-a-l/lynx.profile1
-rw-r--r--etc/profile-a-l/lyx.profile2
-rw-r--r--etc/profile-m-z/Maelstrom.profile1
-rw-r--r--etc/profile-m-z/Mathematica.profile1
-rw-r--r--etc/profile-m-z/PCSX2.profile1
-rw-r--r--etc/profile-m-z/QMediathekView.profile1
-rw-r--r--etc/profile-m-z/QOwnNotes.profile3
-rw-r--r--etc/profile-m-z/Viber.profile3
-rw-r--r--etc/profile-m-z/XMind.profile1
-rw-r--r--etc/profile-m-z/Xvfb.profile2
-rw-r--r--etc/profile-m-z/ZeGrapher.profile1
-rw-r--r--etc/profile-m-z/macrofusion.profile1
-rw-r--r--etc/profile-m-z/magicor.profile3
-rw-r--r--etc/profile-m-z/make.profile13
-rw-r--r--etc/profile-m-z/makepkg.profile1
-rw-r--r--etc/profile-m-z/man.profile6
-rw-r--r--etc/profile-m-z/manaplus.profile1
-rw-r--r--etc/profile-m-z/marker.profile2
-rw-r--r--etc/profile-m-z/masterpdfeditor.profile3
-rw-r--r--etc/profile-m-z/mate-calc.profile3
-rw-r--r--etc/profile-m-z/mate-color-select.profile3
-rw-r--r--etc/profile-m-z/mate-dictionary.profile3
-rw-r--r--etc/profile-m-z/mcabber.profile3
-rw-r--r--etc/profile-m-z/mcomix.profile73
-rw-r--r--etc/profile-m-z/mdr.profile3
-rw-r--r--etc/profile-m-z/mediainfo.profile4
-rw-r--r--etc/profile-m-z/mediathekview.profile5
-rw-r--r--etc/profile-m-z/megaglest.profile2
-rw-r--r--etc/profile-m-z/meld.profile3
-rw-r--r--etc/profile-m-z/mencoder.profile1
-rw-r--r--etc/profile-m-z/mendeleydesktop.profile1
-rw-r--r--etc/profile-m-z/menulibre.profile3
-rw-r--r--etc/profile-m-z/meson.profile14
-rw-r--r--etc/profile-m-z/meteo-qt.profile1
-rw-r--r--etc/profile-m-z/microsoft-edge-beta.profile20
-rw-r--r--etc/profile-m-z/midori.profile7
-rw-r--r--etc/profile-m-z/mindless.profile3
-rw-r--r--etc/profile-m-z/minecraft-launcher.profile8
-rw-r--r--etc/profile-m-z/minetest.profile1
-rw-r--r--etc/profile-m-z/minitube.profile3
-rw-r--r--etc/profile-m-z/mirage.profile1
-rw-r--r--etc/profile-m-z/mirrormagic.profile3
-rw-r--r--etc/profile-m-z/mocp.profile3
-rw-r--r--etc/profile-m-z/mousepad.profile1
-rw-r--r--etc/profile-m-z/mp3splt-gtk.profile3
-rw-r--r--etc/profile-m-z/mp3splt.profile3
-rw-r--r--etc/profile-m-z/mpDris2.profile3
-rw-r--r--etc/profile-m-z/mpd.profile1
-rw-r--r--etc/profile-m-z/mpg123.profile1
-rw-r--r--etc/profile-m-z/mplayer.profile1
-rw-r--r--etc/profile-m-z/mpsyt.profile2
-rw-r--r--etc/profile-m-z/mpv.profile21
-rw-r--r--etc/profile-m-z/mrrescue.profile6
-rw-r--r--etc/profile-m-z/ms-office.profile3
-rw-r--r--etc/profile-m-z/mtpaint.profile1
-rw-r--r--etc/profile-m-z/multimc5.profile5
-rw-r--r--etc/profile-m-z/mumble.profile1
-rw-r--r--etc/profile-m-z/mupdf-x11-curl.profile2
-rw-r--r--etc/profile-m-z/mupdf.profile3
-rw-r--r--etc/profile-m-z/mupen64plus.profile2
-rw-r--r--etc/profile-m-z/musescore.profile1
-rw-r--r--etc/profile-m-z/musictube.profile1
-rw-r--r--etc/profile-m-z/musixmatch.profile5
-rw-r--r--etc/profile-m-z/mutt.profile3
-rw-r--r--etc/profile-m-z/mypaint.profile3
-rw-r--r--etc/profile-m-z/nano.profile9
-rw-r--r--etc/profile-m-z/natron.profile1
-rw-r--r--etc/profile-m-z/ncdu.profile1
-rw-r--r--etc/profile-m-z/ncdu2.profile12
-rw-r--r--etc/profile-m-z/neochat.profile3
-rw-r--r--etc/profile-m-z/neomutt.profile3
-rw-r--r--etc/profile-m-z/netactview.profile3
-rw-r--r--etc/profile-m-z/nethack-vultures.profile1
-rw-r--r--etc/profile-m-z/nethack.profile1
-rw-r--r--etc/profile-m-z/neverball.profile1
-rw-r--r--etc/profile-m-z/newsboat.profile3
-rw-r--r--etc/profile-m-z/newsflash.profile3
-rw-r--r--etc/profile-m-z/nextcloud.profile6
-rw-r--r--etc/profile-m-z/nheko.profile11
-rw-r--r--etc/profile-m-z/nicotine.profile1
-rw-r--r--etc/profile-m-z/nitroshare.profile3
-rw-r--r--etc/profile-m-z/node.profile11
-rw-r--r--etc/profile-m-z/nodejs-common.profile50
-rw-r--r--etc/profile-m-z/nomacs.profile3
-rw-r--r--etc/profile-m-z/noprofile.profile29
-rw-r--r--etc/profile-m-z/notable.profile37
-rw-r--r--etc/profile-m-z/notify-send.profile3
-rw-r--r--etc/profile-m-z/npm.profile18
-rw-r--r--etc/profile-m-z/nslookup.profile1
-rw-r--r--etc/profile-m-z/nuclear.profile2
-rw-r--r--etc/profile-m-z/nvim.profile52
-rw-r--r--etc/profile-m-z/nvm.profile13
-rw-r--r--etc/profile-m-z/nylas.profile1
-rw-r--r--etc/profile-m-z/nyx.profile3
-rw-r--r--etc/profile-m-z/obs.profile1
-rw-r--r--etc/profile-m-z/ocenaudio.profile3
-rw-r--r--etc/profile-m-z/odt2txt.profile3
-rw-r--r--etc/profile-m-z/okular.profile4
-rw-r--r--etc/profile-m-z/onboard.profile3
-rw-r--r--etc/profile-m-z/onionshare-cli.profile12
-rw-r--r--etc/profile-m-z/onionshare-gui.profile1
-rw-r--r--etc/profile-m-z/onionshare.profile11
-rw-r--r--etc/profile-m-z/open-invaders.profile2
-rw-r--r--etc/profile-m-z/openarena.profile3
-rw-r--r--etc/profile-m-z/opencity.profile1
-rw-r--r--etc/profile-m-z/openclonk.profile2
-rw-r--r--etc/profile-m-z/openmw.profile1
-rw-r--r--etc/profile-m-z/openshot.profile1
-rw-r--r--etc/profile-m-z/openstego.profile58
-rw-r--r--etc/profile-m-z/openttd.profile1
-rw-r--r--etc/profile-m-z/opera-beta.profile14
-rw-r--r--etc/profile-m-z/opera-developer.profile20
-rw-r--r--etc/profile-m-z/opera.profile5
-rw-r--r--etc/profile-m-z/orage.profile1
-rw-r--r--etc/profile-m-z/ostrichriders.profile3
-rw-r--r--etc/profile-m-z/otter-browser.profile8
-rw-r--r--etc/profile-m-z/pandoc.profile8
-rw-r--r--etc/profile-m-z/parole.profile3
-rw-r--r--etc/profile-m-z/patch.profile1
-rw-r--r--etc/profile-m-z/pavucontrol.profile3
-rw-r--r--etc/profile-m-z/pcsxr.profile1
-rw-r--r--etc/profile-m-z/pdfchain.profile3
-rw-r--r--etc/profile-m-z/pdfmod.profile1
-rw-r--r--etc/profile-m-z/pdfsam.profile1
-rw-r--r--etc/profile-m-z/pdftotext.profile4
-rw-r--r--etc/profile-m-z/peek.profile3
-rw-r--r--etc/profile-m-z/penguin-command.profile1
-rw-r--r--etc/profile-m-z/photoflare.profile3
-rw-r--r--etc/profile-m-z/picard.profile1
-rw-r--r--etc/profile-m-z/pidgin.profile1
-rw-r--r--etc/profile-m-z/pinball.profile4
-rw-r--r--etc/profile-m-z/ping.profile1
-rw-r--r--etc/profile-m-z/pingus.profile5
-rw-r--r--etc/profile-m-z/pinta.profile1
-rw-r--r--etc/profile-m-z/pioneer.profile1
-rw-r--r--etc/profile-m-z/pip.profile18
-rw-r--r--etc/profile-m-z/pipe-viewer.profile21
-rw-r--r--etc/profile-m-z/pithos.profile1
-rw-r--r--etc/profile-m-z/pitivi.profile1
-rw-r--r--etc/profile-m-z/pix.profile1
-rw-r--r--etc/profile-m-z/pkglog.profile3
-rw-r--r--etc/profile-m-z/pluma.profile1
-rw-r--r--etc/profile-m-z/plv.profile3
-rw-r--r--etc/profile-m-z/pngquant.profile8
-rw-r--r--etc/profile-m-z/ppsspp.profile1
-rw-r--r--etc/profile-m-z/pragha.profile3
-rw-r--r--etc/profile-m-z/profanity.profile3
-rw-r--r--etc/profile-m-z/psi-plus.profile1
-rw-r--r--etc/profile-m-z/psi.profile3
-rw-r--r--etc/profile-m-z/pybitmessage.profile1
-rw-r--r--etc/profile-m-z/pycharm-community.profile1
-rw-r--r--etc/profile-m-z/qbittorrent.profile4
-rw-r--r--etc/profile-m-z/qcomicbook.profile67
-rw-r--r--etc/profile-m-z/qemu-launcher.profile1
-rw-r--r--etc/profile-m-z/qemu-system-x86_64.profile1
-rw-r--r--etc/profile-m-z/qgis.profile3
-rw-r--r--etc/profile-m-z/qlipper.profile1
-rw-r--r--etc/profile-m-z/qmmp.profile1
-rw-r--r--etc/profile-m-z/qnapi.profile3
-rw-r--r--etc/profile-m-z/qpdfview.profile1
-rw-r--r--etc/profile-m-z/qrencode.profile3
-rw-r--r--etc/profile-m-z/qtox.profile3
-rw-r--r--etc/profile-m-z/quaternion.profile1
-rw-r--r--etc/profile-m-z/quiterss.profile1
-rw-r--r--etc/profile-m-z/quodlibet.profile1
-rw-r--r--etc/profile-m-z/qupzilla.profile1
-rw-r--r--etc/profile-m-z/raincat.profile49
-rw-r--r--etc/profile-m-z/rambox.profile6
-rw-r--r--etc/profile-m-z/redeclipse.profile1
-rw-r--r--etc/profile-m-z/rednotebook.profile66
-rw-r--r--etc/profile-m-z/redshift.profile1
-rw-r--r--etc/profile-m-z/regextester.profile3
-rw-r--r--etc/profile-m-z/remmina.profile1
-rw-r--r--etc/profile-m-z/retroarch.profile54
-rw-r--r--etc/profile-m-z/rhythmbox.profile1
-rw-r--r--etc/profile-m-z/ricochet.profile1
-rw-r--r--etc/profile-m-z/ripperx.profile1
-rw-r--r--etc/profile-m-z/ristretto.profile1
-rw-r--r--etc/profile-m-z/rpcs3.profile62
-rw-r--r--etc/profile-m-z/rsync-download_only.profile3
-rw-r--r--etc/profile-m-z/rtin.profile8
-rw-r--r--etc/profile-m-z/rtorrent.profile1
-rw-r--r--etc/profile-m-z/rtv-addons.profile5
-rw-r--r--etc/profile-m-z/rtv.profile8
-rw-r--r--etc/profile-m-z/sayonara.profile1
-rw-r--r--etc/profile-m-z/scallion.profile1
-rw-r--r--etc/profile-m-z/scorched3d.profile2
-rw-r--r--etc/profile-m-z/scorchwentbonkers.profile3
-rw-r--r--etc/profile-m-z/scribus.profile1
-rw-r--r--etc/profile-m-z/sdat2img.profile1
-rw-r--r--etc/profile-m-z/seafile-applet.profile62
-rw-r--r--etc/profile-m-z/seahorse-adventures.profile9
-rw-r--r--etc/profile-m-z/seahorse-tool.profile2
-rw-r--r--etc/profile-m-z/seahorse.profile3
-rw-r--r--etc/profile-m-z/seamonkey.profile6
-rw-r--r--etc/profile-m-z/server.profile3
-rw-r--r--etc/profile-m-z/servo.profile1
-rw-r--r--etc/profile-m-z/shellcheck.profile3
-rw-r--r--etc/profile-m-z/shortwave.profile1
-rw-r--r--etc/profile-m-z/shotcut.profile1
-rw-r--r--etc/profile-m-z/shotwell.profile3
-rw-r--r--etc/profile-m-z/signal-cli.profile1
-rw-r--r--etc/profile-m-z/signal-desktop.profile8
-rw-r--r--etc/profile-m-z/silentarmy.profile1
-rw-r--r--etc/profile-m-z/simple-scan.profile1
-rw-r--r--etc/profile-m-z/simplescreenrecorder.profile1
-rw-r--r--etc/profile-m-z/simutrans.profile1
-rw-r--r--etc/profile-m-z/skanlite.profile1
-rw-r--r--etc/profile-m-z/skypeforlinux.profile18
-rw-r--r--etc/profile-m-z/slack.profile6
-rw-r--r--etc/profile-m-z/slashem.profile1
-rw-r--r--etc/profile-m-z/smplayer.profile1
-rw-r--r--etc/profile-m-z/smtube.profile1
-rw-r--r--etc/profile-m-z/smuxi-frontend-gnome.profile3
-rw-r--r--etc/profile-m-z/snox.profile3
-rw-r--r--etc/profile-m-z/softmaker-common.profile9
-rw-r--r--etc/profile-m-z/sol.profile1
-rw-r--r--etc/profile-m-z/sound-juicer.profile1
-rw-r--r--etc/profile-m-z/soundconverter.profile1
-rw-r--r--etc/profile-m-z/spectacle.profile5
-rw-r--r--etc/profile-m-z/spectral.profile9
-rw-r--r--etc/profile-m-z/spectre-meltdown-checker.profile1
-rw-r--r--etc/profile-m-z/spotify.profile5
-rw-r--r--etc/profile-m-z/sqlitebrowser.profile3
-rw-r--r--etc/profile-m-z/ssh-agent.profile1
-rw-r--r--etc/profile-m-z/ssh.profile2
-rw-r--r--etc/profile-m-z/standardnotes-desktop.profile3
-rw-r--r--etc/profile-m-z/steam.profile31
-rw-r--r--etc/profile-m-z/stellarium.profile1
-rw-r--r--etc/profile-m-z/straw-viewer.profile51
-rw-r--r--etc/profile-m-z/strawberry.profile3
-rw-r--r--etc/profile-m-z/strings.profile1
-rw-r--r--etc/profile-m-z/subdownloader.profile3
-rw-r--r--etc/profile-m-z/supertux2.profile5
-rw-r--r--etc/profile-m-z/supertuxkart.profile8
-rw-r--r--etc/profile-m-z/surf.profile3
-rw-r--r--etc/profile-m-z/sushi.profile1
-rw-r--r--etc/profile-m-z/sway.profile (renamed from etc/profile-a-l/sway.profile)2
-rw-r--r--etc/profile-m-z/synfigstudio.profile1
-rw-r--r--etc/profile-m-z/sysprof.profile19
-rw-r--r--etc/profile-m-z/tar.profile2
-rw-r--r--etc/profile-m-z/tcpdump.profile1
-rw-r--r--etc/profile-m-z/teams-for-linux.profile6
-rw-r--r--etc/profile-m-z/teams.profile2
-rw-r--r--etc/profile-m-z/teamspeak3.profile1
-rw-r--r--etc/profile-m-z/teeworlds.profile2
-rw-r--r--etc/profile-m-z/telegram-desktop.profile2
-rw-r--r--etc/profile-m-z/telegram.profile13
-rw-r--r--etc/profile-m-z/telnet.profile54
-rw-r--r--etc/profile-m-z/terasology.profile1
-rw-r--r--etc/profile-m-z/thunderbird.profile2
-rw-r--r--etc/profile-m-z/tilp.profile3
-rw-r--r--etc/profile-m-z/tin.profile68
-rw-r--r--etc/profile-m-z/tmux.profile1
-rw-r--r--etc/profile-m-z/tor-browser.profile3
-rw-r--r--etc/profile-m-z/tor.profile3
-rw-r--r--etc/profile-m-z/torbrowser-launcher.profile3
-rw-r--r--etc/profile-m-z/torbrowser.profile26
-rw-r--r--etc/profile-m-z/torcs.profile2
-rw-r--r--etc/profile-m-z/totem.profile1
-rw-r--r--etc/profile-m-z/tracker.profile1
-rw-r--r--etc/profile-m-z/transgui.profile3
-rw-r--r--etc/profile-m-z/transmission-cli.profile2
-rw-r--r--etc/profile-m-z/transmission-common.profile1
-rw-r--r--etc/profile-m-z/transmission-daemon.profile2
-rw-r--r--etc/profile-m-z/transmission-remote-gtk.profile2
-rw-r--r--etc/profile-m-z/transmission-remote.profile2
-rw-r--r--etc/profile-m-z/transmission-show.profile2
-rw-r--r--etc/profile-m-z/tremulous.profile6
-rw-r--r--etc/profile-m-z/trojita.profile3
-rw-r--r--etc/profile-m-z/truecraft.profile1
-rw-r--r--etc/profile-m-z/tuxguitar.profile7
-rw-r--r--etc/profile-m-z/tvbrowser.profile1
-rw-r--r--etc/profile-m-z/twitch.profile4
-rw-r--r--etc/profile-m-z/udiskie.profile1
-rw-r--r--etc/profile-m-z/uefitool.profile1
-rw-r--r--etc/profile-m-z/unbound.profile1
-rw-r--r--etc/profile-m-z/unf.profile3
-rw-r--r--etc/profile-m-z/unknown-horizons.profile1
-rw-r--r--etc/profile-m-z/unrar.profile2
-rw-r--r--etc/profile-m-z/unzip.profile2
-rw-r--r--etc/profile-m-z/utox.profile3
-rw-r--r--etc/profile-m-z/uudeview.profile3
-rw-r--r--etc/profile-m-z/uzbl-browser.profile1
-rw-r--r--etc/profile-m-z/viewnior.profile3
-rw-r--r--etc/profile-m-z/viking.profile1
-rw-r--r--etc/profile-m-z/vim.profile1
-rw-r--r--etc/profile-m-z/virtualbox.profile3
-rw-r--r--etc/profile-m-z/vlc.profile1
-rw-r--r--etc/profile-m-z/vmware-view.profile2
-rw-r--r--etc/profile-m-z/vmware.profile4
-rw-r--r--etc/profile-m-z/vscodium.profile4
-rw-r--r--etc/profile-m-z/vym.profile1
-rw-r--r--etc/profile-m-z/w3m.profile25
-rw-r--r--etc/profile-m-z/warmux.profile3
-rw-r--r--etc/profile-m-z/warsow.profile9
-rw-r--r--etc/profile-m-z/warzone2100.profile8
-rw-r--r--etc/profile-m-z/webstorm.profile1
-rw-r--r--etc/profile-m-z/webui-aria2.profile1
-rw-r--r--etc/profile-m-z/weechat-curses.profile1
-rw-r--r--etc/profile-m-z/weechat.profile2
-rw-r--r--etc/profile-m-z/wesnoth.profile1
-rw-r--r--etc/profile-m-z/wget.profile1
-rw-r--r--etc/profile-m-z/wget2.profile19
-rw-r--r--etc/profile-m-z/whalebird.profile4
-rw-r--r--etc/profile-m-z/whois.profile3
-rw-r--r--etc/profile-m-z/widelands.profile1
-rw-r--r--etc/profile-m-z/wine.profile2
-rw-r--r--etc/profile-m-z/wire-desktop.profile2
-rw-r--r--etc/profile-m-z/wireshark.profile7
-rw-r--r--etc/profile-m-z/wordwarvi.profile3
-rw-r--r--etc/profile-m-z/wps.profile1
-rw-r--r--etc/profile-m-z/x2goclient.profile1
-rw-r--r--etc/profile-m-z/xbill.profile3
-rw-r--r--etc/profile-m-z/xcalc.profile1
-rw-r--r--etc/profile-m-z/xed.profile1
-rw-r--r--etc/profile-m-z/xfburn.profile1
-rw-r--r--etc/profile-m-z/xfce4-dict.profile1
-rw-r--r--etc/profile-m-z/xfce4-mixer.profile3
-rw-r--r--etc/profile-m-z/xfce4-notes.profile1
-rw-r--r--etc/profile-m-z/xfce4-screenshooter.profile3
-rw-r--r--etc/profile-m-z/xiphos.profile3
-rw-r--r--etc/profile-m-z/xlinks.profile3
-rw-r--r--etc/profile-m-z/xlinks220
-rw-r--r--etc/profile-m-z/xmms.profile1
-rw-r--r--etc/profile-m-z/xmr-stak.profile3
-rw-r--r--etc/profile-m-z/xonotic.profile2
-rw-r--r--etc/profile-m-z/xournal.profile3
-rw-r--r--etc/profile-m-z/xournalpp.profile9
-rw-r--r--etc/profile-m-z/xpdf.profile1
-rw-r--r--etc/profile-m-z/xplayer.profile1
-rw-r--r--etc/profile-m-z/xpra.profile1
-rw-r--r--etc/profile-m-z/xreader.profile3
-rw-r--r--etc/profile-m-z/xviewer.profile1
-rw-r--r--etc/profile-m-z/yandex-browser.profile3
-rw-r--r--etc/profile-m-z/yarn.profile20
-rw-r--r--etc/profile-m-z/yelp.profile4
-rw-r--r--etc/profile-m-z/youtube-dl-gui.profile3
-rw-r--r--etc/profile-m-z/youtube-dl.profile3
-rw-r--r--etc/profile-m-z/youtube-viewer.profile45
-rw-r--r--etc/profile-m-z/youtube-viewers-common.profile60
-rw-r--r--etc/profile-m-z/youtube.profile4
-rw-r--r--etc/profile-m-z/youtubemusic-nativefier.profile4
-rw-r--r--etc/profile-m-z/yt-dlp.profile21
-rw-r--r--etc/profile-m-z/ytmdesktop.profile2
-rw-r--r--etc/profile-m-z/zaproxy.profile1
-rw-r--r--etc/profile-m-z/zart.profile1
-rw-r--r--etc/profile-m-z/zathura.profile4
-rw-r--r--etc/profile-m-z/zeal.profile20
-rw-r--r--etc/profile-m-z/zim.profile71
-rw-r--r--etc/profile-m-z/zulip.profile3
-rw-r--r--etc/templates/profile.template32
-rw-r--r--etc/templates/syscalls.txt32
-rwxr-xr-xgcov.sh14
-rwxr-xr-xinstall.sh2
-rwxr-xr-xlinecnt.sh10
-rwxr-xr-xmkasc.sh14
-rwxr-xr-xmkdeb.sh.in40
-rwxr-xr-xmketc.sh2
-rwxr-xr-xmkman.sh12
-rwxr-xr-xmkuid.sh6
-rw-r--r--platform/debian/copyright2
-rw-r--r--platform/rpm/firejail.spec4
-rwxr-xr-xplatform/rpm/mkrpm.sh2
-rw-r--r--src/bash_completion/firejail.bash_completion.in8
-rw-r--r--src/common.mk.in9
-rw-r--r--src/fbuilder/build_bin.c2
-rw-r--r--src/fbuilder/build_fs.c5
-rw-r--r--src/fbuilder/build_home.c4
-rw-r--r--src/fbuilder/build_profile.c182
-rw-r--r--src/fbuilder/build_seccomp.c33
-rw-r--r--src/fbuilder/fbuilder.h3
-rw-r--r--src/fbuilder/filedb.c2
-rw-r--r--src/fbuilder/main.c27
-rw-r--r--src/fbuilder/utils.c2
-rw-r--r--src/fcopy/main.c37
-rw-r--r--src/fids/Makefile.in18
-rw-r--r--src/fids/blake2b.c176
-rw-r--r--src/fids/config16
-rw-r--r--src/fids/db.c158
-rw-r--r--src/fids/db_exclude.c56
-rw-r--r--src/fids/fids.h51
-rw-r--r--src/fids/main.c378
-rw-r--r--src/firecfg/desktop_files.c17
-rw-r--r--src/firecfg/firecfg.config77
-rw-r--r--src/firecfg/firecfg.h2
-rw-r--r--src/firecfg/main.c10
-rw-r--r--src/firecfg/sound.c2
-rw-r--r--src/firecfg/util.c2
-rw-r--r--src/firejail/appimage.c43
-rw-r--r--src/firejail/appimage_size.c2
-rw-r--r--src/firejail/arp.c20
-rw-r--r--src/firejail/bandwidth.c34
-rw-r--r--src/firejail/caps.c4
-rw-r--r--src/firejail/cgroup.c89
-rw-r--r--src/firejail/checkcfg.c60
-rw-r--r--src/firejail/chroot.c57
-rw-r--r--src/firejail/cmdline.c34
-rw-r--r--src/firejail/cpu.c8
-rw-r--r--src/firejail/dbus.c35
-rw-r--r--src/firejail/dhcp.c16
-rw-r--r--src/firejail/env.c16
-rw-r--r--src/firejail/firejail.h126
-rw-r--r--src/firejail/fs.c698
-rw-r--r--src/firejail/fs_bin.c47
-rw-r--r--src/firejail/fs_dev.c13
-rw-r--r--src/firejail/fs_etc.c141
-rw-r--r--src/firejail/fs_home.c212
-rw-r--r--src/firejail/fs_hostname.c121
-rw-r--r--src/firejail/fs_lib.c70
-rw-r--r--src/firejail/fs_lib2.c8
-rw-r--r--src/firejail/fs_logger.c27
-rw-r--r--src/firejail/fs_mkdir.c8
-rw-r--r--src/firejail/fs_overlayfs.c470
-rw-r--r--src/firejail/fs_trace.c49
-rw-r--r--src/firejail/fs_var.c26
-rw-r--r--src/firejail/fs_whitelist.c1431
-rw-r--r--src/firejail/ids.c89
-rw-r--r--src/firejail/join.c32
-rw-r--r--src/firejail/ls.c39
-rw-r--r--src/firejail/macros.c68
-rw-r--r--src/firejail/main.c773
-rw-r--r--src/firejail/mountinfo.c238
-rw-r--r--src/firejail/netfilter.c92
-rw-r--r--src/firejail/netns.c2
-rw-r--r--src/firejail/network.c4
-rw-r--r--src/firejail/network_main.c4
-rw-r--r--src/firejail/no_sandbox.c21
-rw-r--r--src/firejail/output.c14
-rw-r--r--src/firejail/paths.c4
-rw-r--r--src/firejail/preproc.c4
-rw-r--r--src/firejail/profile.c213
-rw-r--r--src/firejail/protocol.c6
-rw-r--r--src/firejail/pulseaudio.c128
-rw-r--r--src/firejail/restrict_users.c35
-rw-r--r--src/firejail/restricted_shell.c6
-rw-r--r--src/firejail/rlimit.c28
-rw-r--r--src/firejail/run_files.c8
-rw-r--r--src/firejail/run_symlink.c5
-rw-r--r--src/firejail/sandbox.c140
-rw-r--r--src/firejail/sbox.c26
-rw-r--r--src/firejail/seccomp.c19
-rw-r--r--src/firejail/selinux.c33
-rw-r--r--src/firejail/shutdown.c10
-rw-r--r--src/firejail/usage.c35
-rw-r--r--src/firejail/util.c670
-rw-r--r--src/firejail/x11.c114
-rw-r--r--src/firemon/apparmor.c2
-rw-r--r--src/firemon/arp.c2
-rw-r--r--src/firemon/caps.c2
-rw-r--r--src/firemon/cgroup.c2
-rw-r--r--src/firemon/cpu.c2
-rw-r--r--src/firemon/firemon.c4
-rw-r--r--src/firemon/firemon.h2
-rw-r--r--src/firemon/interface.c7
-rw-r--r--src/firemon/list.c2
-rw-r--r--src/firemon/netstats.c8
-rw-r--r--src/firemon/procevent.c5
-rw-r--r--src/firemon/route.c2
-rw-r--r--src/firemon/seccomp.c2
-rw-r--r--src/firemon/top.c8
-rw-r--r--src/firemon/tree.c2
-rw-r--r--src/firemon/usage.c4
-rw-r--r--src/firemon/x11.c2
-rw-r--r--src/fldd/main.c17
-rw-r--r--src/fnet/arp.c2
-rw-r--r--src/fnet/fnet.h2
-rw-r--r--src/fnet/interface.c2
-rw-r--r--src/fnet/main.c2
-rw-r--r--src/fnet/veth.c2
-rw-r--r--src/fnetfilter/main.c7
-rw-r--r--src/fnettrace/Makefile.in17
-rw-r--r--src/fnettrace/fnettrace.h73
-rw-r--r--src/fnettrace/hostnames.c124
-rw-r--r--src/fnettrace/main.c665
-rw-r--r--src/fnettrace/radix.c155
-rw-r--r--src/fnettrace/radix.h27
-rw-r--r--src/fnettrace/static-ip-map4044
-rw-r--r--src/fnettrace/tail.c63
-rw-r--r--src/fsec-optimize/fsec_optimize.h2
-rw-r--r--src/fsec-optimize/main.c2
-rw-r--r--src/fsec-optimize/optimizer.c2
-rw-r--r--src/fsec-print/fsec_print.h2
-rw-r--r--src/fsec-print/main.c2
-rw-r--r--src/fsec-print/print.c2
-rw-r--r--src/fseccomp/fseccomp.h2
-rw-r--r--src/fseccomp/main.c2
-rw-r--r--src/fseccomp/protocol.c2
-rw-r--r--src/fseccomp/seccomp.c2
-rw-r--r--src/fseccomp/seccomp_file.c2
-rw-r--r--src/fseccomp/seccomp_secondary.c2
-rwxr-xr-xsrc/fshaper/fshaper.sh2
-rw-r--r--src/ftee/ftee.h2
-rw-r--r--src/ftee/main.c2
-rw-r--r--src/include/common.h27
-rw-r--r--src/include/euid_common.h2
-rw-r--r--src/include/firejail_user.h2
-rw-r--r--src/include/gcov_wrapper.h46
-rw-r--r--src/include/ldd_utils.h2
-rw-r--r--src/include/pid.h2
-rw-r--r--src/include/rundefs.h18
-rw-r--r--src/include/seccomp.h2
-rw-r--r--src/include/syscall.h2
-rw-r--r--src/jailcheck/Makefile.in (renamed from src/jailtest/Makefile.in)6
-rw-r--r--src/jailcheck/access.c (renamed from src/jailtest/access.c)8
-rw-r--r--src/jailcheck/apparmor.c (renamed from src/jailtest/apparmor.c)4
-rw-r--r--src/jailcheck/jailcheck.h (renamed from src/jailtest/jailtest.h)10
-rw-r--r--src/jailcheck/main.c (renamed from src/jailtest/main.c)29
-rw-r--r--src/jailcheck/network.c57
-rw-r--r--src/jailcheck/noexec.c (renamed from src/jailtest/noexec.c)8
-rw-r--r--src/jailcheck/seccomp.c (renamed from src/jailtest/seccomp.c)4
-rw-r--r--src/jailcheck/sysfiles.c (renamed from src/jailtest/sysfiles.c)6
-rw-r--r--src/jailcheck/utils.c (renamed from src/jailtest/utils.c)4
-rw-r--r--src/jailcheck/virtual.c (renamed from src/jailtest/virtual.c)6
-rw-r--r--src/lib/common.c112
-rw-r--r--src/lib/errno.c2
-rw-r--r--src/lib/firejail_user.c2
-rw-r--r--src/lib/ldd_utils.c4
-rw-r--r--src/lib/pid.c2
-rw-r--r--src/lib/syscall.c15
-rw-r--r--src/libpostexecseccomp/libpostexecseccomp.c2
-rw-r--r--src/libtrace/libtrace.c16
-rw-r--r--src/libtracelog/libtracelog.c2
-rw-r--r--src/man/Makefile.in2
-rw-r--r--src/man/firecfg.txt4
-rw-r--r--src/man/firejail-login.txt2
-rw-r--r--src/man/firejail-profile.txt175
-rw-r--r--src/man/firejail-users.txt2
-rw-r--r--src/man/firejail.txt323
-rw-r--r--src/man/firemon.txt4
-rw-r--r--src/man/jailcheck.txt (renamed from src/man/jailtest.txt)29
-rwxr-xr-xsrc/man/preproc.awk2
-rw-r--r--src/profstats/Makefile.in2
-rw-r--r--src/profstats/main.c75
-rwxr-xr-xsrc/tools/check-caps.sh2
-rw-r--r--src/tools/extract_caps.c2
-rw-r--r--src/tools/extract_errnos.sh2
-rw-r--r--src/tools/extract_seccomp.c2
-rw-r--r--src/tools/extract_syscalls.c2
-rwxr-xr-xsrc/tools/mkcoverit.sh2
-rw-r--r--src/tools/testuid.c2
-rw-r--r--src/tools/ttytest.c2
-rw-r--r--src/tools/unixsocket.c2
-rw-r--r--src/zsh_completion/_firejail.in14
-rwxr-xr-xtest/appimage/appimage-args.exp6
-rwxr-xr-xtest/appimage/appimage-trace.exp6
-rwxr-xr-xtest/appimage/appimage-v1.exp6
-rwxr-xr-xtest/appimage/appimage-v2.exp6
-rwxr-xr-xtest/appimage/appimage.sh2
-rwxr-xr-xtest/appimage/filename.exp2
-rwxr-xr-xtest/apps-x11-xorg/apps-x11-xorg.sh2
-rwxr-xr-xtest/apps-x11-xorg/firefox.exp4
-rwxr-xr-xtest/apps-x11-xorg/thunderbird.exp4
-rwxr-xr-xtest/apps-x11-xorg/transmission-gtk.exp4
-rwxr-xr-xtest/apps-x11-xorg/transmission-qt.exp4
-rwxr-xr-xtest/apps-x11/apps-x11.sh2
-rwxr-xr-xtest/apps-x11/chromium.exp4
-rwxr-xr-xtest/apps-x11/firefox.exp4
-rwxr-xr-xtest/apps-x11/thunderbird.exp4
-rwxr-xr-xtest/apps-x11/transmission-gtk.exp4
-rwxr-xr-xtest/apps-x11/x11-none.exp4
-rwxr-xr-xtest/apps-x11/x11-xephyr.exp6
-rwxr-xr-xtest/apps-x11/xterm-xephyr.exp4
-rwxr-xr-xtest/apps-x11/xterm-xorg.exp4
-rwxr-xr-xtest/apps-x11/xterm-xpra.exp4
-rwxr-xr-xtest/apps/apps.sh2
-rwxr-xr-xtest/apps/chromium.exp6
-rwxr-xr-xtest/apps/deluge.exp6
-rwxr-xr-xtest/apps/fbreader.exp6
-rwxr-xr-xtest/apps/filezilla.exp6
-rwxr-xr-xtest/apps/firefox.exp6
-rwxr-xr-xtest/apps/gnome-mplayer.exp6
-rwxr-xr-xtest/apps/gthumb.exp6
-rwxr-xr-xtest/apps/hexchat.exp6
-rwxr-xr-xtest/apps/kcalc.exp6
-rwxr-xr-xtest/apps/ktorrent.exp6
-rwxr-xr-xtest/apps/midori.exp6
-rwxr-xr-xtest/apps/opera.exp6
-rwxr-xr-xtest/apps/qbittorrent.exp6
-rwxr-xr-xtest/apps/thunderbird.exp6
-rwxr-xr-xtest/apps/transmission-qt.exp6
-rwxr-xr-xtest/apps/uget-gtk.exp6
-rwxr-xr-xtest/apps/vlc.exp6
-rwxr-xr-xtest/apps/wine.exp4
-rwxr-xr-xtest/apps/xchat.exp6
-rwxr-xr-xtest/chroot/chroot.sh2
-rwxr-xr-xtest/chroot/configure2
-rwxr-xr-xtest/chroot/fs_chroot.exp4
-rwxr-xr-xtest/chroot/unchroot-as-root.exp4
-rw-r--r--test/chroot/unchroot.c2
-rwxr-xr-xtest/compile/compile.sh2
-rwxr-xr-xtest/environment/allow-debuggers.exp4
-rwxr-xr-xtest/environment/csh.exp4
-rwxr-xr-xtest/environment/dash.exp4
-rwxr-xr-xtest/environment/deterministic-exit-code.exp6
-rwxr-xr-xtest/environment/deterministic-shutdown.exp17
-rwxr-xr-xtest/environment/dns.exp10
-rwxr-xr-xtest/environment/doubledash.exp6
-rwxr-xr-xtest/environment/env.exp6
-rwxr-xr-xtest/environment/environment.sh18
-rwxr-xr-xtest/environment/extract_command.exp4
-rwxr-xr-xtest/environment/firejail-in-firejail.exp4
-rwxr-xr-xtest/environment/hostfile.exp4
-rwxr-xr-xtest/environment/ibus.exp4
-rwxr-xr-xtest/environment/keep-fd-bad.exp40
-rwxr-xr-xtest/environment/keep-fd.exp223
-rwxr-xr-xtest/environment/machineid.exp4
-rwxr-xr-xtest/environment/nice.exp8
-rwxr-xr-xtest/environment/output.exp2
-rwxr-xr-xtest/environment/output.sh2
-rwxr-xr-xtest/environment/quiet.exp2
-rwxr-xr-xtest/environment/rlimit-bad-profile.exp4
-rwxr-xr-xtest/environment/rlimit-bad.exp4
-rwxr-xr-xtest/environment/rlimit-join.exp40
-rwxr-xr-xtest/environment/rlimit-profile.exp4
-rwxr-xr-xtest/environment/rlimit.exp4
-rwxr-xr-xtest/environment/shell-none.exp6
-rwxr-xr-xtest/environment/sound.exp12
-rwxr-xr-xtest/environment/timeout.exp4
-rwxr-xr-xtest/environment/umask.exp4
-rwxr-xr-xtest/environment/zsh.exp4
-rwxr-xr-xtest/fcopy/cmdline.exp16
-rwxr-xr-xtest/fcopy/dircopy.exp16
-rwxr-xr-xtest/fcopy/fcopy.sh9
-rwxr-xr-xtest/fcopy/filecopy.exp2
-rwxr-xr-xtest/fcopy/linkcopy.exp16
l---------test/fcopy/src/dircopy.exp1
-rwxr-xr-xtest/features/1.1.exp8
-rwxr-xr-xtest/features/1.10.exp8
-rwxr-xr-xtest/features/1.2.exp8
-rwxr-xr-xtest/features/1.4.exp8
-rwxr-xr-xtest/features/1.5.exp8
-rwxr-xr-xtest/features/1.6.exp8
-rwxr-xr-xtest/features/1.7.exp8
-rwxr-xr-xtest/features/1.8.exp8
-rwxr-xr-xtest/features/2.1.exp8
-rwxr-xr-xtest/features/2.2.exp8
-rwxr-xr-xtest/features/2.3.exp14
-rwxr-xr-xtest/features/2.4.exp14
-rwxr-xr-xtest/features/2.5.exp8
-rwxr-xr-xtest/features/2.6.exp8
-rwxr-xr-xtest/features/3.1.exp8
-rwxr-xr-xtest/features/3.10.exp8
-rwxr-xr-xtest/features/3.11.exp8
-rwxr-xr-xtest/features/3.2.exp8
-rwxr-xr-xtest/features/3.3.exp8
-rwxr-xr-xtest/features/3.4.exp8
-rwxr-xr-xtest/features/3.5.exp8
-rwxr-xr-xtest/features/3.6.exp8
-rwxr-xr-xtest/features/3.7.exp8
-rwxr-xr-xtest/features/3.8.exp8
-rwxr-xr-xtest/features/3.9.exp8
-rwxr-xr-xtest/features/test.sh2
-rwxr-xr-xtest/filters/apparmor.exp6
-rwxr-xr-xtest/filters/caps-join.exp8
-rwxr-xr-xtest/filters/caps-print.exp4
-rwxr-xr-xtest/filters/caps.exp14
-rwxr-xr-xtest/filters/debug.exp2
-rwxr-xr-xtest/filters/filters.sh19
-rwxr-xr-xtest/filters/fseccomp.exp4
-rwxr-xr-xtest/filters/memwrexebin17096 -> 17096 bytes
-rwxr-xr-xtest/filters/memwrexe-32bin6678 -> 15800 bytes
-rwxr-xr-xtest/filters/memwrexe-32.exp8
-rw-r--r--test/filters/memwrexe.c16
-rwxr-xr-xtest/filters/memwrexe.exp8
-rwxr-xr-xtest/filters/noroot.exp8
-rwxr-xr-xtest/filters/protocol.exp173
-rwxr-xr-xtest/filters/seccomp-bad-empty.exp2
-rwxr-xr-xtest/filters/seccomp-chmod-profile.exp4
-rwxr-xr-xtest/filters/seccomp-chmod.exp4
-rwxr-xr-xtest/filters/seccomp-chown.exp4
-rwxr-xr-xtest/filters/seccomp-debug-32.exp87
-rwxr-xr-xtest/filters/seccomp-debug.exp16
-rwxr-xr-xtest/filters/seccomp-dualfilter.exp55
-rwxr-xr-xtest/filters/seccomp-empty.exp10
-rwxr-xr-xtest/filters/seccomp-errno.exp4
-rwxr-xr-xtest/filters/seccomp-join.exp2
-rwxr-xr-xtest/filters/seccomp-numeric.exp2
-rwxr-xr-xtest/filters/seccomp-postexec.exp21
-rwxr-xr-xtest/filters/seccomp-ptrace.exp7
-rwxr-xr-xtest/filters/seccomp-run-files.exp2
-rwxr-xr-xtest/filters/seccomp-su.exp4
-rwxr-xr-xtest/filters/syscall_testbin9552 -> 0 bytes
-rw-r--r--test/filters/syscall_test.c82
-rwxr-xr-xtest/filters/syscall_test32bin6868 -> 0 bytes
-rwxr-xr-xtest/fnetfilter/cmdline.exp2
-rwxr-xr-xtest/fnetfilter/copy.exp2
-rwxr-xr-xtest/fnetfilter/default.exp9
-rwxr-xr-xtest/fnetfilter/fnetfilter.sh2
-rwxr-xr-xtest/fnetfilter/template.exp10
-rwxr-xr-xtest/fs/fs.sh64
-rwxr-xr-xtest/fs/fs_dev_shm.exp22
-rwxr-xr-xtest/fs/fs_var_lock.exp6
-rwxr-xr-xtest/fs/fs_var_tmp.exp22
-rwxr-xr-xtest/fs/fscheck-bindnoroot.exp2
-rwxr-xr-xtest/fs/fscheck-private.exp2
-rwxr-xr-xtest/fs/fscheck-readonly.exp2
-rwxr-xr-xtest/fs/fscheck-tmpfs.exp6
-rwxr-xr-xtest/fs/invalid_filename.exp2
-rwxr-xr-xtest/fs/kmsg.exp4
-rwxr-xr-xtest/fs/macro.exp28
-rwxr-xr-xtest/fs/mkdir.exp22
-rw-r--r--test/fs/mkdir.profile12
-rwxr-xr-xtest/fs/mkdir_mkfile.exp4
-rwxr-xr-xtest/fs/noblacklist-blacklist-noexec.exp4
-rwxr-xr-xtest/fs/noblacklist-blacklist-readonly.exp4
-rwxr-xr-xtest/fs/option_bind_user.exp2
-rwxr-xr-xtest/fs/option_blacklist.exp6
-rwxr-xr-xtest/fs/option_blacklist_file.exp29
-rwxr-xr-xtest/fs/option_blacklist_glob.exp29
-rwxr-xr-xtest/fs/private-bin.exp6
-rwxr-xr-xtest/fs/private-cache.exp4
-rwxr-xr-xtest/fs/private-cwd.exp50
-rw-r--r--test/fs/private-cwd.profile1
-rwxr-xr-xtest/fs/private-etc-empty.exp6
-rwxr-xr-xtest/fs/private-etc.exp9
-rwxr-xr-xtest/fs/private-home-dir.exp21
-rwxr-xr-xtest/fs/private-home.exp19
-rwxr-xr-xtest/fs/private-homedir.exp4
-rwxr-xr-xtest/fs/private-lib.exp4
-rwxr-xr-xtest/fs/private-whitelist.exp4
-rwxr-xr-xtest/fs/private.exp4
-rwxr-xr-xtest/fs/read-write.exp17
-rwxr-xr-xtest/fs/sys_fs.exp6
-rwxr-xr-xtest/fs/tab.exp46
-rw-r--r--test/fs/tab.profile1
-rw-r--r--test/fs/testdir1/.directory/file0
-rw-r--r--test/fs/testdir1/.file0
-rw-r--r--test/fs/testfile10
-rwxr-xr-xtest/fs/whitelist-dev.exp17
-rwxr-xr-xtest/fs/whitelist-double.exp14
-rwxr-xr-xtest/fs/whitelist-empty.exp4
-rwxr-xr-xtest/fs/whitelist-noexec.exp4
-rwxr-xr-xtest/fs/whitelist-readonly.exp14
-rwxr-xr-xtest/fs/whitelist-whitespace.exp4
-rwxr-xr-xtest/fs/whitelist.exp74
-rwxr-xr-xtest/network/4bridges_arp.exp12
-rwxr-xr-xtest/network/4bridges_ip.exp12
-rwxr-xr-xtest/network/bandwidth.exp4
-rwxr-xr-xtest/network/configure2
-rwxr-xr-xtest/network/dns-print.exp4
-rwxr-xr-xtest/network/firemon-arp.exp6
-rwxr-xr-xtest/network/firemon-interfaces.exp6
-rwxr-xr-xtest/network/firemon-route.exp6
-rwxr-xr-xtest/network/hostname.exp4
-rwxr-xr-xtest/network/interface.exp4
-rwxr-xr-xtest/network/ip6.exp8
-rwxr-xr-xtest/network/iprange.exp6
-rwxr-xr-xtest/network/net_arp.exp12
-rwxr-xr-xtest/network/net_badip.exp2
-rwxr-xr-xtest/network/net_defaultgw.exp4
-rwxr-xr-xtest/network/net_defaultgw2.exp4
-rwxr-xr-xtest/network/net_defaultgw3.exp2
-rwxr-xr-xtest/network/net_ip.exp6
-rwxr-xr-xtest/network/net_local.exp6
-rwxr-xr-xtest/network/net_mac.exp4
-rwxr-xr-xtest/network/net_macvlan2.exp4
-rwxr-xr-xtest/network/net_mtu.exp4
-rwxr-xr-xtest/network/net_netfilter.exp10
-rwxr-xr-xtest/network/net_noip.exp4
-rwxr-xr-xtest/network/net_noip2.exp4
-rwxr-xr-xtest/network/net_none.exp6
-rwxr-xr-xtest/network/net_profile.exp4
-rwxr-xr-xtest/network/net_scan.exp8
-rwxr-xr-xtest/network/net_unconfigured.exp12
-rwxr-xr-xtest/network/net_veth.exp6
-rwxr-xr-xtest/network/netfilter-template.exp4
-rwxr-xr-xtest/network/netns.exp4
-rwxr-xr-xtest/network/netstats.exp6
-rwxr-xr-xtest/network/network.sh2
-rw-r--r--test/network/tcpserver.c2
-rwxr-xr-xtest/network/veth-name.exp6
-rwxr-xr-xtest/overlay/firefox-x11-xorg.exp4
-rwxr-xr-xtest/overlay/firefox-x11.exp4
-rwxr-xr-xtest/overlay/firefox.exp6
-rwxr-xr-xtest/overlay/fs-named.exp6
-rwxr-xr-xtest/overlay/fs-tmpfs.exp4
-rwxr-xr-xtest/overlay/fs.exp4
-rwxr-xr-xtest/overlay/overlay.sh2
-rwxr-xr-xtest/private-lib/atril.exp6
-rwxr-xr-xtest/private-lib/dig.exp2
-rwxr-xr-xtest/private-lib/eog.exp6
-rwxr-xr-xtest/private-lib/eom.exp6
-rwxr-xr-xtest/private-lib/evince.exp6
-rwxr-xr-xtest/private-lib/galculator.exp6
-rwxr-xr-xtest/private-lib/gedit.exp6
-rwxr-xr-xtest/private-lib/gnome-calculator.exp6
-rwxr-xr-xtest/private-lib/gnome-logs.exp6
-rwxr-xr-xtest/private-lib/gnome-nettool.exp6
-rwxr-xr-xtest/private-lib/gnome-system-log.exp6
-rwxr-xr-xtest/private-lib/gpicview.exp6
-rwxr-xr-xtest/private-lib/leafpad.exp6
-rwxr-xr-xtest/private-lib/mousepad.exp6
-rwxr-xr-xtest/private-lib/pavucontrol.exp6
-rwxr-xr-xtest/private-lib/pluma.exp6
-rwxr-xr-xtest/private-lib/private-lib.sh2
-rwxr-xr-xtest/private-lib/transmission-gtk.exp6
-rwxr-xr-xtest/private-lib/whois.exp2
-rwxr-xr-xtest/private-lib/xcalc.exp6
-rw-r--r--test/profiles/comment.profile3
-rwxr-xr-xtest/profiles/conditional.exp6
-rwxr-xr-xtest/profiles/ignore.exp12
-rwxr-xr-xtest/profiles/profile_appname.exp2
-rwxr-xr-xtest/profiles/profile_comment.exp52
-rwxr-xr-xtest/profiles/profile_followlnk.exp4
-rwxr-xr-xtest/profiles/profile_noperm.exp2
-rwxr-xr-xtest/profiles/profile_readonly.exp4
-rwxr-xr-xtest/profiles/profile_recursivity.exp2
-rwxr-xr-xtest/profiles/profile_syntax.exp6
-rwxr-xr-xtest/profiles/profile_syntax2.exp2
-rwxr-xr-xtest/profiles/profiles.sh5
-rwxr-xr-xtest/profiles/test-profile.exp2
-rw-r--r--test/profiles/test.profile2
-rwxr-xr-xtest/root/apache2.exp4
-rwxr-xr-xtest/root/cgroup.exp14
-rwxr-xr-xtest/root/checkcfg.exp2
-rwxr-xr-xtest/root/firecfg.exp2
-rwxr-xr-xtest/root/firemon-events.exp4
-rwxr-xr-xtest/root/isc-dhcp.exp4
-rwxr-xr-xtest/root/join.exp20
-rwxr-xr-xtest/root/login_nobody.exp4
-rwxr-xr-xtest/root/nginx.exp4
-rwxr-xr-xtest/root/option_bind_directory.exp4
-rwxr-xr-xtest/root/option_bind_file.exp4
-rwxr-xr-xtest/root/option_tmpfs.exp4
-rwxr-xr-xtest/root/private.exp12
-rwxr-xr-xtest/root/profile_tmpfs.exp4
-rwxr-xr-xtest/root/root.sh2
-rwxr-xr-xtest/root/seccomp-chmod.exp4
-rwxr-xr-xtest/root/seccomp-chown.exp4
-rwxr-xr-xtest/root/seccomp-umount.exp4
-rwxr-xr-xtest/root/snmpd.exp4
-rwxr-xr-xtest/root/unbound.exp4
-rwxr-xr-xtest/root/whitelist.exp12
-rwxr-xr-xtest/ssh/login.exp4
-rwxr-xr-xtest/ssh/scp.exp6
-rwxr-xr-xtest/ssh/sftp.exp6
-rwxr-xr-xtest/ssh/ssh.sh2
-rwxr-xr-xtest/stress/blacklist.exp6
-rwxr-xr-xtest/stress/env.exp4
-rwxr-xr-xtest/stress/net_macvlan.exp6
-rwxr-xr-xtest/stress/stress.sh2
-rwxr-xr-xtest/sysutils/cpio.exp2
-rwxr-xr-xtest/sysutils/file.exp2
-rwxr-xr-xtest/sysutils/gzip.exp2
-rwxr-xr-xtest/sysutils/less.exp2
-rwxr-xr-xtest/sysutils/ping.exp2
-rwxr-xr-xtest/sysutils/strings.exp2
-rwxr-xr-xtest/sysutils/sysutils.sh2
-rwxr-xr-xtest/sysutils/tar.exp2
-rwxr-xr-xtest/sysutils/xz.exp2
-rwxr-xr-xtest/sysutils/xzdec.exp2
-rwxr-xr-xtest/utils/build.exp43
-rwxr-xr-xtest/utils/caps-print.exp4
-rwxr-xr-xtest/utils/catchsignal-master.sh2
-rwxr-xr-xtest/utils/catchsignal.sh2
-rwxr-xr-xtest/utils/catchsignal2.sh2
-rwxr-xr-xtest/utils/command.exp2
-rwxr-xr-xtest/utils/cpu-print.exp6
-rwxr-xr-xtest/utils/dns-print.exp4
-rwxr-xr-xtest/utils/firemon-caps.exp16
-rwxr-xr-xtest/utils/firemon-cgroup.exp6
-rwxr-xr-xtest/utils/firemon-cpu.exp6
-rwxr-xr-xtest/utils/firemon-interface.exp2
-rwxr-xr-xtest/utils/firemon-name.exp4
-rwxr-xr-xtest/utils/firemon-seccomp.exp6
-rwxr-xr-xtest/utils/firemon-version.exp2
-rwxr-xr-xtest/utils/fs-print.exp4
-rwxr-xr-xtest/utils/help.exp2
-rwxr-xr-xtest/utils/join-profile.exp12
-rwxr-xr-xtest/utils/join.exp18
-rwxr-xr-xtest/utils/join2.exp12
-rwxr-xr-xtest/utils/join3.exp12
-rwxr-xr-xtest/utils/join4.exp12
-rwxr-xr-xtest/utils/join5.exp18
-rwxr-xr-xtest/utils/list.exp8
-rwxr-xr-xtest/utils/ls.exp4
-rwxr-xr-xtest/utils/man.exp2
-rwxr-xr-xtest/utils/name.exp26
-rwxr-xr-xtest/utils/profile_print.exp4
-rwxr-xr-xtest/utils/protocol-print.exp4
-rwxr-xr-xtest/utils/seccomp-print.exp4
-rwxr-xr-xtest/utils/shutdown.exp4
-rwxr-xr-xtest/utils/shutdown2.exp4
-rwxr-xr-xtest/utils/shutdown3.exp4
-rwxr-xr-xtest/utils/shutdown4.exp4
-rwxr-xr-xtest/utils/top.exp6
-rwxr-xr-xtest/utils/trace.exp16
-rwxr-xr-xtest/utils/tree.exp8
-rwxr-xr-xtest/utils/utils.sh6
-rwxr-xr-xtest/utils/version.exp2
1321 files changed, 17518 insertions, 7407 deletions
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
new file mode 100644
index 000000000..0c9701d1c
--- /dev/null
+++ b/.git-blame-ignore-revs
@@ -0,0 +1,4 @@
1# move whitelist/blacklist to allow/deny
2fe0f975f447d59977d90c3226cc8c623b31b20b3
3# Revert "move whitelist/blacklist to allow/deny"
4f43382f1e9707b4fd5e63c7bfe881912aa4ee994
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..6b329f917
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
/etc/inc/*.inc linguist-language=text
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 4b2df855c..eb485b8a2 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -6,44 +6,85 @@ labels: ''
6assignees: '' 6assignees: ''
7 7
8--- 8---
9Write clear, concise and in textual form.
10 9
11**Bug and expected behavior** 10<!--
12- Describe the bug. 11See the following links for help with formatting:
13- What did you expect to happen?
14 12
15**No profile and disabling firejail** 13https://guides.github.com/features/mastering-markdown/
16- What changed calling `firejail --noprofile /path/to/program` in a terminal? 14https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax
17- What changed calling the program by path (e.g. `/usr/bin/vlc`)? 15-->
18 16
19**Reproduce** 17### Description
20Steps to reproduce the behavior:
211. Run in bash `firejail PROGRAM`
222. See error `ERROR`
233. Click on '....'
244. Scroll down to '....'
25 18
26**Environment** 19_Describe the bug_
27 - Linux distribution and version (ie output of `lsb_release -a`, `screenfetch` or `cat /etc/os-release`)
28 - Firejail version (output of `firejail --version`) exclusive or used git commit (`git rev-parse HEAD`)
29 20
30**Additional context** 21### Steps to Reproduce
31Other context about the problem like related errors to understand the problem.
32 22
33**Checklist** 23_Steps to reproduce the behavior_
34 - [ ] The profile (and redirect profile if exists) hasn't already been fixed [upstream](https://github.com/netblue30/firejail/tree/master/etc).
35 - [ ] The program has a profile. (If not, request one in `https://github.com/netblue30/firejail/issues/1139`)
36 - [ ] I have performed a short search for similar issues (to avoid opening a duplicate).
37 - [ ] If it is a AppImage, `--profile=PROFILENAME` is used to set the right profile.
38 - [ ] Used `LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 PROGRAM` to get english error-messages.
39 - [ ] I'm aware of `browser-allow-drm yes`/`browser-disable-u2f no` in `firejail.config` to allow DRM/U2F in browsers.
40 - [ ] This is not a question. Questions should be asked in https://github.com/netblue30/firejail/discussions.
41 24
251. Run in bash `LC_ALL=C firejail PROGRAM` (`LC_ALL=C` to get a consistent output in English that can be understood by everybody)
262. Click on '....'
273. Scroll down to '....'
284. See error `ERROR`
42 29
43<details><summary> debug output </summary> 30### Expected behavior
31
32_What you expected to happen_
33
34### Actual behavior
35
36_What actually happened_
37
38### Behavior without a profile
39
40_What changed calling `LC_ALL=C firejail --noprofile /path/to/program` in a terminal?_
41
42### Additional context
43
44_Any other detail that may help to understand/debug the problem_
45
46### Environment
47
48- Linux distribution and version (e.g. "Ubuntu 20.04" or "Arch Linux")
49- Firejail version (`firejail --version`).
50- If you use a development version of firejail, also the commit from which it was compiled (`git rev-parse HEAD`).
51
52### Checklist
53
54<!--
55Note: Items are checked with an "x", like so:
56
57- [x] This is a checked item.
58-->
59
60- [ ] The issues is caused by firejail (i.e. running the program by path (e.g. `/usr/bin/vlc`) "fixes" it).
61- [ ] I can reproduce the issue without custom modifications (e.g. globals.local).
62- [ ] The program has a profile. (If not, request one in `https://github.com/netblue30/firejail/issues/1139`)
63- [ ] The profile (and redirect profile if exists) hasn't already been fixed [upstream](https://github.com/netblue30/firejail/tree/master/etc).
64- [ ] I have performed a short search for similar issues (to avoid opening a duplicate).
65 - [ ] I'm aware of `browser-allow-drm yes`/`browser-disable-u2f no` in `firejail.config` to allow DRM/U2F in browsers.
66- [ ] I used `--profile=PROFILENAME` to set the right profile. (Only relevant for AppImages)
67
68### Log
69
70<details>
71<summary>Output of <code>LC_ALL=C firejail /path/to/program</code></summary>
72<p>
73
74```
75output goes here
76```
77
78</p>
79</details>
80
81<details>
82<summary>Output of <code>LC_ALL=C firejail --debug /path/to/program</code></summary>
83<p>
44 84
45``` 85```
46OUTPUT OF `firejail --debug PROGRAM` 86output goes here
47``` 87```
48 88
89</p>
49</details> 90</details>
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 000000000..b8fe40acd
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,5 @@
1blank_issues_enabled: true
2contact_links:
3 - name: Question
4 url: https://github.com/netblue30/firejail/discussions
5 about: For questions you should use GitHub Discussions.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 000000000..a723cdbde
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,23 @@
1---
2name: Feature request
3about: Suggest an idea for this project
4title: ''
5labels: ''
6assignees: ''
7---
8
9### Is your feature request related to a problem? Please describe.
10
11_A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]_
12
13### Describe the solution you'd like
14
15_A clear and concise description of what you want to happen._
16
17### Describe alternatives you've considered
18
19_A clear and concise description of any alternative solutions or features you've considered._
20
21### Additional context
22
23_Add any other context or screenshots about the feature request here._
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 000000000..30242923d
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,7 @@
1version: 2
2updates:
3 - package-ecosystem: "github-actions"
4 directory: "/"
5 schedule:
6 interval: "weekly"
7 open-pull-requests-limit: 2
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 57ac2e9c4..7cb92a938 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,4 +1,3 @@
1
2If your PR isn't about profiles or you have no idea how to do one of these, skip the following and go ahead with this PR. 1If your PR isn't about profiles or you have no idea how to do one of these, skip the following and go ahead with this PR.
3 2
4If you submit a PR for new profiles or changing profiles, please do the following: 3If you submit a PR for new profiles or changing profiles, please do the following:
diff --git a/.github/workflows/build-extra.yml b/.github/workflows/build-extra.yml
index 29f14788d..0d53b270d 100644
--- a/.github/workflows/build-extra.yml
+++ b/.github/workflows/build-extra.yml
@@ -30,25 +30,25 @@ jobs:
30 build-clang: 30 build-clang:
31 runs-on: ubuntu-20.04 31 runs-on: ubuntu-20.04
32 steps: 32 steps:
33 - uses: actions/checkout@v2 33 - uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
34 - name: configure 34 - name: configure
35 run: CC=clang-10 ./configure --enable-fatal-warnings 35 run: CC=clang-11 ./configure --enable-fatal-warnings
36 - name: make 36 - name: make
37 run: make 37 run: make
38 scan-build: 38 scan-build:
39 runs-on: ubuntu-20.04 39 runs-on: ubuntu-20.04
40 steps: 40 steps:
41 - uses: actions/checkout@v2 41 - uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
42 - name: install clang-tools-10 42 - name: install clang-tools-11
43 run: sudo apt-get install clang-tools-10 43 run: sudo apt-get install clang-tools-11
44 - name: configure 44 - name: configure
45 run: CC=clang-10 ./configure --enable-fatal-warnings 45 run: CC=clang-11 ./configure --enable-fatal-warnings
46 - name: scan-build 46 - name: scan-build
47 run: NO_EXTRA_CFLAGS="yes" scan-build-10 --status-bugs make 47 run: NO_EXTRA_CFLAGS="yes" scan-build-11 --status-bugs make
48 cppcheck: 48 cppcheck:
49 runs-on: ubuntu-20.04 49 runs-on: ubuntu-20.04
50 steps: 50 steps:
51 - uses: actions/checkout@v2 51 - uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
52 - name: install cppcheck 52 - name: install cppcheck
53 run: sudo apt-get install cppcheck 53 run: sudo apt-get install cppcheck
54 - name: cppcheck 54 - name: cppcheck
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 07ab1431e..6219abc2f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -22,11 +22,11 @@ jobs:
22 build_and_test: 22 build_and_test:
23 runs-on: ubuntu-20.04 23 runs-on: ubuntu-20.04
24 steps: 24 steps:
25 - uses: actions/checkout@v2 25 - uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
26 - name: install dependencies 26 - name: install dependencies
27 run: sudo apt-get install gcc-10 libapparmor-dev libselinux1-dev expect xzdec 27 run: sudo apt-get install gcc-11 libapparmor-dev libselinux1-dev expect xzdec
28 - name: configure 28 - name: configure
29 run: CC=gcc-10 ./configure --enable-fatal-warnings --enable-analyzer --enable-apparmor --enable-selinux --prefix=/usr 29 run: CC=gcc-11 ./configure --enable-fatal-warnings --enable-analyzer --enable-apparmor --enable-selinux --prefix=/usr
30 - name: make 30 - name: make
31 run: make 31 run: make
32 - name: make install 32 - name: make install
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 4476963b5..1352ce3e6 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -43,11 +43,11 @@ jobs:
43 43
44 steps: 44 steps:
45 - name: Checkout repository 45 - name: Checkout repository
46 uses: actions/checkout@v2 46 uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
47 47
48 # Initializes the CodeQL tools for scanning. 48 # Initializes the CodeQL tools for scanning.
49 - name: Initialize CodeQL 49 - name: Initialize CodeQL
50 uses: github/codeql-action/init@v1 50 uses: github/codeql-action/init@75f07e7ab2ee63cba88752d8c696324e4df67466
51 with: 51 with:
52 languages: ${{ matrix.language }} 52 languages: ${{ matrix.language }}
53 # If you wish to specify custom queries, you can do so here or in a config file. 53 # If you wish to specify custom queries, you can do so here or in a config file.
@@ -58,7 +58,7 @@ jobs:
58 # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 58 # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
59 # If this step fails, then you should remove it and run the build manually (see below) 59 # If this step fails, then you should remove it and run the build manually (see below)
60 - name: Autobuild 60 - name: Autobuild
61 uses: github/codeql-action/autobuild@v1 61 uses: github/codeql-action/autobuild@75f07e7ab2ee63cba88752d8c696324e4df67466
62 62
63 # ℹ️ Command-line programs to run using the OS shell. 63 # ℹ️ Command-line programs to run using the OS shell.
64 # 📚 https://git.io/JvXDl 64 # 📚 https://git.io/JvXDl
@@ -72,4 +72,4 @@ jobs:
72 # make release 72 # make release
73 73
74 - name: Perform CodeQL Analysis 74 - name: Perform CodeQL Analysis
75 uses: github/codeql-action/analyze@v1 75 uses: github/codeql-action/analyze@75f07e7ab2ee63cba88752d8c696324e4df67466
diff --git a/.github/workflows/profile-checks.yml b/.github/workflows/profile-checks.yml
new file mode 100644
index 000000000..c2a3c5dc7
--- /dev/null
+++ b/.github/workflows/profile-checks.yml
@@ -0,0 +1,31 @@
1name: Profile Checks
2
3on:
4 push:
5 branches: [ master ]
6 paths:
7 - 'etc/**'
8 - 'ci/check/profiles/**'
9 - 'src/firecfg/firecfg.config'
10 - 'contrib/sort.py'
11 pull_request:
12 branches: [ master ]
13 paths:
14 - 'etc/**'
15 - 'ci/check/profiles/**'
16 - 'src/firecfg/firecfg.config'
17 - 'contrib/sort.py'
18
19jobs:
20 profile-checks:
21 runs-on: ubuntu-20.04
22 steps:
23 - uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
24 - name: sort.py
25 run: ./ci/check/profiles/sort.py etc/inc/*.inc etc/{profile-a-l,profile-m-z}/*.profile
26 - name: private-etc-always-required.sh
27 run: ./ci/check/profiles/private-etc-always-required.sh etc/inc/*.inc etc/{profile-a-l,profile-m-z}/*.profile
28 - name: sort-disable-programs.sh
29 run: ./ci/check/profiles/sort-disable-programs.sh etc/inc/disable-programs.inc
30 - name: sort-firecfg.config.sh
31 run: ./ci/check/profiles/sort-firecfg.config.sh src/firecfg/firecfg.config
diff --git a/.github/workflows/sort.yml b/.github/workflows/sort.yml
deleted file mode 100644
index f3ded0f22..000000000
--- a/.github/workflows/sort.yml
+++ /dev/null
@@ -1,22 +0,0 @@
1name: sort.py
2
3on:
4 push:
5 branches: [ master ]
6 paths:
7 - 'etc/**'
8 - 'contrib/sort.py'
9 pull_request:
10 branches: [ master ]
11 paths:
12 - 'etc/**'
13 - 'contrib/sort.py'
14
15jobs:
16 profile-sort:
17 runs-on: ubuntu-20.04
18 steps:
19 - uses: actions/checkout@v2
20 - name: check profiles
21 run: ./contrib/sort.py etc/*/{*.inc,*.profile}
22
diff --git a/.gitignore b/.gitignore
index cbb1b2e83..29e0b63d6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,12 +22,13 @@ firejail-users.5
22firejail.1 22firejail.1
23firemon.1 23firemon.1
24firecfg.1 24firecfg.1
25jailtest.5 25jailcheck.1
26mkdeb.sh 26mkdeb.sh
27src/firejail/firejail 27src/firejail/firejail
28src/firemon/firemon 28src/firemon/firemon
29src/firecfg/firecfg 29src/firecfg/firecfg
30src/ftee/ftee 30src/ftee/ftee
31src/fids/fids
31src/tags 32src/tags
32src/faudit/faudit 33src/faudit/faudit
33src/fnet/fnet 34src/fnet/fnet
@@ -41,7 +42,8 @@ src/fbuilder/fbuilder
41src/profstats/profstats 42src/profstats/profstats
42src/bash_completion/firejail.bash_completion 43src/bash_completion/firejail.bash_completion
43src/zsh_completion/_firejail 44src/zsh_completion/_firejail
44src/jailtest/jailtest 45src/jailcheck/jailcheck
46src/fnettrace/fnettrace
45uids.h 47uids.h
46seccomp 48seccomp
47seccomp.debug 49seccomp.debug
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5affd5cff..e79028c4f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,7 +21,7 @@ build_debian_package:
21 - ./configure --prefix=/usr && make deb && dpkg -i firejail*.deb 21 - ./configure --prefix=/usr && make deb && dpkg -i firejail*.deb
22 22
23build_redhat_package: 23build_redhat_package:
24 image: centos:latest 24 image: almalinux:latest
25 script: 25 script:
26 - dnf update -y 26 - dnf update -y
27 - dnf install -y rpm-build gcc make 27 - dnf install -y rpm-build gcc make
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 688101d13..0f868d6c4 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -34,6 +34,13 @@ If you want to write a new profile, the easiest way to do this is to use the
34[profile template](https://github.com/netblue30/firejail/blob/master/etc/templates/profile.template). 34[profile template](https://github.com/netblue30/firejail/blob/master/etc/templates/profile.template).
35If you have already written a profile, please make sure it follows the rules described in the template. 35If you have already written a profile, please make sure it follows the rules described in the template.
36 36
37If you add a new command, here's the checklist:
38
39 - [ ] Update manpages: firejail(1) and firejail-profile(5)
40 - [ ] Update shell completions
41 - [ ] Update vim syntax files
42 - [ ] Update --help
43
37# Editing the wiki 44# Editing the wiki
38 45
39You are highly encouraged to add your own tips and tricks to the [wiki](https://github.com/netblue30/firejail/wiki). 46You are highly encouraged to add your own tips and tricks to the [wiki](https://github.com/netblue30/firejail/wiki).
diff --git a/COPYING b/COPYING
index b6e1c33e0..d159169d1 100644
--- a/COPYING
+++ b/COPYING
@@ -1,12 +1,12 @@
1 GNU GENERAL PUBLIC LICENSE 1 GNU GENERAL PUBLIC LICENSE
2 Version 2, June 1991 2 Version 2, June 1991
3 3
4 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 4 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 5 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 Everyone is permitted to copy and distribute verbatim copies 6 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed. 7 of this license document, but changing it is not allowed.
8 8
9 Preamble 9 Preamble
10 10
11 The licenses for most software are designed to take away your 11 The licenses for most software are designed to take away your
12freedom to share and change it. By contrast, the GNU General Public 12freedom to share and change it. By contrast, the GNU General Public
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
15General Public License applies to most of the Free Software 15General Public License applies to most of the Free Software
16Foundation's software and to any other program whose authors commit to 16Foundation's software and to any other program whose authors commit to
17using it. (Some other Free Software Foundation software is covered by 17using it. (Some other Free Software Foundation software is covered by
18the GNU Library General Public License instead.) You can apply it to 18the GNU Lesser General Public License instead.) You can apply it to
19your programs, too. 19your programs, too.
20 20
21 When we speak of free software, we are referring to freedom, not 21 When we speak of free software, we are referring to freedom, not
@@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.
55 55
56 The precise terms and conditions for copying, distribution and 56 The precise terms and conditions for copying, distribution and
57modification follow. 57modification follow.
58 58
59 GNU GENERAL PUBLIC LICENSE 59 GNU GENERAL PUBLIC LICENSE
60 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 60 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 61
62 0. This License applies to any program or other work which contains 62 0. This License applies to any program or other work which contains
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
110 License. (Exception: if the Program itself is interactive but 110 License. (Exception: if the Program itself is interactive but
111 does not normally print such an announcement, your work based on 111 does not normally print such an announcement, your work based on
112 the Program is not required to print an announcement.) 112 the Program is not required to print an announcement.)
113 113
114These requirements apply to the modified work as a whole. If 114These requirements apply to the modified work as a whole. If
115identifiable sections of that work are not derived from the Program, 115identifiable sections of that work are not derived from the Program,
116and can be reasonably considered independent and separate works in 116and can be reasonably considered independent and separate works in
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
168access to copy the source code from the same place counts as 168access to copy the source code from the same place counts as
169distribution of the source code, even though third parties are not 169distribution of the source code, even though third parties are not
170compelled to copy the source along with the object code. 170compelled to copy the source along with the object code.
171 171
172 4. You may not copy, modify, sublicense, or distribute the Program 172 4. You may not copy, modify, sublicense, or distribute the Program
173except as expressly provided under this License. Any attempt 173except as expressly provided under this License. Any attempt
174otherwise to copy, modify, sublicense or distribute the Program is 174otherwise to copy, modify, sublicense or distribute the Program is
@@ -225,7 +225,7 @@ impose that choice.
225 225
226This section is intended to make thoroughly clear what is believed to 226This section is intended to make thoroughly clear what is believed to
227be a consequence of the rest of this License. 227be a consequence of the rest of this License.
228 228
229 8. If the distribution and/or use of the Program is restricted in 229 8. If the distribution and/or use of the Program is restricted in
230certain countries either by patents or by copyrighted interfaces, the 230certain countries either by patents or by copyrighted interfaces, the
231original copyright holder who places the Program under this License 231original copyright holder who places the Program under this License
@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
255of preserving the free status of all derivatives of our free software and 255of preserving the free status of all derivatives of our free software and
256of promoting the sharing and reuse of software generally. 256of promoting the sharing and reuse of software generally.
257 257
258 NO WARRANTY 258 NO WARRANTY
259 259
260 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 260 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 261FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@@ -277,4 +277,63 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 277PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278POSSIBILITY OF SUCH DAMAGES. 278POSSIBILITY OF SUCH DAMAGES.
279 279
280 END OF TERMS AND CONDITIONS 280 END OF TERMS AND CONDITIONS
281
282 How to Apply These Terms to Your New Programs
283
284 If you develop a new program, and you want it to be of the greatest
285possible use to the public, the best way to achieve this is to make it
286free software which everyone can redistribute and change under these terms.
287
288 To do so, attach the following notices to the program. It is safest
289to attach them to the start of each source file to most effectively
290convey the exclusion of warranty; and each file should have at least
291the "copyright" line and a pointer to where the full notice is found.
292
293 <one line to give the program's name and a brief idea of what it does.>
294 Copyright (C) <year> <name of author>
295
296 This program is free software; you can redistribute it and/or modify
297 it under the terms of the GNU General Public License as published by
298 the Free Software Foundation; either version 2 of the License, or
299 (at your option) any later version.
300
301 This program is distributed in the hope that it will be useful,
302 but WITHOUT ANY WARRANTY; without even the implied warranty of
303 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 GNU General Public License for more details.
305
306 You should have received a copy of the GNU General Public License along
307 with this program; if not, write to the Free Software Foundation, Inc.,
308 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
310Also add information on how to contact you by electronic and paper mail.
311
312If the program is interactive, make it output a short notice like this
313when it starts in an interactive mode:
314
315 Gnomovision version 69, Copyright (C) year name of author
316 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 This is free software, and you are welcome to redistribute it
318 under certain conditions; type `show c' for details.
319
320The hypothetical commands `show w' and `show c' should show the appropriate
321parts of the General Public License. Of course, the commands you use may
322be called something other than `show w' and `show c'; they could even be
323mouse-clicks or menu items--whatever suits your program.
324
325You should also get your employer (if you work as a programmer) or your
326school, if any, to sign a "copyright disclaimer" for the program, if
327necessary. Here is a sample; alter the names:
328
329 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
332 <signature of Ty Coon>, 1 April 1989
333 Ty Coon, President of Vice
334
335This General Public License does not permit incorporating your program into
336proprietary programs. If your program is a subroutine library, you may
337consider it more useful to permit linking proprietary applications with the
338library. If this is what you want to do, use the GNU Lesser General
339Public License instead of this License.
diff --git a/Makefile.in b/Makefile.in
index f9422fc8b..f38191880 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -25,14 +25,15 @@ COMPLETIONDIRS = src/zsh_completion src/bash_completion
25 25
26.PHONY: all 26.PHONY: all
27all: all_items mydirs $(MAN_TARGET) filters 27all: all_items mydirs $(MAN_TARGET) filters
28APPS = src/firecfg/firecfg src/firejail/firejail src/firemon/firemon src/profstats/profstats src/jailtest/jailtest 28APPS = src/firecfg/firecfg src/firejail/firejail src/firemon/firemon src/profstats/profstats src/jailcheck/jailcheck
29SBOX_APPS = src/fbuilder/fbuilder src/ftee/ftee 29SBOX_APPS = src/fbuilder/fbuilder src/ftee/ftee src/fids/fids
30SBOX_APPS_NON_DUMPABLE = src/fcopy/fcopy src/fldd/fldd src/fnet/fnet src/fnetfilter/fnetfilter 30SBOX_APPS_NON_DUMPABLE = src/fcopy/fcopy src/fldd/fldd src/fnet/fnet src/fnetfilter/fnetfilter
31SBOX_APPS_NON_DUMPABLE += src/fsec-optimize/fsec-optimize src/fsec-print/fsec-print src/fseccomp/fseccomp
32SBOX_APPS_NON_DUMPABLE += src/fnettrace/fnettrace
31MYDIRS = src/lib $(MAN_SRC) $(COMPLETIONDIRS) 33MYDIRS = src/lib $(MAN_SRC) $(COMPLETIONDIRS)
32MYLIBS = src/libpostexecseccomp/libpostexecseccomp.so src/libtrace/libtrace.so src/libtracelog/libtracelog.so 34MYLIBS = src/libpostexecseccomp/libpostexecseccomp.so src/libtrace/libtrace.so src/libtracelog/libtracelog.so
33COMPLETIONS = src/zsh_completion/_firejail src/bash_completion/firejail.bash_completion 35COMPLETIONS = src/zsh_completion/_firejail src/bash_completion/firejail.bash_completion
34MANPAGES = firejail.1 firemon.1 firecfg.1 firejail-profile.5 firejail-login.5 firejail-users.5 jailtest.5 36MANPAGES = firejail.1 firemon.1 firecfg.1 firejail-profile.5 firejail-login.5 firejail-users.5 jailcheck.1
35SBOX_APPS_NON_DUMPABLE += src/fsec-optimize/fsec-optimize src/fsec-print/fsec-print src/fseccomp/fseccomp
36SECCOMP_FILTERS = seccomp seccomp.debug seccomp.32 seccomp.block_secondary seccomp.mdwx seccomp.mdwx.32 37SECCOMP_FILTERS = seccomp seccomp.debug seccomp.32 seccomp.block_secondary seccomp.mdwx seccomp.mdwx.32
37ALL_ITEMS = $(APPS) $(SBOX_APPS) $(SBOX_APPS_NON_DUMPABLE) $(MYLIBS) 38ALL_ITEMS = $(APPS) $(SBOX_APPS) $(SBOX_APPS_NON_DUMPABLE) $(MYLIBS)
38 39
@@ -83,6 +84,7 @@ clean:
83 rm -f $(SECCOMP_FILTERS) 84 rm -f $(SECCOMP_FILTERS)
84 rm -f test/utils/index.html* 85 rm -f test/utils/index.html*
85 rm -f test/utils/wget-log 86 rm -f test/utils/wget-log
87 rm -f test/utils/firejail-test-file*
86 rm -f test/utils/lstesting 88 rm -f test/utils/lstesting
87 rm -f test/environment/index.html* 89 rm -f test/environment/index.html*
88 rm -f test/environment/wget-log* 90 rm -f test/environment/wget-log*
@@ -105,22 +107,24 @@ realinstall:
105 # firejail executable 107 # firejail executable
106 install -m 0755 -d $(DESTDIR)$(bindir) 108 install -m 0755 -d $(DESTDIR)$(bindir)
107 install -m 0755 src/firejail/firejail $(DESTDIR)$(bindir) 109 install -m 0755 src/firejail/firejail $(DESTDIR)$(bindir)
108ifeq ($(HAVE_SUID),yes) 110ifeq ($(HAVE_SUID),-DHAVE_SUID)
109 chmod u+s $(DESTDIR)$(bindir)/firejail 111 chmod u+s $(DESTDIR)$(bindir)/firejail
110endif 112endif
111 # firemon executable 113 # firemon executable
112 install -m 0755 src/firemon/firemon $(DESTDIR)$(bindir) 114 install -m 0755 src/firemon/firemon $(DESTDIR)$(bindir)
113 # firecfg executable 115 # firecfg executable
114 install -m 0755 src/firecfg/firecfg $(DESTDIR)$(bindir) 116 install -m 0755 src/firecfg/firecfg $(DESTDIR)$(bindir)
115 # jailtest executable 117 # jailcheck executable
116 install -m 0755 src/jailtest/jailtest $(DESTDIR)$(bindir) 118 install -m 0755 src/jailcheck/jailcheck $(DESTDIR)$(bindir)
117 # libraries and plugins 119 # libraries and plugins
118 install -m 0755 -d $(DESTDIR)$(libdir)/firejail 120 install -m 0755 -d $(DESTDIR)$(libdir)/firejail
119 install -m 0644 -t $(DESTDIR)$(libdir)/firejail $(MYLIBS) $(SECCOMP_FILTERS) src/firecfg/firecfg.config 121 install -m 0644 -t $(DESTDIR)$(libdir)/firejail $(MYLIBS) $(SECCOMP_FILTERS)
120 install -m 0755 -t $(DESTDIR)$(libdir)/firejail $(SBOX_APPS) 122 install -m 0755 -t $(DESTDIR)$(libdir)/firejail $(SBOX_APPS)
123 install -m 0755 -t $(DESTDIR)$(libdir)/firejail src/profstats/profstats
121 # plugins w/o read permission (non-dumpable) 124 # plugins w/o read permission (non-dumpable)
122 install -m 0711 -t $(DESTDIR)$(libdir)/firejail $(SBOX_APPS_NON_DUMPABLE) 125 install -m 0711 -t $(DESTDIR)$(libdir)/firejail $(SBOX_APPS_NON_DUMPABLE)
123 install -m 0711 -t $(DESTDIR)$(libdir)/firejail src/fshaper/fshaper.sh 126 install -m 0711 -t $(DESTDIR)$(libdir)/firejail src/fshaper/fshaper.sh
127 install -m 0644 -t $(DESTDIR)$(libdir)/firejail src/fnettrace/static-ip-map
124ifeq ($(HAVE_CONTRIB_INSTALL),yes) 128ifeq ($(HAVE_CONTRIB_INSTALL),yes)
125 # contrib scripts 129 # contrib scripts
126 install -m 0755 -t $(DESTDIR)$(libdir)/firejail contrib/*.py contrib/*.sh 130 install -m 0755 -t $(DESTDIR)$(libdir)/firejail contrib/*.py contrib/*.sh
@@ -135,7 +139,8 @@ endif
135 install -m 0644 -t $(DESTDIR)$(DOCDIR) COPYING README RELNOTES etc/templates/* 139 install -m 0644 -t $(DESTDIR)$(DOCDIR) COPYING README RELNOTES etc/templates/*
136 # profiles and settings 140 # profiles and settings
137 install -m 0755 -d $(DESTDIR)$(sysconfdir)/firejail 141 install -m 0755 -d $(DESTDIR)$(sysconfdir)/firejail
138 install -m 0644 -t $(DESTDIR)$(sysconfdir)/firejail etc/profile-a-l/*.profile etc/profile-m-z/*.profile etc/inc/*.inc etc/net/*.net etc/firejail.config 142 install -m 0644 -t $(DESTDIR)$(sysconfdir)/firejail src/firecfg/firecfg.config
143 install -m 0644 -t $(DESTDIR)$(sysconfdir)/firejail etc/profile-a-l/*.profile etc/profile-m-z/*.profile etc/inc/*.inc etc/net/*.net etc/firejail.config etc/ids.config
139 sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/firejail/login.users ]; then install -c -m 0644 etc/login.users $(DESTDIR)/$(sysconfdir)/firejail/.; fi;" 144 sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/firejail/login.users ]; then install -c -m 0644 etc/login.users $(DESTDIR)/$(sysconfdir)/firejail/.; fi;"
140ifeq ($(BUSYBOX_WORKAROUND),yes) 145ifeq ($(BUSYBOX_WORKAROUND),yes)
141 ./mketc.sh $(DESTDIR)$(sysconfdir)/firejail/disable-common.inc 146 ./mketc.sh $(DESTDIR)$(sysconfdir)/firejail/disable-common.inc
@@ -144,9 +149,13 @@ ifeq ($(HAVE_APPARMOR),-DHAVE_APPARMOR)
144 # install apparmor profile 149 # install apparmor profile
145 sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d; fi;" 150 sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d; fi;"
146 install -m 0644 etc/apparmor/firejail-default $(DESTDIR)$(sysconfdir)/apparmor.d 151 install -m 0644 etc/apparmor/firejail-default $(DESTDIR)$(sysconfdir)/apparmor.d
147 sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d/local ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d/local; fi;"
148 # install apparmor profile customization file 152 # install apparmor profile customization file
153 sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d/local ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d/local; fi;"
149 sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/apparmor.d/local/firejail-default ]; then install -c -m 0644 etc/apparmor/firejail-local $(DESTDIR)/$(sysconfdir)/apparmor.d/local/firejail-default; fi;" 154 sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/apparmor.d/local/firejail-default ]; then install -c -m 0644 etc/apparmor/firejail-local $(DESTDIR)/$(sysconfdir)/apparmor.d/local/firejail-default; fi;"
155 # install apparmor base abstraction drop-in
156 sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d/abstractions ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d/abstractions; fi;"
157 sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d/abstractions/base.d ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d/abstractions/base.d; fi;"
158 install -m 0644 etc/apparmor/firejail-base $(DESTDIR)$(sysconfdir)/apparmor.d/abstractions/base.d
150endif 159endif
151ifneq ($(HAVE_MAN),no) 160ifneq ($(HAVE_MAN),no)
152 # man pages 161 # man pages
@@ -182,7 +191,7 @@ uninstall:
182 rm -f $(DESTDIR)$(bindir)/firemon 191 rm -f $(DESTDIR)$(bindir)/firemon
183 rm -f $(DESTDIR)$(bindir)/firecfg 192 rm -f $(DESTDIR)$(bindir)/firecfg
184 rm -fr $(DESTDIR)$(libdir)/firejail 193 rm -fr $(DESTDIR)$(libdir)/firejail
185 rm -fr $(DESTDIR)$(libdir)/jailtest 194 rm -fr $(DESTDIR)$(libdir)/jailcheck
186 rm -fr $(DESTDIR)$(datarootdir)/doc/firejail 195 rm -fr $(DESTDIR)$(datarootdir)/doc/firejail
187 for man in $(MANPAGES); do \ 196 for man in $(MANPAGES); do \
188 rm -f $(DESTDIR)$(mandir)/man5/$$man*; \ 197 rm -f $(DESTDIR)$(mandir)/man5/$$man*; \
diff --git a/README b/README
index 99beaf694..a9e6b98c3 100644
--- a/README
+++ b/README
@@ -1,18 +1,18 @@
1Firejail is a SUID sandbox program that reduces the risk of security 1Firejail is a SUID sandbox program that reduces the risk of security
2breaches by restricting the running environment of untrusted applications 2breaches by restricting the running environment of untrusted applications
3using Linux namespaces and seccomp-bpf. It includes sandbox profiles for 3using Linux namespaces and seccomp-bpf. It includes sandbox profiles for
4Iceweasel/Mozilla Firefox, Chromium, Midori, Opera, Evince, Transmission, 4Iceweasel/Mozilla Firefox, Chromium, Midori, Opera, Evince, Transmission,
5VLC, Audacious, Clementine, Rhythmbox, Totem, Deluge, qBittorrent. 5VLC, Audacious, Clementine, Rhythmbox, Totem, Deluge, qBittorrent.
6DeaDBeeF, Dropbox, Empathy, FileZilla, IceCat, Thunderbird/Icedove, 6DeaDBeeF, Dropbox, Empathy, FileZilla, IceCat, Thunderbird/Icedove,
7Pidgin, Quassel, and XChat. 7Pidgin, Quassel, and XChat.
8 8
9Firejail also expands the restricted shell facility found in bash by adding 9Firejail also expands the restricted shell facility found in bash by adding
10Linux namespace support. It supports sandboxing specific users upon login. 10Linux namespace support. It supports sandboxing specific users upon login.
11 11
12Download: https://sourceforge.net/projects/firejail/files/ 12Download: https://sourceforge.net/projects/firejail/files/
13Build and install: ./configure && make && sudo make install 13Build and install: ./configure && make && sudo make install
14Documentation and support: https://firejail.wordpress.com/ 14Documentation and support: https://firejail.wordpress.com/
15Video Channel: https://www.youtube.com/channel/UCi5u-syndQYyOeV4NZ04hNA 15Video Channel: https://www.brighteon.com/channels/netblue30
16Backup Video Channel: https://www.bitchute.com/profile/JSBsA1aoQVfW/ 16Backup Video Channel: https://www.bitchute.com/profile/JSBsA1aoQVfW/
17Development: https://github.com/netblue30/firejail 17Development: https://github.com/netblue30/firejail
18License: GPL v2 18License: GPL v2
@@ -45,6 +45,7 @@ Committers
45- Kelvin M. Klann (https://github.com/kmk3) 45- Kelvin M. Klann (https://github.com/kmk3)
46- Kristóf Marussy (https://github.com/kris7t) 46- Kristóf Marussy (https://github.com/kris7t)
47- Neo00001 (https://github.com/Neo00001) 47- Neo00001 (https://github.com/Neo00001)
48- pirate486743186 (https://github.com/pirate486743186)
48- Reiner Herrmann (https://github.com/reinerh - Debian/Ubuntu maintainer) 49- Reiner Herrmann (https://github.com/reinerh - Debian/Ubuntu maintainer)
49- rusty-snake (https://github.com/rusty-snake) 50- rusty-snake (https://github.com/rusty-snake)
50- smitsohu (https://github.com/smitsohu) 51- smitsohu (https://github.com/smitsohu)
@@ -67,11 +68,15 @@ Firejail Authors (alphabetical order)
67 - fix flameshot raw screenshots 68 - fix flameshot raw screenshots
681dnrr (https://github.com/1dnrr) 691dnrr (https://github.com/1dnrr)
69 - add pybitmessage profile 70 - add pybitmessage profile
71a1346054 (https://github.com/a1346054)
72 - add missing final newlines in various files
70Ádler Jonas Gross (https://github.com/adgross) 73Ádler Jonas Gross (https://github.com/adgross)
71 - AppArmor fix 74 - AppArmor fix
72Adrian L. Shaw (https://github.com/adrianlshaw) 75Adrian L. Shaw (https://github.com/adrianlshaw)
73 - add profanity profile 76 - add profanity profile
74 - add barrirer profile 77 - add barrirer profile
78 - add profile for Beyond All Reason
79 - RPCS3 profile
75Aidan Gauland (https://github.com/aidalgol) 80Aidan Gauland (https://github.com/aidalgol)
76 - added electron, riot-web and npm profiles 81 - added electron, riot-web and npm profiles
77 - whitelist Bohemia Interactive config dir for Steam 82 - whitelist Bohemia Interactive config dir for Steam
@@ -80,6 +85,8 @@ Akhil Hans Maulloo (https://github.com/kouul)
80Albin Kauffmann (https://github.com/albinou) 85Albin Kauffmann (https://github.com/albinou)
81 - Firefox and Chromium profile fixes 86 - Firefox and Chromium profile fixes
82 - info to allow screen sharing in profiles 87 - info to allow screen sharing in profiles
88Alex Leahu (https://github.com/alxjsn)
89 - fix screen sharing configuration on Wayland
83Alexey Kuznetsov (kuznet@ms2.inr.ac.ru) 90Alexey Kuznetsov (kuznet@ms2.inr.ac.ru)
84 - src/lib/libnetlink.c extracted from iproute2 software package 91 - src/lib/libnetlink.c extracted from iproute2 software package
85Aleksey Manevich (https://github.com/manevich) 92Aleksey Manevich (https://github.com/manevich)
@@ -109,6 +116,9 @@ Amin Vakil (https://github.com/aminvakil)
109 - whois profile fix 116 - whois profile fix
110 - added profile for strawberry 117 - added profile for strawberry
111 - w3m profile fix 118 - w3m profile fix
119 - disable seccomp in wireshark profile
120Ammon Smith (https://github.com/ammongit)
121 - Add DBus filter rules specific to firefox-developer-edition
112Andreas Hunkeler (https://github.com/Karneades) 122Andreas Hunkeler (https://github.com/Karneades)
113 - Add profile for offical Linux Teams application 123 - Add profile for offical Linux Teams application
114Andrey Alekseenko (https://github.com/al42and) 124Andrey Alekseenko (https://github.com/al42and)
@@ -124,6 +134,9 @@ announ (https://github.com/announ)
124 - evince profile fix 134 - evince profile fix
125Anton Shestakov (https://github.com/antonv6) 135Anton Shestakov (https://github.com/antonv6)
126 - add whitelist items for uim 136 - add whitelist items for uim
137 - allow /etc/vulkan in steam profile
138 - allow ~/.cache/wine in lutris and wine profile
139 - support MangoHud in steam profile
127Antonio Russo (https://github.com/aerusso) 140Antonio Russo (https://github.com/aerusso)
128 - enumerate root directories in apparmor profile 141 - enumerate root directories in apparmor profile
129 - fix join-or-start 142 - fix join-or-start
@@ -143,6 +156,9 @@ Austin S. Hemmelgarn (https://github.com/Ferroin)
143 - unbound profile update 156 - unbound profile update
144Avi Lumelsky (https://github.com/avilum) 157Avi Lumelsky (https://github.com/avilum)
145 - syscall.sh improvements 158 - syscall.sh improvements
159avallach2000 (https://github.com/avallach2000(
160 - fix qbittorrent profile
161 - support for changing appearance of the Qt6 apps with qt6ct
146avoidr (https://github.com/avoidr) 162avoidr (https://github.com/avoidr)
147 - whitelist fix 163 - whitelist fix
148 - recently-used.xbel fix 164 - recently-used.xbel fix
@@ -167,6 +183,8 @@ Bandie (https://github.com/Bandie)
167 - fixed riot-desktop 183 - fixed riot-desktop
168Barış Ekin Yıldırım (https://github.com/circuitshaker) 184Barış Ekin Yıldırım (https://github.com/circuitshaker)
169 - removing net none from code.profile 185 - removing net none from code.profile
186Bart Bakker (https://github.com/bjpbakker)
187 - multimc5: fix exec of LWJGL libraries
170bbhtt (https://github.com/bbhtt) 188bbhtt (https://github.com/bbhtt)
171 - improvements to balsa,fractal,gajim,trojita profiles 189 - improvements to balsa,fractal,gajim,trojita profiles
172 - improvements to nheko, spectral, feh, links, lynx, smplayer profiles 190 - improvements to nheko, spectral, feh, links, lynx, smplayer profiles
@@ -181,6 +199,7 @@ bitfreak25 (https://github.com/bitfreak25)
181 - added PlayOnLinux profile 199 - added PlayOnLinux profile
182 - minetest profile fix 200 - minetest profile fix
183 - added sylpheed profile 201 - added sylpheed profile
202
184bn0785ac (https://github.com/bn0785ac) 203bn0785ac (https://github.com/bn0785ac)
185 - fixed bnox, dnox profiles 204 - fixed bnox, dnox profiles
186 - support all tor-browser langpacks 205 - support all tor-browser langpacks
@@ -203,6 +222,8 @@ Bundy01 (https://github.com/Bundy01)
203 - fixup geary 222 - fixup geary
204 - add gradio profile 223 - add gradio profile
205 - update virtualbox.profile 224 - update virtualbox.profile
225 - Quodlibet profile
226 - update apparmor firejail-local for Brave + ipfs
206BytesTuner (https://github.com/BytesTuner) 227BytesTuner (https://github.com/BytesTuner)
207 - provided keepassxc profile 228 - provided keepassxc profile
208caoliver (https://github.com/caoliver) 229caoliver (https://github.com/caoliver)
@@ -211,8 +232,13 @@ Carlo Abelli (https://github.com/carloabelli)
211 - fixed udiskie profile 232 - fixed udiskie profile
212 - Allow mbind syscall for GIMP 233 - Allow mbind syscall for GIMP
213 - fixed simple-scan 234 - fixed simple-scan
235Case_Of (https://github.com/CaseOf)
236 - added Seafile profile
214Cat (https://github.com/ecat3) 237Cat (https://github.com/ecat3)
215 - prevent tmux connecting to an existing session 238 - prevent tmux connecting to an existing session
239cayday (https://github.com/caydey)
240 - added ~/Private blacklist in disable-common.inc
241 - added quiet to some CLI profiles
216Christian Pinedo (https://github.com/chrpinedo) 242Christian Pinedo (https://github.com/chrpinedo)
217 - added nicotine profile 243 - added nicotine profile
218 - allow python3 in totem profile 244 - allow python3 in totem profile
@@ -238,6 +264,11 @@ crass (https://github.com/crass)
238 - extract_command_name fixes 264 - extract_command_name fixes
239 - update appimage size calculation to newest code from libappimage 265 - update appimage size calculation to newest code from libappimage
240 - firejail should look for processes with names exactly named 266 - firejail should look for processes with names exactly named
267croket (https://github.com/crocket)
268 - fix librewolf profile
269 - added profiles for imv, retroarch, and torbrowser
270 - fix dino profile
271 - fix wireshark profile
241curiosity-seeker (https://github.com/curiosity-seeker - old) 272curiosity-seeker (https://github.com/curiosity-seeker - old)
242curiosityseeker (https://github.com/curiosityseeker - new) 273curiosityseeker (https://github.com/curiosityseeker - new)
243 - tightening unbound and dnscrypt-proxy profiles 274 - tightening unbound and dnscrypt-proxy profiles
@@ -279,6 +310,7 @@ Davide Beatrici (https://github.com/davidebeatrici)
279 - steam.profile: correctly blacklist unneeded directories in user's home 310 - steam.profile: correctly blacklist unneeded directories in user's home
280 - minetest fixes 311 - minetest fixes
281 - map /dev/input with "--private-dev", add "--no-input" option to disable it 312 - map /dev/input with "--private-dev", add "--no-input" option to disable it
313 - whitelist /usr/share/TelegramDesktop in telegram.profile
282David Hyrule (https://github.com/Svaag) 314David Hyrule (https://github.com/Svaag)
283 - remove nou2f in ssh profile 315 - remove nou2f in ssh profile
284Deelvesh Bunjun (https://github.com/DeelveshBunjun) 316Deelvesh Bunjun (https://github.com/DeelveshBunjun)
@@ -295,9 +327,13 @@ DiGitHubCap (https://github.com/DiGitHubCap)
295 - fix qt5ct colour schemes and QSS 327 - fix qt5ct colour schemes and QSS
296Disconnect3d (https://github.com/disconnect3d) 328Disconnect3d (https://github.com/disconnect3d)
297 - code cleanup 329 - code cleanup
330dm9pZCAq (https://github.com/dm9pZCAq)
331 - fix for compilation under musl
298dmfreemon (https://github.com/dmfreemon) 332dmfreemon (https://github.com/dmfreemon)
299 - add sandbox name or name of private directory to the window title when xpra is used 333 - add sandbox name or name of private directory to the window title when xpra is used
300 - handle malloc() failures; use gnu_basename() instead of basenaem() 334 - handle malloc() failures; use gnu_basename() instead of basenaem()
335Dmitriy Chestnykh (https://github.com/chestnykh)
336 - add ability to disable user profiles at compile time
301dshmgh (https://github.com/dshmgh) 337dshmgh (https://github.com/dshmgh)
302 - overlayfs fix for systems with /home mounted on a separate partition 338 - overlayfs fix for systems with /home mounted on a separate partition
303Duncan Overbruck (https://github.com/Duncaen) 339Duncan Overbruck (https://github.com/Duncaen)
@@ -307,6 +343,8 @@ Duncan Overbruck (https://github.com/Duncaen)
307Eduard Tolosa (https://github.com/Edu4rdSHL) 343Eduard Tolosa (https://github.com/Edu4rdSHL)
308 - fixed and hardened qpdfview.profile 344 - fixed and hardened qpdfview.profile
309 - fixed gajim.profile 345 - fixed gajim.profile
346Eklektisk (https://github.com/Eklektisk)
347 - update librewolf.profile: use new d-bus message bus
310emacsomancer (https://github.com/emacsomancer) 348emacsomancer (https://github.com/emacsomancer)
311 - added profile for Conkeror browser 349 - added profile for Conkeror browser
312Emil Gedda (https://github.com/EmilGedda) 350Emil Gedda (https://github.com/EmilGedda)
@@ -322,10 +360,12 @@ Felipe Barriga Richards (https://github.com/fbarriga)
322 - --private-etc fix 360 - --private-etc fix
323fenuks (https://github.com/fenuks) 361fenuks (https://github.com/fenuks)
324 - fix sound in games using FMOD 362 - fix sound in games using FMOD
363 - allow /opt/tor-browser for Tor Browser profile
325Florian Begusch (https://github.com/florianbegusch) 364Florian Begusch (https://github.com/florianbegusch)
326 - (la)tex profiles 365 - (la)tex profiles
327 - fixed transmission-common.profile 366 - fixed transmission-common.profile
328 - fixed standardnotes-desktop.profile 367 - fixed standardnotes-desktop.profile
368 - fix jailprober.py
329floxo (https://github.com/floxo) 369floxo (https://github.com/floxo)
330 - fixed qml disk cache issue 370 - fixed qml disk cache issue
331Franco (nextime) Lanza (https://github.com/nextime) 371Franco (nextime) Lanza (https://github.com/nextime)
@@ -435,6 +475,8 @@ hamzadis (https://github.com/hamzadis)
435 - added --overlay-named=name and --overlay-path=path 475 - added --overlay-named=name and --overlay-path=path
436Hans-Christoph Steiner (https://github.com/eighthave) 476Hans-Christoph Steiner (https://github.com/eighthave)
437 - added xournal profile 477 - added xournal profile
478Harald Kubota (https://github.com/haraldkubota)
479 - zsh completion
438hawkey116477 (https://github.com/hawkeye116477) 480hawkey116477 (https://github.com/hawkeye116477)
439 - added Waterfox profile 481 - added Waterfox profile
440 - updated Cyberfox profile 482 - updated Cyberfox profile
@@ -442,9 +484,12 @@ hawkey116477 (https://github.com/hawkeye116477)
442Helmut Grohne (https://github.com/helmutg) 484Helmut Grohne (https://github.com/helmutg)
443 - compiler support in the build system - Debian bug #869707 485 - compiler support in the build system - Debian bug #869707
444hhzek0014 (https://github.com/hhzek0014) 486hhzek0014 (https://github.com/hhzek0014)
445 - updated bibletime.profile 487 - updated bibletime.profile
446hlein (https://github.com/hlein) 488hlein (https://github.com/hlein)
447 - strip out \r's from jail prober 489 - strip out \r's from jail prober
490 - make env/arg sanity check failure messages more useful
491 - relocate firecfg.config to /etc/firejail/
492 - fix display profile for Gentoo distribution
448Holger Heinz (https://github.com/hheinz) 493Holger Heinz (https://github.com/hheinz)
449 - manpage work 494 - manpage work
450Haowei Yu (https://github.com/sfc-gh-hyu) 495Haowei Yu (https://github.com/sfc-gh-hyu)
@@ -467,6 +512,8 @@ irregulator (https://github.com/irregulator)
467Irvine (https://github.com/Irvinehimself) 512Irvine (https://github.com/Irvinehimself)
468 - added conky profile 513 - added conky profile
469 - added ping, bsdtar, makepkg (Arch), archaudit-report, cower (Arch) profiles 514 - added ping, bsdtar, makepkg (Arch), archaudit-report, cower (Arch) profiles
515Ivan (https://github.com/ordinary-dev)
516 - fix telegram profile
470Ivan Kozik (https://github.com/ivan) 517Ivan Kozik (https://github.com/ivan)
471 - speed up sandbox exit 518 - speed up sandbox exit
472Jaykishan Mutkawoa (https://github.com/jmutkawoa) 519Jaykishan Mutkawoa (https://github.com/jmutkawoa)
@@ -476,6 +523,13 @@ James Elford (https://github.com/jelford)
476 - removed shell none from ssh-agent configuration, fixing the infinite loop 523 - removed shell none from ssh-agent configuration, fixing the infinite loop
477 - added gcloud profile 524 - added gcloud profile
478 - blacklist sensitive cloud provider files in disable-common 525 - blacklist sensitive cloud provider files in disable-common
526Jan-Niclas (https://github.com/0x6a61)
527 - moved rules from firefox-common.profile to firefox.profile
528 - blacklist /*firefox* except for firefox itself
529 - fix Firefox 'Profile not found' - whitelist /run/user/xxx/firefox
530Jan Sonntag (https://github.com/jmetrius)
531 - added OpenStego profile
532 - allow common access to EGL External platform configuration directory
479Jean Lucas (https://github.com/flacks) 533Jean Lucas (https://github.com/flacks)
480 - fix Discord profile 534 - fix Discord profile
481 - add AnyDesk profile 535 - add AnyDesk profile
@@ -496,6 +550,7 @@ Jean-Philippe Eisenbarth (https://github.com/jpeisenbarth)
496 - fixed spotify.profile 550 - fixed spotify.profile
497Jeff Squyres (https://github.com/jsquyres) 551Jeff Squyres (https://github.com/jsquyres)
498 - various manpage fixes 552 - various manpage fixes
553 - cmdline.c: optionally quote the resulting command line
499Jericho (https://github.com/attritionorg) 554Jericho (https://github.com/attritionorg)
500 - spelling 555 - spelling
501Jesse Smith (https://github.com/slicer69) 556Jesse Smith (https://github.com/slicer69)
@@ -511,6 +566,7 @@ John Mullee (https://github.com/jmullee)
511Jonas Heinrich (https://github.com/onny) 566Jonas Heinrich (https://github.com/onny)
512 - added signal-desktop profile 567 - added signal-desktop profile
513 - fixed franz profile 568 - fixed franz profile
569 - remove /etc/hosts is_link check for NixOS
514Jose Riha (https://github.com/jose1711) 570Jose Riha (https://github.com/jose1711)
515 - added meteo-qt profile 571 - added meteo-qt profile
516 - created qgis, links, xlinks profiles 572 - created qgis, links, xlinks profiles
@@ -520,6 +576,12 @@ Jose Riha (https://github.com/jose1711)
520 - Add davfs2 secrets file to blacklist 576 - Add davfs2 secrets file to blacklist
521 - Add profile for udiskie 577 - Add profile for udiskie
522 - fix udiskie.profile 578 - fix udiskie.profile
579 - improve hints for allowing browser access to Gnome extensions connector
580 - fix warshow, jumpnbump, tremulous, blobwars profile fixes
581 - drop noinput for games with gampad/joystick support
582 - goldendict profile fix
583 - whitelist /usr/share/nextcloud to allow access to translation files
584 - fix clipgrab profile
523jrabe (https://github.com/jrabe) 585jrabe (https://github.com/jrabe)
524 - disallow access to kdbx files 586 - disallow access to kdbx files
525 - Epiphany profile 587 - Epiphany profile
@@ -552,9 +614,10 @@ Kishore96in (https://github.com/Kishore96in)
552 - added falkon profile 614 - added falkon profile
553 - kxmlgui fixes 615 - kxmlgui fixes
554 - okular profile fixes 616 - okular profile fixes
555 - jitsi-meet-desktop profile 617 - jitsi-meet-desktop profile
556 - konversatin profile fix 618 - konversatin profile fix
557 - added Neochat profile 619 - added Neochat profile
620 - added whitelist-1793-workaround.inc
558KOLANICH (https://github.com/KOLANICH) 621KOLANICH (https://github.com/KOLANICH)
559 - added symlink fixer fix_private-bin.py in contrib section 622 - added symlink fixer fix_private-bin.py in contrib section
560 - update fix_private-bin.py 623 - update fix_private-bin.py
@@ -564,6 +627,10 @@ kortewegdevries (https://github.com/kortewegdevries)
564 - whitelisting evolution, kmail 627 - whitelisting evolution, kmail
565Kristóf Marussy (https://github.com/kris7t) 628Kristóf Marussy (https://github.com/kris7t)
566 - dns support 629 - dns support
630kuesji koesnu (https://github.com/kuesji)
631 - unit suffixes for rlimit-fsize and rlimit-as
632 - util.c and firejail.h fixes
633 - better parser for size strings
567Kunal Mehta (https://github.com/legoktm) 634Kunal Mehta (https://github.com/legoktm)
568 - converted all links to https in manpages 635 - converted all links to https in manpages
569laniakea64 (https://github.com/laniakea64) 636laniakea64 (https://github.com/laniakea64)
@@ -574,6 +641,9 @@ Laurent Declercq (https://github.com/nuxwin)
574 - fixed test for shell interpreter in chroots 641 - fixed test for shell interpreter in chroots
575LaurentGH (https://github.com/LaurentGH) 642LaurentGH (https://github.com/LaurentGH)
576 - allow private-bin parameters to be absolute paths 643 - allow private-bin parameters to be absolute paths
644lecso7 (https://github.com/lecso7)
645 - added goldendict profile
646 - allow evince to read .cbz file format
577Loïc Damien (https://github.com/dzamlo) 647Loïc Damien (https://github.com/dzamlo)
578 - small fixes 648 - small fixes
579Liorst4 (https://github.com/Liorst4) 649Liorst4 (https://github.com/Liorst4)
@@ -587,6 +657,8 @@ Lukáš Krejčí (https://github.com/lskrejci)
587 - fixed parsing of --keep-var-tmp 657 - fixed parsing of --keep-var-tmp
588luzpaz (https://github.com/luzpaz) 658luzpaz (https://github.com/luzpaz)
589 - code spelling fixes 659 - code spelling fixes
660lxeiqr (https://github.com/lxeiqr)
661 - fix sndio support
590Mace Muilman (https://github.com/mace015) 662Mace Muilman (https://github.com/mace015)
591 - google-chrome{,beta,unstable} flags 663 - google-chrome{,beta,unstable} flags
592maces (https://github.com/maces) 664maces (https://github.com/maces)
@@ -604,12 +676,16 @@ Martin Carpenter (https://github.com/mcarpenter)
604Martin Dosch (spam-debian@mdosch.de) 676Martin Dosch (spam-debian@mdosch.de)
605 - support for gnome-shell integration addon in Firefox 677 - support for gnome-shell integration addon in Firefox
606 (Bug-Debian: https://bugs.debian.org/872720) 678 (Bug-Debian: https://bugs.debian.org/872720)
679Martynas Janonis (https://github.com/mjanonis)
680 - update wrc for Arch Linux
607Matt Parnell (https://github.com/ilikenwf) 681Matt Parnell (https://github.com/ilikenwf)
608 - whitelisting for core firefox related functionality 682 - whitelisting for core firefox related functionality
609Mattias Wadman (https://github.com/wader) 683Mattias Wadman (https://github.com/wader)
610 - seccomp errno filter support 684 - seccomp errno filter support
611Matthew Gyurgyik (https://github.com/pyther) 685Matthew Gyurgyik (https://github.com/pyther)
612 - rpm spec and several fixes 686 - rpm spec and several fixes
687Matthew Cline (https://github.com/matthew-cline)
688 - steam profile and dropbox profile fixes
613matu3ba (https://github.com/matu3ba) 689matu3ba (https://github.com/matu3ba)
614 - evince hardening, dbus removed 690 - evince hardening, dbus removed
615 - fix dia profile 691 - fix dia profile
@@ -625,6 +701,8 @@ Michael Hoffmann (https://github.com/brisad)
625 - added support for subdirs in private-etc 701 - added support for subdirs in private-etc
626Mike Frysinger (vapier@gentoo.org) 702Mike Frysinger (vapier@gentoo.org)
627 - Gentoo compile patch 703 - Gentoo compile patch
704minus7 (https://github.com/minus7)
705 - fix hanging arp_check
628mirabellette (https://github.com/mirabellette) 706mirabellette (https://github.com/mirabellette)
629 - add comment to thunderbird.profile to allow Firefox to load profiles 707 - add comment to thunderbird.profile to allow Firefox to load profiles
630mjudtmann (https://github.com/mjudtmann) 708mjudtmann (https://github.com/mjudtmann)
@@ -643,18 +721,28 @@ Neo00001 (https://github.com/Neo00001)
643 - update telegram profile 721 - update telegram profile
644 - add spectacle profile 722 - add spectacle profile
645 - add kdiff3 profile 723 - add kdiff3 profile
724NetSysFire (https://github.com/NetSysFire)
725 - update weechat profile
646Nick Fox (https://github.com/njfox) 726Nick Fox (https://github.com/njfox)
647 - add a profile alias for code-oss 727 - add a profile alias for code-oss
648 - add code-oss config directory 728 - add code-oss config directory
649 - fix wire-desktop.profile on arch 729 - fix wire-desktop.profile on arch
650NickMolloy (https://github.com/NickMolloy) 730NickMolloy (https://github.com/NickMolloy)
651 - ARP address length fix 731 - ARP address length fix
732Nico (https://github.com/dr460nf1r3)
733 - added FireDragon profile
734Nicola Davide Mannarelli (https://github.com/nidamanx)
735 - fix "Could not create AF_NETLINK socket"
736 - added nextcloud profiles
737 - Firefox, KeepassXC, Telegram fixes
652Niklas Haas (https://github.com/haasn) 738Niklas Haas (https://github.com/haasn)
653 - blacklisting for keybase.io's client 739 - blacklisting for keybase.io's client
654Niklas Goerke (https://github.com/Niklas974) 740Niklas Goerke (https://github.com/Niklas974)
655 - update QOwnNotes profile 741 - update QOwnNotes profile
656Nikos Chantziaras (https://github.com/realnc) 742Nikos Chantziaras (https://github.com/realnc)
657 - fix audio support for Discord 743 - fix audio support for Discord
744nolanl (https://github.com/nolanl)
745 - added localtime to signal-desktop's profile
658nyancat18 (https://github.com/nyancat18) 746nyancat18 (https://github.com/nyancat18)
659 - added ardour4, dooble, karbon, krita profiles 747 - added ardour4, dooble, karbon, krita profiles
660Ondra Nekola (https://github.com/satai) 748Ondra Nekola (https://github.com/satai)
@@ -662,7 +750,7 @@ Ondra Nekola (https://github.com/satai)
662OndrejMalek (https://github.com/OndrejMalek) 750OndrejMalek (https://github.com/OndrejMalek)
663 - various manpage fixes 751 - various manpage fixes
664Ondřej Nový (https://github.com/onovy) 752Ondřej Nový (https://github.com/onovy)
665 - allow video for Signal profile 753 - allow video for Signal profile
666 - added Mattermost desktop profile 754 - added Mattermost desktop profile
667 - hardened Zoom profile 755 - hardened Zoom profile
668 - hardened Signal desktop profile 756 - hardened Signal desktop profile
@@ -679,7 +767,7 @@ Patrick Toomey (https://sourceforge.net/u/ptoomey/profile/)
679Paul Moore <pmoore@redhat.com> 767Paul Moore <pmoore@redhat.com>
680 -src/fsec-print/print.c extracted from libseccomp software package 768 -src/fsec-print/print.c extracted from libseccomp software package
681Paupiah Yash (https://github.com/CaffeinatedStud) 769Paupiah Yash (https://github.com/CaffeinatedStud)
682 - gzip profile 770 - gzip profile
683Pawel (https://github.com/grimskies) 771Pawel (https://github.com/grimskies)
684 - make --join return exit code of the invoked program 772 - make --join return exit code of the invoked program
685Peter Millerchip (https://github.com/pmillerchip) 773Peter Millerchip (https://github.com/pmillerchip)
@@ -702,6 +790,8 @@ Petter Reinholdtsen (pere@hungry.com)
702PharmaceuticalCobweb (https://github.com/PharmaceuticalCobweb) 790PharmaceuticalCobweb (https://github.com/PharmaceuticalCobweb)
703 - fix quiterss profile 791 - fix quiterss profile
704 - added profile for gnome-ring 792 - added profile for gnome-ring
793pholodniak (https://github.com/pholodniak)
794 - profstats fixes
705pianoslum (https://github.com/pianoslum) 795pianoslum (https://github.com/pianoslum)
706 - nodbus breaking evince two-page-view warning 796 - nodbus breaking evince two-page-view warning
707pirate486743186 (https://github.com/pirate486743186) 797pirate486743186 (https://github.com/pirate486743186)
@@ -709,6 +799,18 @@ pirate486743186 (https://github.com/pirate486743186)
709 - mpsyt profile 799 - mpsyt profile
710 - fix youtube-dl and mpv 800 - fix youtube-dl and mpv
711 - fix gnome-mpv profile 801 - fix gnome-mpv profile
802 - fix gunzip profile
803 - reorganizing youtube-viewers
804 - fix pluma profile
805 - whitelist /var/lib/aspell
806 - mcomix fixes
807 - fixing engrampa profile
808 - adding qcomicbook and pipe-viewer in disable-programs
809 - newsboat/newsbeuter profiles
810 - fix atril profile
811 - reorganizing links browsers
812 - added rtv, alpine, mcomix, qcomicbook, googler, ddgr profiles
813 - w3m, zahura, profile.template fixes
712Pixel Fairy (https://github.com/xahare) 814Pixel Fairy (https://github.com/xahare)
713 - added fjclip.py, fjdisplay.py and fjresize.py in contrib section 815 - added fjclip.py, fjdisplay.py and fjresize.py in contrib section
714PizzaDude (https://github.com/pizzadude) 816PizzaDude (https://github.com/pizzadude)
@@ -744,10 +846,17 @@ Rahul Golam (https://github.com/technoLord)
744 - strings profile 846 - strings profile
745RandomVoid (https://github.com/RandomVoid) 847RandomVoid (https://github.com/RandomVoid)
746 - fix building C# projects in Godot 848 - fix building C# projects in Godot
849 - fix Lutris profile
850 - fix running games with enabled Feral GameMode in Lutris
747Raphaël Droz (https://github.com/drzraf) 851Raphaël Droz (https://github.com/drzraf)
748 - zoom profile fixes 852 - zoom profile fixes
749realaltffour (https://github.com/realaltffour) 853realaltffour (https://github.com/realaltffour)
750 - add lynx support to newsboat profile 854 - add lynx support to newsboat profile
855Reed Riley (https://github.com/reedriley)
856 - cointop profile
857 - 1password profile
858 - blacklist rclone, 1Password, Ledger Live and cointop
859 - allow Signal to open links in Firefox
751Reiner Herrmann (https://github.com/reinerh) 860Reiner Herrmann (https://github.com/reinerh)
752 - a number of build patches 861 - a number of build patches
753 - man page fixes 862 - man page fixes
@@ -785,6 +894,8 @@ rusty-snake (https://github.com/rusty-snake)
785 - some typo fixes 894 - some typo fixes
786 - added profile templates 895 - added profile templates
787 - added sort.py to contrib 896 - added sort.py to contrib
897sak96 (https://github.com/sak96)
898 - discord profile fixes
788Salvo 'LtWorf' Tomaselli (https://github.com/ltworf) 899Salvo 'LtWorf' Tomaselli (https://github.com/ltworf)
789 - fixed ktorrent profile 900 - fixed ktorrent profile
790sarneaud (https://github.com/sarneaud) 901sarneaud (https://github.com/sarneaud)
@@ -796,6 +907,8 @@ Sebastian Hafner (https://github.com/DropNib)
796Senemu (https://github.com/Senemu) 907Senemu (https://github.com/Senemu)
797 - protection for .pythonrc.py 908 - protection for .pythonrc.py
798 - fixed evince 909 - fixed evince
910Seonwoo Lee (https://github.com/seonwoolee)
911 - fix teams ignoring input sources e.g. microphones
799Sergey Alirzaev (https://github.com/l29ah) 912Sergey Alirzaev (https://github.com/l29ah)
800 - firejail.h enum fix 913 - firejail.h enum fix
801 - firefox-common-addons.inc: + tridactyl 914 - firefox-common-addons.inc: + tridactyl
@@ -813,6 +926,8 @@ sinkuu (https://github.com/sinkuu)
813 - fix symlink invocation for programs placing symlinks in $PATH 926 - fix symlink invocation for programs placing symlinks in $PATH
814Simo Piiroinen (https://github.com/spiiroin) 927Simo Piiroinen (https://github.com/spiiroin)
815 - Jolla/SailfishOS patches 928 - Jolla/SailfishOS patches
929slowpeek (https://github.com/slowpeek)
930 - refine appimage example in docs
816smitsohu (https://github.com/smitsohu) 931smitsohu (https://github.com/smitsohu)
817 - read-only kde4 services directory 932 - read-only kde4 services directory
818 - enhanced mediathekview profile 933 - enhanced mediathekview profile
@@ -864,6 +979,8 @@ SkewedZeppelin (https://github.com/SkewedZeppelin)
864 - hardern /var 979 - hardern /var
865 - profile standard layout 980 - profile standard layout
866 - Spotify and itch.io profile fixes 981 - Spotify and itch.io profile fixes
982Spacewalker2 (https://github.com/Spacewalker2)
983 - fix MediathekView profile
867sshirokov (https://sourceforge.net/u/yshirokov/profile/) 984sshirokov (https://sourceforge.net/u/yshirokov/profile/)
868 - Patch to output "Reading profile" to stderr instead of stdout 985 - Patch to output "Reading profile" to stderr instead of stdout
869SYN-cook (https://github.com/SYN-cook) 986SYN-cook (https://github.com/SYN-cook)
@@ -887,7 +1004,7 @@ SYN-cook (https://github.com/SYN-cook)
887 - gnome-calculator changes 1004 - gnome-calculator changes
888startx2017 (https://github.com/startx2017) 1005startx2017 (https://github.com/startx2017)
889 - syscall list update 1006 - syscall list update
890 - updated default seccomp filters - added bpf, clock_settime, personality, process_vm_writev, query_module, 1007 - updated default seccomp filters - added bpf, clock_settime, personality, process_vm_writev, query_module,
891 settimeofday, stime, umount, userfaultfd, ustat, vm86, and vm86old 1008 settimeofday, stime, umount, userfaultfd, ustat, vm86, and vm86old
892 - enable/disable join support in /etc/firejail/firejail.config 1009 - enable/disable join support in /etc/firejail/firejail.config
893 - firecfg fix: create ~/.local/share/applications directory if it doesn't exist 1010 - firecfg fix: create ~/.local/share/applications directory if it doesn't exist
@@ -938,6 +1055,14 @@ Topi Miettinen (https://github.com/topimiettinen)
938 - improve loading of seccomp filter and memory-deny-write-execute feature 1055 - improve loading of seccomp filter and memory-deny-write-execute feature
939 - private-lib feature 1056 - private-lib feature
940 - make --nodbus block also system D-Bus socket 1057 - make --nodbus block also system D-Bus socket
1058Ted Robertson (https://github.com/tredondo)
1059 - webstorm profile fixes
1060 - added bcompare profile
1061 - various documentation fixes
1062 - blacklist Exodus wallet
1063 - blacklist monero-project directory
1064Tus1688 (https://github.com/Tus1688)
1065 - added neovim profile
941user1024 (user1024@tut.by) 1066user1024 (user1024@tut.by)
942 - electron profile whitelisting 1067 - electron profile whitelisting
943 - fixed Rocket.Chat profile 1068 - fixed Rocket.Chat profile
@@ -989,11 +1114,14 @@ Vincent43 (https://github.com/Vincent43)
989 - apparmor enhancements 1114 - apparmor enhancements
990Vincent Blillault (https://github.com/Feandil) 1115Vincent Blillault (https://github.com/Feandil)
991 - fix mumble profile 1116 - fix mumble profile
1117Vincent Lefèvre (https://github.com/vinc17fr)
1118 - blacklist rxvt after the blacklist of Perl
1119 - Noblacklist rxvt in allow-perl.inc
992vismir2 (https://github.com/vismir2) 1120vismir2 (https://github.com/vismir2)
993 - feh, ranger, 7z, keepass, keepassx and zathura profiles 1121 - feh, ranger, 7z, keepass, keepassx and zathura profiles
994 - claws-mail, mutt, git, emacs, vim profiles 1122 - claws-mail, mutt, git, emacs, vim profiles
995 - lots of profile fixes 1123 - lots of profile fixes
996 - support for truecrypt and zuluCrypt 1124 - support for truecrypt and zuluCrypt
997viq (https://github.com/viq) 1125viq (https://github.com/viq)
998 - discord-canary profile 1126 - discord-canary profile
999Vladimir Gorelov (https://github.com/larkvirtual) 1127Vladimir Gorelov (https://github.com/larkvirtual)
@@ -1001,9 +1129,21 @@ Vladimir Gorelov (https://github.com/larkvirtual)
1001Vladimir Schowalter (https://github.com/VladimirSchowalter20) 1129Vladimir Schowalter (https://github.com/VladimirSchowalter20)
1002 - apparmor profile enhancements 1130 - apparmor profile enhancements
1003 - various KDE profile enhancements 1131 - various KDE profile enhancements
1004 read-only kde5 services directory 1132 - read-only kde5 services directory
1133Vladislav Nepogodin (https://github.com/vnepogodin)
1134 - added Librewolf profiles
1135 - added Sway profile
1136 - fix CLion profile
1137 - fixes for disable-programs.inc
1138 - CachyBrowser profile
1139Hugo Osvaldo Barrera (https://github.com/WhyNotHugo)
1140 - Skype profile tweaks
1141 - whitelist-ro command
1005xee5ch (https://github.com/xee5ch) 1142xee5ch (https://github.com/xee5ch)
1006 - skypeforlinux profile 1143 - skypeforlinux profile
1144York Zhao (https://github.com/YorkZ)
1145 - tor browser profile fix
1146 - allow telegram to open hyperlinks
1007Ypnose (https://github.com/Ypnose) 1147Ypnose (https://github.com/Ypnose)
1008 - disable-shell.inc: add mksh shell 1148 - disable-shell.inc: add mksh shell
1009yumkam (https://github.com/yumkam) 1149yumkam (https://github.com/yumkam)
@@ -1031,4 +1171,4 @@ Zack Weinberg (https://github.com/zackw)
1031zupatisc (https://github.com/zupatisc) 1171zupatisc (https://github.com/zupatisc)
1032 - patch-util fix 1172 - patch-util fix
1033 1173
1034Copyright (C) 2014-2021 Firejail Authors 1174Copyright (C) 2014-2022 Firejail Authors
diff --git a/README.md b/README.md
index 40e9eff41..01d24db1b 100644
--- a/README.md
+++ b/README.md
@@ -22,43 +22,23 @@ implemented directly in Linux kernel and available on any Linux computer.
22<table><tr> 22<table><tr>
23 23
24<td> 24<td>
25<a href="http://www.youtube.com/watch?feature=player_embedded&v=7RMz7tePA98 25<a href="https://www.brighteon.com/6ebef4a5-20fe-4071-9d03-e6172c806ff7" target="_blank">
26" target="_blank"><img src="http://img.youtube.com/vi/7RMz7tePA98/0.jpg" 26<img src="https://photos.brighteon.com/thumbnail/092dccab-9974-4775-93d2-35e31b2ebf61"
27alt="Firejail Introduction" width="240" height="180" border="10" /><br/>Firejail Intro</a> 27alt="Advanced Browser Security" width="240" height="142" border="10" /><br/>Advanced Browser Security</a>
28</td> 28</td>
29 29
30<td> 30<td>
31<a href="http://www.youtube.com/watch?feature=player_embedded&v=J1ZsXrpAgBU 31<a href="https://www.brighteon.com/f09f693a-9847-4d9e-aaaf-60f756cc3833" target="_blank">
32" target="_blank"><img src="http://img.youtube.com/vi/J1ZsXrpAgBU/0.jpg" 32<img src="https://photos.brighteon.com/thumbnail/ab951131-81c7-4a6b-b483-924a342fea11"
33alt="Firejail Demo" width="240" height="180" border="10" /><br/>Firejail Demo</a> 33alt="How To Disable Network Access" width="240" height="142" border="10" /><br/>How To Disable Network Access</a>
34</td> 34</td>
35 35
36<td> 36<td>
37<a href="http://www.youtube.com/watch?feature=player_embedded&v=EyEz65RYfw4 37<a href="https://www.brighteon.com/94ae1731-2352-4cda-bb48-7cc7a6ad32f8" target="_blank">
38" target="_blank"><img src="http://img.youtube.com/vi/EyEz65RYfw4/0.jpg" 38<img src="https://photos.brighteon.com/thumbnail/5c90254c-61f3-4927-ac57-ae279dc543cf"
39alt="Debian Install" width="240" height="180" border="10" /><br/>Debian Install</a> 39alt="Deep Dive" width="240" height="142" border="10" /><br/>Deep Dive</a>
40</td> 40</td>
41 41
42
43</tr><tr>
44<td>
45<a href="http://www.youtube.com/watch?feature=player_embedded&v=Uy2ZTHc4s0w
46" target="_blank"><img src="http://img.youtube.com/vi/Uy2ZTHc4s0w/0.jpg"
47alt="Arch Linux Install" width="240" height="180" border="10" /><br/>Arch Linux Install</a>
48
49</td>
50<td>
51<a href="http://www.youtube.com/watch?feature=player_embedded&v=xuMxRx0zSfQ
52" target="_blank"><img src="http://img.youtube.com/vi/xuMxRx0zSfQ/0.jpg"
53alt="Disable Network Access" width="240" height="180" border="10" /><br/>Disable Network Access</a>
54
55</td>
56<td>
57<a href="http://www.youtube.com/watch?feature=player_embedded&v=N-Mso2bSr3o
58" target="_blank"><img src="http://img.youtube.com/vi/N-Mso2bSr3o/0.jpg"
59alt="Firejail Security Deep Dive" width="240" height="180" border="10" /><br/>Firejail Security Deep Dive</a>
60
61</td>
62</tr></table> 42</tr></table>
63 43
64Project webpage: https://firejail.wordpress.com/ 44Project webpage: https://firejail.wordpress.com/
@@ -75,7 +55,7 @@ Wiki: https://github.com/netblue30/firejail/wiki
75 55
76GitLab-CI status: https://gitlab.com/Firejail/firejail_ci/pipelines/ 56GitLab-CI status: https://gitlab.com/Firejail/firejail_ci/pipelines/
77 57
78Video Channel: https://www.youtube.com/channel/UCi5u-syndQYyOeV4NZ04hNA 58Video Channel: https://www.brighteon.com/channels/netblue30
79 59
80Backup Video Channel: https://www.bitchute.com/profile/JSBsA1aoQVfW/ 60Backup Video Channel: https://www.bitchute.com/profile/JSBsA1aoQVfW/
81 61
@@ -114,9 +94,47 @@ https://unparalleled.eu/blog/2021/20210208-rigged-race-against-firejail-for-loca
114 94
115## Installing 95## Installing
116 96
117Try installing Firejail from your system packages first. Firejail is included in Alpine, ALT Linux, Arch, Chakra, Debian, Deepin, Devuan, Fedora, Gentoo, Manjaro, Mint, NixOS, Parabola, Parrot, PCLinuxOS, ROSA, Solus, Slackware/SlackBuilds, Trisquel, Ubuntu, Void and possibly others. 97### Debian
98
99Debian stable (bullseye): We recommend to use the [backports](https://packages.debian.org/bullseye-backports/firejail) package.
100
101### Ubuntu
102
103For Ubuntu 18.04+ and derivatives (such as Linux Mint), users are **strongly advised** to use the [PPA](https://launchpad.net/~deki/+archive/ubuntu/firejail).
104
105How to add and install from the PPA:
118 106
119The firejail 0.9.52-LTS version is deprecated. On Ubuntu 18.04 LTS users are advised to use the [PPA](https://launchpad.net/~deki/+archive/ubuntu/firejail). On Debian buster we recommend to use the [backports](https://packages.debian.org/buster-backports/firejail) package. 107```sh
108sudo add-apt-repository ppa:deki/firejail
109sudo apt-get update
110sudo apt-get install firejail firejail-profiles
111```
112
113Reason: The firejail package for Ubuntu 20.04 has been left vulnerable to CVE-2021-26910 for months after a patch for it was posted on Launchpad:
114
115* [firejail version in Ubuntu 20.04 LTS is vulnerable to CVE-2021-26910](https://bugs.launchpad.net/ubuntu/+source/firejail/+bug/1916767)
116
117See also <https://wiki.ubuntu.com/SecurityTeam/FAQ>:
118
119> What software is supported by the Ubuntu Security team?
120>
121> Ubuntu is currently divided into four components: main, restricted, universe
122> and multiverse. All binary packages in main and restricted are supported by
123> the Ubuntu Security team for the life of an Ubuntu release, while binary
124> packages in universe and multiverse are supported by the Ubuntu community.
125
126Additionally, the PPA version is likely to be more recent and to contain more profile fixes.
127
128See the following discussions for details:
129
130* [Should I keep using the version of firejail available in my distro repos?](https://github.com/netblue30/firejail/discussions/4666)
131* [How to install the latest version on Ubuntu and derivatives](https://github.com/netblue30/firejail/discussions/4663)
132
133### Other
134
135Firejail is included in a large number of Linux distributions.
136
137Note: The firejail 0.9.52-LTS version is deprecated.
120 138
121You can also install one of the [released packages](http://sourceforge.net/projects/firejail/files/firejail), or clone Firejail’s source code from our Git repository and compile manually: 139You can also install one of the [released packages](http://sourceforge.net/projects/firejail/files/firejail), or clone Firejail’s source code from our Git repository and compile manually:
122 140
@@ -126,18 +144,18 @@ $ cd firejail
126$ ./configure && make && sudo make install-strip 144$ ./configure && make && sudo make install-strip
127````` 145`````
128On Debian/Ubuntu you will need to install git and gcc compiler. AppArmor 146On Debian/Ubuntu you will need to install git and gcc compiler. AppArmor
129development libraries and pkg-config are required when using --apparmor 147development libraries and pkg-config are required when using `--apparmor`
130./configure option: 148./configure option:
131````` 149`````
132$ sudo apt-get install git build-essential libapparmor-dev pkg-config gawk 150$ sudo apt-get install git build-essential libapparmor-dev pkg-config gawk
133````` 151`````
134For --selinux option, add libselinux1-dev (libselinux-devel for Fedora). 152For `--selinux` option, add libselinux1-dev (libselinux-devel for Fedora).
135 153
136Detailed information on using firejail from git is available on the [wiki](https://github.com/netblue30/firejail/wiki/Using-firejail-from-git). 154Detailed information on using firejail from git is available on the [wiki](https://github.com/netblue30/firejail/wiki/Using-firejail-from-git).
137 155
138## Running the sandbox 156## Running the sandbox
139 157
140To start the sandbox, prefix your command with firejail: 158To start the sandbox, prefix your command with `firejail`:
141 159
142````` 160`````
143$ firejail firefox # starting Mozilla Firefox 161$ firejail firefox # starting Mozilla Firefox
@@ -145,7 +163,7 @@ $ firejail transmission-gtk # starting Transmission BitTorrent
145$ firejail vlc # starting VideoLAN Client 163$ firejail vlc # starting VideoLAN Client
146$ sudo firejail /etc/init.d/nginx start 164$ sudo firejail /etc/init.d/nginx start
147````` 165`````
148Run "firejail --list" in a terminal to list all active sandboxes. Example: 166Run `firejail --list` in a terminal to list all active sandboxes. Example:
149````` 167`````
150$ firejail --list 168$ firejail --list
1511617:netblue:/usr/bin/firejail /usr/bin/firefox-esr 1691617:netblue:/usr/bin/firejail /usr/bin/firefox-esr
@@ -170,7 +188,7 @@ PulseAudio changes.
170Start your programs the way you are used to: desktop manager menus, file manager, desktop launchers. 188Start your programs the way you are used to: desktop manager menus, file manager, desktop launchers.
171The integration applies to any program supported by default by Firejail. There are about 250 default applications 189The integration applies to any program supported by default by Firejail. There are about 250 default applications
172in current Firejail version, and the number goes up with every new release. 190in current Firejail version, and the number goes up with every new release.
173We keep the application list in [/usr/lib/firejail/firecfg.config](https://github.com/netblue30/firejail/blob/master/src/firecfg/firecfg.config) file. 191We keep the application list in [/etc/firejail/firecfg.config](https://github.com/netblue30/firejail/blob/master/src/firecfg/firecfg.config) file.
174 192
175## Security profiles 193## Security profiles
176 194
@@ -188,152 +206,57 @@ Use this issue to request new profiles: [#1139](https://github.com/netblue30/fir
188You can also use this tool to get a list of syscalls needed by a program: [contrib/syscalls.sh](contrib/syscalls.sh). 206You can also use this tool to get a list of syscalls needed by a program: [contrib/syscalls.sh](contrib/syscalls.sh).
189 207
190We also keep a list of profile fixes for previous released versions in [etc-fixes](https://github.com/netblue30/firejail/tree/master/etc-fixes) directory. 208We also keep a list of profile fixes for previous released versions in [etc-fixes](https://github.com/netblue30/firejail/tree/master/etc-fixes) directory.
191`````
192 209
193````` 210## Latest released version: 0.9.68
194## Latest released version: 0.9.64
195 211
196## Current development version: 0.9.65 212## Current development version: 0.9.69
197 213
198Milestone page: https://github.com/netblue30/firejail/milestone/1 214Milestone page: https://github.com/netblue30/firejail/milestone/1
199Release discussion: https://github.com/netblue30/firejail/issues/3696
200 215
201### jailtest 216### Shell tab completion
202````` 217```
203JAILTEST(1) JAILTEST man page JAILTEST(1) 218 --tab Enable shell tab completion in sandboxes using private or whitelisted
204 219 home directories.
205NAME
206 jailtest - Simple utility program to test running sandboxes
207
208SYNOPSIS
209 sudo jailtest [OPTIONS] [directory]
210
211DESCRIPTION
212 WORK IN PROGRESS! jailtest attaches itself to all sandboxes started by
213 the user and performs some basic tests on the sandbox filesystem:
214
215 1. Virtual directories
216 jailtest extracts a list with the main virtual directories in‐
217 stalled by the sandbox. These directories are build by firejail
218 at startup using --private* and --whitelist commands.
219
220 2. Noexec test
221 jailtest inserts executable programs in /home/username, /tmp,
222 and /var/tmp directories and tries to run them form inside the
223 sandbox, thus testing if the directory is executable or not.
224
225 3. Read access test
226 jailtest creates test files in the directories specified by the
227 user and tries to read them from inside the sandbox.
228
229 4. AppArmor test
230
231 5. Seccomp test
232
233 The program is started as root using sudo.
234
235OPTIONS
236 --debug
237 Print debug messages
238
239 -?, --help
240 Print options end exit.
241
242 --version
243 Print program version and exit.
244
245 [directory]
246 One or more directories in user home to test for read access.
247 ~/.ssh and ~/.gnupg are tested by default.
248
249OUTPUT
250 For each sandbox detected we print the following line:
251
252 PID:USER:Sandbox Name:Command
253
254 It is followed by relevant sandbox information, such as the virtual di‐
255 rectories and various warnings.
256
257EXAMPLE
258 $ sudo jailtest
259 2014:netblue::firejail /usr/bin/gimp
260 Virtual dirs: /tmp, /var/tmp, /dev, /usr/share,
261 Warning: I can run programs in /home/netblue
262
263 2055:netblue::firejail /usr/bin/ssh -X netblue@x.y.z.net
264 Virtual dirs: /var/tmp, /dev, /usr/share, /run/user/1000,
265 Warning: I can read ~/.ssh
266
267 2186:netblue:libreoffice:firejail --appimage /opt/LibreOffice-fresh.ap‐
268 pimage
269 Virtual dirs: /tmp, /var/tmp, /dev,
270
271 26090:netblue::/usr/bin/firejail /opt/firefox/firefox
272 Virtual dirs: /home/netblue, /tmp, /var/tmp, /dev, /etc, /usr/share,
273 /run/user/1000,
274
275 26160:netblue:tor:firejail --private=~/tor-browser_en-US ./start-tor
276 Warning: AppArmor not enabled
277 Virtual dirs: /home/netblue, /tmp, /var/tmp, /dev, /etc, /bin,
278 /usr/share, /run/user/1000,
279 Warning: I can run programs in /home/netblue
280
281LICENSE
282 This program is free software; you can redistribute it and/or modify it
283 under the terms of the GNU General Public License as published by the
284 Free Software Foundation; either version 2 of the License, or (at your
285 option) any later version.
286
287 Homepage: https://firejail.wordpress.com
288
289SEE ALSO
290 firejail(1), firemon(1), firecfg(1), firejail-profile(5), firejail-lo‐
291 gin(5), firejail-users(5),
292 220
2930.9.65 Feb 2021 JAILTEST(1) 221 $ firejail --private --tab
294````` 222```
295 223
296### Profile Statistics 224### Profile Statistics
297 225
298A small tool to print profile statistics. Compile as usual and run in /etc/profiles: 226A small tool to print profile statistics. Compile and install as usual. The tool is installed in /usr/lib/firejail directory.
227Run it over the profiles in /etc/profiles:
299``` 228```
300$ sudo cp src/profstats/profstats /etc/firejail/. 229$ /usr/lib/firejail/profstats /etc/firejail/*.profile
301$ cd /etc/firejail 230No include .local found in /etc/firejail/noprofile.profile
302$ ./profstats *.profile 231Warning: multiple caps in /etc/firejail/transmission-daemon.profile
303Warning: multiple caps in transmission-daemon.profile
304 232
305Stats: 233Stats:
306 profiles 1077 234 profiles 1184
307 include local profile 1077 (include profile-name.local) 235 include local profile 1183 (include profile-name.local)
308 include globals 1077 (include globals.local) 236 include globals 1152 (include globals.local)
309 blacklist ~/.ssh 971 (include disable-common.inc) 237 blacklist ~/.ssh 1057 (include disable-common.inc)
310 seccomp 988 238 seccomp 1076
311 capabilities 1076 239 capabilities 1178
312 noexec 960 (include disable-exec.inc) 240 noexec 1064 (include disable-exec.inc)
313 memory-deny-write-execute 231 241 noroot 985
314 apparmor 621 242 memory-deny-write-execute 259
315 private-bin 571 243 apparmor 707
316 private-dev 949 244 private-bin 686
317 private-etc 470 245 private-dev 1040
318 private-tmp 835 246 private-etc 537
319 whitelist home directory 508 247 private-tmp 911
320 whitelist var 758 (include whitelist-var-common.inc) 248 whitelist home directory 567
321 whitelist run/user 539 (include whitelist-runuser-common.inc 249 whitelist var 849 (include whitelist-var-common.inc)
250 whitelist run/user 1153 (include whitelist-runuser-common.inc
322 or blacklist ${RUNUSER}) 251 or blacklist ${RUNUSER})
323 whitelist usr/share 526 (include whitelist-usr-share-common.inc 252 whitelist usr/share 621 (include whitelist-usr-share-common.inc
324 net none 354 253 net none 403
325 dbus-user none 573 254 dbus-user none 670
326 dbus-user filter 86 255 dbus-user filter 114
327 dbus-system none 706 256 dbus-system none 824
328 dbus-system filter 7 257 dbus-system filter 10
329``` 258```
330 259
331### New profiles: 260### New profiles:
332 261
333vmware-view, display-im6.q16, ipcalc, ipcalc-ng, ebook-convert, ebook-edit, ebook-meta, ebook-polish, lzop, 262onionshare, onionshare-cli, opera-developer
334avidemux, calligragemini, vmware-player, vmware-workstation, gget, com.github.phase1geo.minder, nextcloud-desktop,
335pcsxr, PPSSPPSDL, openmw, openmw-launcher, jami-gnome, PCSX2, bcompare, b2sum, cksum, md5sum, sha1sum, sha224sum,
336sha256sum, sha384sum, sha512sum, sum, librewold-nightly, Quodlibet, tmux, sway, alienarena, alienarena-wrapper,
337ballbuster, ballbuster-wrapper, colorful, colorful-wrapper, gl-117, gl-117-wrapper, glaxium, glaxium-wrapper,
338pinball, pinball-wrapper, etr-wrapper, neverball-wrapper, neverputt-wrapper, supertuxkart-wrapper, firedragon
339neochat
diff --git a/RELNOTES b/RELNOTES
index f62bf70bb..4849168f0 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -1,22 +1,112 @@
1firejail (0.9.65) baseline; urgency=low 1firejail (0.9.69) baseline; urgency=low
2 * work in progress
3 * feature: enable shell tab completion (#4936)
4 * feature: disable user profiles at compile time (#4990)
5 * rework: whitelist restructuring (#4985)
6 * bugfix: --private-cwd not expanding macros, broken hyperrogue (#4910)
7 * bugfix: nogroups + wrc prints confusing messages (#4930 #4933)
8 * bugfix: openSUSE Leap - whitelist-run-common.inc (#4954)
9 * bugfix: fix printing in evince (#5011)
10 * ci: replace centos (EOL) with almalinux (#4912)
11 * docs: Refer to firejail.config in configuration files (#4916)
12 * docs: firejail.config: add warning about allow-tray (#4946)
13 * new profiles: onionshare, onionshare-cli
14 -- netblue30 <netblue30@yahoo.com> Mon, 7 Feb 2022 09:00:00 -0500
15
16firejail (0.9.68) baseline; urgency=low
17 * security: on Ubuntu, the PPA is now recommended over the distro package
18 (see README.md) (#4748)
19 * security: bugfix: private-cwd leaks access to the entire filesystem
20 (#4780); reported by Hugo Osvaldo Barrera
21 * feature: remove (some) environment variables with auth-tokens (#4157)
22 * feature: ALLOW_TRAY condition (#4510 #4599)
23 * feature: add basic Firejail support to AppArmor base abstraction (#3226
24 #4628)
25 * feature: intrusion detection system (--ids-init, --ids-check)
26 * feature: deterministic shutdown command (--deterministic-exit-code,
27 --deterministic-shutdown) (#928 #3042 #4635)
28 * feature: noprinters command (#4607 #4827)
29 * feature: network monitor (--nettrace)
30 * feature: network locker (--netlock) (#4848)
31 * feature: whitelist-ro profile command (#4740)
32 * feature: disable pipewire with --nosound (#4855)
33 * feature: Unset TMP if it doesn't exist inside of sandbox (#4151)
34 * feature: Allow apostrophe in whitelist and blacklist (#4614)
35 * feature: AppImage support in --build command (#4878)
36 * modifs: exit code: distinguish fatal signals by adding 128 (#4533)
37 * modifs: firecfg.config is now installed to /etc/firejail/ (#408 #4669)
38 * modifs: close file descriptors greater than 2 (--keep-fd) (#4845)
39 * modifs: nogroups now stopped causing certain system groups to be dropped,
40 which are now controlled by the relevant "no" options instead (such as
41 nosound -> drop audio group), which fixes device access issues on systems
42 not using (e)logind (such as with seatd) (#4632 #4725 #4732 #4851)
43 * removal: --disable-whitelist at compile time
44 * removal: whitelist=yes/no in /etc/firejail/firejail.config
45 * bugfix: Fix sndio support (#4362 #4365)
46 * bugfix: Error mounting tmpfs (MS_REMOUNT flag not being cleared) (#4387)
47 * bugfix: --build clears the environment (#4460 #4467)
48 * bugfix: firejail hangs with net parameter (#3958 #4476)
49 * bugfix: Firejail does not work with a custom hosts file (#2758 #4560)
50 * bugfix: --tracelog and --trace override /etc/ld.so.preload (#4558 #4586)
51 * bugfix: PATH_MAX is undeclared on musl libc (#4578 #4579 #4583 #4606)
52 * bugfix: firejail symlinks are not skipped with private-bin + globs (#4626)
53 * bugfix: Firejail rejects empty arguments (#4395)
54 * bugfix: firecfg does not work with symlinks (discord.desktop) (#4235)
55 * bugfix: Seccomp list output goes to stdout instead of stderr (#4328)
56 * bugfix: private-etc does not work with symlinks (#4887)
57 * bugfix: Hardware key not detected on keepassxc (#4883)
58 * build: allow building with address sanitizer (#4594)
59 * build: Stop linking pthread (#4695)
60 * build: Configure cleanup and improvements (#4712)
61 * ci: add profile checks for sorting disable-programs.inc and
62 firecfg.config and for the required arguments in private-etc (#2739 #4643)
63 * ci: pin GitHub actions to SHAs and use Dependabot to update them (#4774)
64 * docs: Add new command checklist to CONTRIBUTING.md (#4413)
65 * docs: Rework bug report issue template and add both a question and a
66 feature request template (#4479 #4515 #4561)
67 * docs: fix contradictory descriptions of machine-id ("preserves" vs
68 "spoofs") (#4689)
69 * docs: Document that private-bin and private-etc always accumulate (#4078)
70 * new includes: whitelist-run-common.inc (#4288), disable-X11.inc (#4462)
71 * new includes: disable-proc.inc (#4521)
72 * removed includes: disable-passwordmgr.inc (#4454 #4461)
73 * new profiles: microsoft-edge-beta, clion-eap, lifeograph, zim
74 * new profiles: io.github.lainsce.Notejot, rednotebook, gallery-dl
75 * new profiles: yt-dlp, goldendict, goldendict, bundle, cmake
76 * new profiles: make, meson, pip, codium, telnet, ftp, OpenStego
77 * new profiles: imv, retroarch, torbrowser, CachyBrowser,
78 * new profiles: notable, RPCS3, wget2, raincat, conitop, 1passwd,
79 * new profiles: Seafile, neovim, com.github.tchx84.Flatseal
80 -- netblue30 <netblue30@yahoo.com> Sun, 6 Feb 2022 09:00:00 -0500
81
82firejail (0.9.66) baseline; urgency=low
83 * deprecated --audit options, relpaced by jailcheck utility
84 * deprecated follow-symlink-as-user from firejail.config
85 * new firejail.config settings: private-bin, private-etc
86 * new firejail.config settings: private-opt, private-srv
87 * new firejail.config settings: whitelist-disable-topdir
88 * new firejail.config settings: seccomp-filter-add
89 * removed kcmp syscall from seccomp default filter
90 * rename --noautopulse to keep-config-pulse
2 * filtering environment variables 91 * filtering environment variables
3 * zsh completion 92 * zsh completion
4 * command line: --mkdir, --mkfile 93 * command line: --mkdir, --mkfile
5 * --protocol now accumulates 94 * --protocol now accumulates
6 * Jolla/SailfishOS patches 95 * Jolla/SailfishOS patches
7 * private-lib rework 96 * private-lib rework
97 * whitelist rework
8 * jailtest utility for testing running sandboxes 98 * jailtest utility for testing running sandboxes
9 * removed --audit options, relpaced by jailtest
10 * capabilities list update 99 * capabilities list update
11 * faccessat2 syscall support 100 * faccessat2 syscall support
12 * --private-dev keeps /dev/input 101 * --private-dev keeps /dev/input
13 * added --noinput to disable /dev/input 102 * added --noinput to disable /dev/input
14 * Add support for subdirs in --private-etc 103 * add support for subdirs in --private-etc
15 * compile time: --enable-force-nonewprivs 104 * compile time: --enable-force-nonewprivs
16 * compile time: --disable-output 105 * compile time: --disable-output
17 * compile time: --enable-lts 106 * compile time: --enable-lts
18 * subdirs support in private-etc 107 * subdirs support in private-etc
19 * input devices support in private-dev, --no-input 108 * input devices support in private-dev, --no-input
109 * support trailing comments on profile lines
20 * new profiles: vmware-view, display-im6.q16, ipcalc, ipcalc-ng 110 * new profiles: vmware-view, display-im6.q16, ipcalc, ipcalc-ng
21 * ebook-convert, ebook-edit, ebook-meta, ebook-polish, lzop, 111 * ebook-convert, ebook-edit, ebook-meta, ebook-polish, lzop,
22 * avidemux, calligragemini, vmware-player, vmware-workstation 112 * avidemux, calligragemini, vmware-player, vmware-workstation
@@ -27,8 +117,10 @@ firejail (0.9.65) baseline; urgency=low
27 * alienarena, alienarena-wrapper, ballbuster, ballbuster-wrapper, 117 * alienarena, alienarena-wrapper, ballbuster, ballbuster-wrapper,
28 * colorful, colorful-wrapper, gl-117, gl-117-wrapper, glaxium, 118 * colorful, colorful-wrapper, gl-117, gl-117-wrapper, glaxium,
29 * glaxium-wrapper, pinball, pinball-wrapper, etr-wrapper, firedragon 119 * glaxium-wrapper, pinball, pinball-wrapper, etr-wrapper, firedragon
30 * neverball-wrapper, neverputt-wrapper, supertuxkart-wrapper, neochat 120 * neverball-wrapper, neverputt-wrapper, supertuxkart-wrapper, neochat,
31 -- netblue30 <netblue30@yahoo.com> Tue, 9 Feb 2021 09:00:00 -0500 121 * cargo, LibreCAD, blobby, funnyboat, pipe-viewer, gtk-pipe-viewer
122 * links2, xlinks2, googler, ddgr, tin
123 -- netblue30 <netblue30@yahoo.com> Mon, 28 Jun 2021 09:00:00 -0500
32 124
33firejail (0.9.64.4) baseline; urgency=low 125firejail (0.9.64.4) baseline; urgency=low
34 * disabled overlayfs, pending multiple fixes (CVE-2021-26910) 126 * disabled overlayfs, pending multiple fixes (CVE-2021-26910)
@@ -36,7 +128,7 @@ firejail (0.9.64.4) baseline; urgency=low
36 128
37firejail (0.9.64.2) baseline; urgency=low 129firejail (0.9.64.2) baseline; urgency=low
38 * allow --tmpfs inside $HOME for unprivileged users 130 * allow --tmpfs inside $HOME for unprivileged users
39 * --disable-usertmpfs compile time option 131 * --disable-usertmpfs compile time option
40 * allow AF_BLUETOOTH via --protocol=bluetooth 132 * allow AF_BLUETOOTH via --protocol=bluetooth
41 * Setup guide for new users: contrib/firejail-welcome.sh 133 * Setup guide for new users: contrib/firejail-welcome.sh
42 * implement netns in profiles 134 * implement netns in profiles
@@ -543,7 +635,7 @@ firejail (0.9.44) baseline; urgency=low
543 * feature: disable 3D hardware acceleration (--no3d) 635 * feature: disable 3D hardware acceleration (--no3d)
544 * feature: x11 xpra, x11 xephyr, x11 block, allusers, no3d profile commands 636 * feature: x11 xpra, x11 xephyr, x11 block, allusers, no3d profile commands
545 * feature: move files in sandbox (--put) 637 * feature: move files in sandbox (--put)
546 * feature: accept wildcard patterns in user name field of restricted 638 * feature: accept wildcard patterns in user name field of restricted
547 shell login feature 639 shell login feature
548 * new profiles: qpdfview, mupdf, Luminance HDR, Synfig Studio, Gimp, Inkscape 640 * new profiles: qpdfview, mupdf, Luminance HDR, Synfig Studio, Gimp, Inkscape
549 * new profiles: feh, ranger, zathura, 7z, keepass, keepassx, 641 * new profiles: feh, ranger, zathura, 7z, keepass, keepassx,
@@ -585,7 +677,7 @@ firejail (0.9.42) baseline; urgency=low
585 * compile time: disable whitelisting (--disable-whitelist) 677 * compile time: disable whitelisting (--disable-whitelist)
586 * compile time: disable global config (--disable-globalcfg) 678 * compile time: disable global config (--disable-globalcfg)
587 * run time: enable/disable overlayfs (overlayfs yes/no) 679 * run time: enable/disable overlayfs (overlayfs yes/no)
588 * run time: enable/disable quiet as default (quiet-by-default yes/no) 680 * run time: enable/disable quiet as default (quiet-by-default yes/no)
589 * run time: user-defined network filter (netfilter-default) 681 * run time: user-defined network filter (netfilter-default)
590 * run time: enable/disable whitelisting (whitelist yes/no) 682 * run time: enable/disable whitelisting (whitelist yes/no)
591 * run time: enable/disable remounting of /proc and /sys 683 * run time: enable/disable remounting of /proc and /sys
@@ -683,7 +775,7 @@ firejail (0.9.38) baseline; urgency=low
683 -- netblue30 <netblue30@yahoo.com> Tue, 2 Feb 2016 10:00:00 -0500 775 -- netblue30 <netblue30@yahoo.com> Tue, 2 Feb 2016 10:00:00 -0500
684 776
685firejail (0.9.36) baseline; urgency=low 777firejail (0.9.36) baseline; urgency=low
686 * added unbound, dnscrypt-proxy, BitlBee, HexChat, WeeChat, 778 * added unbound, dnscrypt-proxy, BitlBee, HexChat, WeeChat,
687 parole and rtorrent profiles 779 parole and rtorrent profiles
688 * Google Chrome profile rework 780 * Google Chrome profile rework
689 * added google-chrome-stable profile 781 * added google-chrome-stable profile
diff --git a/SECURITY.md b/SECURITY.md
index 92204da0a..5159a5f3d 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -2,23 +2,25 @@
2 2
3## Supported Versions 3## Supported Versions
4 4
5| Version | Supported by us | EOL | Supported by distribution | 5| Version | Supported by us | EOL | Supported by distribution |
6| ------- | ------------------ | ---- | --------------------------- 6| ------- | ------------------ | ------------------ | --------------------------------------------------------------------------------- |
7| 0.9.64 | :heavy_check_mark: | | :white_check_mark: Debian 10 **backports**, Debian 11 **backports**, Debian 12 (testing/unstable) 7| 0.9.68 | :heavy_check_mark: | | |
8| 0.9.62 | :x: | | :white_check_mark: Ubuntu 20.04 LTS, Ubuntu 20.10 8| 0.9.66 | :x: | | :white_check_mark: Debian 11 **backports**, Debian 12 (testing/unstable) |
9| 0.9.60 | :x: | 29 Dec 2019 | 9| 0.9.64 | :x: | | :white_check_mark: Debian 10 **backports**, Debian 11, Ubuntu 21.10 |
10| 0.9.58 | :x: | | :white_check_mark: Debian 9 **backports**, Debian 10 10| 0.9.62 | :x: | | :white_check_mark: Ubuntu 20.04 LTS, Ubuntu 20.10 |
11| 0.9.56 | :x: | 27 Jan 2019 | 11| 0.9.60 | :x: | 29 Dec 2019 | |
12| 0.9.54 | :x: | 18 Sep 2018 | 12| 0.9.58 | :x: | | :white_check_mark: Debian 9 **backports**, Debian 10 |
13| 0.9.52 | :x: | | :white_check_mark: Ubuntu 18.04 LTS 13| 0.9.56 | :x: | 27 Jan 2019 | |
14| 0.9.50 | :x: | 12 Dec 2017 | 14| 0.9.54 | :x: | 18 Sep 2018 | |
15| 0.9.48 | :x: | 09 Sep 2017 | 15| 0.9.52 | :x: | | :white_check_mark: Ubuntu 18.04 LTS |
16| 0.9.46 | :x: | 12 Jun 2017 | 16| 0.9.50 | :x: | 12 Dec 2017 | |
17| 0.9.44 | :x: | | :white_check_mark: Debian 9 17| 0.9.48 | :x: | 09 Sep 2017 | |
18| 0.9.42 | :x: | 22 Oct 2016 | 18| 0.9.46 | :x: | 12 Jun 2017 | |
19| 0.9.40 | :x: | 09 Sep 2016 | 19| 0.9.44 | :x: | | :white_check_mark: Debian 9 |
20| 0.9.38 | :x: | | :white_check_mark: Ubuntu 16.04 LTS 20| 0.9.42 | :x: | 22 Oct 2016 | |
21| <0.9.38 | :x: | Before 05 Feb 2016 | 21| 0.9.40 | :x: | 09 Sep 2016 | |
22| 0.9.38 | :x: | 31 May 2016 | |
23| <0.9.38 | :x: | Before 05 Feb 2016 | |
22 24
23## Security vulnerabilities 25## Security vulnerabilities
24 26
diff --git a/ci/check/profiles/private-etc-always-required.sh b/ci/check/profiles/private-etc-always-required.sh
new file mode 100755
index 000000000..892b15aa4
--- /dev/null
+++ b/ci/check/profiles/private-etc-always-required.sh
@@ -0,0 +1,15 @@
1#!/bin/bash
2
3ALWAYS_REQUIRED=(alternatives ld.so.cache ld.so.preload)
4
5error=0
6while IFS=: read -r profile private_etc; do
7 for required in "${ALWAYS_REQUIRED[@]}"; do
8 if grep -q -v -E "( |,)$required(,|$)" <<<"$private_etc"; then
9 printf '%s misses %s\n' "$profile" "$required" >&2
10 error=1
11 fi
12 done
13done < <(grep "^private-etc " "$@")
14
15exit "$error"
diff --git a/ci/check/profiles/sort-disable-programs.sh b/ci/check/profiles/sort-disable-programs.sh
new file mode 100755
index 000000000..d81ee75d7
--- /dev/null
+++ b/ci/check/profiles/sort-disable-programs.sh
@@ -0,0 +1,2 @@
1#!/bin/sh
2tail -n +5 "$1" | LC_ALL=C sort -c -u
diff --git a/ci/check/profiles/sort-firecfg.config.sh b/ci/check/profiles/sort-firecfg.config.sh
new file mode 100755
index 000000000..17a595350
--- /dev/null
+++ b/ci/check/profiles/sort-firecfg.config.sh
@@ -0,0 +1,2 @@
1#!/bin/sh
2tail -n +4 "$1" | sed 's/^# /#/' | LC_ALL=C sort -c -d
diff --git a/ci/check/profiles/sort.py b/ci/check/profiles/sort.py
new file mode 120000
index 000000000..e1f3f5f16
--- /dev/null
+++ b/ci/check/profiles/sort.py
@@ -0,0 +1 @@
../../../contrib/sort.py \ No newline at end of file
diff --git a/configure b/configure
index e5e0dcc0d..6611a8817 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
1#! /bin/sh 1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles. 2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for firejail 0.9.65. 3# Generated by GNU Autoconf 2.69 for firejail 0.9.69.
4# 4#
5# Report bugs to <netblue30@protonmail.com>. 5# Report bugs to <netblue30@protonmail.com>.
6# 6#
@@ -580,8 +580,8 @@ MAKEFLAGS=
580# Identity of this package. 580# Identity of this package.
581PACKAGE_NAME='firejail' 581PACKAGE_NAME='firejail'
582PACKAGE_TARNAME='firejail' 582PACKAGE_TARNAME='firejail'
583PACKAGE_VERSION='0.9.65' 583PACKAGE_VERSION='0.9.69'
584PACKAGE_STRING='firejail 0.9.65' 584PACKAGE_STRING='firejail 0.9.69'
585PACKAGE_BUGREPORT='netblue30@protonmail.com' 585PACKAGE_BUGREPORT='netblue30@protonmail.com'
586PACKAGE_URL='https://firejail.wordpress.com' 586PACKAGE_URL='https://firejail.wordpress.com'
587 587
@@ -628,13 +628,13 @@ EGREP
628GREP 628GREP
629CPP 629CPP
630HAVE_LTS 630HAVE_LTS
631HAVE_ONLY_SYSCFG_PROFILES
631HAVE_FORCE_NONEWPRIVS 632HAVE_FORCE_NONEWPRIVS
632HAVE_CONTRIB_INSTALL 633HAVE_CONTRIB_INSTALL
633HAVE_GCOV 634HAVE_GCOV
634BUSYBOX_WORKAROUND 635BUSYBOX_WORKAROUND
635HAVE_FATAL_WARNINGS 636HAVE_FATAL_WARNINGS
636HAVE_SUID 637HAVE_SUID
637HAVE_WHITELIST
638HAVE_FILE_TRANSFER 638HAVE_FILE_TRANSFER
639HAVE_X11 639HAVE_X11
640HAVE_USERNS 640HAVE_USERNS
@@ -652,12 +652,12 @@ HAVE_DBUSPROXY
652EXTRA_LDFLAGS 652EXTRA_LDFLAGS
653EXTRA_CFLAGS 653EXTRA_CFLAGS
654HAVE_SELINUX 654HAVE_SELINUX
655HAVE_APPARMOR
656AA_LIBS 655AA_LIBS
657AA_CFLAGS 656AA_CFLAGS
658PKG_CONFIG_LIBDIR 657PKG_CONFIG_LIBDIR
659PKG_CONFIG_PATH 658PKG_CONFIG_PATH
660PKG_CONFIG 659PKG_CONFIG
660HAVE_APPARMOR
661RANLIB 661RANLIB
662INSTALL_DATA 662INSTALL_DATA
663INSTALL_SCRIPT 663INSTALL_SCRIPT
@@ -712,6 +712,7 @@ ac_subst_files=''
712ac_user_opts=' 712ac_user_opts='
713enable_option_checking 713enable_option_checking
714enable_analyzer 714enable_analyzer
715enable_sanitizer
715enable_apparmor 716enable_apparmor
716enable_selinux 717enable_selinux
717enable_dbusproxy 718enable_dbusproxy
@@ -726,13 +727,13 @@ enable_network
726enable_userns 727enable_userns
727enable_x11 728enable_x11
728enable_file_transfer 729enable_file_transfer
729enable_whitelist
730enable_suid 730enable_suid
731enable_fatal_warnings 731enable_fatal_warnings
732enable_busybox_workaround 732enable_busybox_workaround
733enable_gcov 733enable_gcov
734enable_contrib_install 734enable_contrib_install
735enable_force_nonewprivs 735enable_force_nonewprivs
736enable_only_syscfg_profiles
736enable_lts 737enable_lts
737' 738'
738 ac_precious_vars='build_alias 739 ac_precious_vars='build_alias
@@ -1299,7 +1300,7 @@ if test "$ac_init_help" = "long"; then
1299 # Omit some internal or obsolete options to make the list less imposing. 1300 # Omit some internal or obsolete options to make the list less imposing.
1300 # This message is too long to be a string in the A/UX 3.1 sh. 1301 # This message is too long to be a string in the A/UX 3.1 sh.
1301 cat <<_ACEOF 1302 cat <<_ACEOF
1302\`configure' configures firejail 0.9.65 to adapt to many kinds of systems. 1303\`configure' configures firejail 0.9.69 to adapt to many kinds of systems.
1303 1304
1304Usage: $0 [OPTION]... [VAR=VALUE]... 1305Usage: $0 [OPTION]... [VAR=VALUE]...
1305 1306
@@ -1361,7 +1362,7 @@ fi
1361 1362
1362if test -n "$ac_init_help"; then 1363if test -n "$ac_init_help"; then
1363 case $ac_init_help in 1364 case $ac_init_help in
1364 short | recursive ) echo "Configuration of firejail 0.9.65:";; 1365 short | recursive ) echo "Configuration of firejail 0.9.69:";;
1365 esac 1366 esac
1366 cat <<\_ACEOF 1367 cat <<\_ACEOF
1367 1368
@@ -1369,7 +1370,9 @@ Optional Features:
1369 --disable-option-checking ignore unrecognized --enable/--with options 1370 --disable-option-checking ignore unrecognized --enable/--with options
1370 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 1371 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1371 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 1372 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1372 --enable-analyzer enable GCC 10 static analyzer 1373 --enable-analyzer enable GCC static analyzer
1374 --enable-sanitizer=[address | memory | undefined]
1375 enable a compiler-based sanitizer (debug)
1373 --enable-apparmor enable apparmor 1376 --enable-apparmor enable apparmor
1374 --enable-selinux SELinux labeling support 1377 --enable-selinux SELinux labeling support
1375 --disable-dbusproxy disable dbus proxy 1378 --disable-dbusproxy disable dbus proxy
@@ -1379,13 +1382,12 @@ Optional Features:
1379 --disable-firetunnel disable firetunnel 1382 --disable-firetunnel disable firetunnel
1380 --disable-private-home disable private home feature 1383 --disable-private-home disable private home feature
1381 --disable-chroot disable chroot 1384 --disable-chroot disable chroot
1382 --disable-globalcfg if the global config file firejail.cfg is not 1385 --disable-globalcfg if the global config file firejail.config is not
1383 present, continue the program using defaults 1386 present, continue the program using defaults
1384 --disable-network disable network 1387 --disable-network disable network
1385 --disable-userns disable user namespace 1388 --disable-userns disable user namespace
1386 --disable-x11 disable X11 sandboxing support 1389 --disable-x11 disable X11 sandboxing support
1387 --disable-file-transfer disable file transfer 1390 --disable-file-transfer disable file transfer
1388 --disable-whitelist disable whitelist
1389 --disable-suid install as a non-SUID executable 1391 --disable-suid install as a non-SUID executable
1390 --enable-fatal-warnings -W -Wall -Werror 1392 --enable-fatal-warnings -W -Wall -Werror
1391 --enable-busybox-workaround 1393 --enable-busybox-workaround
@@ -1395,6 +1397,8 @@ Optional Features:
1395 install contrib scripts 1397 install contrib scripts
1396 --enable-force-nonewprivs 1398 --enable-force-nonewprivs
1397 enable force nonewprivs 1399 enable force nonewprivs
1400 --enable-only-syscfg-profiles
1401 disable profiles in $HOME/.config/firejail
1398 --enable-lts enable long-term support software version (LTS) 1402 --enable-lts enable long-term support software version (LTS)
1399 1403
1400Some influential environment variables: 1404Some influential environment variables:
@@ -1481,7 +1485,7 @@ fi
1481test -n "$ac_init_help" && exit $ac_status 1485test -n "$ac_init_help" && exit $ac_status
1482if $ac_init_version; then 1486if $ac_init_version; then
1483 cat <<\_ACEOF 1487 cat <<\_ACEOF
1484firejail configure 0.9.65 1488firejail configure 0.9.69
1485generated by GNU Autoconf 2.69 1489generated by GNU Autoconf 2.69
1486 1490
1487Copyright (C) 2012 Free Software Foundation, Inc. 1491Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1533,52 +1537,6 @@ fi
1533 1537
1534} # ac_fn_c_try_compile 1538} # ac_fn_c_try_compile
1535 1539
1536# ac_fn_c_try_link LINENO
1537# -----------------------
1538# Try to link conftest.$ac_ext, and return whether this succeeded.
1539ac_fn_c_try_link ()
1540{
1541 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1542 rm -f conftest.$ac_objext conftest$ac_exeext
1543 if { { ac_try="$ac_link"
1544case "(($ac_try" in
1545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1546 *) ac_try_echo=$ac_try;;
1547esac
1548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1549$as_echo "$ac_try_echo"; } >&5
1550 (eval "$ac_link") 2>conftest.err
1551 ac_status=$?
1552 if test -s conftest.err; then
1553 grep -v '^ *+' conftest.err >conftest.er1
1554 cat conftest.er1 >&5
1555 mv -f conftest.er1 conftest.err
1556 fi
1557 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1558 test $ac_status = 0; } && {
1559 test -z "$ac_c_werror_flag" ||
1560 test ! -s conftest.err
1561 } && test -s conftest$ac_exeext && {
1562 test "$cross_compiling" = yes ||
1563 test -x conftest$ac_exeext
1564 }; then :
1565 ac_retval=0
1566else
1567 $as_echo "$as_me: failed program was:" >&5
1568sed 's/^/| /' conftest.$ac_ext >&5
1569
1570 ac_retval=1
1571fi
1572 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1573 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1574 # interfere with the next link command; also delete a directory that is
1575 # left behind by Apple's compiler. We do this before executing the actions.
1576 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1577 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1578 as_fn_set_status $ac_retval
1579
1580} # ac_fn_c_try_link
1581
1582# ac_fn_c_try_cpp LINENO 1540# ac_fn_c_try_cpp LINENO
1583# ---------------------- 1541# ----------------------
1584# Try to preprocess conftest.$ac_ext, and return whether this succeeded. 1542# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
@@ -1783,7 +1741,7 @@ cat >config.log <<_ACEOF
1783This file contains any messages produced by compilers while 1741This file contains any messages produced by compilers while
1784running configure, to aid debugging if configure makes a mistake. 1742running configure, to aid debugging if configure makes a mistake.
1785 1743
1786It was created by firejail $as_me 0.9.65, which was 1744It was created by firejail $as_me 0.9.69, which was
1787generated by GNU Autoconf 2.69. Invocation command line was 1745generated by GNU Autoconf 2.69. Invocation command line was
1788 1746
1789 $ $0 $@ 1747 $ $0 $@
@@ -3171,7 +3129,7 @@ fi
3171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mindirect_branch_thunk" >&5 3129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mindirect_branch_thunk" >&5
3172$as_echo "$ax_cv_check_cflags___mindirect_branch_thunk" >&6; } 3130$as_echo "$ax_cv_check_cflags___mindirect_branch_thunk" >&6; }
3173if test "x$ax_cv_check_cflags___mindirect_branch_thunk" = xyes; then : 3131if test "x$ax_cv_check_cflags___mindirect_branch_thunk" = xyes; then :
3174 HAVE_SPECTRE="yes" && EXTRA_CFLAGS+=" -mindirect-branch=thunk" 3132 HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -mindirect-branch=thunk"
3175 3133
3176else 3134else
3177 : 3135 :
@@ -3207,7 +3165,7 @@ fi
3207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mretpoline" >&5 3165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mretpoline" >&5
3208$as_echo "$ax_cv_check_cflags___mretpoline" >&6; } 3166$as_echo "$ax_cv_check_cflags___mretpoline" >&6; }
3209if test "x$ax_cv_check_cflags___mretpoline" = xyes; then : 3167if test "x$ax_cv_check_cflags___mretpoline" = xyes; then :
3210 HAVE_SPECTRE="yes" && EXTRA_CFLAGS+=" -mretpoline" 3168 HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -mretpoline"
3211 3169
3212else 3170else
3213 : 3171 :
@@ -3243,7 +3201,7 @@ fi
3243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fstack_clash_protection" >&5 3201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fstack_clash_protection" >&5
3244$as_echo "$ax_cv_check_cflags___fstack_clash_protection" >&6; } 3202$as_echo "$ax_cv_check_cflags___fstack_clash_protection" >&6; }
3245if test "x$ax_cv_check_cflags___fstack_clash_protection" = xyes; then : 3203if test "x$ax_cv_check_cflags___fstack_clash_protection" = xyes; then :
3246 HAVE_SPECTRE="yes" && EXTRA_CFLAGS+=" -fstack-clash-protection" 3204 HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -fstack-clash-protection"
3247 3205
3248else 3206else
3249 : 3207 :
@@ -3279,7 +3237,7 @@ fi
3279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fstack_protector_strong" >&5 3237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fstack_protector_strong" >&5
3280$as_echo "$ax_cv_check_cflags___fstack_protector_strong" >&6; } 3238$as_echo "$ax_cv_check_cflags___fstack_protector_strong" >&6; }
3281if test "x$ax_cv_check_cflags___fstack_protector_strong" = xyes; then : 3239if test "x$ax_cv_check_cflags___fstack_protector_strong" = xyes; then :
3282 HAVE_SPECTRE="yes" && EXTRA_CFLAGS+=" -fstack-protector-strong" 3240 HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -fstack-protector-strong"
3283 3241
3284else 3242else
3285 : 3243 :
@@ -3293,11 +3251,63 @@ fi
3293 3251
3294if test "x$enable_analyzer" = "xyes"; then : 3252if test "x$enable_analyzer" = "xyes"; then :
3295 3253
3296 EXTRA_CFLAGS+=" -fanalyzer" 3254 EXTRA_CFLAGS="$EXTRA_CFLAGS -fanalyzer -Wno-analyzer-malloc-leak"
3255
3256fi
3257
3258# Check whether --enable-sanitizer was given.
3259if test "${enable_sanitizer+set}" = set; then :
3260 enableval=$enable_sanitizer;
3261else
3262 enable_sanitizer=no
3263fi
3264
3265if test "x$enable_sanitizer" != "xno" ; then :
3266 as_CACHEVAR=`$as_echo "ax_cv_check_cflags__-fsanitize=$enable_sanitizer" | $as_tr_sh`
3267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fsanitize=$enable_sanitizer" >&5
3268$as_echo_n "checking whether C compiler accepts -fsanitize=$enable_sanitizer... " >&6; }
3269if eval \${$as_CACHEVAR+:} false; then :
3270 $as_echo_n "(cached) " >&6
3271else
3272
3273 ax_check_save_flags=$CFLAGS
3274 CFLAGS="$CFLAGS -fsanitize=$enable_sanitizer"
3275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3276/* end confdefs.h. */
3277
3278int
3279main ()
3280{
3281
3282 ;
3283 return 0;
3284}
3285_ACEOF
3286if ac_fn_c_try_compile "$LINENO"; then :
3287 eval "$as_CACHEVAR=yes"
3288else
3289 eval "$as_CACHEVAR=no"
3290fi
3291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3292 CFLAGS=$ax_check_save_flags
3293fi
3294eval ac_res=\$$as_CACHEVAR
3295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3296$as_echo "$ac_res" >&6; }
3297if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
3298
3299 EXTRA_CFLAGS="$EXTRA_CFLAGS -fsanitize=$enable_sanitizer -fno-omit-frame-pointer"
3300 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -fsanitize=$enable_sanitizer"
3301
3302else
3303 as_fn_error $? "sanitizer not supported: $enable_sanitizer" "$LINENO" 5
3304
3305fi
3297 3306
3298fi 3307fi
3299 3308
3300HAVE_APPARMOR="" 3309HAVE_APPARMOR=""
3310
3301# Check whether --enable-apparmor was given. 3311# Check whether --enable-apparmor was given.
3302if test "${enable_apparmor+set}" = set; then : 3312if test "${enable_apparmor+set}" = set; then :
3303 enableval=$enable_apparmor; 3313 enableval=$enable_apparmor;
@@ -3428,8 +3438,8 @@ if test "x$enable_apparmor" = "xyes"; then :
3428 HAVE_APPARMOR="-DHAVE_APPARMOR" 3438 HAVE_APPARMOR="-DHAVE_APPARMOR"
3429 3439
3430pkg_failed=no 3440pkg_failed=no
3431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AA" >&5 3441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libapparmor" >&5
3432$as_echo_n "checking for AA... " >&6; } 3442$as_echo_n "checking for libapparmor... " >&6; }
3433 3443
3434if test -n "$AA_CFLAGS"; then 3444if test -n "$AA_CFLAGS"; then
3435 pkg_cv_AA_CFLAGS="$AA_CFLAGS" 3445 pkg_cv_AA_CFLAGS="$AA_CFLAGS"
@@ -3469,7 +3479,7 @@ fi
3469 3479
3470 3480
3471if test $pkg_failed = yes; then 3481if test $pkg_failed = yes; then
3472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3473$as_echo "no" >&6; } 3483$as_echo "no" >&6; }
3474 3484
3475if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 3485if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -3496,7 +3506,7 @@ Alternatively, you may set the environment variables AA_CFLAGS
3496and AA_LIBS to avoid the need to call pkg-config. 3506and AA_LIBS to avoid the need to call pkg-config.
3497See the pkg-config man page for more details." "$LINENO" 5 3507See the pkg-config man page for more details." "$LINENO" 5
3498elif test $pkg_failed = untried; then 3508elif test $pkg_failed = untried; then
3499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3500$as_echo "no" >&6; } 3510$as_echo "no" >&6; }
3501 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3511 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3502$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 3512$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -3515,13 +3525,13 @@ else
3515 AA_LIBS=$pkg_cv_AA_LIBS 3525 AA_LIBS=$pkg_cv_AA_LIBS
3516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 3526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3517$as_echo "yes" >&6; } 3527$as_echo "yes" >&6; }
3518 EXTRA_CFLAGS+=" $AA_CFLAGS" && EXTRA_LDFLAGS+=" $AA_LIBS" 3528 EXTRA_CFLAGS="$EXTRA_CFLAGS $AA_CFLAGS" && EXTRA_LDFLAGS="$EXTRA_LDFLAGS $AA_LIBS"
3519fi 3529fi
3520 3530
3521
3522fi 3531fi
3523 3532
3524HAVE_SELINUX="" 3533HAVE_SELINUX=""
3534
3525# Check whether --enable-selinux was given. 3535# Check whether --enable-selinux was given.
3526if test "${enable_selinux+set}" = set; then : 3536if test "${enable_selinux+set}" = set; then :
3527 enableval=$enable_selinux; 3537 enableval=$enable_selinux;
@@ -3530,8 +3540,7 @@ fi
3530if test "x$enable_selinux" = "xyes"; then : 3540if test "x$enable_selinux" = "xyes"; then :
3531 3541
3532 HAVE_SELINUX="-DHAVE_SELINUX" 3542 HAVE_SELINUX="-DHAVE_SELINUX"
3533 EXTRA_LDFLAGS+=" -lselinux " 3543 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lselinux"
3534
3535 3544
3536fi 3545fi
3537 3546
@@ -3540,6 +3549,7 @@ fi
3540 3549
3541 3550
3542HAVE_DBUSPROXY="" 3551HAVE_DBUSPROXY=""
3552
3543# Check whether --enable-dbusproxy was given. 3553# Check whether --enable-dbusproxy was given.
3544if test "${enable_dbusproxy+set}" = set; then : 3554if test "${enable_dbusproxy+set}" = set; then :
3545 enableval=$enable_dbusproxy; 3555 enableval=$enable_dbusproxy;
@@ -3549,21 +3559,19 @@ if test "x$enable_dbusproxy" != "xno"; then :
3549 3559
3550 HAVE_DBUSPROXY="-DHAVE_DBUSPROXY" 3560 HAVE_DBUSPROXY="-DHAVE_DBUSPROXY"
3551 3561
3552
3553fi 3562fi
3554 3563
3555# overlayfs features temporarely disabled pending fixes 3564# overlayfs features temporarily disabled pending fixes
3556HAVE_OVERLAYFS="" 3565HAVE_OVERLAYFS=""
3557 3566
3558#
3559#AC_ARG_ENABLE([overlayfs], 3567#AC_ARG_ENABLE([overlayfs],
3560# AS_HELP_STRING([--disable-overlayfs], [disable overlayfs])) 3568# [AS_HELP_STRING([--disable-overlayfs], [disable overlayfs])])
3561#AS_IF([test "x$enable_overlayfs" != "xno"], [ 3569#AS_IF([test "x$enable_overlayfs" != "xno"], [
3562# HAVE_OVERLAYFS="-DHAVE_OVERLAYFS" 3570# HAVE_OVERLAYFS="-DHAVE_OVERLAYFS"
3563# AC_SUBST(HAVE_OVERLAYFS)
3564#]) 3571#])
3565 3572
3566HAVE_OUTPUT="" 3573HAVE_OUTPUT=""
3574
3567# Check whether --enable-output was given. 3575# Check whether --enable-output was given.
3568if test "${enable_output+set}" = set; then : 3576if test "${enable_output+set}" = set; then :
3569 enableval=$enable_output; 3577 enableval=$enable_output;
@@ -3573,10 +3581,10 @@ if test "x$enable_output" != "xno"; then :
3573 3581
3574 HAVE_OUTPUT="-DHAVE_OUTPUT" 3582 HAVE_OUTPUT="-DHAVE_OUTPUT"
3575 3583
3576
3577fi 3584fi
3578 3585
3579HAVE_USERTMPFS="" 3586HAVE_USERTMPFS=""
3587
3580# Check whether --enable-usertmpfs was given. 3588# Check whether --enable-usertmpfs was given.
3581if test "${enable_usertmpfs+set}" = set; then : 3589if test "${enable_usertmpfs+set}" = set; then :
3582 enableval=$enable_usertmpfs; 3590 enableval=$enable_usertmpfs;
@@ -3586,10 +3594,10 @@ if test "x$enable_usertmpfs" != "xno"; then :
3586 3594
3587 HAVE_USERTMPFS="-DHAVE_USERTMPFS" 3595 HAVE_USERTMPFS="-DHAVE_USERTMPFS"
3588 3596
3589
3590fi 3597fi
3591 3598
3592HAVE_MAN="no" 3599HAVE_MAN="no"
3600
3593# Check whether --enable-man was given. 3601# Check whether --enable-man was given.
3594if test "${enable_man+set}" = set; then : 3602if test "${enable_man+set}" = set; then :
3595 enableval=$enable_man; 3603 enableval=$enable_man;
@@ -3598,7 +3606,6 @@ fi
3598if test "x$enable_man" != "xno"; then : 3606if test "x$enable_man" != "xno"; then :
3599 3607
3600 HAVE_MAN="-DHAVE_MAN" 3608 HAVE_MAN="-DHAVE_MAN"
3601
3602 # Extract the first word of "gawk", so it can be a program name with args. 3609 # Extract the first word of "gawk", so it can be a program name with args.
3603set dummy gawk; ac_word=$2 3610set dummy gawk; ac_word=$2
3604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -3638,12 +3645,13 @@ fi
3638 3645
3639 3646
3640 if test "x$HAVE_GAWK" != "xyes"; then : 3647 if test "x$HAVE_GAWK" != "xyes"; then :
3641 as_fn_error $? "\"*** gawk not found ***\"" "$LINENO" 5 3648 as_fn_error $? "*** gawk not found ***" "$LINENO" 5
3642fi 3649fi
3643 3650
3644fi 3651fi
3645 3652
3646HAVE_FIRETUNNEL="" 3653HAVE_FIRETUNNEL=""
3654
3647# Check whether --enable-firetunnel was given. 3655# Check whether --enable-firetunnel was given.
3648if test "${enable_firetunnel+set}" = set; then : 3656if test "${enable_firetunnel+set}" = set; then :
3649 enableval=$enable_firetunnel; 3657 enableval=$enable_firetunnel;
@@ -3653,10 +3661,10 @@ if test "x$enable_firetunnel" != "xno"; then :
3653 3661
3654 HAVE_FIRETUNNEL="-DHAVE_FIRETUNNEL" 3662 HAVE_FIRETUNNEL="-DHAVE_FIRETUNNEL"
3655 3663
3656
3657fi 3664fi
3658 3665
3659HAVE_PRIVATEHOME="" 3666HAVE_PRIVATE_HOME=""
3667
3660# Check whether --enable-private-home was given. 3668# Check whether --enable-private-home was given.
3661if test "${enable_private_home+set}" = set; then : 3669if test "${enable_private_home+set}" = set; then :
3662 enableval=$enable_private_home; 3670 enableval=$enable_private_home;
@@ -3666,10 +3674,10 @@ if test "x$enable_private_home" != "xno"; then :
3666 3674
3667 HAVE_PRIVATE_HOME="-DHAVE_PRIVATE_HOME" 3675 HAVE_PRIVATE_HOME="-DHAVE_PRIVATE_HOME"
3668 3676
3669
3670fi 3677fi
3671 3678
3672HAVE_CHROOT="" 3679HAVE_CHROOT=""
3680
3673# Check whether --enable-chroot was given. 3681# Check whether --enable-chroot was given.
3674if test "${enable_chroot+set}" = set; then : 3682if test "${enable_chroot+set}" = set; then :
3675 enableval=$enable_chroot; 3683 enableval=$enable_chroot;
@@ -3679,10 +3687,10 @@ if test "x$enable_chroot" != "xno"; then :
3679 3687
3680 HAVE_CHROOT="-DHAVE_CHROOT" 3688 HAVE_CHROOT="-DHAVE_CHROOT"
3681 3689
3682
3683fi 3690fi
3684 3691
3685HAVE_GLOBALCFG="" 3692HAVE_GLOBALCFG=""
3693
3686# Check whether --enable-globalcfg was given. 3694# Check whether --enable-globalcfg was given.
3687if test "${enable_globalcfg+set}" = set; then : 3695if test "${enable_globalcfg+set}" = set; then :
3688 enableval=$enable_globalcfg; 3696 enableval=$enable_globalcfg;
@@ -3692,10 +3700,10 @@ if test "x$enable_globalcfg" != "xno"; then :
3692 3700
3693 HAVE_GLOBALCFG="-DHAVE_GLOBALCFG" 3701 HAVE_GLOBALCFG="-DHAVE_GLOBALCFG"
3694 3702
3695
3696fi 3703fi
3697 3704
3698HAVE_NETWORK="" 3705HAVE_NETWORK=""
3706
3699# Check whether --enable-network was given. 3707# Check whether --enable-network was given.
3700if test "${enable_network+set}" = set; then : 3708if test "${enable_network+set}" = set; then :
3701 enableval=$enable_network; 3709 enableval=$enable_network;
@@ -3705,10 +3713,10 @@ if test "x$enable_network" != "xno"; then :
3705 3713
3706 HAVE_NETWORK="-DHAVE_NETWORK" 3714 HAVE_NETWORK="-DHAVE_NETWORK"
3707 3715
3708
3709fi 3716fi
3710 3717
3711HAVE_USERNS="" 3718HAVE_USERNS=""
3719
3712# Check whether --enable-userns was given. 3720# Check whether --enable-userns was given.
3713if test "${enable_userns+set}" = set; then : 3721if test "${enable_userns+set}" = set; then :
3714 enableval=$enable_userns; 3722 enableval=$enable_userns;
@@ -3718,10 +3726,10 @@ if test "x$enable_userns" != "xno"; then :
3718 3726
3719 HAVE_USERNS="-DHAVE_USERNS" 3727 HAVE_USERNS="-DHAVE_USERNS"
3720 3728
3721
3722fi 3729fi
3723 3730
3724HAVE_X11="" 3731HAVE_X11=""
3732
3725# Check whether --enable-x11 was given. 3733# Check whether --enable-x11 was given.
3726if test "${enable_x11+set}" = set; then : 3734if test "${enable_x11+set}" = set; then :
3727 enableval=$enable_x11; 3735 enableval=$enable_x11;
@@ -3731,10 +3739,10 @@ if test "x$enable_x11" != "xno"; then :
3731 3739
3732 HAVE_X11="-DHAVE_X11" 3740 HAVE_X11="-DHAVE_X11"
3733 3741
3734
3735fi 3742fi
3736 3743
3737HAVE_FILE_TRANSFER="" 3744HAVE_FILE_TRANSFER=""
3745
3738# Check whether --enable-file-transfer was given. 3746# Check whether --enable-file-transfer was given.
3739if test "${enable_file_transfer+set}" = set; then : 3747if test "${enable_file_transfer+set}" = set; then :
3740 enableval=$enable_file_transfer; 3748 enableval=$enable_file_transfer;
@@ -3744,37 +3752,23 @@ if test "x$enable_file_transfer" != "xno"; then :
3744 3752
3745 HAVE_FILE_TRANSFER="-DHAVE_FILE_TRANSFER" 3753 HAVE_FILE_TRANSFER="-DHAVE_FILE_TRANSFER"
3746 3754
3747
3748fi
3749
3750HAVE_WHITELIST=""
3751# Check whether --enable-whitelist was given.
3752if test "${enable_whitelist+set}" = set; then :
3753 enableval=$enable_whitelist;
3754fi
3755
3756if test "x$enable_whitelist" != "xno"; then :
3757
3758 HAVE_WHITELIST="-DHAVE_WHITELIST"
3759
3760
3761fi 3755fi
3762 3756
3763HAVE_SUID="" 3757HAVE_SUID=""
3758
3764# Check whether --enable-suid was given. 3759# Check whether --enable-suid was given.
3765if test "${enable_suid+set}" = set; then : 3760if test "${enable_suid+set}" = set; then :
3766 enableval=$enable_suid; 3761 enableval=$enable_suid;
3767fi 3762fi
3768 3763
3769if test "x$enable_suid" = "xno"; then : 3764if test "x$enable_suid" != "xno"; then :
3770 HAVE_SUID="no"
3771else
3772 HAVE_SUID="yes"
3773 3765
3774fi 3766 HAVE_SUID="-DHAVE_SUID"
3775 3767
3768fi
3776 3769
3777HAVE_FATAL_WARNINGS="" 3770HAVE_FATAL_WARNINGS=""
3771
3778# Check whether --enable-fatal_warnings was given. 3772# Check whether --enable-fatal_warnings was given.
3779if test "${enable_fatal_warnings+set}" = set; then : 3773if test "${enable_fatal_warnings+set}" = set; then :
3780 enableval=$enable_fatal_warnings; 3774 enableval=$enable_fatal_warnings;
@@ -3784,10 +3778,10 @@ if test "x$enable_fatal_warnings" = "xyes"; then :
3784 3778
3785 HAVE_FATAL_WARNINGS="-W -Wall -Werror" 3779 HAVE_FATAL_WARNINGS="-W -Wall -Werror"
3786 3780
3787
3788fi 3781fi
3789 3782
3790BUSYBOX_WORKAROUND="no" 3783BUSYBOX_WORKAROUND="no"
3784
3791# Check whether --enable-busybox-workaround was given. 3785# Check whether --enable-busybox-workaround was given.
3792if test "${enable_busybox_workaround+set}" = set; then : 3786if test "${enable_busybox_workaround+set}" = set; then :
3793 enableval=$enable_busybox_workaround; 3787 enableval=$enable_busybox_workaround;
@@ -3797,11 +3791,11 @@ if test "x$enable_busybox_workaround" = "xyes"; then :
3797 3791
3798 BUSYBOX_WORKAROUND="yes" 3792 BUSYBOX_WORKAROUND="yes"
3799 3793
3800
3801fi 3794fi
3802 3795
3803 3796
3804HAVE_GCOV="" 3797HAVE_GCOV=""
3798
3805# Check whether --enable-gcov was given. 3799# Check whether --enable-gcov was given.
3806if test "${enable_gcov+set}" = set; then : 3800if test "${enable_gcov+set}" = set; then :
3807 enableval=$enable_gcov; 3801 enableval=$enable_gcov;
@@ -3809,27 +3803,26 @@ fi
3809 3803
3810if test "x$enable_gcov" = "xyes"; then : 3804if test "x$enable_gcov" = "xyes"; then :
3811 3805
3812 HAVE_GCOV="--coverage -DHAVE_GCOV " 3806 HAVE_GCOV="--coverage -DHAVE_GCOV"
3813 EXTRA_LDFLAGS+=" -lgcov --coverage " 3807 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lgcov --coverage"
3814
3815 3808
3816fi 3809fi
3817 3810
3818HAVE_CONTRIB_INSTALL="yes" 3811HAVE_CONTRIB_INSTALL="yes"
3812
3819# Check whether --enable-contrib-install was given. 3813# Check whether --enable-contrib-install was given.
3820if test "${enable_contrib_install+set}" = set; then : 3814if test "${enable_contrib_install+set}" = set; then :
3821 enableval=$enable_contrib_install; 3815 enableval=$enable_contrib_install;
3822fi 3816fi
3823 3817
3824if test "x$enable_contrib_install" = "xno"; then : 3818if test "x$enable_contrib_install" = "xno"; then :
3825 HAVE_CONTRIB_INSTALL="no"
3826else
3827 HAVE_CONTRIB_INSTALL="yes"
3828 3819
3829fi 3820 HAVE_CONTRIB_INSTALL="no"
3830 3821
3822fi
3831 3823
3832HAVE_FORCE_NONEWPRIVS="" 3824HAVE_FORCE_NONEWPRIVS=""
3825
3833# Check whether --enable-force-nonewprivs was given. 3826# Check whether --enable-force-nonewprivs was given.
3834if test "${enable_force_nonewprivs+set}" = set; then : 3827if test "${enable_force_nonewprivs+set}" = set; then :
3835 enableval=$enable_force_nonewprivs; 3828 enableval=$enable_force_nonewprivs;
@@ -3839,10 +3832,23 @@ if test "x$enable_force_nonewprivs" = "xyes"; then :
3839 3832
3840 HAVE_FORCE_NONEWPRIVS="-DHAVE_FORCE_NONEWPRIVS" 3833 HAVE_FORCE_NONEWPRIVS="-DHAVE_FORCE_NONEWPRIVS"
3841 3834
3835fi
3836
3837HAVE_ONLY_SYSCFG_PROFILES=""
3838
3839# Check whether --enable-only-syscfg-profiles was given.
3840if test "${enable_only_syscfg_profiles+set}" = set; then :
3841 enableval=$enable_only_syscfg_profiles;
3842fi
3843
3844if test "x$enable_only_syscfg_profiles" = "xyes"; then :
3845
3846 HAVE_ONLY_SYSCFG_PROFILES="-DHAVE_ONLY_SYSCFG_PROFILES"
3842 3847
3843fi 3848fi
3844 3849
3845HAVE_LTS="" 3850HAVE_LTS=""
3851
3846# Check whether --enable-lts was given. 3852# Check whether --enable-lts was given.
3847if test "${enable_lts+set}" = set; then : 3853if test "${enable_lts+set}" = set; then :
3848 enableval=$enable_lts; 3854 enableval=$enable_lts;
@@ -3851,98 +3857,22 @@ fi
3851if test "x$enable_lts" = "xyes"; then : 3857if test "x$enable_lts" = "xyes"; then :
3852 3858
3853 HAVE_LTS="-DHAVE_LTS" 3859 HAVE_LTS="-DHAVE_LTS"
3854
3855
3856 HAVE_DBUSPROXY="" 3860 HAVE_DBUSPROXY=""
3857
3858
3859 HAVE_OVERLAYFS="" 3861 HAVE_OVERLAYFS=""
3860
3861
3862 HAVE_OUTPUT="" 3862 HAVE_OUTPUT=""
3863
3864
3865 HAVE_USERTMPFS="" 3863 HAVE_USERTMPFS=""
3866
3867
3868 HAVE_MAN="-DHAVE_MAN" 3864 HAVE_MAN="-DHAVE_MAN"
3869
3870
3871 HAVE_FIRETUNNEL="" 3865 HAVE_FIRETUNNEL=""
3872 3866 HAVE_PRIVATE_HOME=""
3873
3874 HAVE_PRIVATEHOME=""
3875
3876
3877 HAVE_CHROOT="" 3867 HAVE_CHROOT=""
3878
3879
3880 HAVE_GLOBALCFG="" 3868 HAVE_GLOBALCFG=""
3881
3882
3883 HAVE_USERNS="" 3869 HAVE_USERNS=""
3884
3885
3886 HAVE_X11="" 3870 HAVE_X11=""
3887
3888
3889 HAVE_FILE_TRANSFER="" 3871 HAVE_FILE_TRANSFER=""
3890 3872 HAVE_SUID="-DHAVE_SUID"
3891
3892 HAVE_SUID="yes"
3893
3894
3895 BUSYBOX_WORKAROUND="no" 3873 BUSYBOX_WORKAROUND="no"
3896
3897
3898 HAVE_CONTRIB_INSTALL="no", 3874 HAVE_CONTRIB_INSTALL="no",
3899 3875
3900
3901fi
3902
3903
3904
3905
3906# checking pthread library
3907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5
3908$as_echo_n "checking for main in -lpthread... " >&6; }
3909if ${ac_cv_lib_pthread_main+:} false; then :
3910 $as_echo_n "(cached) " >&6
3911else
3912 ac_check_lib_save_LIBS=$LIBS
3913LIBS="-lpthread $LIBS"
3914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3915/* end confdefs.h. */
3916
3917
3918int
3919main ()
3920{
3921return main ();
3922 ;
3923 return 0;
3924}
3925_ACEOF
3926if ac_fn_c_try_link "$LINENO"; then :
3927 ac_cv_lib_pthread_main=yes
3928else
3929 ac_cv_lib_pthread_main=no
3930fi
3931rm -f core conftest.err conftest.$ac_objext \
3932 conftest$ac_exeext conftest.$ac_ext
3933LIBS=$ac_check_lib_save_LIBS
3934fi
3935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_main" >&5
3936$as_echo "$ac_cv_lib_pthread_main" >&6; }
3937if test "x$ac_cv_lib_pthread_main" = xyes; then :
3938 cat >>confdefs.h <<_ACEOF
3939#define HAVE_LIBPTHREAD 1
3940_ACEOF
3941
3942 LIBS="-lpthread $LIBS"
3943
3944else
3945 as_fn_error $? "*** POSIX thread support not installed ***" "$LINENO" 5
3946fi 3876fi
3947 3877
3948ac_ext=c 3878ac_ext=c
@@ -4342,14 +4272,6 @@ fi
4342done 4272done
4343 4273
4344 4274
4345ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
4346if test "x$ac_cv_header_pthread_h" = xyes; then :
4347
4348else
4349 as_fn_error $? "*** POSIX thread support not installed ***" "$LINENO" 5
4350fi
4351
4352
4353ac_fn_c_check_header_mongrel "$LINENO" "linux/seccomp.h" "ac_cv_header_linux_seccomp_h" "$ac_includes_default" 4275ac_fn_c_check_header_mongrel "$LINENO" "linux/seccomp.h" "ac_cv_header_linux_seccomp_h" "$ac_includes_default"
4354if test "x$ac_cv_header_linux_seccomp_h" = xyes; then : 4276if test "x$ac_cv_header_linux_seccomp_h" = xyes; then :
4355 4277
@@ -4366,7 +4288,7 @@ fi
4366 4288
4367ac_config_files="$ac_config_files mkdeb.sh" 4289ac_config_files="$ac_config_files mkdeb.sh"
4368 4290
4369ac_config_files="$ac_config_files Makefile src/common.mk src/lib/Makefile src/fcopy/Makefile src/fnet/Makefile src/firejail/Makefile src/fnetfilter/Makefile src/firemon/Makefile src/libtrace/Makefile src/libtracelog/Makefile src/firecfg/Makefile src/fbuilder/Makefile src/fsec-print/Makefile src/ftee/Makefile src/fseccomp/Makefile src/fldd/Makefile src/libpostexecseccomp/Makefile src/fsec-optimize/Makefile src/profstats/Makefile src/man/Makefile src/zsh_completion/Makefile src/bash_completion/Makefile test/Makefile src/jailtest/Makefile" 4291ac_config_files="$ac_config_files Makefile src/common.mk src/lib/Makefile src/fcopy/Makefile src/fnet/Makefile src/firejail/Makefile src/fnetfilter/Makefile src/firemon/Makefile src/libtrace/Makefile src/libtracelog/Makefile src/firecfg/Makefile src/fbuilder/Makefile src/fsec-print/Makefile src/ftee/Makefile src/fseccomp/Makefile src/fldd/Makefile src/libpostexecseccomp/Makefile src/fsec-optimize/Makefile src/profstats/Makefile src/man/Makefile src/zsh_completion/Makefile src/bash_completion/Makefile test/Makefile src/jailcheck/Makefile src/fids/Makefile src/fnettrace/Makefile"
4370 4292
4371cat >confcache <<\_ACEOF 4293cat >confcache <<\_ACEOF
4372# This file is a shell script that caches the results of configure 4294# This file is a shell script that caches the results of configure
@@ -4910,7 +4832,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
4910# report actual input values of CONFIG_FILES etc. instead of their 4832# report actual input values of CONFIG_FILES etc. instead of their
4911# values after options handling. 4833# values after options handling.
4912ac_log=" 4834ac_log="
4913This file was extended by firejail $as_me 0.9.65, which was 4835This file was extended by firejail $as_me 0.9.69, which was
4914generated by GNU Autoconf 2.69. Invocation command line was 4836generated by GNU Autoconf 2.69. Invocation command line was
4915 4837
4916 CONFIG_FILES = $CONFIG_FILES 4838 CONFIG_FILES = $CONFIG_FILES
@@ -4964,7 +4886,7 @@ _ACEOF
4964cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 4886cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4965ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 4887ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
4966ac_cs_version="\\ 4888ac_cs_version="\\
4967firejail config.status 0.9.65 4889firejail config.status 0.9.69
4968configured by $0, generated by GNU Autoconf 2.69, 4890configured by $0, generated by GNU Autoconf 2.69,
4969 with options \\"\$ac_cs_config\\" 4891 with options \\"\$ac_cs_config\\"
4970 4892
@@ -5099,7 +5021,9 @@ do
5099 "src/zsh_completion/Makefile") CONFIG_FILES="$CONFIG_FILES src/zsh_completion/Makefile" ;; 5021 "src/zsh_completion/Makefile") CONFIG_FILES="$CONFIG_FILES src/zsh_completion/Makefile" ;;
5100 "src/bash_completion/Makefile") CONFIG_FILES="$CONFIG_FILES src/bash_completion/Makefile" ;; 5022 "src/bash_completion/Makefile") CONFIG_FILES="$CONFIG_FILES src/bash_completion/Makefile" ;;
5101 "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; 5023 "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
5102 "src/jailtest/Makefile") CONFIG_FILES="$CONFIG_FILES src/jailtest/Makefile" ;; 5024 "src/jailcheck/Makefile") CONFIG_FILES="$CONFIG_FILES src/jailcheck/Makefile" ;;
5025 "src/fids/Makefile") CONFIG_FILES="$CONFIG_FILES src/fids/Makefile" ;;
5026 "src/fnettrace/Makefile") CONFIG_FILES="$CONFIG_FILES src/fnettrace/Makefile" ;;
5103 5027
5104 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 5028 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
5105 esac 5029 esac
@@ -5560,47 +5484,49 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
5560fi 5484fi
5561 5485
5562 5486
5563echo 5487cat <<EOF
5564echo "Configuration options:" 5488
5565echo " prefix: $prefix" 5489Configuration options:
5566echo " sysconfdir: $sysconfdir" 5490 prefix: $prefix
5567echo " apparmor: $HAVE_APPARMOR" 5491 sysconfdir: $sysconfdir
5568echo " SELinux labeling support: $HAVE_SELINUX" 5492 apparmor: $HAVE_APPARMOR
5569echo " global config: $HAVE_GLOBALCFG" 5493 SELinux labeling support: $HAVE_SELINUX
5570echo " chroot: $HAVE_CHROOT" 5494 global config: $HAVE_GLOBALCFG
5571echo " network: $HAVE_NETWORK" 5495 chroot: $HAVE_CHROOT
5572echo " user namespace: $HAVE_USERNS" 5496 network: $HAVE_NETWORK
5573echo " X11 sandboxing support: $HAVE_X11" 5497 user namespace: $HAVE_USERNS
5574echo " whitelisting: $HAVE_WHITELIST" 5498 X11 sandboxing support: $HAVE_X11
5575echo " private home support: $HAVE_PRIVATE_HOME" 5499 private home support: $HAVE_PRIVATE_HOME
5576echo " file transfer support: $HAVE_FILE_TRANSFER" 5500 file transfer support: $HAVE_FILE_TRANSFER
5577echo " overlayfs support: $HAVE_OVERLAYFS" 5501 overlayfs support: $HAVE_OVERLAYFS
5578echo " DBUS proxy support: $HAVE_DBUSPROXY" 5502 DBUS proxy support: $HAVE_DBUSPROXY
5579echo " allow tmpfs as regular user: $HAVE_USERTMPFS" 5503 allow tmpfs as regular user: $HAVE_USERTMPFS
5580echo " enable --ouput logging: $HAVE_OUTPUT" 5504 enable --ouput logging: $HAVE_OUTPUT
5581echo " Manpage support: $HAVE_MAN" 5505 Manpage support: $HAVE_MAN
5582echo " firetunnel support: $HAVE_FIRETUNNEL" 5506 firetunnel support: $HAVE_FIRETUNNEL
5583echo " busybox workaround: $BUSYBOX_WORKAROUND" 5507 busybox workaround: $BUSYBOX_WORKAROUND
5584echo " Spectre compiler patch: $HAVE_SPECTRE" 5508 Spectre compiler patch: $HAVE_SPECTRE
5585echo " EXTRA_LDFLAGS: $EXTRA_LDFLAGS" 5509 EXTRA_LDFLAGS: $EXTRA_LDFLAGS
5586echo " EXTRA_CFLAGS: $EXTRA_CFLAGS" 5510 EXTRA_CFLAGS: $EXTRA_CFLAGS
5587echo " fatal warnings: $HAVE_FATAL_WARNINGS" 5511 fatal warnings: $HAVE_FATAL_WARNINGS
5588echo " Gcov instrumentation: $HAVE_GCOV" 5512 Gcov instrumentation: $HAVE_GCOV
5589echo " Install contrib scripts: $HAVE_CONTRIB_INSTALL" 5513 Install contrib scripts: $HAVE_CONTRIB_INSTALL
5590echo " Install as a SUID executable: $HAVE_SUID" 5514 Install as a SUID executable: $HAVE_SUID
5591echo " LTS: $HAVE_LTS" 5515 LTS: $HAVE_LTS
5592echo " Always enforce filters: $HAVE_FORCE_NONEWPRIVS" 5516 Always enforce filters: $HAVE_FORCE_NONEWPRIVS
5593echo 5517 Disable user profiles: $HAVE_ONLY_SYSCFG_PROFILES
5594 5518
5519EOF
5595 5520
5596if test "$HAVE_LTS" = -DHAVE_LTS; then 5521if test "$HAVE_LTS" = -DHAVE_LTS; then
5597 echo 5522 cat <<\EOF
5598 echo 5523
5599 echo "*********************************************************"
5600 echo "* Warning: Long-term support (LTS) was enabled! *"
5601 echo "* Most compile-time options have bean rewritten! *"
5602 echo "*********************************************************"
5603 echo
5604 echo
5605fi
5606 5524
5525*********************************************************
5526* Warning: Long-term support (LTS) was enabled! *
5527* Most compile-time options have bean rewritten! *
5528*********************************************************
5529
5530
5531EOF
5532fi
diff --git a/configure.ac b/configure.ac
index e8bd6fb80..4ca30e6d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,9 +12,10 @@
12# 12#
13 13
14AC_PREREQ([2.68]) 14AC_PREREQ([2.68])
15AC_INIT(firejail, 0.9.65, netblue30@protonmail.com, , https://firejail.wordpress.com) 15AC_INIT([firejail], [0.9.69], [netblue30@protonmail.com], [],
16AC_CONFIG_SRCDIR([src/firejail/main.c]) 16 [https://firejail.wordpress.com])
17 17
18AC_CONFIG_SRCDIR([src/firejail/main.c])
18AC_CONFIG_MACRO_DIR([m4]) 19AC_CONFIG_MACRO_DIR([m4])
19 20
20AC_PROG_CC 21AC_PROG_CC
@@ -24,43 +25,54 @@ AC_PROG_RANLIB
24HAVE_SPECTRE="no" 25HAVE_SPECTRE="no"
25AX_CHECK_COMPILE_FLAG( 26AX_CHECK_COMPILE_FLAG(
26 [-mindirect-branch=thunk], 27 [-mindirect-branch=thunk],
27 [HAVE_SPECTRE="yes" && EXTRA_CFLAGS+=" -mindirect-branch=thunk"] 28 [HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -mindirect-branch=thunk"]
28) 29)
29AX_CHECK_COMPILE_FLAG( 30AX_CHECK_COMPILE_FLAG(
30 [-mretpoline], 31 [-mretpoline],
31 [HAVE_SPECTRE="yes" && EXTRA_CFLAGS+=" -mretpoline"] 32 [HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -mretpoline"]
32) 33)
33AX_CHECK_COMPILE_FLAG( 34AX_CHECK_COMPILE_FLAG(
34 [-fstack-clash-protection], 35 [-fstack-clash-protection],
35 [HAVE_SPECTRE="yes" && EXTRA_CFLAGS+=" -fstack-clash-protection"] 36 [HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -fstack-clash-protection"]
36) 37)
37AX_CHECK_COMPILE_FLAG( 38AX_CHECK_COMPILE_FLAG(
38 [-fstack-protector-strong], 39 [-fstack-protector-strong],
39 [HAVE_SPECTRE="yes" && EXTRA_CFLAGS+=" -fstack-protector-strong"] 40 [HAVE_SPECTRE="yes" && EXTRA_CFLAGS="$EXTRA_CFLAGS -fstack-protector-strong"]
40) 41)
41 42
42AC_ARG_ENABLE([analyzer], 43AC_ARG_ENABLE([analyzer],
43 AS_HELP_STRING([--enable-analyzer], [enable GCC 10 static analyzer])) 44 [AS_HELP_STRING([--enable-analyzer], [enable GCC static analyzer])])
44AS_IF([test "x$enable_analyzer" = "xyes"], [ 45AS_IF([test "x$enable_analyzer" = "xyes"], [
45 EXTRA_CFLAGS+=" -fanalyzer" 46 EXTRA_CFLAGS="$EXTRA_CFLAGS -fanalyzer -Wno-analyzer-malloc-leak"
46]) 47])
47 48
49AC_ARG_ENABLE([sanitizer],
50 [AS_HELP_STRING([--enable-sanitizer=@<:@address | memory | undefined@:>@], [enable a compiler-based sanitizer (debug)])],
51 [], [enable_sanitizer=no])
52AS_IF([test "x$enable_sanitizer" != "xno" ],
53 [AX_CHECK_COMPILE_FLAG([-fsanitize=$enable_sanitizer], [
54 EXTRA_CFLAGS="$EXTRA_CFLAGS -fsanitize=$enable_sanitizer -fno-omit-frame-pointer"
55 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -fsanitize=$enable_sanitizer"
56 ], [AC_MSG_ERROR([sanitizer not supported: $enable_sanitizer])]
57)])
58
48HAVE_APPARMOR="" 59HAVE_APPARMOR=""
60AC_SUBST([HAVE_APPARMOR])
49AC_ARG_ENABLE([apparmor], 61AC_ARG_ENABLE([apparmor],
50 AS_HELP_STRING([--enable-apparmor], [enable apparmor])) 62 [AS_HELP_STRING([--enable-apparmor], [enable apparmor])])
51AS_IF([test "x$enable_apparmor" = "xyes"], [ 63AS_IF([test "x$enable_apparmor" = "xyes"], [
52 HAVE_APPARMOR="-DHAVE_APPARMOR" 64 HAVE_APPARMOR="-DHAVE_APPARMOR"
53 PKG_CHECK_MODULES([AA], libapparmor, [EXTRA_CFLAGS+=" $AA_CFLAGS" && EXTRA_LDFLAGS+=" $AA_LIBS"]) 65 PKG_CHECK_MODULES([AA], [libapparmor],
54 AC_SUBST(HAVE_APPARMOR) 66 [EXTRA_CFLAGS="$EXTRA_CFLAGS $AA_CFLAGS" && EXTRA_LDFLAGS="$EXTRA_LDFLAGS $AA_LIBS"])
55]) 67])
56 68
57HAVE_SELINUX="" 69HAVE_SELINUX=""
70AC_SUBST([HAVE_SELINUX])
58AC_ARG_ENABLE([selinux], 71AC_ARG_ENABLE([selinux],
59 AS_HELP_STRING([--enable-selinux], [SELinux labeling support])) 72 [AS_HELP_STRING([--enable-selinux], [SELinux labeling support])])
60AS_IF([test "x$enable_selinux" = "xyes"], [ 73AS_IF([test "x$enable_selinux" = "xyes"], [
61 HAVE_SELINUX="-DHAVE_SELINUX" 74 HAVE_SELINUX="-DHAVE_SELINUX"
62 EXTRA_LDFLAGS+=" -lselinux " 75 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lselinux"
63 AC_SUBST(HAVE_SELINUX)
64]) 76])
65 77
66AC_SUBST([EXTRA_CFLAGS]) 78AC_SUBST([EXTRA_CFLAGS])
@@ -68,234 +80,195 @@ AC_SUBST([EXTRA_LDFLAGS])
68 80
69 81
70HAVE_DBUSPROXY="" 82HAVE_DBUSPROXY=""
83AC_SUBST([HAVE_DBUSPROXY])
71AC_ARG_ENABLE([dbusproxy], 84AC_ARG_ENABLE([dbusproxy],
72 AS_HELP_STRING([--disable-dbusproxy], [disable dbus proxy])) 85 [AS_HELP_STRING([--disable-dbusproxy], [disable dbus proxy])])
73AS_IF([test "x$enable_dbusproxy" != "xno"], [ 86AS_IF([test "x$enable_dbusproxy" != "xno"], [
74 HAVE_DBUSPROXY="-DHAVE_DBUSPROXY" 87 HAVE_DBUSPROXY="-DHAVE_DBUSPROXY"
75 AC_SUBST(HAVE_DBUSPROXY)
76]) 88])
77 89
78# overlayfs features temporarely disabled pending fixes 90# overlayfs features temporarily disabled pending fixes
79HAVE_OVERLAYFS="" 91HAVE_OVERLAYFS=""
80AC_SUBST(HAVE_OVERLAYFS) 92AC_SUBST([HAVE_OVERLAYFS])
81#
82#AC_ARG_ENABLE([overlayfs], 93#AC_ARG_ENABLE([overlayfs],
83# AS_HELP_STRING([--disable-overlayfs], [disable overlayfs])) 94# [AS_HELP_STRING([--disable-overlayfs], [disable overlayfs])])
84#AS_IF([test "x$enable_overlayfs" != "xno"], [ 95#AS_IF([test "x$enable_overlayfs" != "xno"], [
85# HAVE_OVERLAYFS="-DHAVE_OVERLAYFS" 96# HAVE_OVERLAYFS="-DHAVE_OVERLAYFS"
86# AC_SUBST(HAVE_OVERLAYFS)
87#]) 97#])
88 98
89HAVE_OUTPUT="" 99HAVE_OUTPUT=""
100AC_SUBST([HAVE_OUTPUT])
90AC_ARG_ENABLE([output], 101AC_ARG_ENABLE([output],
91 AS_HELP_STRING([--disable-output], [disable --output logging])) 102 [AS_HELP_STRING([--disable-output], [disable --output logging])])
92AS_IF([test "x$enable_output" != "xno"], [ 103AS_IF([test "x$enable_output" != "xno"], [
93 HAVE_OUTPUT="-DHAVE_OUTPUT" 104 HAVE_OUTPUT="-DHAVE_OUTPUT"
94 AC_SUBST(HAVE_OUTPUT)
95]) 105])
96 106
97HAVE_USERTMPFS="" 107HAVE_USERTMPFS=""
108AC_SUBST([HAVE_USERTMPFS])
98AC_ARG_ENABLE([usertmpfs], 109AC_ARG_ENABLE([usertmpfs],
99 AS_HELP_STRING([--disable-usertmpfs], [disable tmpfs as regular user])) 110 [AS_HELP_STRING([--disable-usertmpfs], [disable tmpfs as regular user])])
100AS_IF([test "x$enable_usertmpfs" != "xno"], [ 111AS_IF([test "x$enable_usertmpfs" != "xno"], [
101 HAVE_USERTMPFS="-DHAVE_USERTMPFS" 112 HAVE_USERTMPFS="-DHAVE_USERTMPFS"
102 AC_SUBST(HAVE_USERTMPFS)
103]) 113])
104 114
105HAVE_MAN="no" 115HAVE_MAN="no"
116AC_SUBST([HAVE_MAN])
106AC_ARG_ENABLE([man], 117AC_ARG_ENABLE([man],
107 AS_HELP_STRING([--disable-man], [disable man pages])) 118 [AS_HELP_STRING([--disable-man], [disable man pages])])
108AS_IF([test "x$enable_man" != "xno"], [ 119AS_IF([test "x$enable_man" != "xno"], [
109 HAVE_MAN="-DHAVE_MAN" 120 HAVE_MAN="-DHAVE_MAN"
110 AC_SUBST(HAVE_MAN)
111 AC_CHECK_PROG([HAVE_GAWK], [gawk], [yes], [no]) 121 AC_CHECK_PROG([HAVE_GAWK], [gawk], [yes], [no])
112 AS_IF([test "x$HAVE_GAWK" != "xyes"], [AC_MSG_ERROR("*** gawk not found ***")]) 122 AS_IF([test "x$HAVE_GAWK" != "xyes"], [AC_MSG_ERROR([*** gawk not found ***])])
113]) 123])
114 124
115HAVE_FIRETUNNEL="" 125HAVE_FIRETUNNEL=""
126AC_SUBST([HAVE_FIRETUNNEL])
116AC_ARG_ENABLE([firetunnel], 127AC_ARG_ENABLE([firetunnel],
117 AS_HELP_STRING([--disable-firetunnel], [disable firetunnel])) 128 [AS_HELP_STRING([--disable-firetunnel], [disable firetunnel])])
118AS_IF([test "x$enable_firetunnel" != "xno"], [ 129AS_IF([test "x$enable_firetunnel" != "xno"], [
119 HAVE_FIRETUNNEL="-DHAVE_FIRETUNNEL" 130 HAVE_FIRETUNNEL="-DHAVE_FIRETUNNEL"
120 AC_SUBST(HAVE_FIRETUNNEL)
121]) 131])
122 132
123HAVE_PRIVATEHOME="" 133HAVE_PRIVATE_HOME=""
134AC_SUBST([HAVE_PRIVATE_HOME])
124AC_ARG_ENABLE([private-home], 135AC_ARG_ENABLE([private-home],
125 AS_HELP_STRING([--disable-private-home], [disable private home feature])) 136 [AS_HELP_STRING([--disable-private-home], [disable private home feature])])
126AS_IF([test "x$enable_private_home" != "xno"], [ 137AS_IF([test "x$enable_private_home" != "xno"], [
127 HAVE_PRIVATE_HOME="-DHAVE_PRIVATE_HOME" 138 HAVE_PRIVATE_HOME="-DHAVE_PRIVATE_HOME"
128 AC_SUBST(HAVE_PRIVATE_HOME)
129]) 139])
130 140
131HAVE_CHROOT="" 141HAVE_CHROOT=""
142AC_SUBST([HAVE_CHROOT])
132AC_ARG_ENABLE([chroot], 143AC_ARG_ENABLE([chroot],
133 AS_HELP_STRING([--disable-chroot], [disable chroot])) 144 [AS_HELP_STRING([--disable-chroot], [disable chroot])])
134AS_IF([test "x$enable_chroot" != "xno"], [ 145AS_IF([test "x$enable_chroot" != "xno"], [
135 HAVE_CHROOT="-DHAVE_CHROOT" 146 HAVE_CHROOT="-DHAVE_CHROOT"
136 AC_SUBST(HAVE_CHROOT)
137]) 147])
138 148
139HAVE_GLOBALCFG="" 149HAVE_GLOBALCFG=""
150AC_SUBST([HAVE_GLOBALCFG])
140AC_ARG_ENABLE([globalcfg], 151AC_ARG_ENABLE([globalcfg],
141 AS_HELP_STRING([--disable-globalcfg], [if the global config file firejail.cfg is not present, continue the program using defaults])) 152 [AS_HELP_STRING([--disable-globalcfg],
153 [if the global config file firejail.config is not present, continue the program using defaults])])
142AS_IF([test "x$enable_globalcfg" != "xno"], [ 154AS_IF([test "x$enable_globalcfg" != "xno"], [
143 HAVE_GLOBALCFG="-DHAVE_GLOBALCFG" 155 HAVE_GLOBALCFG="-DHAVE_GLOBALCFG"
144 AC_SUBST(HAVE_GLOBALCFG)
145]) 156])
146 157
147HAVE_NETWORK="" 158HAVE_NETWORK=""
159AC_SUBST([HAVE_NETWORK])
148AC_ARG_ENABLE([network], 160AC_ARG_ENABLE([network],
149 AS_HELP_STRING([--disable-network], [disable network])) 161 [AS_HELP_STRING([--disable-network], [disable network])])
150AS_IF([test "x$enable_network" != "xno"], [ 162AS_IF([test "x$enable_network" != "xno"], [
151 HAVE_NETWORK="-DHAVE_NETWORK" 163 HAVE_NETWORK="-DHAVE_NETWORK"
152 AC_SUBST(HAVE_NETWORK)
153]) 164])
154 165
155HAVE_USERNS="" 166HAVE_USERNS=""
167AC_SUBST([HAVE_USERNS])
156AC_ARG_ENABLE([userns], 168AC_ARG_ENABLE([userns],
157 AS_HELP_STRING([--disable-userns], [disable user namespace])) 169 [AS_HELP_STRING([--disable-userns], [disable user namespace])])
158AS_IF([test "x$enable_userns" != "xno"], [ 170AS_IF([test "x$enable_userns" != "xno"], [
159 HAVE_USERNS="-DHAVE_USERNS" 171 HAVE_USERNS="-DHAVE_USERNS"
160 AC_SUBST(HAVE_USERNS)
161]) 172])
162 173
163HAVE_X11="" 174HAVE_X11=""
175AC_SUBST([HAVE_X11])
164AC_ARG_ENABLE([x11], 176AC_ARG_ENABLE([x11],
165 AS_HELP_STRING([--disable-x11], [disable X11 sandboxing support])) 177 [AS_HELP_STRING([--disable-x11], [disable X11 sandboxing support])])
166AS_IF([test "x$enable_x11" != "xno"], [ 178AS_IF([test "x$enable_x11" != "xno"], [
167 HAVE_X11="-DHAVE_X11" 179 HAVE_X11="-DHAVE_X11"
168 AC_SUBST(HAVE_X11)
169]) 180])
170 181
171HAVE_FILE_TRANSFER="" 182HAVE_FILE_TRANSFER=""
183AC_SUBST([HAVE_FILE_TRANSFER])
172AC_ARG_ENABLE([file-transfer], 184AC_ARG_ENABLE([file-transfer],
173 AS_HELP_STRING([--disable-file-transfer], [disable file transfer])) 185 [AS_HELP_STRING([--disable-file-transfer], [disable file transfer])])
174AS_IF([test "x$enable_file_transfer" != "xno"], [ 186AS_IF([test "x$enable_file_transfer" != "xno"], [
175 HAVE_FILE_TRANSFER="-DHAVE_FILE_TRANSFER" 187 HAVE_FILE_TRANSFER="-DHAVE_FILE_TRANSFER"
176 AC_SUBST(HAVE_FILE_TRANSFER)
177])
178
179HAVE_WHITELIST=""
180AC_ARG_ENABLE([whitelist],
181 AS_HELP_STRING([--disable-whitelist], [disable whitelist]))
182AS_IF([test "x$enable_whitelist" != "xno"], [
183 HAVE_WHITELIST="-DHAVE_WHITELIST"
184 AC_SUBST(HAVE_WHITELIST)
185]) 188])
186 189
187HAVE_SUID="" 190HAVE_SUID=""
191AC_SUBST([HAVE_SUID])
188AC_ARG_ENABLE([suid], 192AC_ARG_ENABLE([suid],
189 AS_HELP_STRING([--disable-suid], [install as a non-SUID executable])) 193 [AS_HELP_STRING([--disable-suid], [install as a non-SUID executable])])
190AS_IF([test "x$enable_suid" = "xno"], 194AS_IF([test "x$enable_suid" != "xno"], [
191 [HAVE_SUID="no"], 195 HAVE_SUID="-DHAVE_SUID"
192 [HAVE_SUID="yes"] 196])
193)
194AC_SUBST(HAVE_SUID)
195 197
196HAVE_FATAL_WARNINGS="" 198HAVE_FATAL_WARNINGS=""
199AC_SUBST([HAVE_FATAL_WARNINGS])
197AC_ARG_ENABLE([fatal_warnings], 200AC_ARG_ENABLE([fatal_warnings],
198 AS_HELP_STRING([--enable-fatal-warnings], [-W -Wall -Werror])) 201 [AS_HELP_STRING([--enable-fatal-warnings], [-W -Wall -Werror])])
199AS_IF([test "x$enable_fatal_warnings" = "xyes"], [ 202AS_IF([test "x$enable_fatal_warnings" = "xyes"], [
200 HAVE_FATAL_WARNINGS="-W -Wall -Werror" 203 HAVE_FATAL_WARNINGS="-W -Wall -Werror"
201 AC_SUBST(HAVE_FATAL_WARNINGS)
202]) 204])
203 205
204BUSYBOX_WORKAROUND="no" 206BUSYBOX_WORKAROUND="no"
207AC_SUBST([BUSYBOX_WORKAROUND])
205AC_ARG_ENABLE([busybox-workaround], 208AC_ARG_ENABLE([busybox-workaround],
206 AS_HELP_STRING([--enable-busybox-workaround], [enable busybox workaround])) 209 [AS_HELP_STRING([--enable-busybox-workaround], [enable busybox workaround])])
207AS_IF([test "x$enable_busybox_workaround" = "xyes"], [ 210AS_IF([test "x$enable_busybox_workaround" = "xyes"], [
208 BUSYBOX_WORKAROUND="yes" 211 BUSYBOX_WORKAROUND="yes"
209 AC_SUBST(BUSYBOX_WORKAROUND)
210]) 212])
211 213
212 214
213HAVE_GCOV="" 215HAVE_GCOV=""
216AC_SUBST([HAVE_GCOV])
214AC_ARG_ENABLE([gcov], 217AC_ARG_ENABLE([gcov],
215 AS_HELP_STRING([--enable-gcov], [Gcov instrumentation])) 218 [AS_HELP_STRING([--enable-gcov], [Gcov instrumentation])])
216AS_IF([test "x$enable_gcov" = "xyes"], [ 219AS_IF([test "x$enable_gcov" = "xyes"], [
217 HAVE_GCOV="--coverage -DHAVE_GCOV " 220 HAVE_GCOV="--coverage -DHAVE_GCOV"
218 EXTRA_LDFLAGS+=" -lgcov --coverage " 221 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lgcov --coverage"
219 AC_SUBST(HAVE_GCOV)
220]) 222])
221 223
222HAVE_CONTRIB_INSTALL="yes" 224HAVE_CONTRIB_INSTALL="yes"
225AC_SUBST([HAVE_CONTRIB_INSTALL])
223AC_ARG_ENABLE([contrib-install], 226AC_ARG_ENABLE([contrib-install],
224 AS_HELP_STRING([--enable-contrib-install], [install contrib scripts])) 227 [AS_HELP_STRING([--enable-contrib-install], [install contrib scripts])])
225AS_IF([test "x$enable_contrib_install" = "xno"], 228AS_IF([test "x$enable_contrib_install" = "xno"], [
226 [HAVE_CONTRIB_INSTALL="no"], 229 HAVE_CONTRIB_INSTALL="no"
227 [HAVE_CONTRIB_INSTALL="yes"] 230])
228)
229AC_SUBST(HAVE_CONTRIB_INSTALL)
230 231
231HAVE_FORCE_NONEWPRIVS="" 232HAVE_FORCE_NONEWPRIVS=""
233AC_SUBST([HAVE_FORCE_NONEWPRIVS])
232AC_ARG_ENABLE([force-nonewprivs], 234AC_ARG_ENABLE([force-nonewprivs],
233 AS_HELP_STRING([--enable-force-nonewprivs], [enable force nonewprivs])) 235 [AS_HELP_STRING([--enable-force-nonewprivs], [enable force nonewprivs])])
234AS_IF([test "x$enable_force_nonewprivs" = "xyes"], [ 236AS_IF([test "x$enable_force_nonewprivs" = "xyes"], [
235 HAVE_FORCE_NONEWPRIVS="-DHAVE_FORCE_NONEWPRIVS" 237 HAVE_FORCE_NONEWPRIVS="-DHAVE_FORCE_NONEWPRIVS"
236 AC_SUBST(HAVE_FORCE_NONEWPRIVS) 238])
239
240HAVE_ONLY_SYSCFG_PROFILES=""
241AC_SUBST([HAVE_ONLY_SYSCFG_PROFILES])
242AC_ARG_ENABLE([only-syscfg-profiles],
243 [AS_HELP_STRING([--enable-only-syscfg-profiles], [disable profiles in $HOME/.config/firejail])])
244AS_IF([test "x$enable_only_syscfg_profiles" = "xyes"], [
245 HAVE_ONLY_SYSCFG_PROFILES="-DHAVE_ONLY_SYSCFG_PROFILES"
237]) 246])
238 247
239HAVE_LTS="" 248HAVE_LTS=""
249AC_SUBST([HAVE_LTS])
240AC_ARG_ENABLE([lts], 250AC_ARG_ENABLE([lts],
241 AS_HELP_STRING([--enable-lts], [enable long-term support software version (LTS)])) 251 [AS_HELP_STRING([--enable-lts], [enable long-term support software version (LTS)])])
242AS_IF([test "x$enable_lts" = "xyes"], [ 252AS_IF([test "x$enable_lts" = "xyes"], [
243 HAVE_LTS="-DHAVE_LTS" 253 HAVE_LTS="-DHAVE_LTS"
244 AC_SUBST(HAVE_LTS)
245
246 HAVE_DBUSPROXY="" 254 HAVE_DBUSPROXY=""
247 AC_SUBST(HAVE_DBUSPROXY)
248
249 HAVE_OVERLAYFS="" 255 HAVE_OVERLAYFS=""
250 AC_SUBST(HAVE_OVERLAYFS)
251
252 HAVE_OUTPUT="" 256 HAVE_OUTPUT=""
253 AC_SUBST(HAVE_OUTPUT)
254
255 HAVE_USERTMPFS="" 257 HAVE_USERTMPFS=""
256 AC_SUBST(HAVE_USERTMPFS)
257
258 HAVE_MAN="-DHAVE_MAN" 258 HAVE_MAN="-DHAVE_MAN"
259 AC_SUBST(HAVE_MAN)
260
261 HAVE_FIRETUNNEL="" 259 HAVE_FIRETUNNEL=""
262 AC_SUBST(HAVE_FIRETUNNEL) 260 HAVE_PRIVATE_HOME=""
263
264 HAVE_PRIVATEHOME=""
265 AC_SUBST(HAVE_PRIVATE_HOME)
266
267 HAVE_CHROOT="" 261 HAVE_CHROOT=""
268 AC_SUBST(HAVE_CHROOT)
269
270 HAVE_GLOBALCFG="" 262 HAVE_GLOBALCFG=""
271 AC_SUBST(HAVE_GLOBALCFG)
272
273 HAVE_USERNS="" 263 HAVE_USERNS=""
274 AC_SUBST(HAVE_USERNS)
275
276 HAVE_X11="" 264 HAVE_X11=""
277 AC_SUBST(HAVE_X11)
278
279 HAVE_FILE_TRANSFER="" 265 HAVE_FILE_TRANSFER=""
280 AC_SUBST(HAVE_FILE_TRANSFER) 266 HAVE_SUID="-DHAVE_SUID"
281
282 HAVE_SUID="yes"
283 AC_SUBST(HAVE_SUID)
284
285 BUSYBOX_WORKAROUND="no" 267 BUSYBOX_WORKAROUND="no"
286 AC_SUBST(BUSYBOX_WORKAROUND)
287
288 HAVE_CONTRIB_INSTALL="no", 268 HAVE_CONTRIB_INSTALL="no",
289 AC_SUBST(HAVE_CONTRIB_INSTALL)
290]) 269])
291 270
292 271AC_CHECK_HEADER([linux/seccomp.h], [], AC_MSG_ERROR([*** SECCOMP support is not installed (/usr/include/linux/seccomp.h missing) ***]))
293
294
295# checking pthread library
296AC_CHECK_LIB([pthread], [main], [], AC_MSG_ERROR([*** POSIX thread support not installed ***]))
297AC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR([*** POSIX thread support not installed ***]))
298AC_CHECK_HEADER([linux/seccomp.h],,AC_MSG_ERROR([*** SECCOMP support is not installed (/usr/include/linux/seccomp.h missing) ***]))
299 272
300# set sysconfdir 273# set sysconfdir
301if test "$prefix" = /usr; then 274if test "$prefix" = /usr; then
@@ -303,53 +276,56 @@ if test "$prefix" = /usr; then
303fi 276fi
304 277
305AC_CONFIG_FILES([mkdeb.sh], [chmod +x mkdeb.sh]) 278AC_CONFIG_FILES([mkdeb.sh], [chmod +x mkdeb.sh])
306AC_OUTPUT(Makefile src/common.mk src/lib/Makefile src/fcopy/Makefile src/fnet/Makefile src/firejail/Makefile src/fnetfilter/Makefile \ 279AC_CONFIG_FILES([Makefile src/common.mk src/lib/Makefile src/fcopy/Makefile src/fnet/Makefile src/firejail/Makefile src/fnetfilter/Makefile \
307src/firemon/Makefile src/libtrace/Makefile src/libtracelog/Makefile src/firecfg/Makefile src/fbuilder/Makefile src/fsec-print/Makefile \ 280src/firemon/Makefile src/libtrace/Makefile src/libtracelog/Makefile src/firecfg/Makefile src/fbuilder/Makefile src/fsec-print/Makefile \
308src/ftee/Makefile src/fseccomp/Makefile src/fldd/Makefile src/libpostexecseccomp/Makefile src/fsec-optimize/Makefile \ 281src/ftee/Makefile src/fseccomp/Makefile src/fldd/Makefile src/libpostexecseccomp/Makefile src/fsec-optimize/Makefile \
309src/profstats/Makefile src/man/Makefile src/zsh_completion/Makefile src/bash_completion/Makefile test/Makefile \ 282src/profstats/Makefile src/man/Makefile src/zsh_completion/Makefile src/bash_completion/Makefile test/Makefile \
310src/jailtest/Makefile) 283src/jailcheck/Makefile src/fids/Makefile src/fnettrace/Makefile])
311 284AC_OUTPUT
312echo 285
313echo "Configuration options:" 286cat <<EOF
314echo " prefix: $prefix" 287
315echo " sysconfdir: $sysconfdir" 288Configuration options:
316echo " apparmor: $HAVE_APPARMOR" 289 prefix: $prefix
317echo " SELinux labeling support: $HAVE_SELINUX" 290 sysconfdir: $sysconfdir
318echo " global config: $HAVE_GLOBALCFG" 291 apparmor: $HAVE_APPARMOR
319echo " chroot: $HAVE_CHROOT" 292 SELinux labeling support: $HAVE_SELINUX
320echo " network: $HAVE_NETWORK" 293 global config: $HAVE_GLOBALCFG
321echo " user namespace: $HAVE_USERNS" 294 chroot: $HAVE_CHROOT
322echo " X11 sandboxing support: $HAVE_X11" 295 network: $HAVE_NETWORK
323echo " whitelisting: $HAVE_WHITELIST" 296 user namespace: $HAVE_USERNS
324echo " private home support: $HAVE_PRIVATE_HOME" 297 X11 sandboxing support: $HAVE_X11
325echo " file transfer support: $HAVE_FILE_TRANSFER" 298 private home support: $HAVE_PRIVATE_HOME
326echo " overlayfs support: $HAVE_OVERLAYFS" 299 file transfer support: $HAVE_FILE_TRANSFER
327echo " DBUS proxy support: $HAVE_DBUSPROXY" 300 overlayfs support: $HAVE_OVERLAYFS
328echo " allow tmpfs as regular user: $HAVE_USERTMPFS" 301 DBUS proxy support: $HAVE_DBUSPROXY
329echo " enable --ouput logging: $HAVE_OUTPUT" 302 allow tmpfs as regular user: $HAVE_USERTMPFS
330echo " Manpage support: $HAVE_MAN" 303 enable --ouput logging: $HAVE_OUTPUT
331echo " firetunnel support: $HAVE_FIRETUNNEL" 304 Manpage support: $HAVE_MAN
332echo " busybox workaround: $BUSYBOX_WORKAROUND" 305 firetunnel support: $HAVE_FIRETUNNEL
333echo " Spectre compiler patch: $HAVE_SPECTRE" 306 busybox workaround: $BUSYBOX_WORKAROUND
334echo " EXTRA_LDFLAGS: $EXTRA_LDFLAGS" 307 Spectre compiler patch: $HAVE_SPECTRE
335echo " EXTRA_CFLAGS: $EXTRA_CFLAGS" 308 EXTRA_LDFLAGS: $EXTRA_LDFLAGS
336echo " fatal warnings: $HAVE_FATAL_WARNINGS" 309 EXTRA_CFLAGS: $EXTRA_CFLAGS
337echo " Gcov instrumentation: $HAVE_GCOV" 310 fatal warnings: $HAVE_FATAL_WARNINGS
338echo " Install contrib scripts: $HAVE_CONTRIB_INSTALL" 311 Gcov instrumentation: $HAVE_GCOV
339echo " Install as a SUID executable: $HAVE_SUID" 312 Install contrib scripts: $HAVE_CONTRIB_INSTALL
340echo " LTS: $HAVE_LTS" 313 Install as a SUID executable: $HAVE_SUID
341echo " Always enforce filters: $HAVE_FORCE_NONEWPRIVS" 314 LTS: $HAVE_LTS
342echo 315 Always enforce filters: $HAVE_FORCE_NONEWPRIVS
343 316 Disable user profiles: $HAVE_ONLY_SYSCFG_PROFILES
317
318EOF
344 319
345if test "$HAVE_LTS" = -DHAVE_LTS; then 320if test "$HAVE_LTS" = -DHAVE_LTS; then
346 echo 321 cat <<\EOF
347 echo
348 echo "*********************************************************"
349 echo "* Warning: Long-term support (LTS) was enabled! *"
350 echo "* Most compile-time options have bean rewritten! *"
351 echo "*********************************************************"
352 echo
353 echo
354fi
355 322
323
324*********************************************************
325* Warning: Long-term support (LTS) was enabled! *
326* Most compile-time options have bean rewritten! *
327*********************************************************
328
329
330EOF
331fi
diff --git a/contrib/firejail-welcome.sh b/contrib/firejail-welcome.sh
index 6eebc67c5..c9b6c450b 100755
--- a/contrib/firejail-welcome.sh
+++ b/contrib/firejail-welcome.sh
@@ -1,7 +1,7 @@
1#!/bin/bash 1#!/bin/bash
2 2
3# This file is part of Firejail project 3# This file is part of Firejail project
4# Copyright (C) 2020-2021 Firejail Authors 4# Copyright (C) 2020-2022 Firejail Authors
5# License GPL v2 5# License GPL v2
6 6
7if ! command -v zenity >/dev/null; then 7if ! command -v zenity >/dev/null; then
diff --git a/contrib/fix_private-bin.py b/contrib/fix_private-bin.py
index 12b596749..961646aa4 100755
--- a/contrib/fix_private-bin.py
+++ b/contrib/fix_private-bin.py
@@ -164,7 +164,7 @@ def printHelp():
164 164
165 165
166def main() -> None: 166def main() -> None:
167 """The main function. Parses the commandline args, shows messages and calles the function actually doing the work.""" 167 """The main function. Parses the commandline args, shows messages and calls the function actually doing the work."""
168 if len(sys.argv) > 2 or (len(sys.argv) == 2 and 168 if len(sys.argv) > 2 or (len(sys.argv) == 2 and
169 (sys.argv[1] == "-h" or sys.argv[1] == "--help")): 169 (sys.argv[1] == "-h" or sys.argv[1] == "--help")):
170 printHelp() 170 printHelp()
diff --git a/contrib/fj-mkdeb.py b/contrib/fj-mkdeb.py
index b4a947535..60e25fd14 100755
--- a/contrib/fj-mkdeb.py
+++ b/contrib/fj-mkdeb.py
@@ -1,6 +1,6 @@
1#!/usr/bin/env python3 1#!/usr/bin/env python3
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6# This script automates the workaround for https://github.com/netblue30/firejail/issues/772 6# This script automates the workaround for https://github.com/netblue30/firejail/issues/772
diff --git a/contrib/fjclip.py b/contrib/fjclip.py
index 3e99d71e9..893fff243 100755
--- a/contrib/fjclip.py
+++ b/contrib/fjclip.py
@@ -1,6 +1,6 @@
1#!/usr/bin/env python3 1#!/usr/bin/env python3
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6import sys 6import sys
diff --git a/contrib/fjdisplay.py b/contrib/fjdisplay.py
index 294bde997..a49aa3e36 100755
--- a/contrib/fjdisplay.py
+++ b/contrib/fjdisplay.py
@@ -1,6 +1,6 @@
1#!/usr/bin/env python3 1#!/usr/bin/env python3
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6import re 6import re
diff --git a/contrib/fjresize.py b/contrib/fjresize.py
index d656f5c91..6575d6a0b 100755
--- a/contrib/fjresize.py
+++ b/contrib/fjresize.py
@@ -1,6 +1,6 @@
1#!/usr/bin/env python3 1#!/usr/bin/env python3
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6import sys 6import sys
diff --git a/contrib/gdb-firejail.sh b/contrib/gdb-firejail.sh
index 941fc45ef..397438e1e 100755
--- a/contrib/gdb-firejail.sh
+++ b/contrib/gdb-firejail.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5set -x 5set -x
6 6
@@ -21,4 +21,4 @@ else
21fi 21fi
22 22
23bash -c "kill -STOP \$\$; exec \"\$0\" \"\$@\"" "$@" & 23bash -c "kill -STOP \$\$; exec \"\$0\" \"\$@\"" "$@" &
24sudo gdb -e "$FIREJAIL" -p "$!" 24sudo gdb -e "$FIREJAIL" -p "$!"
diff --git a/contrib/jail_prober.py b/contrib/jail_prober.py
index 9205d9b3e..9776e9380 100755
--- a/contrib/jail_prober.py
+++ b/contrib/jail_prober.py
@@ -1,6 +1,6 @@
1#!/usr/bin/env python3 1#!/usr/bin/env python3
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5""" 5"""
6Figure out which profile options may be causing a particular program to break 6Figure out which profile options may be causing a particular program to break
@@ -70,6 +70,19 @@ def get_args(profile_path):
70 return profile 70 return profile
71 71
72 72
73def absolute_include(word):
74 home = os.environ['HOME']
75 path = home + '/.config/firejail/'
76
77 option, filename = word.split('=')
78 absolute_filename = path + filename
79
80 if not os.path.isfile(absolute_filename):
81 absolute_filename = '${CFG}/' + filename
82
83 return option + '=' + absolute_filename
84
85
73def arg_converter(arg_list, style): 86def arg_converter(arg_list, style):
74 """ 87 """
75 Convert between firejail command-line arguments (--example=something) and 88 Convert between firejail command-line arguments (--example=something) and
@@ -94,9 +107,12 @@ def arg_converter(arg_list, style):
94 if style == 'to_profile': 107 if style == 'to_profile':
95 new_args = [word[2:] for word in new_args] 108 new_args = [word[2:] for word in new_args]
96 109
97 # Remove invalid '--include' args if converting to command-line form
98 elif style == 'to_commandline': 110 elif style == 'to_commandline':
99 new_args = [word for word in new_args if 'include' not in word] 111 new_args = [
112 absolute_include(word) if word.startswith('--include')
113 else word
114 for word in new_args
115 ]
100 116
101 return new_args 117 return new_args
102 118
@@ -148,8 +164,12 @@ def run_firejail(program, all_args):
148 164
149 165
150def main(): 166def main():
151 profile_path = sys.argv[1] 167 try:
152 program = sys.argv[2] 168 profile_path = sys.argv[1]
169 program = sys.argv[2]
170 except IndexError:
171 print('USAGE: jail_prober.py <PROFILE-PATH> <PROGRAM>')
172 sys.exit()
153 # Quick error check and extract arguments 173 # Quick error check and extract arguments
154 check_params(profile_path) 174 check_params(profile_path)
155 profile = get_args(profile_path) 175 profile = get_args(profile_path)
diff --git a/contrib/sort.py b/contrib/sort.py
index c7325facb..6f21370ec 100755
--- a/contrib/sort.py
+++ b/contrib/sort.py
@@ -1,6 +1,6 @@
1#!/usr/bin/env python3 1#!/usr/bin/env python3
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5""" 5"""
6Sort the items of multi-item options in profiles, the following options are supported: 6Sort the items of multi-item options in profiles, the following options are supported:
@@ -24,7 +24,7 @@ Exit-Codes:
24 24
25# Requirements: 25# Requirements:
26# python >= 3.6 26# python >= 3.6
27from sys import argv 27from sys import argv, exit as sys_exit
28 28
29 29
30def sort_alphabetical(raw_items): 30def sort_alphabetical(raw_items):
@@ -34,7 +34,7 @@ def sort_alphabetical(raw_items):
34 34
35 35
36def sort_protocol(protocols): 36def sort_protocol(protocols):
37 """sort the given protocole into this scheme: unix,inet,inet6,netlink,packet,bluetooth""" 37 """sort the given protocols into this scheme: unix,inet,inet6,netlink,packet,bluetooth"""
38 38
39 # shortcut for common protocol lines 39 # shortcut for common protocol lines
40 if protocols in ("unix", "unix,inet,inet6"): 40 if protocols in ("unix", "unix,inet,inet6"):
@@ -105,4 +105,4 @@ def main(args):
105 105
106 106
107if __name__ == "__main__": 107if __name__ == "__main__":
108 exit(main(argv[1:])) 108 sys_exit(main(argv[1:]))
diff --git a/contrib/syscalls.sh b/contrib/syscalls.sh
index 728ff5a78..d13f24280 100755
--- a/contrib/syscalls.sh
+++ b/contrib/syscalls.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6STRACE_OUTPUT_FILE="$(pwd)/strace_output.txt" 6STRACE_OUTPUT_FILE="$(pwd)/strace_output.txt"
diff --git a/contrib/update_deb.sh b/contrib/update_deb.sh
index 4c715aaf7..68460e41f 100755
--- a/contrib/update_deb.sh
+++ b/contrib/update_deb.sh
@@ -1,6 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6# Purpose: Fetch, compile, and install firejail from GitHub source. For 6# Purpose: Fetch, compile, and install firejail from GitHub source. For
diff --git a/contrib/vim/ftdetect/firejail.vim b/contrib/vim/ftdetect/firejail.vim
index a8ba5cd75..2edc741da 100644
--- a/contrib/vim/ftdetect/firejail.vim
+++ b/contrib/vim/ftdetect/firejail.vim
@@ -1,6 +1,6 @@
1autocmd BufNewFile,BufRead /etc/firejail/*.profile set filetype=firejail 1autocmd BufNewFile,BufRead /etc/firejail/*.profile setfiletype firejail
2autocmd BufNewFile,BufRead /etc/firejail/*.local set filetype=firejail 2autocmd BufNewFile,BufRead /etc/firejail/*.local setfiletype firejail
3autocmd BufNewFile,BufRead /etc/firejail/*.inc set filetype=firejail 3autocmd BufNewFile,BufRead /etc/firejail/*.inc setfiletype firejail
4autocmd BufNewFile,BufRead ~/.config/firejail/*.profile set filetype=firejail 4autocmd BufNewFile,BufRead ~/.config/firejail/*.profile setfiletype firejail
5autocmd BufNewFile,BufRead ~/.config/firejail/*.local set filetype=firejail 5autocmd BufNewFile,BufRead ~/.config/firejail/*.local setfiletype firejail
6autocmd BufNewFile,BufRead ~/.config/firejail/*.inc set filetype=firejail 6autocmd BufNewFile,BufRead ~/.config/firejail/*.inc setfiletype firejail
diff --git a/contrib/vim/syntax/firejail.vim b/contrib/vim/syntax/firejail.vim
index 65eb690ac..714ed8e6e 100644
--- a/contrib/vim/syntax/firejail.vim
+++ b/contrib/vim/syntax/firejail.vim
@@ -20,19 +20,20 @@ syn match fjCapabilityList /,/ nextgroup=fjCapability contained
20syn keyword fjProtocol unix inet inet6 netlink packet nextgroup=fjProtocolList contained 20syn keyword fjProtocol unix inet inet6 netlink packet nextgroup=fjProtocolList contained
21syn match fjProtocolList /,/ nextgroup=fjProtocol contained 21syn match fjProtocolList /,/ nextgroup=fjProtocol contained
22 22
23" Syscalls grabbed from: src/include/syscall.h 23" Syscalls grabbed from: src/include/syscall*.h
24" Generate list with: rg -o '"([^"]+)' -r '$1' src/include/syscall.h | sort -u | tr $'\n' ' ' 24" Generate list with: sed -ne 's/{\s\+"\([^"]\+\)",.*},/\1/p' src/include/syscall*.h | sort -u | tr $'\n' ' '
25syn keyword fjSyscall _llseek _newselect _sysctl accept accept4 access acct add_key adjtimex afs_syscall alarm arch_prctl bdflush bind bpf break brk capget capset chdir chmod chown chown32 chroot clock_adjtime clock_getres clock_gettime clock_nanosleep clock_settime clone close connect copy_file_range creat create_module delete_module dup dup2 dup3 epoll_create epoll_create1 epoll_ctl epoll_ctl_old epoll_pwait epoll_wait epoll_wait_old eventfd eventfd2 execve execveat exit exit_group faccessat faccessat2 fadvise64 fadvise64_64 fallocate fanotify_init fanotify_mark fchdir fchmod fchmodat fchown fchown32 fchownat fcntl fcntl64 fdatasync fgetxattr finit_module flistxattr flock fork fremovexattr fsetxattr fstat fstat64 fstatat64 fstatfs fstatfs64 fsync ftime ftruncate ftruncate64 futex futimesat get_kernel_syms get_mempolicy get_robust_list get_thread_area getcpu getcwd getdents getdents64 getegid getegid32 geteuid geteuid32 getgid getgid32 getgroups getgroups32 getitimer getpeername getpgid getpgrp getpid getpmsg getppid getpriority getrandom getresgid getresgid32 getresuid getresuid32 getrlimit getrusage getsid getsockname getsockopt gettid gettimeofday getuid getuid32 getxattr gtty idle init_module inotify_add_watch inotify_init inotify_init1 inotify_rm_watch io_cancel io_destroy io_getevents io_setup io_submit ioctl ioperm iopl ioprio_get ioprio_set ipc kcmp kexec_file_load kexec_load keyctl kill lchown lchown32 lgetxattr link linkat listen listxattr llistxattr lock lookup_dcookie lremovexattr lseek lsetxattr lstat lstat64 madvise mbind membarrier memfd_create migrate_pages mincore mkdir mkdirat mknod mknodat mlock mlock2 mlockall mmap mmap2 modify_ldt mount move_pages mprotect mpx mq_getsetattr mq_notify mq_open mq_timedreceive mq_timedsend mq_unlink mremap msgctl msgget msgrcv msgsnd msync munlock munlockall munmap name_to_handle_at nanosleep newfstatat nfsservctl nice oldfstat oldlstat oldolduname oldstat olduname open open_by_handle_at openat pause perf_event_open personality pipe pipe2 pivot_root pkey_alloc pkey_free pkey_mprotect poll ppoll prctl pread64 preadv preadv2 prlimit64 process_vm_readv process_vm_writev prof profil pselect6 ptrace putpmsg pwrite64 pwritev pwritev2 query_module quotactl read readahead readdir readlink readlinkat readv reboot recvfrom recvmmsg recvmsg remap_file_pages removexattr rename renameat renameat2 request_key restart_syscall rmdir rt_sigaction rt_sigpending rt_sigprocmask rt_sigqueueinfo rt_sigreturn rt_sigsuspend rt_sigtimedwait rt_tgsigqueueinfo sched_get_priority_max sched_get_priority_min sched_getaffinity sched_getattr sched_getparam sched_getscheduler sched_rr_get_interval sched_setaffinity sched_setattr sched_setparam sched_setscheduler sched_yield seccomp security select semctl semget semop semtimedop sendfile sendfile64 sendmmsg sendmsg sendto set_mempolicy set_robust_list set_thread_area set_tid_address setdomainname setfsgid setfsgid32 setfsuid setfsuid32 setgid setgid32 setgroups setgroups32 sethostname setitimer setns setpgid setpriority setregid setregid32 setresgid setresgid32 setresuid setresuid32 setreuid setreuid32 setrlimit setsid setsockopt settimeofday setuid setuid32 setxattr sgetmask shmat shmctl shmdt shmget shutdown sigaction sigaltstack signal signalfd signalfd4 sigpending sigprocmask sigreturn sigsuspend socket socketcall socketpair splice ssetmask stat stat64 statfs statfs64 statx stime stty swapoff swapon symlink symlinkat sync sync_file_range syncfs sysfs sysinfo syslog tee tgkill time timer_create timer_delete timer_getoverrun timer_gettime timer_settime timerfd_create timerfd_gettime timerfd_settime times tkill truncate truncate64 tuxcall ugetrlimit ulimit umask umount umount2 uname unlink unlinkat unshare uselib userfaultfd ustat utime utimensat utimes vfork vhangup vm86 vm86old vmsplice vserver wait4 waitid waitpid write writev nextgroup=fjSyscallErrno contained 25syn keyword fjSyscall _llseek _newselect _sysctl accept accept4 access acct add_key adjtimex afs_syscall alarm arch_prctl arm_fadvise64_64 arm_sync_file_range bdflush bind bpf break brk capget capset chdir chmod chown chown32 chroot clock_adjtime clock_adjtime64 clock_getres clock_getres_time64 clock_gettime clock_gettime64 clock_nanosleep clock_nanosleep_time64 clock_settime clock_settime64 clone clone3 close connect copy_file_range creat create_module delete_module dup dup2 dup3 epoll_create epoll_create1 epoll_ctl epoll_ctl_old epoll_pwait epoll_wait epoll_wait_old eventfd eventfd2 execve execveat exit exit_group faccessat faccessat2 fadvise64 fadvise64_64 fallocate fanotify_init fanotify_mark fchdir fchmod fchmodat fchown fchown32 fchownat fcntl fcntl64 fdatasync fgetxattr finit_module flistxattr flock fork fremovexattr fsconfig fsetxattr fsmount fsopen fspick fstat fstat64 fstatat64 fstatfs fstatfs64 fsync ftime ftruncate ftruncate64 futex futex_time64 futimesat getcpu getcwd getdents getdents64 getegid getegid32 geteuid geteuid32 getgid getgid32 getgroups getgroups32 getitimer get_kernel_syms get_mempolicy getpeername getpgid getpgrp getpid getpmsg getppid getpriority getrandom getresgid getresgid32 getresuid getresuid32 getrlimit get_robust_list getrusage getsid getsockname getsockopt get_thread_area gettid gettimeofday getuid getuid32 getxattr gtty idle init_module inotify_add_watch inotify_init inotify_init1 inotify_rm_watch io_cancel ioctl io_destroy io_getevents ioperm io_pgetevents io_pgetevents_time64 iopl ioprio_get ioprio_set io_setup io_submit io_uring_enter io_uring_register io_uring_setup ipc kcmp kexec_file_load kexec_load keyctl kill lchown lchown32 lgetxattr link linkat listen listxattr llistxattr lock lookup_dcookie lremovexattr lseek lsetxattr lstat lstat64 madvise mbind membarrier memfd_create migrate_pages mincore mkdir mkdirat mknod mknodat mlock mlock2 mlockall mmap mmap2 modify_ldt mount move_mount move_pages mprotect mpx mq_getsetattr mq_notify mq_open mq_timedreceive mq_timedreceive_time64 mq_timedsend mq_timedsend_time64 mq_unlink mremap msgctl msgget msgrcv msgsnd msync munlock munlockall munmap name_to_handle_at nanosleep newfstatat nfsservctl nice oldfstat oldlstat oldolduname oldstat olduname open openat open_by_handle_at open_tree pause pciconfig_iobase pciconfig_read pciconfig_write perf_event_open personality pidfd_open pidfd_send_signal pipe pipe2 pivot_root pkey_alloc pkey_free pkey_mprotect poll ppoll ppoll_time64 prctl pread64 preadv preadv2 prlimit64 process_vm_readv process_vm_writev prof profil pselect6 pselect6_time64 ptrace putpmsg pwrite64 pwritev pwritev2 query_module quotactl read readahead readdir readlink readlinkat readv reboot recv recvfrom recvmmsg recvmmsg_time64 recvmsg remap_file_pages removexattr rename renameat renameat2 request_key restart_syscall rmdir rseq rt_sigaction rt_sigpending rt_sigprocmask rt_sigqueueinfo rt_sigreturn rt_sigsuspend rt_sigtimedwait rt_sigtimedwait_time64 rt_tgsigqueueinfo sched_getaffinity sched_getattr sched_getparam sched_get_priority_max sched_get_priority_min sched_getscheduler sched_rr_get_interval sched_rr_get_interval_time64 sched_setaffinity sched_setattr sched_setparam sched_setscheduler sched_yield seccomp security select semctl semget semop semtimedop semtimedop_time64 send sendfile sendfile64 sendmmsg sendmsg sendto setdomainname setfsgid setfsgid32 setfsuid setfsuid32 setgid setgid32 setgroups setgroups32 sethostname setitimer set_mempolicy setns setpgid setpriority setregid setregid32 setresgid setresgid32 setresuid setresuid32 setreuid setreuid32 setrlimit set_robust_list setsid setsockopt set_thread_area set_tid_address settimeofday setuid setuid32 setxattr sgetmask shmat shmctl shmdt shmget shutdown sigaction sigaltstack signal signalfd signalfd4 sigpending sigprocmask sigreturn sigsuspend socket socketcall socketpair splice ssetmask stat stat64 statfs statfs64 statx stime stty swapoff swapon symlink symlinkat sync sync_file_range sync_file_range2 syncfs syscall sysfs sysinfo syslog tee tgkill time timer_create timer_delete timerfd_create timerfd_gettime timerfd_gettime64 timerfd_settime timerfd_settime64 timer_getoverrun timer_gettime timer_gettime64 timer_settime timer_settime64 times tkill truncate truncate64 tuxcall ugetrlimit ulimit umask umount umount2 uname unlink unlinkat unshare uselib userfaultfd ustat utime utimensat utimensat_time64 utimes vfork vhangup vm86 vm86old vmsplice vserver wait4 waitid waitpid write writev nextgroup=fjSyscallErrno contained
26" Syscall groups grabbed from: src/fseccomp/syscall.c 26" Syscall groups grabbed from: src/fseccomp/syscall.c
27" Generate list with: rg -o '"@([^",]+)' -r '$1' src/fseccomp/syscall.c | sort -u | tr $'\n' '|' 27" Generate list with: rg -o '"@([^",]+)' -r '$1' src/lib/syscall.c | sort -u | tr $'\n' '|'
28syn match fjSyscall /\v\@(clock|cpu-emulation|debug|default|default-keep|default-nodebuggers|module|obsolete|privileged|raw-io|reboot|resources|swap)>/ nextgroup=fjSyscallErrno contained 28syn match fjSyscall /\v\@(aio|basic-io|chown|clock|cpu-emulation|debug|default|default-keep|default-nodebuggers|file-system|io-event|ipc|keyring|memlock|module|mount|network-io|obsolete|privileged|process|raw-io|reboot|resources|setuid|signal|swap|sync|system-service|timer)>/ nextgroup=fjSyscallErrno contained
29syn match fjSyscall /\$[0-9]\+/ nextgroup=fjSyscallErrno contained 29syn match fjSyscall /\$[0-9]\+/ nextgroup=fjSyscallErrno contained
30" Errnos grabbed from: src/fseccomp/errno.c 30" Errnos grabbed from: src/fseccomp/errno.c
31" Generate list with: rg -o '"(E[^"]+)' -r '$1' src/fseccomp/errno.c | sort -u | tr $'\n' '|' 31" Generate list with: rg -o '"(E[^"]+)' -r '$1' src/lib/errno.c | sort -u | tr $'\n' '|'
32syn match fjSyscallErrno /\v(:(E2BIG|EACCES|EADDRINUSE|EADDRNOTAVAIL|EADV|EAFNOSUPPORT|EAGAIN|EALREADY|EBADE|EBADF|EBADFD|EBADMSG|EBADR|EBADRQC|EBADSLT|EBFONT|EBUSY|ECANCELED|ECHILD|ECHRNG|ECOMM|ECONNABORTED|ECONNREFUSED|ECONNRESET|EDEADLK|EDEADLOCK|EDESTADDRREQ|EDOM|EDOTDOT|EDQUOT|EEXIST|EFAULT|EFBIG|EHOSTDOWN|EHOSTUNREACH|EHWPOISON|EIDRM|EILSEQ|EINPROGRESS|EINTR|EINVAL|EIO|EISCONN|EISDIR|EISNAM|EKEYEXPIRED|EKEYREJECTED|EKEYREVOKED|EL2HLT|EL2NSYNC|EL3HLT|EL3RST|ELIBACC|ELIBBAD|ELIBEXEC|ELIBMAX|ELIBSCN|ELNRNG|ELOOP|EMEDIUMTYPE|EMFILE|EMLINK|EMSGSIZE|EMULTIHOP|ENAMETOOLONG|ENAVAIL|ENETDOWN|ENETRESET|ENETUNREACH|ENFILE|ENOANO|ENOATTR|ENOBUFS|ENOCSI|ENODATA|ENODEV|ENOENT|ENOEXEC|ENOKEY|ENOLCK|ENOLINK|ENOMEDIUM|ENOMEM|ENOMSG|ENONET|ENOPKG|ENOPROTOOPT|ENOSPC|ENOSR|ENOSTR|ENOSYS|ENOTBLK|ENOTCONN|ENOTDIR|ENOTEMPTY|ENOTNAM|ENOTRECOVERABLE|ENOTSOCK|ENOTSUP|ENOTTY|ENOTUNIQ|ENXIO|EOPNOTSUPP|EOVERFLOW|EOWNERDEAD|EPERM|EPFNOSUPPORT|EPIPE|EPROTO|EPROTONOSUPPORT|EPROTOTYPE|ERANGE|EREMCHG|EREMOTE|EREMOTEIO|ERESTART|ERFKILL|EROFS|ESHUTDOWN|ESOCKTNOSUPPORT|ESPIPE|ESRCH|ESRMNT|ESTALE|ESTRPIPE|ETIME|ETIMEDOUT|ETOOMANYREFS|ETXTBSY|EUCLEAN|EUNATCH|EUSERS|EWOULDBLOCK|EXDEV|EXFULL)>)?/ nextgroup=fjSyscallList contained 32syn match fjSyscallErrno /\v(:(E2BIG|EACCES|EADDRINUSE|EADDRNOTAVAIL|EADV|EAFNOSUPPORT|EAGAIN|EALREADY|EBADE|EBADF|EBADFD|EBADMSG|EBADR|EBADRQC|EBADSLT|EBFONT|EBUSY|ECANCELED|ECHILD|ECHRNG|ECOMM|ECONNABORTED|ECONNREFUSED|ECONNRESET|EDEADLK|EDEADLOCK|EDESTADDRREQ|EDOM|EDOTDOT|EDQUOT|EEXIST|EFAULT|EFBIG|EHOSTDOWN|EHOSTUNREACH|EHWPOISON|EIDRM|EILSEQ|EINPROGRESS|EINTR|EINVAL|EIO|EISCONN|EISDIR|EISNAM|EKEYEXPIRED|EKEYREJECTED|EKEYREVOKED|EL2HLT|EL2NSYNC|EL3HLT|EL3RST|ELIBACC|ELIBBAD|ELIBEXEC|ELIBMAX|ELIBSCN|ELNRNG|ELOOP|EMEDIUMTYPE|EMFILE|EMLINK|EMSGSIZE|EMULTIHOP|ENAMETOOLONG|ENAVAIL|ENETDOWN|ENETRESET|ENETUNREACH|ENFILE|ENOANO|ENOATTR|ENOBUFS|ENOCSI|ENODATA|ENODEV|ENOENT|ENOEXEC|ENOKEY|ENOLCK|ENOLINK|ENOMEDIUM|ENOMEM|ENOMSG|ENONET|ENOPKG|ENOPROTOOPT|ENOSPC|ENOSR|ENOSTR|ENOSYS|ENOTBLK|ENOTCONN|ENOTDIR|ENOTEMPTY|ENOTNAM|ENOTRECOVERABLE|ENOTSOCK|ENOTSUP|ENOTTY|ENOTUNIQ|ENXIO|EOPNOTSUPP|EOVERFLOW|EOWNERDEAD|EPERM|EPFNOSUPPORT|EPIPE|EPROTO|EPROTONOSUPPORT|EPROTOTYPE|ERANGE|EREMCHG|EREMOTE|EREMOTEIO|ERESTART|ERFKILL|EROFS|ESHUTDOWN|ESOCKTNOSUPPORT|ESPIPE|ESRCH|ESRMNT|ESTALE|ESTRPIPE|ETIME|ETIMEDOUT|ETOOMANYREFS|ETXTBSY|EUCLEAN|EUNATCH|EUSERS|EWOULDBLOCK|EXDEV|EXFULL)>)?/ nextgroup=fjSyscallList contained
33syn match fjSyscallList /,/ nextgroup=fjSyscall contained 33syn match fjSyscallList /,/ nextgroup=fjSyscall contained
34 34
35syn keyword fjX11Sandbox none xephyr xorg xpra xvfb contained 35syn keyword fjX11Sandbox none xephyr xorg xpra xvfb contained
36syn keyword fjSeccompAction kill log ERRNO contained
36 37
37syn match fjEnvVar "[A-Za-z0-9_]\+=" contained 38syn match fjEnvVar "[A-Za-z0-9_]\+=" contained
38syn match fjRmenvVar "[A-Za-z0-9_]\+" contained 39syn match fjRmenvVar "[A-Za-z0-9_]\+" contained
@@ -40,6 +41,7 @@ syn match fjRmenvVar "[A-Za-z0-9_]\+" contained
40syn keyword fjAll all contained 41syn keyword fjAll all contained
41syn keyword fjNone none contained 42syn keyword fjNone none contained
42syn keyword fjLo lo contained 43syn keyword fjLo lo contained
44syn keyword fjFilter filter contained
43 45
44" Variable names grabbed from: src/firejail/macros.c 46" Variable names grabbed from: src/firejail/macros.c
45" Generate list with: rg -o '\$\{([^}]+)\}' -r '$1' src/firejail/macros.c | sort -u | tr $'\n' '|' 47" Generate list with: rg -o '\$\{([^}]+)\}' -r '$1' src/firejail/macros.c | sort -u | tr $'\n' '|'
@@ -47,27 +49,30 @@ syn match fjVar /\v\$\{(CFG|DESKTOP|DOCUMENTS|DOWNLOADS|HOME|MUSIC|PATH|PICTURES
47 49
48" Commands grabbed from: src/firejail/profile.c 50" Commands grabbed from: src/firejail/profile.c
49" Generate list with: { rg -o 'strn?cmp\(ptr, "([^"]+) "' -r '$1' src/firejail/profile.c; echo private-lib; } | grep -vEx '(include|ignore|caps\.drop|caps\.keep|protocol|seccomp|seccomp\.drop|seccomp\.keep|env|rmenv|net|ip)' | sort -u | tr $'\n' '|' # private-lib is special-cased in the code and doesn't match the regex; grep-ed patterns are handled later with 'syn match nextgroup=' directives (except for include which is special-cased as a fjCommandNoCond keyword) 51" Generate list with: { rg -o 'strn?cmp\(ptr, "([^"]+) "' -r '$1' src/firejail/profile.c; echo private-lib; } | grep -vEx '(include|ignore|caps\.drop|caps\.keep|protocol|seccomp|seccomp\.drop|seccomp\.keep|env|rmenv|net|ip)' | sort -u | tr $'\n' '|' # private-lib is special-cased in the code and doesn't match the regex; grep-ed patterns are handled later with 'syn match nextgroup=' directives (except for include which is special-cased as a fjCommandNoCond keyword)
50syn match fjCommand /\v(bind|blacklist|blacklist-nolog|cgroup|cpu|defaultgw|dns|hostname|hosts-file|ip6|iprange|join-or-start|mac|mkdir|mkfile|mtu|name|netfilter|netfilter6|netmask|nice|noblacklist|noexec|nowhitelist|overlay-named|private|private-bin|private-etc|private-home|private-lib|private-opt|private-srv|read-only|read-write|rlimit-as|rlimit-cpu|rlimit-fsize|rlimit-nofile|rlimit-nproc|rlimit-sigpending|timeout|tmpfs|veth-name|whitelist|xephyr-screen) / skipwhite contained 52syn match fjCommand /\v(bind|blacklist|blacklist-nolog|cgroup|cpu|defaultgw|dns|hostname|hosts-file|ip6|iprange|join-or-start|mac|mkdir|mkfile|mtu|name|netfilter|netfilter6|netmask|nice|noblacklist|noexec|nowhitelist|overlay-named|private|private-bin|private-cwd|private-etc|private-home|private-lib|private-opt|private-srv|read-only|read-write|rlimit-as|rlimit-cpu|rlimit-fsize|rlimit-nofile|rlimit-nproc|rlimit-sigpending|timeout|tmpfs|veth-name|whitelist|xephyr-screen) / skipwhite contained
51" Generate list with: rg -o 'strn?cmp\(ptr, "([^ "]*[^ ])"' -r '$1' src/firejail/profile.c | grep -vEx '(include|rlimit|quiet)' | sed -e 's/\./\\./' | sort -u | tr $'\n' '|' # include/rlimit are false positives, quiet is special-cased below 53" Generate list with: rg -o 'strn?cmp\(ptr, "([^ "]*[^ ])"' -r '$1' src/firejail/profile.c | grep -vEx '(include|rlimit|quiet)' | sed -e 's/\./\\./' | sort -u | tr $'\n' '|' # include/rlimit are false positives, quiet is special-cased below
52syn match fjCommand /\v(allusers|apparmor|caps|disable-mnt|ipc-namespace|keep-dev-shm|keep-var-tmp|machine-id|memory-deny-write-execute|netfilter|no3d|noautopulse|nodbus|nodvd|nogroups|nonewprivs|noroot|nosound|notv|nou2f|novideo|overlay|overlay-tmpfs|private|private-cache|private-dev|private-lib|private-tmp|seccomp|seccomp\.block-secondary|tracelog|writable-etc|writable-run-user|writable-var|writable-var-log|x11)$/ contained 54syn match fjCommand /\v(allow-debuggers|allusers|apparmor|caps|deterministic-exit-code|deterministic-shutdown|disable-mnt|ipc-namespace|keep-config-pulse|keep-dev-shm|keep-fd|keep-var-tmp|machine-id|memory-deny-write-execute|netfilter|no3d|noautopulse|nodbus|nodvd|nogroups|noinput|nonewprivs|noprinters|noroot|nosound|notv|nou2f|novideo|overlay|overlay-tmpfs|private|private-cache|private-cwd|private-dev|private-lib|private-tmp|seccomp|seccomp\.32|seccomp\.block-secondary|tracelog|writable-etc|writable-run-user|writable-var|writable-var-log|x11)$/ contained
53syn match fjCommand /ignore / nextgroup=fjCommand,fjCommandNoCond skipwhite contained 55syn match fjCommand /ignore / nextgroup=fjCommand,fjCommandNoCond skipwhite contained
54syn match fjCommand /caps\.drop / nextgroup=fjCapability,fjAll skipwhite contained 56syn match fjCommand /caps\.drop / nextgroup=fjCapability,fjAll skipwhite contained
55syn match fjCommand /caps\.keep / nextgroup=fjCapability skipwhite contained 57syn match fjCommand /caps\.keep / nextgroup=fjCapability skipwhite contained
56syn match fjCommand /protocol / nextgroup=fjProtocol skipwhite contained 58syn match fjCommand /protocol / nextgroup=fjProtocol skipwhite contained
57syn match fjCommand /\vseccomp(\.drop|\.keep)? / nextgroup=fjSyscall skipwhite contained 59syn match fjCommand /\vseccomp(\.32)?(\.drop|\.keep)? / nextgroup=fjSyscall skipwhite contained
58syn match fjCommand /x11 / nextgroup=fjX11Sandbox skipwhite contained 60syn match fjCommand /x11 / nextgroup=fjX11Sandbox skipwhite contained
59syn match fjCommand /env / nextgroup=fjEnvVar skipwhite contained 61syn match fjCommand /env / nextgroup=fjEnvVar skipwhite contained
60syn match fjCommand /rmenv / nextgroup=fjRmenvVar skipwhite contained 62syn match fjCommand /rmenv / nextgroup=fjRmenvVar skipwhite contained
61syn match fjCommand /shell / nextgroup=fjNone skipwhite contained 63syn match fjCommand /shell / nextgroup=fjNone skipwhite contained
62syn match fjCommand /net / nextgroup=fjNone,fjLo skipwhite contained 64syn match fjCommand /net / nextgroup=fjNone,fjLo skipwhite contained
63syn match fjCommand /ip / nextgroup=fjNone skipwhite contained 65syn match fjCommand /ip / nextgroup=fjNone skipwhite contained
66syn match fjCommand /seccomp-error-action / nextgroup=fjSeccompAction skipwhite contained
67syn match fjCommand /\vdbus-(user|system) / nextgroup=fjFilter,fjNone skipwhite contained
68syn match fjCommand /\vdbus-(user|system)\.(broadcast|call|own|see|talk) / skipwhite contained
64" Commands that can't be inside a ?CONDITIONAL: statement 69" Commands that can't be inside a ?CONDITIONAL: statement
65syn match fjCommandNoCond /include / skipwhite contained 70syn match fjCommandNoCond /include / skipwhite contained
66syn match fjCommandNoCond /quiet$/ contained 71syn match fjCommandNoCond /quiet$/ contained
67 72
68" Conditionals grabbed from: src/firejail/profile.c 73" Conditionals grabbed from: src/firejail/profile.c
69" Generate list with: awk -- 'BEGIN {process=0;} /^Cond conditionals\[\] = \{$/ {process=1;} /\t*\{"[^"]+".*/ { if (process) {print gensub(/^\t*\{"([^"]+)".*$/, "\\1", 1);} } /^\t\{ NULL, NULL \}$/ {process=0;}' src/firejail/profile.c | sort -u | tr $'\n' '|' 74" Generate list with: awk -- 'BEGIN {process=0;} /^Cond conditionals\[\] = \{$/ {process=1;} /\t*\{"[^"]+".*/ { if (process) {print gensub(/^\t*\{"([^"]+)".*$/, "\\1", 1);} } /^\t\{ NULL, NULL \}$/ {process=0;}' src/firejail/profile.c | sort -u | tr $'\n' '|'
70syn match fjConditional /\v\?(BROWSER_ALLOW_DRM|BROWSER_DISABLE_U2F|HAS_APPIMAGE|HAS_NODBUS) ?:/ nextgroup=fjCommand skipwhite contained 75syn match fjConditional /\v\?(ALLOW_TRAY|BROWSER_ALLOW_DRM|BROWSER_DISABLE_U2F|HAS_APPIMAGE|HAS_NET|HAS_NODBUS|HAS_NOSOUND|HAS_X11) ?:/ nextgroup=fjCommand skipwhite contained
71 76
72" A line is either a command, a conditional or a comment 77" A line is either a command, a conditional or a comment
73syn match fjStatement /^/ nextgroup=fjCommand,fjCommandNoCond,fjConditional,fjComment 78syn match fjStatement /^/ nextgroup=fjCommand,fjCommandNoCond,fjConditional,fjComment
@@ -88,6 +93,8 @@ hi def link fjRmenvVar Type
88hi def link fjAll Type 93hi def link fjAll Type
89hi def link fjNone Type 94hi def link fjNone Type
90hi def link fjLo Type 95hi def link fjLo Type
96hi def link fjFilter Type
97hi def link fjSeccompAction Type
91 98
92 99
93let b:current_syntax = "firejail" 100let b:current_syntax = "firejail"
diff --git a/etc-fixes/0.9.58/atom.profile b/etc-fixes/0.9.58/atom.profile
index 9bc35da5a..1cc9b0116 100644
--- a/etc-fixes/0.9.58/atom.profile
+++ b/etc-fixes/0.9.58/atom.profile
@@ -1,4 +1,3 @@
1
2# Firejail profile for atom 1# Firejail profile for atom
3# Description: A hackable text editor for the 21st Century 2# Description: A hackable text editor for the 21st Century
4# This file is overwritten after every install/update 3# This file is overwritten after every install/update
diff --git a/etc-fixes/seccomp-join-bug/README b/etc-fixes/seccomp-join-bug/README
index 9f85a0e00..15596eca7 100644
--- a/etc-fixes/seccomp-join-bug/README
+++ b/etc-fixes/seccomp-join-bug/README
@@ -8,4 +8,3 @@ on May 21, 2019:
8 8
9The original discussion thread: https://github.com/netblue30/firejail/issues/2718 9The original discussion thread: https://github.com/netblue30/firejail/issues/2718
10The fix on mainline: https://github.com/netblue30/firejail/commit/eecf35c2f8249489a1d3e512bb07f0d427183134 10The fix on mainline: https://github.com/netblue30/firejail/commit/eecf35c2f8249489a1d3e512bb07f0d427183134
11
diff --git a/etc/apparmor/firejail-base b/etc/apparmor/firejail-base
new file mode 100644
index 000000000..6e286d4af
--- /dev/null
+++ b/etc/apparmor/firejail-base
@@ -0,0 +1,27 @@
1#########################################
2# Firejail base abstraction drop-in
3#
4# Adds basic Firejail support to AppArmor profiles.
5# Please note: Firejail's nonewprivs and seccomp options
6# are not compatible with AppArmor profile transitions.
7# Also there is no support for Firejail chroot options.
8#########################################
9
10# Discovery of process names
11owner /proc/@{pid}/comm r,
12
13##########
14# Following paths only exist inside a Firejail sandbox
15##########
16
17# Library preloading
18/{,var/}run/firejail/lib/*.so mr,
19
20# Supporting seccomp
21owner /{,var/}run/firejail/mnt/seccomp/seccomp.postexec r,
22
23# Supporting trace
24owner /{,var/}run/firejail/mnt/trace w,
25
26# Supporting tracelog
27/{,var/}run/firejail/mnt/fslogger r,
diff --git a/etc/apparmor/firejail-default b/etc/apparmor/firejail-default
index ca32f5b0d..a7044152e 100644
--- a/etc/apparmor/firejail-default
+++ b/etc/apparmor/firejail-default
@@ -129,7 +129,7 @@ signal (receive),
129########## 129##########
130# The list of recognized capabilities varies from one apparmor version to another. 130# The list of recognized capabilities varies from one apparmor version to another.
131# For example on Debian 10 (apparmor 2.13.2) checkpoint_restore, perfmon, bpf are not available 131# For example on Debian 10 (apparmor 2.13.2) checkpoint_restore, perfmon, bpf are not available
132# We allow all caps by default and remove the ones we don't like: 132# We allow all caps by default and remove the ones we don't like:
133capability, 133capability,
134deny capability audit_write, 134deny capability audit_write,
135deny capability audit_control, 135deny capability audit_control,
diff --git a/etc/apparmor/firejail-local b/etc/apparmor/firejail-local
index 3dfd3d0ea..59c8f7f8a 100644
--- a/etc/apparmor/firejail-local
+++ b/etc/apparmor/firejail-local
@@ -8,6 +8,9 @@
8#owner @HOME/bin/** ix 8#owner @HOME/bin/** ix
9#owner @HOME/.local/bin/** ix 9#owner @HOME/.local/bin/** ix
10 10
11# Uncomment to opt-in to apparmor for brave + ipfs
12#owner @{HOME}/.config/BraveSoftware/Brave-Browser/oecghfpdmkjlhnfpmmjegjacfimiafjp/*/** ix,
13
11# Uncomment to opt-in to apparmor for brave + tor 14# Uncomment to opt-in to apparmor for brave + tor
12#owner @{HOME}/.config/BraveSoftware/Brave-Browser/biahpgbdmdkfgndcmfiipgcebobojjkp/*/** ix, 15#owner @{HOME}/.config/BraveSoftware/Brave-Browser/biahpgbdmdkfgndcmfiipgcebobojjkp/*/** ix,
13 16
diff --git a/etc/firejail.config b/etc/firejail.config
index 731e744dd..856018101 100644
--- a/etc/firejail.config
+++ b/etc/firejail.config
@@ -2,6 +2,10 @@
2# keyword-argument pairs, one per line. Most features are enabled by default. 2# keyword-argument pairs, one per line. Most features are enabled by default.
3# Use 'yes' or 'no' as configuration values. 3# Use 'yes' or 'no' as configuration values.
4 4
5# Allow programs to display a tray icon (warning: allows escaping the sandbox;
6# see https://github.com/netblue30/firejail/discussions/4053)
7# allow-tray no
8
5# Enable AppArmor functionality, default enabled. 9# Enable AppArmor functionality, default enabled.
6# apparmor yes 10# apparmor yes
7 11
@@ -35,23 +39,12 @@
35# cannot be overridden by --noblacklist or --ignore. 39# cannot be overridden by --noblacklist or --ignore.
36# disable-mnt no 40# disable-mnt no
37 41
38# Set the limit for file copy in several --private-* options. The size is set
39# in megabytes. By default we allow up to 500MB.
40# Note: the files are copied in RAM.
41# file-copy-limit 500
42
43# Enable or disable file transfer support, default enabled. 42# Enable or disable file transfer support, default enabled.
44# file-transfer yes 43# file-transfer yes
45 44
46# Enable Firejail green prompt in terminal, default disabled 45# Enable Firejail green prompt in terminal, default disabled
47# firejail-prompt no 46# firejail-prompt no
48 47
49# Follow symlink as user. While using --whitelist feature,
50# symlinks pointing outside home directory are followed only
51# if both the link and the real file are owned by the user.
52# Enabled by default
53# follow-symlink-as-user yes
54
55# Force use of nonewprivs. This mitigates the possibility of 48# Force use of nonewprivs. This mitigates the possibility of
56# a user abusing firejail's features to trick a privileged (suid 49# a user abusing firejail's features to trick a privileged (suid
57# or file capabilities) process into loading code or configuration 50# or file capabilities) process into loading code or configuration
@@ -74,7 +67,7 @@
74# a file argument, the default filter is hardcoded (see man 1 firejail). This 67# a file argument, the default filter is hardcoded (see man 1 firejail). This
75# configuration entry allows the user to change the default by specifying 68# configuration entry allows the user to change the default by specifying
76# a file containing the filter configuration. The filter file format is the 69# a file containing the filter configuration. The filter file format is the
77# format of iptables-save and iptable-restore commands. Example: 70# format of iptables-save and iptables-restore commands. Example:
78# netfilter-default /etc/iptables.iptables.rules 71# netfilter-default /etc/iptables.iptables.rules
79 72
80# Enable or disable networking features, default enabled. 73# Enable or disable networking features, default enabled.
@@ -83,18 +76,35 @@
83# Enable or disable overlayfs features, default enabled. 76# Enable or disable overlayfs features, default enabled.
84# overlayfs yes 77# overlayfs yes
85 78
79# Set the limit for file copy in several --private-* options. The size is set
80# in megabytes. By default we allow up to 500MB.
81# Note: the files are copied in RAM.
82# file-copy-limit 500
83
84# Enable or disable private-bin feature, default enabled.
85# private-bin yes
86
86# Remove /usr/local directories from private-bin list, default disabled. 87# Remove /usr/local directories from private-bin list, default disabled.
87# private-bin-no-local no 88# private-bin-no-local no
88 89
89# Enable or disable private-cache feature, default enabled 90# Enable or disable private-cache feature, default enabled
90# private-cache yes 91# private-cache yes
91 92
93# Enable or disable private-etc feature, default enabled.
94# private-etc yes
95
92# Enable or disable private-home feature, default enabled 96# Enable or disable private-home feature, default enabled
93# private-home yes 97# private-home yes
94 98
95# Enable or disable private-lib feature, default enabled 99# Enable or disable private-lib feature, default enabled
96# private-lib yes 100# private-lib yes
97 101
102# Enable or disable private-opt feature, default enabled.
103# private-opt yes
104
105# Enable or disable private-srv feature, default enabled.
106# private-srv yes
107
98# Enable --quiet as default every time the sandbox is started. Default disabled. 108# Enable --quiet as default every time the sandbox is started. Default disabled.
99# quiet-by-default no 109# quiet-by-default no
100 110
@@ -107,14 +117,19 @@
107# Enable or disable seccomp support, default enabled. 117# Enable or disable seccomp support, default enabled.
108# seccomp yes 118# seccomp yes
109 119
120# Add rules to the default seccomp filter. Same syntax as for --seccomp=
121# None by default; this is an example.
122# seccomp-filter-add !chroot,kcmp,mincore
123
110# Seccomp error action, kill, log or errno (EPERM, ENOSYS etc) 124# Seccomp error action, kill, log or errno (EPERM, ENOSYS etc)
111# seccomp-error-action EPERM 125# seccomp-error-action EPERM
112 126
113# Enable or disable user namespace support, default enabled. 127# Enable or disable user namespace support, default enabled.
114# userns yes 128# userns yes
115 129
116# Enable or disable whitelisting support, default enabled. 130# Disable whitelist top level directories, in addition to those
117# whitelist yes 131# that are disabled out of the box. None by default; this is an example.
132# whitelist-disable-topdir /etc,/usr/etc
118 133
119# Enable or disable X11 sandboxing support, default enabled. 134# Enable or disable X11 sandboxing support, default enabled.
120# x11 yes 135# x11 yes
diff --git a/etc/ids.config b/etc/ids.config
new file mode 100644
index 000000000..ff55416ca
--- /dev/null
+++ b/etc/ids.config
@@ -0,0 +1,158 @@
1# /etc/firejail/ids.config - configuration file for Firejail's Intrusion Detection System
2# This config file is overwritten when a new version of Firejail is installed.
3# For global customization use /etc/firejail/ids.config.local.
4include ids.config.local
5#
6# Each line is a file or directory name such as
7# /usr/bin
8# or
9# ${HOME}/Desktop/*.desktop
10#
11# ${HOME} is expanded to the user's home directory, and * is the regular
12# globbing match for zero or more characters.
13#
14# File or directory names starting with ! are not scanned. For example
15# !${HOME}/.ssh/known_hosts
16# ${HOME}/.ssh
17# will scan all files in ~/.ssh directory with the exception of known_hosts
18
19### system executables ###
20/bin
21/sbin
22/usr/bin
23/usr/games
24/usr/libexec
25/usr/sbin
26
27### user executables ###
28#/opt
29#/usr/local
30
31### system libraries ###
32#/lib
33#/usr/lib
34#/usr/lib32
35#/usr/lib64
36#/usr/libx32
37
38### shells local ###
39# bash
40${HOME}/.bash_aliases
41${HOME}/.bash_login
42${HOME}/.bash_logout
43${HOME}/.bash_profile
44${HOME}/.bashrc
45# fish
46${HOME}/.config/fish/config.fish
47# others
48${HOME}/.cshrc
49${HOME}/.kshrc
50${HOME}/.login
51${HOME}/.logout
52${HOME}/.profile
53${HOME}/.tcshrc
54# zsh
55${HOME}/.zlogin
56${HOME}/.zlogout
57${HOME}/.zshenv
58${HOME}/.zshprofile
59${HOME}/.zshrc
60
61### shells global ###
62# all
63/etc/dircolors
64/etc/environment
65/etc/profile
66/etc/profile.d
67/etc/shells
68/etc/skel
69# bash
70/etc/bash_completion*
71/etc/bash.bashrc
72/etc/bashrc
73# fish
74/etc/fish
75# ksh
76/etc/ksh.kshrc
77# tcsh
78/etc/complete.tcsh
79/etc/csh.cshrc
80/etc/csh.login
81/etc/csh.logout
82# zsh
83/etc/zlogin
84/etc/zlogout
85/etc/zprofile
86/etc/zshenv
87/etc/zshrc
88
89### X11 ###
90/etc/X11
91${HOME}/.xinitrc
92${HOME}/.xmodmaprc
93${HOME}/.xprofile
94${HOME}/.Xresources
95${HOME}/.xserverrc
96${HOME}/.Xsession
97${HOME}/.xsession
98${HOME}/.xsessionrc
99
100### window/desktop manager ###
101${HOME}/Desktop/*.desktop
102${HOME}/.config/autostart
103${HOME}/.config/autostart-scripts
104${HOME}/.config/lxsession/LXDE/autostart
105${HOME}/.config/openbox/autostart
106${HOME}/.config/openbox/environment
107${HOME}/.config/plasma-workspace/env
108${HOME}/.config/plasma-workspace/shutdown
109${HOME}/.gnomerc
110${HOME}/.gtkrc
111${HOME}/.kde/Autostart
112${HOME}/.kde/env
113${HOME}/.kde/share/autostart
114${HOME}/.kde/shutdown
115${HOME}/.kde4/Autostart
116${HOME}/.kde4/env
117${HOME}/.kde4/share/autostart
118${HOME}/.kde4/shutdown
119${HOME}/.kderc
120${HOME}/.local/share/autostart
121
122### security ###
123/etc/aide
124/etc/apparmor*
125/etc/chkrootkit.conf
126/etc/cracklib
127/etc/libaudit.conf
128/etc/group*
129/etc/gshadow*
130/etc/pam.*
131/etc/passwd*
132/etc/rkhunter*
133/etc/securetty
134/etc/security
135/etc/selinux
136/etc/shadow*
137/etc/sudoers*
138/etc/tripwire
139${HOME}/.config/firejail
140${HOME}/.gnupg
141${HOME}/.pam_environment
142
143### network security ###
144/etc/ca-certificates*
145/etc/hosts.*
146/etc/services
147/etc/snort
148/etc/ssh
149/etc/ssl
150/etc/wireshark
151!${HOME}/.ssh/known_hosts # excluding
152${HOME}/.ssh
153/usr/share/ca-certificates
154
155### system config ###
156/etc/cron.*
157/etc/crontab
158/etc/default
diff --git a/etc/inc/allow-common-devel.inc b/etc/inc/allow-common-devel.inc
index 41643657d..4e460fc10 100644
--- a/etc/inc/allow-common-devel.inc
+++ b/etc/inc/allow-common-devel.inc
@@ -15,6 +15,7 @@ noblacklist ${HOME}/.java
15noblacklist ${HOME}/.node-gyp 15noblacklist ${HOME}/.node-gyp
16noblacklist ${HOME}/.npm 16noblacklist ${HOME}/.npm
17noblacklist ${HOME}/.npmrc 17noblacklist ${HOME}/.npmrc
18noblacklist ${HOME}/.nvm
18noblacklist ${HOME}/.yarn 19noblacklist ${HOME}/.yarn
19noblacklist ${HOME}/.yarn-config 20noblacklist ${HOME}/.yarn-config
20noblacklist ${HOME}/.yarncache 21noblacklist ${HOME}/.yarncache
@@ -26,11 +27,8 @@ noblacklist ${HOME}/.python-history
26noblacklist ${HOME}/.python_history 27noblacklist ${HOME}/.python_history
27noblacklist ${HOME}/.pythonhist 28noblacklist ${HOME}/.pythonhist
28 29
30# Ruby
31noblacklist ${HOME}/.bundle
32
29# Rust 33# Rust
30noblacklist ${HOME}/.cargo/advisory-db 34noblacklist ${HOME}/.cargo
31noblacklist ${HOME}/.cargo/config
32noblacklist ${HOME}/.cargo/git
33noblacklist ${HOME}/.cargo/registry
34noblacklist ${HOME}/.cargo/.crates.toml
35noblacklist ${HOME}/.cargo/.crates2.json
36noblacklist ${HOME}/.cargo/.package-cache
diff --git a/etc/inc/allow-nodejs.inc b/etc/inc/allow-nodejs.inc
index 78a4bed80..351c94ab8 100644
--- a/etc/inc/allow-nodejs.inc
+++ b/etc/inc/allow-nodejs.inc
@@ -4,3 +4,7 @@ include allow-nodejs.local
4 4
5noblacklist ${PATH}/node 5noblacklist ${PATH}/node
6noblacklist /usr/include/node 6noblacklist /usr/include/node
7
8# Allow python for node-gyp (blacklisted by disable-interpreters.inc)
9include allow-python2.inc
10include allow-python3.inc
diff --git a/etc/inc/allow-opengl-game.inc b/etc/inc/allow-opengl-game.inc
index b5ff1bd50..5d2d6c5c1 100644
--- a/etc/inc/allow-opengl-game.inc
+++ b/etc/inc/allow-opengl-game.inc
@@ -1,3 +1,7 @@
1# This file is overwritten during software install.
2# Persistent customizations should go in a .local file.
3include allow-opengl-game.local
4
1noblacklist ${PATH}/bash 5noblacklist ${PATH}/bash
2whitelist /usr/share/opengl-games-utils/opengl-game-functions.sh 6whitelist /usr/share/opengl-games-utils/opengl-game-functions.sh
3private-bin basename,bash,cut,glxinfo,grep,head,sed,zenity 7private-bin basename,bash,cut,glxinfo,grep,head,sed,zenity
diff --git a/etc/inc/allow-perl.inc b/etc/inc/allow-perl.inc
index 5a1952c94..a473900da 100644
--- a/etc/inc/allow-perl.inc
+++ b/etc/inc/allow-perl.inc
@@ -10,3 +10,6 @@ noblacklist ${PATH}/vendor_perl
10noblacklist /usr/lib/perl* 10noblacklist /usr/lib/perl*
11noblacklist /usr/lib64/perl* 11noblacklist /usr/lib64/perl*
12noblacklist /usr/share/perl* 12noblacklist /usr/share/perl*
13
14# rxvt is also blacklisted in disable-interpreters.inc
15noblacklist ${PATH}/rxvt
diff --git a/etc/inc/allow-ruby.inc b/etc/inc/allow-ruby.inc
index a8c701219..00276cac7 100644
--- a/etc/inc/allow-ruby.inc
+++ b/etc/inc/allow-ruby.inc
@@ -4,3 +4,4 @@ include allow-ruby.local
4 4
5noblacklist ${PATH}/ruby 5noblacklist ${PATH}/ruby
6noblacklist /usr/lib/ruby 6noblacklist /usr/lib/ruby
7noblacklist /usr/lib64/ruby
diff --git a/etc/inc/allow-ssh.inc b/etc/inc/allow-ssh.inc
index 67c78a483..5d41e6607 100644
--- a/etc/inc/allow-ssh.inc
+++ b/etc/inc/allow-ssh.inc
@@ -5,4 +5,11 @@ include allow-ssh.local
5noblacklist ${HOME}/.ssh 5noblacklist ${HOME}/.ssh
6noblacklist /etc/ssh 6noblacklist /etc/ssh
7noblacklist /etc/ssh/ssh_config 7noblacklist /etc/ssh/ssh_config
8noblacklist ${PATH}/ssh
8noblacklist /tmp/ssh-* 9noblacklist /tmp/ssh-*
10# Arch Linux and derivatives
11noblacklist /usr/lib/ssh
12# Debian/Ubuntu and derivatives
13noblacklist /usr/lib/openssh
14# Fedora and derivatives
15noblacklist /usr/libexec/openssh
diff --git a/etc/inc/disable-X11.inc b/etc/inc/disable-X11.inc
new file mode 100644
index 000000000..d227c7a0b
--- /dev/null
+++ b/etc/inc/disable-X11.inc
@@ -0,0 +1,15 @@
1# This file is overwritten during software install.
2# Persistent customizations should go in a .local file.
3include disable-X11.local
4
5blacklist /tmp/.X11-unix
6blacklist ${HOME}/.Xauthority
7blacklist ${RUNUSER}/gdm/Xauthority
8blacklist ${RUNUSER}/.mutter-Xwaylandauth*
9blacklist ${RUNUSER}/xauth_*
10#blacklist ${RUNUSER}/[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]]-[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]]-[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]]-[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]]-[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]]
11blacklist /tmp/xauth*
12blacklist /tmp/.ICE-unix
13blacklist ${RUNUSER}/ICEauthority
14rmenv DISPLAY
15rmenv XAUTHORITY
diff --git a/etc/inc/disable-common.inc b/etc/inc/disable-common.inc
index 35f89e11b..43332b4d0 100644
--- a/etc/inc/disable-common.inc
+++ b/etc/inc/disable-common.inc
@@ -16,7 +16,9 @@ blacklist-nolog ${HOME}/.history
16blacklist-nolog ${HOME}/.kde/share/apps/klipper 16blacklist-nolog ${HOME}/.kde/share/apps/klipper
17blacklist-nolog ${HOME}/.kde4/share/apps/klipper 17blacklist-nolog ${HOME}/.kde4/share/apps/klipper
18blacklist-nolog ${HOME}/.local/share/fish/fish_history 18blacklist-nolog ${HOME}/.local/share/fish/fish_history
19blacklist-nolog ${HOME}/.local/share/ibus-typing-booster
19blacklist-nolog ${HOME}/.local/share/klipper 20blacklist-nolog ${HOME}/.local/share/klipper
21blacklist-nolog ${HOME}/.local/share/nvim
20blacklist-nolog ${HOME}/.macromedia 22blacklist-nolog ${HOME}/.macromedia
21blacklist-nolog ${HOME}/.mupdf.history 23blacklist-nolog ${HOME}/.mupdf.history
22blacklist-nolog ${HOME}/.python-history 24blacklist-nolog ${HOME}/.python-history
@@ -159,20 +161,23 @@ blacklist ${RUNUSER}/gsconnect
159# systemd 161# systemd
160blacklist ${HOME}/.config/systemd 162blacklist ${HOME}/.config/systemd
161blacklist ${HOME}/.local/share/systemd 163blacklist ${HOME}/.local/share/systemd
162blacklist /var/lib/systemd 164blacklist ${PATH}/systemctl
163blacklist ${PATH}/systemd-run 165blacklist ${PATH}/systemd-run
164blacklist ${RUNUSER}/systemd 166blacklist ${RUNUSER}/systemd
167blacklist /etc/systemd/network
168blacklist /etc/systemd/system
169blacklist /var/lib/systemd
165# creates problems on Arch where /etc/resolv.conf is a symlink to /var/run/systemd/resolve/resolv.conf 170# creates problems on Arch where /etc/resolv.conf is a symlink to /var/run/systemd/resolve/resolv.conf
166#blacklist /var/run/systemd 171#blacklist /var/run/systemd
167 172
168# openrc 173# openrc
169blacklist /etc/runlevels/ 174blacklist /etc/init.d
170blacklist /etc/init.d/
171blacklist /etc/rc.conf 175blacklist /etc/rc.conf
176blacklist /etc/runlevels
172 177
173# VirtualBox 178# VirtualBox
174blacklist ${HOME}/.VirtualBox
175blacklist ${HOME}/.config/VirtualBox 179blacklist ${HOME}/.config/VirtualBox
180blacklist ${HOME}/.VirtualBox
176blacklist ${HOME}/VirtualBox VMs 181blacklist ${HOME}/VirtualBox VMs
177 182
178# GNOME Boxes 183# GNOME Boxes
@@ -242,20 +247,34 @@ blacklist /var/spool/cron
242blacklist /var/spool/mail 247blacklist /var/spool/mail
243 248
244# etc 249# etc
250blacklist /etc/adduser.conf
245blacklist /etc/anacrontab 251blacklist /etc/anacrontab
252blacklist /etc/apparmor*
246blacklist /etc/cron* 253blacklist /etc/cron*
254blacklist /etc/default
255blacklist /etc/dkms
256blacklist /etc/grub*
257blacklist /etc/kernel*
258blacklist /etc/logrotate*
259blacklist /etc/modules*
247blacklist /etc/profile.d 260blacklist /etc/profile.d
248blacklist /etc/rc.local 261blacklist /etc/rc.local
249# rc1.d, rc2.d, ... 262# rc1.d, rc2.d, ...
250blacklist /etc/rc?.d 263blacklist /etc/rc?.d
251blacklist /etc/kernel* 264blacklist /etc/sysconfig
252blacklist /etc/grub* 265
253blacklist /etc/dkms 266# hide config for various intrusion detection systems
254blacklist /etc/apparmor* 267blacklist /etc/aide
255blacklist /etc/selinux 268blacklist /etc/aide.conf
256blacklist /etc/modules* 269blacklist /etc/chkrootkit.conf
257blacklist /etc/logrotate* 270blacklist /etc/fail2ban.conf
258blacklist /etc/adduser.conf 271blacklist /etc/logcheck
272blacklist /etc/lynis
273blacklist /etc/rkhunter.*
274blacklist /etc/snort
275blacklist /etc/suricata
276blacklist /etc/tripwire
277blacklist /var/lib/rkhunter
259 278
260# Startup files 279# Startup files
261read-only ${HOME}/.antigen 280read-only ${HOME}/.antigen
@@ -305,6 +324,7 @@ read-only ${HOME}/.ssh/config.d
305# Initialization files that allow arbitrary command execution 324# Initialization files that allow arbitrary command execution
306read-only ${HOME}/.caffrc 325read-only ${HOME}/.caffrc
307read-only ${HOME}/.cargo/env 326read-only ${HOME}/.cargo/env
327read-only ${HOME}/.config/nvim
308read-only ${HOME}/.dotfiles 328read-only ${HOME}/.dotfiles
309read-only ${HOME}/.emacs 329read-only ${HOME}/.emacs
310read-only ${HOME}/.emacs.d 330read-only ${HOME}/.emacs.d
@@ -314,6 +334,7 @@ read-only ${HOME}/.homesick
314read-only ${HOME}/.iscreenrc 334read-only ${HOME}/.iscreenrc
315read-only ${HOME}/.local/lib 335read-only ${HOME}/.local/lib
316read-only ${HOME}/.local/share/cool-retro-term 336read-only ${HOME}/.local/share/cool-retro-term
337read-only ${HOME}/.local/share/nvim
317read-only ${HOME}/.mailcap 338read-only ${HOME}/.mailcap
318read-only ${HOME}/.msmtprc 339read-only ${HOME}/.msmtprc
319read-only ${HOME}/.mutt/muttrc 340read-only ${HOME}/.mutt/muttrc
@@ -335,13 +356,15 @@ read-only ${HOME}/_vimrc
335read-only ${HOME}/dotfiles 356read-only ${HOME}/dotfiles
336 357
337# Make directories commonly found in $PATH read-only 358# Make directories commonly found in $PATH read-only
359read-only ${HOME}/.bin
360read-only ${HOME}/.cargo/bin
338read-only ${HOME}/.gem 361read-only ${HOME}/.gem
362read-only ${HOME}/.local/bin
339read-only ${HOME}/.luarocks 363read-only ${HOME}/.luarocks
340read-only ${HOME}/.npm-packages 364read-only ${HOME}/.npm-packages
365read-only ${HOME}/.nvm
366read-only ${HOME}/.rustup
341read-only ${HOME}/bin 367read-only ${HOME}/bin
342read-only ${HOME}/.bin
343read-only ${HOME}/.local/bin
344read-only ${HOME}/.cargo/bin
345 368
346# Write-protection for desktop entries 369# Write-protection for desktop entries
347read-only ${HOME}/.config/menus 370read-only ${HOME}/.config/menus
@@ -360,13 +383,32 @@ read-only ${HOME}/.local/share/thumbnailers
360blacklist /tmp/ssh-* 383blacklist /tmp/ssh-*
361 384
362# top secret 385# top secret
386blacklist /.fscrypt
387blacklist /etc/davfs2/secrets
388blacklist /etc/group+
389blacklist /etc/group-
390blacklist /etc/gshadow
391blacklist /etc/gshadow+
392blacklist /etc/gshadow-
393blacklist /etc/passwd+
394blacklist /etc/passwd-
395blacklist /etc/shadow
396blacklist /etc/shadow+
397blacklist /etc/shadow-
398blacklist /etc/ssh
399blacklist /etc/ssh/*
400blacklist /home/.ecryptfs
401blacklist /home/.fscrypt
363blacklist ${HOME}/*.kdb 402blacklist ${HOME}/*.kdb
364blacklist ${HOME}/*.kdbx 403blacklist ${HOME}/*.kdbx
365blacklist ${HOME}/*.key 404blacklist ${HOME}/*.key
405blacklist ${HOME}/Private
366blacklist ${HOME}/.Private 406blacklist ${HOME}/.Private
367blacklist ${HOME}/.caff 407blacklist ${HOME}/.caff
368blacklist ${HOME}/.cargo/credentials 408blacklist ${HOME}/.cargo/credentials
409blacklist ${HOME}/.cargo/credentials.toml
369blacklist ${HOME}/.cert 410blacklist ${HOME}/.cert
411blacklist ${HOME}/.config/hub
370blacklist ${HOME}/.config/keybase 412blacklist ${HOME}/.config/keybase
371blacklist ${HOME}/.davfs2/secrets 413blacklist ${HOME}/.davfs2/secrets
372blacklist ${HOME}/.ecryptfs 414blacklist ${HOME}/.ecryptfs
@@ -376,40 +418,37 @@ blacklist ${HOME}/.git-credential-cache
376blacklist ${HOME}/.git-credentials 418blacklist ${HOME}/.git-credentials
377blacklist ${HOME}/.gnome2/keyrings 419blacklist ${HOME}/.gnome2/keyrings
378blacklist ${HOME}/.gnupg 420blacklist ${HOME}/.gnupg
379blacklist ${HOME}/.config/hub
380blacklist ${HOME}/.kde/share/apps/kwallet 421blacklist ${HOME}/.kde/share/apps/kwallet
381blacklist ${HOME}/.kde4/share/apps/kwallet 422blacklist ${HOME}/.kde4/share/apps/kwallet
382blacklist ${HOME}/.local/share/keyrings 423blacklist ${HOME}/.local/share/keyrings
383blacklist ${HOME}/.local/share/kwalletd 424blacklist ${HOME}/.local/share/kwalletd
425blacklist ${HOME}/.local/share/pki
384blacklist ${HOME}/.local/share/plasma-vault 426blacklist ${HOME}/.local/share/plasma-vault
427blacklist ${HOME}/.minisign
385blacklist ${HOME}/.msmtprc 428blacklist ${HOME}/.msmtprc
386blacklist ${HOME}/.mutt 429blacklist ${HOME}/.mutt
387blacklist ${HOME}/.muttrc 430blacklist ${HOME}/.muttrc
388blacklist ${HOME}/.netrc 431blacklist ${HOME}/.netrc
389blacklist ${HOME}/.nyx 432blacklist ${HOME}/.nyx
390blacklist ${HOME}/.pki 433blacklist ${HOME}/.pki
391blacklist ${HOME}/.local/share/pki
392blacklist ${HOME}/.smbcredentials 434blacklist ${HOME}/.smbcredentials
393blacklist ${HOME}/.ssh 435blacklist ${HOME}/.ssh
394blacklist ${HOME}/.vaults 436blacklist ${HOME}/.vaults
395blacklist /.fscrypt 437blacklist /run/timeshift
396blacklist /etc/davfs2/secrets
397blacklist /etc/group+
398blacklist /etc/group-
399blacklist /etc/gshadow
400blacklist /etc/gshadow+
401blacklist /etc/gshadow-
402blacklist /etc/passwd+
403blacklist /etc/passwd-
404blacklist /etc/shadow
405blacklist /etc/shadow+
406blacklist /etc/shadow-
407blacklist /etc/ssh
408blacklist /etc/ssh/*
409blacklist /home/.ecryptfs
410blacklist /home/.fscrypt
411blacklist /var/backup 438blacklist /var/backup
412 439
440# Remove environment variables with auth tokens.
441# Note however that the sandbox might still have access to the
442# files where these variables are set.
443rmenv GH_TOKEN
444rmenv GITHUB_TOKEN
445rmenv GH_ENTERPRISE_TOKEN
446rmenv GITHUB_ENTERPRISE_TOKEN
447rmenv CARGO_REGISTRY_TOKEN
448rmenv RESTIC_KEY_HINT
449rmenv RESTIC_PASSWORD_COMMAND
450rmenv RESTIC_PASSWORD_FILE
451
413# cloud provider configuration 452# cloud provider configuration
414blacklist ${HOME}/.aws 453blacklist ${HOME}/.aws
415blacklist ${HOME}/.boto 454blacklist ${HOME}/.boto
@@ -424,7 +463,7 @@ blacklist /sbin
424blacklist /usr/local/sbin 463blacklist /usr/local/sbin
425blacklist /usr/sbin 464blacklist /usr/sbin
426 465
427# system management 466# system management and various SUID executables
428blacklist ${PATH}/at 467blacklist ${PATH}/at
429blacklist ${PATH}/busybox 468blacklist ${PATH}/busybox
430blacklist ${PATH}/chage 469blacklist ${PATH}/chage
@@ -459,6 +498,42 @@ blacklist ${PATH}/umount
459blacklist ${PATH}/unix_chkpwd 498blacklist ${PATH}/unix_chkpwd
460blacklist ${PATH}/xev 499blacklist ${PATH}/xev
461blacklist ${PATH}/xinput 500blacklist ${PATH}/xinput
501# from 0.9.67
502blacklist /usr/lib/openssh
503blacklist /usr/lib/ssh
504blacklist /usr/libexec/openssh
505blacklist ${PATH}/passwd
506blacklist /usr/lib/xorg/Xorg.wrap
507blacklist /usr/lib/policykit-1/polkit-agent-helper-1
508blacklist /usr/lib/dbus-1.0/dbus-daemon-launch-helper
509blacklist /usr/lib/eject/dmcrypt-get-device
510blacklist /usr/lib/chromium/chrome-sandbox
511blacklist /usr/lib/vmware
512blacklist ${PATH}/suexec
513blacklist /usr/lib/squid/basic_pam_auth
514blacklist ${PATH}/slock
515blacklist ${PATH}/physlock
516blacklist ${PATH}/schroot
517blacklist ${PATH}/wshowkeys
518blacklist ${PATH}/pmount
519blacklist ${PATH}/pumount
520blacklist ${PATH}/bmon
521blacklist ${PATH}/fping
522blacklist ${PATH}/fping6
523blacklist ${PATH}/hostname
524# blacklist ${PATH}/ip - breaks --ip=dhcp
525blacklist ${PATH}/mtr
526blacklist ${PATH}/mtr-packet
527blacklist ${PATH}/netstat
528blacklist ${PATH}/nm-online
529blacklist ${PATH}/nmcli
530blacklist ${PATH}/nmtui
531blacklist ${PATH}/nmtui-connect
532blacklist ${PATH}/nmtui-edit
533blacklist ${PATH}/nmtui-hostname
534blacklist ${PATH}/networkctl
535blacklist ${PATH}/ss
536blacklist ${PATH}/traceroute
462 537
463# other SUID binaries 538# other SUID binaries
464blacklist /usr/lib/virtualbox 539blacklist /usr/lib/virtualbox
@@ -470,10 +545,12 @@ blacklist /tmp/.lxterminal-socket*
470blacklist /tmp/tmux-* 545blacklist /tmp/tmux-*
471 546
472# disable terminals running as server resulting in sandbox escape 547# disable terminals running as server resulting in sandbox escape
473blacklist ${PATH}/lxterminal
474blacklist ${PATH}/gnome-terminal 548blacklist ${PATH}/gnome-terminal
475blacklist ${PATH}/gnome-terminal.wrapper 549blacklist ${PATH}/gnome-terminal.wrapper
550# blacklist ${PATH}/konsole
551# konsole doesn't seem to have this problem - last tested on Ubuntu 16.04
476blacklist ${PATH}/lilyterm 552blacklist ${PATH}/lilyterm
553blacklist ${PATH}/lxterminal
477blacklist ${PATH}/mate-terminal 554blacklist ${PATH}/mate-terminal
478blacklist ${PATH}/mate-terminal.wrapper 555blacklist ${PATH}/mate-terminal.wrapper
479blacklist ${PATH}/pantheon-terminal 556blacklist ${PATH}/pantheon-terminal
@@ -485,8 +562,6 @@ blacklist ${PATH}/urxvtc
485blacklist ${PATH}/urxvtcd 562blacklist ${PATH}/urxvtcd
486blacklist ${PATH}/xfce4-terminal 563blacklist ${PATH}/xfce4-terminal
487blacklist ${PATH}/xfce4-terminal.wrapper 564blacklist ${PATH}/xfce4-terminal.wrapper
488# blacklist ${PATH}/konsole
489# konsole doesn't seem to have this problem - last tested on Ubuntu 16.04
490 565
491# kernel files 566# kernel files
492blacklist /initrd* 567blacklist /initrd*
@@ -502,17 +577,17 @@ noblacklist ${HOME}/.local/share/flatpak/exports
502read-only ${HOME}/.local/share/flatpak/exports 577read-only ${HOME}/.local/share/flatpak/exports
503blacklist ${HOME}/.local/share/flatpak/* 578blacklist ${HOME}/.local/share/flatpak/*
504blacklist ${HOME}/.var 579blacklist ${HOME}/.var
505blacklist ${RUNUSER}/app 580# most of the time bwrap is SUID binary
506blacklist ${RUNUSER}/doc 581blacklist ${PATH}/bwrap
507blacklist ${RUNUSER}/.dbus-proxy 582blacklist ${RUNUSER}/.dbus-proxy
508blacklist ${RUNUSER}/.flatpak 583blacklist ${RUNUSER}/.flatpak
509blacklist ${RUNUSER}/.flatpak-cache 584blacklist ${RUNUSER}/.flatpak-cache
510blacklist ${RUNUSER}/.flatpak-helper 585blacklist ${RUNUSER}/.flatpak-helper
586blacklist ${RUNUSER}/app
587blacklist ${RUNUSER}/doc
511blacklist /usr/share/flatpak 588blacklist /usr/share/flatpak
512noblacklist /var/lib/flatpak/exports 589noblacklist /var/lib/flatpak/exports
513blacklist /var/lib/flatpak/* 590blacklist /var/lib/flatpak/*
514# most of the time bwrap is SUID binary
515blacklist ${PATH}/bwrap
516 591
517# snap 592# snap
518blacklist ${RUNUSER}/snapd-session-agent.socket 593blacklist ${RUNUSER}/snapd-session-agent.socket
@@ -529,8 +604,7 @@ blacklist ${HOME}/sent
529# kernel configuration 604# kernel configuration
530blacklist /proc/config.gz 605blacklist /proc/config.gz
531 606
532# prevent DNS malware attempting to communicate with the server 607# prevent DNS malware attempting to communicate with the server using regular DNS tools
533# using regular DNS tools
534blacklist ${PATH}/dig 608blacklist ${PATH}/dig
535blacklist ${PATH}/dlint 609blacklist ${PATH}/dlint
536blacklist ${PATH}/dns2tcp 610blacklist ${PATH}/dns2tcp
@@ -548,8 +622,19 @@ blacklist ${PATH}/nslookup
548blacklist ${PATH}/resolvectl 622blacklist ${PATH}/resolvectl
549blacklist ${PATH}/unbound-host 623blacklist ${PATH}/unbound-host
550 624
625# prevent an intruder to guess passwords using regular network tools
626blacklist ${PATH}/ftp
627blacklist ${PATH}/ssh
628blacklist ${PATH}/telnet
629
551# rest of ${RUNUSER} 630# rest of ${RUNUSER}
552blacklist ${RUNUSER}/*.lock 631blacklist ${RUNUSER}/*.lock
553blacklist ${RUNUSER}/inaccessible 632blacklist ${RUNUSER}/inaccessible
554blacklist ${RUNUSER}/pk-debconf-socket 633blacklist ${RUNUSER}/pk-debconf-socket
555blacklist ${RUNUSER}/update-notifier.pid 634blacklist ${RUNUSER}/update-notifier.pid
635
636# tor-browser
637blacklist ${HOME}/.local/opt/tor-browser
638
639# pass utility (pass package in Debian etc.)
640blacklist ${HOME}/.password-store
diff --git a/etc/inc/disable-devel.inc b/etc/inc/disable-devel.inc
index e74b1b40b..98bf5ecc8 100644
--- a/etc/inc/disable-devel.inc
+++ b/etc/inc/disable-devel.inc
@@ -60,9 +60,7 @@ blacklist /usr/lib/tcc
60blacklist ${PATH}/valgrind* 60blacklist ${PATH}/valgrind*
61blacklist /usr/lib/valgrind 61blacklist /usr/lib/valgrind
62 62
63
64# Source-Code 63# Source-Code
65
66blacklist /usr/src 64blacklist /usr/src
67blacklist /usr/local/src 65blacklist /usr/local/src
68blacklist /usr/include 66blacklist /usr/include
diff --git a/etc/inc/disable-exec.inc b/etc/inc/disable-exec.inc
index 9b5c40a2b..d7dcef7e7 100644
--- a/etc/inc/disable-exec.inc
+++ b/etc/inc/disable-exec.inc
@@ -6,6 +6,7 @@ noexec ${HOME}
6noexec ${RUNUSER} 6noexec ${RUNUSER}
7noexec /dev/mqueue 7noexec /dev/mqueue
8noexec /dev/shm 8noexec /dev/shm
9noexec /run/shm
9noexec /tmp 10noexec /tmp
10# /var is noexec by default for unprivileged users 11# /var is noexec by default for unprivileged users
11# except there is a writable-var option, so just in case: 12# except there is a writable-var option, so just in case:
diff --git a/etc/inc/disable-interpreters.inc b/etc/inc/disable-interpreters.inc
index 5d8a236fb..ca43e5ed9 100644
--- a/etc/inc/disable-interpreters.inc
+++ b/etc/inc/disable-interpreters.inc
@@ -40,6 +40,15 @@ blacklist /usr/lib/perl*
40blacklist /usr/lib64/perl* 40blacklist /usr/lib64/perl*
41blacklist /usr/share/perl* 41blacklist /usr/share/perl*
42 42
43# rxvt needs Perl modules, thus does not work. In particular, blacklisting
44# it is needed so that Firefox can run applications with Terminal=true in
45# their .desktop file (depending on what is installed). The reason is that
46# this is done via glib, which currently uses a hardcoded list of terminal
47# emulators:
48# https://gitlab.gnome.org/GNOME/glib/-/issues/338
49# And in this list, rxvt comes before xterm.
50blacklist ${PATH}/rxvt
51
43# PHP 52# PHP
44blacklist ${PATH}/php* 53blacklist ${PATH}/php*
45blacklist /usr/lib/php* 54blacklist /usr/lib/php*
@@ -48,6 +57,7 @@ blacklist /usr/share/php*
48# Ruby 57# Ruby
49blacklist ${PATH}/ruby 58blacklist ${PATH}/ruby
50blacklist /usr/lib/ruby 59blacklist /usr/lib/ruby
60blacklist /usr/lib64/ruby
51 61
52# Programs using python: deluge, firefox addons, filezilla, cherrytree, xchat, hexchat, libreoffice, scribus 62# Programs using python: deluge, firefox addons, filezilla, cherrytree, xchat, hexchat, libreoffice, scribus
53# Python 2 63# Python 2
diff --git a/etc/inc/disable-passwdmgr.inc b/etc/inc/disable-passwdmgr.inc
deleted file mode 100644
index 3ed9a1b14..000000000
--- a/etc/inc/disable-passwdmgr.inc
+++ /dev/null
@@ -1,19 +0,0 @@
1# This file is overwritten during software install.
2# Persistent customizations should go in a .local file.
3include disable-passwdmgr.local
4
5blacklist ${HOME}/.config/Bitwarden
6blacklist ${HOME}/.config/KeePass
7blacklist ${HOME}/.config/keepass
8blacklist ${HOME}/.config/keepassx
9blacklist ${HOME}/.config/keepassxc
10blacklist ${HOME}/.config/KeePassXCrc
11blacklist ${HOME}/.config/Sinew Software Systems
12blacklist ${HOME}/.fpm
13blacklist ${HOME}/.keepass
14blacklist ${HOME}/.keepassx
15blacklist ${HOME}/.keepassxc
16blacklist ${HOME}/.lastpass
17blacklist ${HOME}/.local/share/KeePass
18blacklist ${HOME}/.local/share/keepass
19blacklist ${HOME}/.password-store
diff --git a/etc/inc/disable-proc.inc b/etc/inc/disable-proc.inc
new file mode 100644
index 000000000..81a8883f3
--- /dev/null
+++ b/etc/inc/disable-proc.inc
@@ -0,0 +1,82 @@
1# This file is overwritten during software install.
2# Persistent customizations should go in a .local file.
3include disable-proc.local
4
5blacklist /proc/acpi
6blacklist /proc/asound
7blacklist /proc/bootconfig
8blacklist /proc/buddyinfo
9blacklist /proc/cgroups
10blacklist /proc/cmdline
11blacklist /proc/config.gz
12blacklist /proc/consoles
13#blacklist /proc/cpuinfo
14blacklist /proc/crypto
15blacklist /proc/devices
16blacklist /proc/diskstats
17blacklist /proc/dma
18#blacklist /proc/driver
19blacklist /proc/dynamic_debug
20blacklist /proc/execdomains
21blacklist /proc/fb
22#blacklist /proc/filesystems
23blacklist /proc/fs
24blacklist /proc/i8k
25blacklist /proc/interrupts
26blacklist /proc/iomem
27blacklist /proc/ioports
28blacklist /proc/irq
29blacklist /proc/kallsyms
30blacklist /proc/kcore
31blacklist /proc/keys
32blacklist /proc/key-users
33blacklist /proc/kmsg
34blacklist /proc/kpagecgroup
35blacklist /proc/kpagecount
36blacklist /proc/kpageflags
37blacklist /proc/latency_stats
38#blacklist /proc/loadavg
39blacklist /proc/locks
40blacklist /proc/mdstat
41#blacklist /proc/meminfo
42blacklist /proc/misc
43#blacklist /proc/modules
44#blacklist /proc/mounts
45blacklist /proc/mtrr
46#blacklist /proc/net
47blacklist /proc/partitions
48blacklist /proc/pressure
49blacklist /proc/sched_debug
50blacklist /proc/schedstat
51blacklist /proc/scsi
52#blacklist /proc/self
53blacklist /proc/slabinfo
54blacklist /proc/softirqs
55blacklist /proc/spl
56#blacklist /proc/stat
57blacklist /proc/swaps
58#blacklist /proc/sys
59blacklist /proc/sysrq-trigger
60blacklist /proc/sysvipc
61#blacklist /proc/thread-self
62blacklist /proc/timer_list
63blacklist /proc/tty
64#blacklist /proc/uptime
65#blacklist /proc/version
66blacklist /proc/version_signature
67blacklist /proc/vmallocinfo
68#blacklist /proc/vmstat
69#blacklist /proc/zoneinfo
70
71blacklist /proc/sys/abi
72blacklist /proc/sys/crypto
73blacklist /proc/sys/debug
74blacklist /proc/sys/dev
75blacklist /proc/sys/fs
76blacklist /proc/sys/net
77blacklist /proc/sys/user
78blacklist /proc/sys/vm
79
80noblacklist /proc/sys/kernel/osrelease
81noblacklist /proc/sys/kernel/yama
82blacklist /proc/sys/*/*
diff --git a/etc/inc/disable-programs.inc b/etc/inc/disable-programs.inc
index cbc8ef6d2..5078ec82f 100644
--- a/etc/inc/disable-programs.inc
+++ b/etc/inc/disable-programs.inc
@@ -2,18 +2,6 @@
2# Persistent customizations should go in a .local file. 2# Persistent customizations should go in a .local file.
3include disable-programs.local 3include disable-programs.local
4 4
5blacklist ${HOME}/Arduino
6blacklist ${HOME}/i2p
7blacklist ${HOME}/Monero/wallets
8blacklist ${HOME}/Nextcloud
9blacklist ${HOME}/Nextcloud/Notes
10blacklist ${HOME}/SoftMaker
11blacklist ${HOME}/Standard Notes Backups
12blacklist ${HOME}/TeamSpeak3-Client-linux_x86
13blacklist ${HOME}/TeamSpeak3-Client-linux_amd64
14blacklist ${HOME}/hyperrogue.ini
15blacklist ${HOME}/mps
16blacklist ${HOME}/wallet.dat
17blacklist ${HOME}/.*coin 5blacklist ${HOME}/.*coin
18blacklist ${HOME}/.8pecxstudios 6blacklist ${HOME}/.8pecxstudios
19blacklist ${HOME}/.AndroidStudio* 7blacklist ${HOME}/.AndroidStudio*
@@ -38,8 +26,10 @@ blacklist ${HOME}/.VirtualBox
38blacklist ${HOME}/.WebStorm* 26blacklist ${HOME}/.WebStorm*
39blacklist ${HOME}/.Wolfram Research 27blacklist ${HOME}/.Wolfram Research
40blacklist ${HOME}/.ZAP 28blacklist ${HOME}/.ZAP
41blacklist ${HOME}/.abook
42blacklist ${HOME}/.aMule 29blacklist ${HOME}/.aMule
30blacklist ${HOME}/.abook
31blacklist ${HOME}/.addressbook
32blacklist ${HOME}/.alpine-smime
43blacklist ${HOME}/.android 33blacklist ${HOME}/.android
44blacklist ${HOME}/.anydesk 34blacklist ${HOME}/.anydesk
45blacklist ${HOME}/.arduino15 35blacklist ${HOME}/.arduino15
@@ -57,19 +47,196 @@ blacklist ${HOME}/.balsa
57blacklist ${HOME}/.bcast5 47blacklist ${HOME}/.bcast5
58blacklist ${HOME}/.bibletime 48blacklist ${HOME}/.bibletime
59blacklist ${HOME}/.bitcoin 49blacklist ${HOME}/.bitcoin
50blacklist ${HOME}/.blobby
60blacklist ${HOME}/.bogofilter 51blacklist ${HOME}/.bogofilter
52blacklist ${HOME}/.bundle
61blacklist ${HOME}/.bzf 53blacklist ${HOME}/.bzf
62blacklist ${HOME}/.cargo/advisory-db 54blacklist ${HOME}/.cache/0ad
63blacklist ${HOME}/.cargo/config 55blacklist ${HOME}/.cache/8pecxstudios
64blacklist ${HOME}/.cargo/git 56blacklist ${HOME}/.cache/Authenticator
65blacklist ${HOME}/.cargo/registry 57blacklist ${HOME}/.cache/BraveSoftware
66blacklist ${HOME}/.cargo/.crates.toml 58blacklist ${HOME}/.cache/Clementine
67blacklist ${HOME}/.cargo/.crates2.json 59blacklist ${HOME}/.cache/ENCOM/Spectral
68blacklist ${HOME}/.cargo/.package-cache 60blacklist ${HOME}/.cache/Enox
61blacklist ${HOME}/.cache/Enpass
62blacklist ${HOME}/.cache/Ferdi
63blacklist ${HOME}/.cache/Flavio Tordini
64blacklist ${HOME}/.cache/Franz
65blacklist ${HOME}/.cache/GoldenDict
66blacklist ${HOME}/.cache/INRIA
67blacklist ${HOME}/.cache/INRIA/Natron
68blacklist ${HOME}/.cache/JetBrains/CLion*
69blacklist ${HOME}/.cache/KDE/neochat
70blacklist ${HOME}/.cache/Mendeley Ltd.
71blacklist ${HOME}/.cache/MusicBrainz
72blacklist ${HOME}/.cache/NewsFlashGTK
73blacklist ${HOME}/.cache/Otter
74blacklist ${HOME}/.cache/PawelStolowski
75blacklist ${HOME}/.cache/Psi
76blacklist ${HOME}/.cache/QuiteRss
77blacklist ${HOME}/.cache/Quotient/quaternion
78blacklist ${HOME}/.cache/Shortwave
79blacklist ${HOME}/.cache/Tox
80blacklist ${HOME}/.cache/Zeal
81blacklist ${HOME}/.cache/agenda
82blacklist ${HOME}/.cache/akonadi*
83blacklist ${HOME}/.cache/atril
84blacklist ${HOME}/.cache/attic
85blacklist ${HOME}/.cache/babl
86blacklist ${HOME}/.cache/bnox
87blacklist ${HOME}/.cache/borg
88blacklist ${HOME}/.cache/cachy
89blacklist ${HOME}/.cache/calibre
90blacklist ${HOME}/.cache/cantata
91blacklist ${HOME}/.cache/champlain
92blacklist ${HOME}/.cache/chromium
93blacklist ${HOME}/.cache/chromium-dev
94blacklist ${HOME}/.cache/cliqz
95blacklist ${HOME}/.cache/com.github.johnfactotum.Foliate
96blacklist ${HOME}/.cache/darktable
97blacklist ${HOME}/.cache/deja-dup
98blacklist ${HOME}/.cache/discover
99blacklist ${HOME}/.cache/dnox
100blacklist ${HOME}/.cache/dolphin
101blacklist ${HOME}/.cache/dolphin-emu
102blacklist ${HOME}/.cache/ephemeral
103blacklist ${HOME}/.cache/epiphany
104blacklist ${HOME}/.cache/evolution
105blacklist ${HOME}/.cache/falkon
106blacklist ${HOME}/.cache/feedreader
107blacklist ${HOME}/.cache/firedragon
108blacklist ${HOME}/.cache/flaska.net/trojita
109blacklist ${HOME}/.cache/folks
110blacklist ${HOME}/.cache/font-manager
111blacklist ${HOME}/.cache/fossamail
112blacklist ${HOME}/.cache/fractal
113blacklist ${HOME}/.cache/freecol
114blacklist ${HOME}/.cache/gajim
115blacklist ${HOME}/.cache/geary
116blacklist ${HOME}/.cache/geeqie
117blacklist ${HOME}/.cache/gegl-0.4
118blacklist ${HOME}/.cache/gfeeds
119blacklist ${HOME}/.cache/gimp
120blacklist ${HOME}/.cache/gnome-boxes
121blacklist ${HOME}/.cache/gnome-builder
122blacklist ${HOME}/.cache/gnome-control-center
123blacklist ${HOME}/.cache/gnome-recipes
124blacklist ${HOME}/.cache/gnome-screenshot
125blacklist ${HOME}/.cache/gnome-software
126blacklist ${HOME}/.cache/gnome-twitch
127blacklist ${HOME}/.cache/godot
128blacklist ${HOME}/.cache/google-chrome
129blacklist ${HOME}/.cache/google-chrome-beta
130blacklist ${HOME}/.cache/google-chrome-unstable
131blacklist ${HOME}/.cache/gradio
132blacklist ${HOME}/.cache/gummi
133blacklist ${HOME}/.cache/icedove
134blacklist ${HOME}/.cache/inkscape
135blacklist ${HOME}/.cache/inox
136blacklist ${HOME}/.cache/io.github.lainsce.Notejot
137blacklist ${HOME}/.cache/iridium
138blacklist ${HOME}/.cache/kcmshell5
139blacklist ${HOME}/.cache/kdenlive
140blacklist ${HOME}/.cache/keepassxc
141blacklist ${HOME}/.cache/kfind
142blacklist ${HOME}/.cache/kinfocenter
143blacklist ${HOME}/.cache/kmail2
144blacklist ${HOME}/.cache/krunner
145blacklist ${HOME}/.cache/krunnerbookmarkrunnerfirefoxdbfile.sqlite*
146blacklist ${HOME}/.cache/kscreenlocker_greet
147blacklist ${HOME}/.cache/ksmserver-logout-greeter
148blacklist ${HOME}/.cache/ksplashqml
149blacklist ${HOME}/.cache/kube
150blacklist ${HOME}/.cache/kwin
151blacklist ${HOME}/.cache/libgweather
152blacklist ${HOME}/.cache/librewolf
153blacklist ${HOME}/.cache/liferea
154blacklist ${HOME}/.cache/lutris
155blacklist ${HOME}/.cache/marker
156blacklist ${HOME}/.cache/matrix-mirage
157blacklist ${HOME}/.cache/microsoft-edge-beta
158blacklist ${HOME}/.cache/microsoft-edge-dev
159blacklist ${HOME}/.cache/midori
160blacklist ${HOME}/.cache/minetest
161blacklist ${HOME}/.cache/mirage
162blacklist ${HOME}/.cache/moonchild productions/basilisk
163blacklist ${HOME}/.cache/moonchild productions/pale moon
164blacklist ${HOME}/.cache/mozilla
165blacklist ${HOME}/.cache/ms-excel-online
166blacklist ${HOME}/.cache/ms-office-online
167blacklist ${HOME}/.cache/ms-onenote-online
168blacklist ${HOME}/.cache/ms-outlook-online
169blacklist ${HOME}/.cache/ms-powerpoint-online
170blacklist ${HOME}/.cache/ms-skype-online
171blacklist ${HOME}/.cache/ms-word-online
172blacklist ${HOME}/.cache/mutt
173blacklist ${HOME}/.cache/mypaint
174blacklist ${HOME}/.cache/netsurf
175blacklist ${HOME}/.cache/nheko
176blacklist ${HOME}/.cache/nvim
177blacklist ${HOME}/.cache/okular
178blacklist ${HOME}/.cache/opera
179blacklist ${HOME}/.cache/opera-beta
180blacklist ${HOME}/.cache/opera-developer
181blacklist ${HOME}/.cache/org.gabmus.gfeeds
182blacklist ${HOME}/.cache/org.gnome.Books
183blacklist ${HOME}/.cache/org.gnome.Maps
184blacklist ${HOME}/.cache/pdfmod
185blacklist ${HOME}/.cache/peek
186blacklist ${HOME}/.cache/pip
187blacklist ${HOME}/.cache/pipe-viewer
188blacklist ${HOME}/.cache/plasmashell
189blacklist ${HOME}/.cache/plasmashellbookmarkrunnerfirefoxdbfile.sqlite*
190blacklist ${HOME}/.cache/psi
191blacklist ${HOME}/.cache/qBittorrent
192blacklist ${HOME}/.cache/quodlibet
193blacklist ${HOME}/.cache/qupzilla
194blacklist ${HOME}/.cache/qutebrowser
195blacklist ${HOME}/.cache/rclone
196blacklist ${HOME}/.cache/rednotebook
197blacklist ${HOME}/.cache/rhythmbox
198blacklist ${HOME}/.cache/rpcs3
199blacklist ${HOME}/.cache/shotwell
200blacklist ${HOME}/.cache/simple-scan
201blacklist ${HOME}/.cache/slimjet
202blacklist ${HOME}/.cache/smuxi
203blacklist ${HOME}/.cache/snox
204blacklist ${HOME}/.cache/spotify
205blacklist ${HOME}/.cache/straw-viewer
206blacklist ${HOME}/.cache/strawberry
207blacklist ${HOME}/.cache/supertuxkart
208blacklist ${HOME}/.cache/systemsettings
209blacklist ${HOME}/.cache/telepathy
210blacklist ${HOME}/.cache/thunderbird
211blacklist ${HOME}/.cache/torbrowser
212blacklist ${HOME}/.cache/transmission
213blacklist ${HOME}/.cache/ungoogled-chromium
214blacklist ${HOME}/.cache/vivaldi
215blacklist ${HOME}/.cache/vivaldi-snapshot
216blacklist ${HOME}/.cache/vlc
217blacklist ${HOME}/.cache/vmware
218blacklist ${HOME}/.cache/warsow-2.1
219blacklist ${HOME}/.cache/waterfox
220blacklist ${HOME}/.cache/wesnoth
221blacklist ${HOME}/.cache/wine
222blacklist ${HOME}/.cache/winetricks
223blacklist ${HOME}/.cache/xmms2
224blacklist ${HOME}/.cache/xournalpp
225blacklist ${HOME}/.cache/xreader
226blacklist ${HOME}/.cache/yandex-browser
227blacklist ${HOME}/.cache/yandex-browser-beta
228blacklist ${HOME}/.cache/youtube-dl
229blacklist ${HOME}/.cache/youtube-viewer
230blacklist ${HOME}/.cache/yt-dlp
231blacklist ${HOME}/.cache/zim
232blacklist ${HOME}/.cachy
233blacklist ${HOME}/.cargo
69blacklist ${HOME}/.claws-mail 234blacklist ${HOME}/.claws-mail
235blacklist ${HOME}/.clion*
70blacklist ${HOME}/.cliqz 236blacklist ${HOME}/.cliqz
71blacklist ${HOME}/.clonk 237blacklist ${HOME}/.clonk
72blacklist ${HOME}/.config/0ad 238blacklist ${HOME}/.config/0ad
239blacklist ${HOME}/.config/1Password
73blacklist ${HOME}/.config/2048-qt 240blacklist ${HOME}/.config/2048-qt
74blacklist ${HOME}/.config/Atom 241blacklist ${HOME}/.config/Atom
75blacklist ${HOME}/.config/Audaciousrc 242blacklist ${HOME}/.config/Audaciousrc
@@ -80,17 +247,20 @@ blacklist ${HOME}/.config/Bitwarden
80blacklist ${HOME}/.config/Brackets 247blacklist ${HOME}/.config/Brackets
81blacklist ${HOME}/.config/BraveSoftware 248blacklist ${HOME}/.config/BraveSoftware
82blacklist ${HOME}/.config/Clementine 249blacklist ${HOME}/.config/Clementine
250blacklist ${HOME}/.config/ClipGrab
83blacklist ${HOME}/.config/Code 251blacklist ${HOME}/.config/Code
84blacklist ${HOME}/.config/Code - OSS 252blacklist ${HOME}/.config/Code - OSS
85blacklist ${HOME}/.config/Code Industry 253blacklist ${HOME}/.config/Code Industry
86blacklist ${HOME}/.config/Cryptocat 254blacklist ${HOME}/.config/Cryptocat
87blacklist ${HOME}/.config/Debauchee/Barrier.conf 255blacklist ${HOME}/.config/Debauchee/Barrier.conf
88blacklist ${HOME}/.config/Dharkael 256blacklist ${HOME}/.config/Dharkael
257blacklist ${HOME}/.config/ENCOM
258blacklist ${HOME}/.config/Electron
89blacklist ${HOME}/.config/Element 259blacklist ${HOME}/.config/Element
90blacklist ${HOME}/.config/Element (Riot) 260blacklist ${HOME}/.config/Element (Riot)
91blacklist ${HOME}/.config/ENCOM
92blacklist ${HOME}/.config/Enox 261blacklist ${HOME}/.config/Enox
93blacklist ${HOME}/.config/Epic 262blacklist ${HOME}/.config/Epic
263blacklist ${HOME}/.config/Exodus
94blacklist ${HOME}/.config/Ferdi 264blacklist ${HOME}/.config/Ferdi
95blacklist ${HOME}/.config/Flavio Tordini 265blacklist ${HOME}/.config/Flavio Tordini
96blacklist ${HOME}/.config/Franz 266blacklist ${HOME}/.config/Franz
@@ -105,16 +275,23 @@ blacklist ${HOME}/.config/Google Play Music Desktop Player
105blacklist ${HOME}/.config/Gpredict 275blacklist ${HOME}/.config/Gpredict
106blacklist ${HOME}/.config/INRIA 276blacklist ${HOME}/.config/INRIA
107blacklist ${HOME}/.config/InSilmaril 277blacklist ${HOME}/.config/InSilmaril
278blacklist ${HOME}/.config/JetBrains/CLion*
108blacklist ${HOME}/.config/Jitsi Meet 279blacklist ${HOME}/.config/Jitsi Meet
109blacklist ${HOME}/.config/KDE/neochat 280blacklist ${HOME}/.config/KDE/neochat
281blacklist ${HOME}/.config/KeePass
282blacklist ${HOME}/.config/KeePassXCrc
110blacklist ${HOME}/.config/Kid3 283blacklist ${HOME}/.config/Kid3
111blacklist ${HOME}/.config/Kingsoft 284blacklist ${HOME}/.config/Kingsoft
285blacklist ${HOME}/.config/Ledger Live
286blacklist ${HOME}/.config/LibreCAD
112blacklist ${HOME}/.config/Loop_Hero 287blacklist ${HOME}/.config/Loop_Hero
113blacklist ${HOME}/.config/Luminance 288blacklist ${HOME}/.config/Luminance
114blacklist ${HOME}/.config/LyX 289blacklist ${HOME}/.config/LyX
290blacklist ${HOME}/.config/MangoHud
115blacklist ${HOME}/.config/Mattermost 291blacklist ${HOME}/.config/Mattermost
116blacklist ${HOME}/.config/Meltytech 292blacklist ${HOME}/.config/Meltytech
117blacklist ${HOME}/.config/Mendeley Ltd. 293blacklist ${HOME}/.config/Mendeley Ltd.
294blacklist ${HOME}/.config/Microsoft
118blacklist ${HOME}/.config/Min 295blacklist ${HOME}/.config/Min
119blacklist ${HOME}/.config/ModTheSpire 296blacklist ${HOME}/.config/ModTheSpire
120blacklist ${HOME}/.config/Mousepad 297blacklist ${HOME}/.config/Mousepad
@@ -124,11 +301,14 @@ blacklist ${HOME}/.config/MuseScore
124blacklist ${HOME}/.config/MusicBrainz 301blacklist ${HOME}/.config/MusicBrainz
125blacklist ${HOME}/.config/Nathan Osman 302blacklist ${HOME}/.config/Nathan Osman
126blacklist ${HOME}/.config/Nextcloud 303blacklist ${HOME}/.config/Nextcloud
304blacklist ${HOME}/.config/NitroShare
305blacklist ${HOME}/.config/Notable
127blacklist ${HOME}/.config/Nylas Mail 306blacklist ${HOME}/.config/Nylas Mail
307blacklist ${HOME}/.config/PBE
128blacklist ${HOME}/.config/PacmanLogViewer 308blacklist ${HOME}/.config/PacmanLogViewer
129blacklist ${HOME}/.config/PawelStolowski 309blacklist ${HOME}/.config/PawelStolowski
130blacklist ${HOME}/.config/PBE
131blacklist ${HOME}/.config/Philipp Schmieder 310blacklist ${HOME}/.config/Philipp Schmieder
311blacklist ${HOME}/.config/Pinta
132blacklist ${HOME}/.config/QGIS 312blacklist ${HOME}/.config/QGIS
133blacklist ${HOME}/.config/QMediathekView 313blacklist ${HOME}/.config/QMediathekView
134blacklist ${HOME}/.config/Qlipper 314blacklist ${HOME}/.config/Qlipper
@@ -140,6 +320,7 @@ blacklist ${HOME}/.config/Riot
140blacklist ${HOME}/.config/Rocket.Chat 320blacklist ${HOME}/.config/Rocket.Chat
141blacklist ${HOME}/.config/RogueLegacy 321blacklist ${HOME}/.config/RogueLegacy
142blacklist ${HOME}/.config/RogueLegacyStorageContainer 322blacklist ${HOME}/.config/RogueLegacyStorageContainer
323blacklist ${HOME}/.config/Seafile
143blacklist ${HOME}/.config/Signal 324blacklist ${HOME}/.config/Signal
144blacklist ${HOME}/.config/Sinew Software Systems 325blacklist ${HOME}/.config/Sinew Software Systems
145blacklist ${HOME}/.config/Slack 326blacklist ${HOME}/.config/Slack
@@ -148,11 +329,14 @@ blacklist ${HOME}/.config/SubDownloader
148blacklist ${HOME}/.config/Thunar 329blacklist ${HOME}/.config/Thunar
149blacklist ${HOME}/.config/Twitch 330blacklist ${HOME}/.config/Twitch
150blacklist ${HOME}/.config/Unknown Organization 331blacklist ${HOME}/.config/Unknown Organization
332blacklist ${HOME}/.config/VSCodium
151blacklist ${HOME}/.config/VirtualBox 333blacklist ${HOME}/.config/VirtualBox
334blacklist ${HOME}/.config/Whalebird
152blacklist ${HOME}/.config/Wire 335blacklist ${HOME}/.config/Wire
153blacklist ${HOME}/.config/Youtube 336blacklist ${HOME}/.config/Youtube
154blacklist ${HOME}/.config/Zeal
155blacklist ${HOME}/.config/ZeGrapher Project 337blacklist ${HOME}/.config/ZeGrapher Project
338blacklist ${HOME}/.config/Zeal
339blacklist ${HOME}/.config/Zulip
156blacklist ${HOME}/.config/aacs 340blacklist ${HOME}/.config/aacs
157blacklist ${HOME}/.config/abiword 341blacklist ${HOME}/.config/abiword
158blacklist ${HOME}/.config/agenda 342blacklist ${HOME}/.config/agenda
@@ -201,10 +385,12 @@ blacklist ${HOME}/.config/chromium-flags.conf
201blacklist ${HOME}/.config/clipit 385blacklist ${HOME}/.config/clipit
202blacklist ${HOME}/.config/cliqz 386blacklist ${HOME}/.config/cliqz
203blacklist ${HOME}/.config/cmus 387blacklist ${HOME}/.config/cmus
388blacklist ${HOME}/.config/cointop
204blacklist ${HOME}/.config/com.github.bleakgrey.tootle 389blacklist ${HOME}/.config/com.github.bleakgrey.tootle
205blacklist ${HOME}/.config/corebird 390blacklist ${HOME}/.config/corebird
206blacklist ${HOME}/.config/cower 391blacklist ${HOME}/.config/cower
207blacklist ${HOME}/.config/coyim 392blacklist ${HOME}/.config/coyim
393blacklist ${HOME}/.config/d-feet
208blacklist ${HOME}/.config/darktable 394blacklist ${HOME}/.config/darktable
209blacklist ${HOME}/.config/deadbeef 395blacklist ${HOME}/.config/deadbeef
210blacklist ${HOME}/.config/deluge 396blacklist ${HOME}/.config/deluge
@@ -219,7 +405,7 @@ blacklist ${HOME}/.config/dolphin-emu
219blacklist ${HOME}/.config/dolphinrc 405blacklist ${HOME}/.config/dolphinrc
220blacklist ${HOME}/.config/dragonplayerrc 406blacklist ${HOME}/.config/dragonplayerrc
221blacklist ${HOME}/.config/draw.io 407blacklist ${HOME}/.config/draw.io
222blacklist ${HOME}/.config/d-feet 408blacklist ${HOME}/.config/electron-flag*.conf
223blacklist ${HOME}/.config/electron-mail 409blacklist ${HOME}/.config/electron-mail
224blacklist ${HOME}/.config/emaildefaults 410blacklist ${HOME}/.config/emaildefaults
225blacklist ${HOME}/.config/emailidentities 411blacklist ${HOME}/.config/emailidentities
@@ -239,6 +425,7 @@ blacklist ${HOME}/.config/font-manager
239blacklist ${HOME}/.config/freecol 425blacklist ${HOME}/.config/freecol
240blacklist ${HOME}/.config/gajim 426blacklist ${HOME}/.config/gajim
241blacklist ${HOME}/.config/galculator 427blacklist ${HOME}/.config/galculator
428blacklist ${HOME}/.config/gallery-dl
242blacklist ${HOME}/.config/gconf 429blacklist ${HOME}/.config/gconf
243blacklist ${HOME}/.config/geany 430blacklist ${HOME}/.config/geany
244blacklist ${HOME}/.config/geary 431blacklist ${HOME}/.config/geary
@@ -293,6 +480,9 @@ blacklist ${HOME}/.config/kdeconnect
293blacklist ${HOME}/.config/kdenliverc 480blacklist ${HOME}/.config/kdenliverc
294blacklist ${HOME}/.config/kdiff3fileitemactionrc 481blacklist ${HOME}/.config/kdiff3fileitemactionrc
295blacklist ${HOME}/.config/kdiff3rc 482blacklist ${HOME}/.config/kdiff3rc
483blacklist ${HOME}/.config/keepass
484blacklist ${HOME}/.config/keepassx
485blacklist ${HOME}/.config/keepassxc
296blacklist ${HOME}/.config/kfindrc 486blacklist ${HOME}/.config/kfindrc
297blacklist ${HOME}/.config/kgetrc 487blacklist ${HOME}/.config/kgetrc
298blacklist ${HOME}/.config/kid3rc 488blacklist ${HOME}/.config/kid3rc
@@ -302,8 +492,8 @@ blacklist ${HOME}/.config/kmail2rc
302blacklist ${HOME}/.config/kmailsearchindexingrc 492blacklist ${HOME}/.config/kmailsearchindexingrc
303blacklist ${HOME}/.config/kmplayerrc 493blacklist ${HOME}/.config/kmplayerrc
304blacklist ${HOME}/.config/knotesrc 494blacklist ${HOME}/.config/knotesrc
305blacklist ${HOME}/.config/konversationrc
306blacklist ${HOME}/.config/konversation.notifyrc 495blacklist ${HOME}/.config/konversation.notifyrc
496blacklist ${HOME}/.config/konversationrc
307blacklist ${HOME}/.config/kritarc 497blacklist ${HOME}/.config/kritarc
308blacklist ${HOME}/.config/ktorrentrc 498blacklist ${HOME}/.config/ktorrentrc
309blacklist ${HOME}/.config/ktouch2rc 499blacklist ${HOME}/.config/ktouch2rc
@@ -324,13 +514,14 @@ blacklist ${HOME}/.config/mate/mate-dictionary
324blacklist ${HOME}/.config/matrix-mirage 514blacklist ${HOME}/.config/matrix-mirage
325blacklist ${HOME}/.config/mcomix 515blacklist ${HOME}/.config/mcomix
326blacklist ${HOME}/.config/meld 516blacklist ${HOME}/.config/meld
327blacklist ${HOME}/.config/meteo-qt
328blacklist ${HOME}/.config/menulibre.cfg 517blacklist ${HOME}/.config/menulibre.cfg
518blacklist ${HOME}/.config/meteo-qt
329blacklist ${HOME}/.config/mfusion 519blacklist ${HOME}/.config/mfusion
330blacklist ${HOME}/.config/Microsoft 520blacklist ${HOME}/.config/microsoft-edge-beta
331blacklist ${HOME}/.config/microsoft-edge-dev 521blacklist ${HOME}/.config/microsoft-edge-dev
332blacklist ${HOME}/.config/midori 522blacklist ${HOME}/.config/midori
333blacklist ${HOME}/.config/mirage 523blacklist ${HOME}/.config/mirage
524blacklist ${HOME}/.config/monero-project
334blacklist ${HOME}/.config/mono 525blacklist ${HOME}/.config/mono
335blacklist ${HOME}/.config/mpDris2 526blacklist ${HOME}/.config/mpDris2
336blacklist ${HOME}/.config/mpd 527blacklist ${HOME}/.config/mpd
@@ -343,17 +534,17 @@ blacklist ${HOME}/.config/mypaint
343blacklist ${HOME}/.config/nano 534blacklist ${HOME}/.config/nano
344blacklist ${HOME}/.config/nautilus 535blacklist ${HOME}/.config/nautilus
345blacklist ${HOME}/.config/nemo 536blacklist ${HOME}/.config/nemo
346blacklist ${HOME}/.config/neochatrc
347blacklist ${HOME}/.config/neochat.notifyrc 537blacklist ${HOME}/.config/neochat.notifyrc
538blacklist ${HOME}/.config/neochatrc
348blacklist ${HOME}/.config/neomutt 539blacklist ${HOME}/.config/neomutt
349blacklist ${HOME}/.config/netsurf 540blacklist ${HOME}/.config/netsurf
350blacklist ${HOME}/.config/newsbeuter 541blacklist ${HOME}/.config/newsbeuter
351blacklist ${HOME}/.config/newsboat 542blacklist ${HOME}/.config/newsboat
352blacklist ${HOME}/.config/newsflash 543blacklist ${HOME}/.config/newsflash
353blacklist ${HOME}/.config/nheko 544blacklist ${HOME}/.config/nheko
354blacklist ${HOME}/.config/NitroShare
355blacklist ${HOME}/.config/nomacs 545blacklist ${HOME}/.config/nomacs
356blacklist ${HOME}/.config/nuclear 546blacklist ${HOME}/.config/nuclear
547blacklist ${HOME}/.config/nvim
357blacklist ${HOME}/.config/obs-studio 548blacklist ${HOME}/.config/obs-studio
358blacklist ${HOME}/.config/okularpartrc 549blacklist ${HOME}/.config/okularpartrc
359blacklist ${HOME}/.config/okularrc 550blacklist ${HOME}/.config/okularrc
@@ -363,6 +554,7 @@ blacklist ${HOME}/.config/onlyoffice
363blacklist ${HOME}/.config/openmw 554blacklist ${HOME}/.config/openmw
364blacklist ${HOME}/.config/opera 555blacklist ${HOME}/.config/opera
365blacklist ${HOME}/.config/opera-beta 556blacklist ${HOME}/.config/opera-beta
557blacklist ${HOME}/.config/opera-developer
366blacklist ${HOME}/.config/orage 558blacklist ${HOME}/.config/orage
367blacklist ${HOME}/.config/org.gabmus.gfeeds.json 559blacklist ${HOME}/.config/org.gabmus.gfeeds.json
368blacklist ${HOME}/.config/org.gabmus.gfeeds.saved_articles 560blacklist ${HOME}/.config/org.gabmus.gfeeds.saved_articles
@@ -372,7 +564,6 @@ blacklist ${HOME}/.config/pavucontrol-qt
372blacklist ${HOME}/.config/pavucontrol.ini 564blacklist ${HOME}/.config/pavucontrol.ini
373blacklist ${HOME}/.config/pcmanfm 565blacklist ${HOME}/.config/pcmanfm
374blacklist ${HOME}/.config/pdfmod 566blacklist ${HOME}/.config/pdfmod
375blacklist ${HOME}/.config/Pinta
376blacklist ${HOME}/.config/pipe-viewer 567blacklist ${HOME}/.config/pipe-viewer
377blacklist ${HOME}/.config/pitivi 568blacklist ${HOME}/.config/pitivi
378blacklist ${HOME}/.config/pix 569blacklist ${HOME}/.config/pix
@@ -390,10 +581,12 @@ blacklist ${HOME}/.config/quodlibet
390blacklist ${HOME}/.config/qupzilla 581blacklist ${HOME}/.config/qupzilla
391blacklist ${HOME}/.config/qutebrowser 582blacklist ${HOME}/.config/qutebrowser
392blacklist ${HOME}/.config/ranger 583blacklist ${HOME}/.config/ranger
584blacklist ${HOME}/.config/rclone
393blacklist ${HOME}/.config/redshift 585blacklist ${HOME}/.config/redshift
394blacklist ${HOME}/.config/redshift.conf 586blacklist ${HOME}/.config/redshift.conf
395blacklist ${HOME}/.config/remmina 587blacklist ${HOME}/.config/remmina
396blacklist ${HOME}/.config/ristretto 588blacklist ${HOME}/.config/ristretto
589blacklist ${HOME}/.config/rpcs3
397blacklist ${HOME}/.config/rtv 590blacklist ${HOME}/.config/rtv
398blacklist ${HOME}/.config/scribus 591blacklist ${HOME}/.config/scribus
399blacklist ${HOME}/.config/scribusrc 592blacklist ${HOME}/.config/scribusrc
@@ -411,8 +604,8 @@ blacklist ${HOME}/.config/spectaclerc
411blacklist ${HOME}/.config/spotify 604blacklist ${HOME}/.config/spotify
412blacklist ${HOME}/.config/sqlitebrowser 605blacklist ${HOME}/.config/sqlitebrowser
413blacklist ${HOME}/.config/stellarium 606blacklist ${HOME}/.config/stellarium
414blacklist ${HOME}/.config/strawberry
415blacklist ${HOME}/.config/straw-viewer 607blacklist ${HOME}/.config/straw-viewer
608blacklist ${HOME}/.config/strawberry
416blacklist ${HOME}/.config/supertuxkart 609blacklist ${HOME}/.config/supertuxkart
417blacklist ${HOME}/.config/synfig 610blacklist ${HOME}/.config/synfig
418blacklist ${HOME}/.config/teams 611blacklist ${HOME}/.config/teams
@@ -435,19 +628,20 @@ blacklist ${HOME}/.config/vivaldi
435blacklist ${HOME}/.config/vivaldi-snapshot 628blacklist ${HOME}/.config/vivaldi-snapshot
436blacklist ${HOME}/.config/vlc 629blacklist ${HOME}/.config/vlc
437blacklist ${HOME}/.config/wesnoth 630blacklist ${HOME}/.config/wesnoth
438blacklist ${HOME}/.config/wormux 631blacklist ${HOME}/.config/wget
439blacklist ${HOME}/.config/Whalebird
440blacklist ${HOME}/.config/wireshark 632blacklist ${HOME}/.config/wireshark
633blacklist ${HOME}/.config/wormux
441blacklist ${HOME}/.config/xchat 634blacklist ${HOME}/.config/xchat
442blacklist ${HOME}/.config/xed 635blacklist ${HOME}/.config/xed
443blacklist ${HOME}/.config/xfburn 636blacklist ${HOME}/.config/xfburn
637blacklist ${HOME}/.config/xfce4-dict
444blacklist ${HOME}/.config/xfce4/xfce4-notes.gtkrc 638blacklist ${HOME}/.config/xfce4/xfce4-notes.gtkrc
445blacklist ${HOME}/.config/xfce4/xfce4-notes.rc 639blacklist ${HOME}/.config/xfce4/xfce4-notes.rc
446blacklist ${HOME}/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml 640blacklist ${HOME}/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml
447blacklist ${HOME}/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-mixer.xml 641blacklist ${HOME}/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-mixer.xml
448blacklist ${HOME}/.config/xfce4-dict
449blacklist ${HOME}/.config/xiaoyong 642blacklist ${HOME}/.config/xiaoyong
450blacklist ${HOME}/.config/xmms2 643blacklist ${HOME}/.config/xmms2
644blacklist ${HOME}/.config/xournalpp
451blacklist ${HOME}/.config/xplayer 645blacklist ${HOME}/.config/xplayer
452blacklist ${HOME}/.config/xreader 646blacklist ${HOME}/.config/xreader
453blacklist ${HOME}/.config/xviewer 647blacklist ${HOME}/.config/xviewer
@@ -456,12 +650,14 @@ blacklist ${HOME}/.config/yandex-browser-beta
456blacklist ${HOME}/.config/yelp 650blacklist ${HOME}/.config/yelp
457blacklist ${HOME}/.config/youtube-dl 651blacklist ${HOME}/.config/youtube-dl
458blacklist ${HOME}/.config/youtube-dlg 652blacklist ${HOME}/.config/youtube-dlg
459blacklist ${HOME}/.config/youtubemusic-nativefier-040164
460blacklist ${HOME}/.config/youtube-music-desktop-app 653blacklist ${HOME}/.config/youtube-music-desktop-app
461blacklist ${HOME}/.config/youtube-viewer 654blacklist ${HOME}/.config/youtube-viewer
655blacklist ${HOME}/.config/youtubemusic-nativefier-040164
656blacklist ${HOME}/.config/yt-dlp
657blacklist ${HOME}/.config/yt-dlp.conf
462blacklist ${HOME}/.config/zathura 658blacklist ${HOME}/.config/zathura
659blacklist ${HOME}/.config/zim
463blacklist ${HOME}/.config/zoomus.conf 660blacklist ${HOME}/.config/zoomus.conf
464blacklist ${HOME}/.config/Zulip
465blacklist ${HOME}/.conkeror.mozdev.org 661blacklist ${HOME}/.conkeror.mozdev.org
466blacklist ${HOME}/.crawl 662blacklist ${HOME}/.crawl
467blacklist ${HOME}/.cups 663blacklist ${HOME}/.cups
@@ -489,24 +685,29 @@ blacklist ${HOME}/.firedragon
489blacklist ${HOME}/.flowblade 685blacklist ${HOME}/.flowblade
490blacklist ${HOME}/.fltk 686blacklist ${HOME}/.fltk
491blacklist ${HOME}/.fossamail 687blacklist ${HOME}/.fossamail
688blacklist ${HOME}/.fpm
492blacklist ${HOME}/.freeciv 689blacklist ${HOME}/.freeciv
493blacklist ${HOME}/.freecol 690blacklist ${HOME}/.freecol
494blacklist ${HOME}/.freemind 691blacklist ${HOME}/.freemind
495blacklist ${HOME}/.frogatto 692blacklist ${HOME}/.frogatto
496blacklist ${HOME}/.frozen-bubble 693blacklist ${HOME}/.frozen-bubble
694blacklist ${HOME}/.funnyboat
695blacklist ${HOME}/.gallery-dl.conf
696blacklist ${HOME}/.geekbench5
497blacklist ${HOME}/.gimp* 697blacklist ${HOME}/.gimp*
498blacklist ${HOME}/.gist 698blacklist ${HOME}/.gist
499blacklist ${HOME}/.gitconfig 699blacklist ${HOME}/.gitconfig
500blacklist ${HOME}/.gl-117 700blacklist ${HOME}/.gl-117
501blacklist ${HOME}/.glaxiumrc 701blacklist ${HOME}/.glaxiumrc
502blacklist ${HOME}/.gnome/gnome-schedule 702blacklist ${HOME}/.gnome/gnome-schedule
703blacklist ${HOME}/.goldendict
503blacklist ${HOME}/.googleearth 704blacklist ${HOME}/.googleearth
504blacklist ${HOME}/.gradle 705blacklist ${HOME}/.gradle
505blacklist ${HOME}/.gramps 706blacklist ${HOME}/.gramps
506blacklist ${HOME}/.guayadeque 707blacklist ${HOME}/.guayadeque
507blacklist ${HOME}/.hashcat 708blacklist ${HOME}/.hashcat
508blacklist ${HOME}/.hex-a-hop
509blacklist ${HOME}/.hedgewars 709blacklist ${HOME}/.hedgewars
710blacklist ${HOME}/.hex-a-hop
510blacklist ${HOME}/.hugin 711blacklist ${HOME}/.hugin
511blacklist ${HOME}/.i2p 712blacklist ${HOME}/.i2p
512blacklist ${HOME}/.icedove 713blacklist ${HOME}/.icedove
@@ -582,6 +783,9 @@ blacklist ${HOME}/.kde4/share/config/kopeterc
582blacklist ${HOME}/.kde4/share/config/ktorrentrc 783blacklist ${HOME}/.kde4/share/config/ktorrentrc
583blacklist ${HOME}/.kde4/share/config/okularpartrc 784blacklist ${HOME}/.kde4/share/config/okularpartrc
584blacklist ${HOME}/.kde4/share/config/okularrc 785blacklist ${HOME}/.kde4/share/config/okularrc
786blacklist ${HOME}/.keepass
787blacklist ${HOME}/.keepassx
788blacklist ${HOME}/.keepassxc
585blacklist ${HOME}/.killingfloor 789blacklist ${HOME}/.killingfloor
586blacklist ${HOME}/.kingsoft 790blacklist ${HOME}/.kingsoft
587blacklist ${HOME}/.kino-history 791blacklist ${HOME}/.kino-history
@@ -589,9 +793,11 @@ blacklist ${HOME}/.kinorc
589blacklist ${HOME}/.klatexformula 793blacklist ${HOME}/.klatexformula
590blacklist ${HOME}/.klei 794blacklist ${HOME}/.klei
591blacklist ${HOME}/.kodi 795blacklist ${HOME}/.kodi
796blacklist ${HOME}/.lastpass
592blacklist ${HOME}/.librewolf 797blacklist ${HOME}/.librewolf
593blacklist ${HOME}/.lincity-ng 798blacklist ${HOME}/.lincity-ng
594blacklist ${HOME}/.links 799blacklist ${HOME}/.links
800blacklist ${HOME}/.links2
595blacklist ${HOME}/.linphone-history.db 801blacklist ${HOME}/.linphone-history.db
596blacklist ${HOME}/.linphonerc 802blacklist ${HOME}/.linphonerc
597blacklist ${HOME}/.lmmsrc.xml 803blacklist ${HOME}/.lmmsrc.xml
@@ -602,14 +808,19 @@ blacklist ${HOME}/.local/share/Anki2
602blacklist ${HOME}/.local/share/Dredmor 808blacklist ${HOME}/.local/share/Dredmor
603blacklist ${HOME}/.local/share/Empathy 809blacklist ${HOME}/.local/share/Empathy
604blacklist ${HOME}/.local/share/Enpass 810blacklist ${HOME}/.local/share/Enpass
811blacklist ${HOME}/.local/share/FasterThanLight
605blacklist ${HOME}/.local/share/Flavio Tordini 812blacklist ${HOME}/.local/share/Flavio Tordini
813blacklist ${HOME}/.local/share/IntoTheBreach
606blacklist ${HOME}/.local/share/JetBrains 814blacklist ${HOME}/.local/share/JetBrains
607blacklist ${HOME}/.local/share/KDE/neochat 815blacklist ${HOME}/.local/share/KDE/neochat
816blacklist ${HOME}/.local/share/KeePass
608blacklist ${HOME}/.local/share/Kingsoft 817blacklist ${HOME}/.local/share/Kingsoft
818blacklist ${HOME}/.local/share/LibreCAD
609blacklist ${HOME}/.local/share/Mendeley Ltd. 819blacklist ${HOME}/.local/share/Mendeley Ltd.
610blacklist ${HOME}/.local/share/Mumble 820blacklist ${HOME}/.local/share/Mumble
611blacklist ${HOME}/.local/share/Nextcloud 821blacklist ${HOME}/.local/share/Nextcloud
612blacklist ${HOME}/.local/share/PBE 822blacklist ${HOME}/.local/share/PBE
823blacklist ${HOME}/.local/share/Paradox Interactive
613blacklist ${HOME}/.local/share/PawelStolowski 824blacklist ${HOME}/.local/share/PawelStolowski
614blacklist ${HOME}/.local/share/PillarsOfEternity 825blacklist ${HOME}/.local/share/PillarsOfEternity
615blacklist ${HOME}/.local/share/Psi 826blacklist ${HOME}/.local/share/Psi
@@ -621,20 +832,20 @@ blacklist ${HOME}/.local/share/RogueLegacy
621blacklist ${HOME}/.local/share/RogueLegacyStorageContainer 832blacklist ${HOME}/.local/share/RogueLegacyStorageContainer
622blacklist ${HOME}/.local/share/Shortwave 833blacklist ${HOME}/.local/share/Shortwave
623blacklist ${HOME}/.local/share/Steam 834blacklist ${HOME}/.local/share/Steam
624blacklist ${HOME}/.local/share/SteamWorldDig
625blacklist ${HOME}/.local/share/SteamWorld Dig 2 835blacklist ${HOME}/.local/share/SteamWorld Dig 2
836blacklist ${HOME}/.local/share/SteamWorldDig
626blacklist ${HOME}/.local/share/SuperHexagon 837blacklist ${HOME}/.local/share/SuperHexagon
627blacklist ${HOME}/.local/share/TelegramDesktop 838blacklist ${HOME}/.local/share/TelegramDesktop
628blacklist ${HOME}/.local/share/Terraria 839blacklist ${HOME}/.local/share/Terraria
629blacklist ${HOME}/.local/share/TpLogger 840blacklist ${HOME}/.local/share/TpLogger
630blacklist ${HOME}/.local/share/Zeal 841blacklist ${HOME}/.local/share/Zeal
842blacklist ${HOME}/.local/share/agenda
631blacklist ${HOME}/.local/share/akonadi* 843blacklist ${HOME}/.local/share/akonadi*
632blacklist ${HOME}/.local/share/akregator 844blacklist ${HOME}/.local/share/akregator
633blacklist ${HOME}/.local/share/agenda
634blacklist ${HOME}/.local/share/apps/korganizer 845blacklist ${HOME}/.local/share/apps/korganizer
635blacklist ${HOME}/.local/share/aspyr-media 846blacklist ${HOME}/.local/share/aspyr-media
636blacklist ${HOME}/.local/share/autokey
637blacklist ${HOME}/.local/share/authenticator-rs 847blacklist ${HOME}/.local/share/authenticator-rs
848blacklist ${HOME}/.local/share/autokey
638blacklist ${HOME}/.local/share/backintime 849blacklist ${HOME}/.local/share/backintime
639blacklist ${HOME}/.local/share/baloo 850blacklist ${HOME}/.local/share/baloo
640blacklist ${HOME}/.local/share/barrier 851blacklist ${HOME}/.local/share/barrier
@@ -661,7 +872,6 @@ blacklist ${HOME}/.local/share/dolphin-emu
661blacklist ${HOME}/.local/share/emailidentities 872blacklist ${HOME}/.local/share/emailidentities
662blacklist ${HOME}/.local/share/epiphany 873blacklist ${HOME}/.local/share/epiphany
663blacklist ${HOME}/.local/share/evolution 874blacklist ${HOME}/.local/share/evolution
664blacklist ${HOME}/.local/share/FasterThanLight
665blacklist ${HOME}/.local/share/feedreader 875blacklist ${HOME}/.local/share/feedreader
666blacklist ${HOME}/.local/share/feral-interactive 876blacklist ${HOME}/.local/share/feral-interactive
667blacklist ${HOME}/.local/share/five-or-more 877blacklist ${HOME}/.local/share/five-or-more
@@ -691,12 +901,13 @@ blacklist ${HOME}/.local/share/godot
691blacklist ${HOME}/.local/share/gradio 901blacklist ${HOME}/.local/share/gradio
692blacklist ${HOME}/.local/share/gwenview 902blacklist ${HOME}/.local/share/gwenview
693blacklist ${HOME}/.local/share/i2p 903blacklist ${HOME}/.local/share/i2p
694blacklist ${HOME}/.local/share/IntoTheBreach 904blacklist ${HOME}/.local/share/io.github.lainsce.Notejot
695blacklist ${HOME}/.local/share/jami 905blacklist ${HOME}/.local/share/jami
696blacklist ${HOME}/.local/share/kaffeine 906blacklist ${HOME}/.local/share/kaffeine
697blacklist ${HOME}/.local/share/kalgebra 907blacklist ${HOME}/.local/share/kalgebra
698blacklist ${HOME}/.local/share/kate 908blacklist ${HOME}/.local/share/kate
699blacklist ${HOME}/.local/share/kdenlive 909blacklist ${HOME}/.local/share/kdenlive
910blacklist ${HOME}/.local/share/keepass
700blacklist ${HOME}/.local/share/kget 911blacklist ${HOME}/.local/share/kget
701blacklist ${HOME}/.local/share/kiwix 912blacklist ${HOME}/.local/share/kiwix
702blacklist ${HOME}/.local/share/kiwix-desktop 913blacklist ${HOME}/.local/share/kiwix-desktop
@@ -741,20 +952,21 @@ blacklist ${HOME}/.local/share/newsboat
741blacklist ${HOME}/.local/share/nheko 952blacklist ${HOME}/.local/share/nheko
742blacklist ${HOME}/.local/share/nomacs 953blacklist ${HOME}/.local/share/nomacs
743blacklist ${HOME}/.local/share/notes 954blacklist ${HOME}/.local/share/notes
955blacklist ${HOME}/.local/share/nvim
744blacklist ${HOME}/.local/share/ocenaudio 956blacklist ${HOME}/.local/share/ocenaudio
745blacklist ${HOME}/.local/share/okular 957blacklist ${HOME}/.local/share/okular
746blacklist ${HOME}/.local/share/onlyoffice 958blacklist ${HOME}/.local/share/onlyoffice
747blacklist ${HOME}/.local/share/openmw 959blacklist ${HOME}/.local/share/openmw
748blacklist ${HOME}/.local/share/orage 960blacklist ${HOME}/.local/share/orage
749blacklist ${HOME}/.local/share/org.kde.gwenview 961blacklist ${HOME}/.local/share/org.kde.gwenview
750blacklist ${HOME}/.local/share/Paradox Interactive
751blacklist ${HOME}/.local/share/pix 962blacklist ${HOME}/.local/share/pix
752blacklist ${HOME}/.local/share/plasma_notes 963blacklist ${HOME}/.local/share/plasma_notes
753blacklist ${HOME}/.local/share/profanity 964blacklist ${HOME}/.local/share/profanity
754blacklist ${HOME}/.local/share/psi 965blacklist ${HOME}/.local/share/psi
755blacklist ${HOME}/.local/share/psi+ 966blacklist ${HOME}/.local/share/psi+
756blacklist ${HOME}/.local/share/quadrapassel 967blacklist ${HOME}/.local/share/qBittorrent
757blacklist ${HOME}/.local/share/qpdfview 968blacklist ${HOME}/.local/share/qpdfview
969blacklist ${HOME}/.local/share/quadrapassel
758blacklist ${HOME}/.local/share/qutebrowser 970blacklist ${HOME}/.local/share/qutebrowser
759blacklist ${HOME}/.local/share/remmina 971blacklist ${HOME}/.local/share/remmina
760blacklist ${HOME}/.local/share/rhythmbox 972blacklist ${HOME}/.local/share/rhythmbox
@@ -779,11 +991,13 @@ blacklist ${HOME}/.local/share/vlc
779blacklist ${HOME}/.local/share/vpltd 991blacklist ${HOME}/.local/share/vpltd
780blacklist ${HOME}/.local/share/vulkan 992blacklist ${HOME}/.local/share/vulkan
781blacklist ${HOME}/.local/share/warsow-2.1 993blacklist ${HOME}/.local/share/warsow-2.1
994blacklist ${HOME}/.local/share/warzone2100-3.*
782blacklist ${HOME}/.local/share/wesnoth 995blacklist ${HOME}/.local/share/wesnoth
783blacklist ${HOME}/.local/share/wormux 996blacklist ${HOME}/.local/share/wormux
784blacklist ${HOME}/.local/share/xplayer 997blacklist ${HOME}/.local/share/xplayer
785blacklist ${HOME}/.local/share/xreader 998blacklist ${HOME}/.local/share/xreader
786blacklist ${HOME}/.local/share/zathura 999blacklist ${HOME}/.local/share/zathura
1000blacklist ${HOME}/.local/state/pipewire
787blacklist ${HOME}/.lv2 1001blacklist ${HOME}/.lv2
788blacklist ${HOME}/.lyx 1002blacklist ${HOME}/.lyx
789blacklist ${HOME}/.magicor 1003blacklist ${HOME}/.magicor
@@ -811,11 +1025,14 @@ blacklist ${HOME}/.netactview
811blacklist ${HOME}/.neverball 1025blacklist ${HOME}/.neverball
812blacklist ${HOME}/.newsbeuter 1026blacklist ${HOME}/.newsbeuter
813blacklist ${HOME}/.newsboat 1027blacklist ${HOME}/.newsboat
1028blacklist ${HOME}/.newsrc
814blacklist ${HOME}/.nicotine 1029blacklist ${HOME}/.nicotine
815blacklist ${HOME}/.node-gyp 1030blacklist ${HOME}/.node-gyp
1031blacklist ${HOME}/.notable
816blacklist ${HOME}/.npm 1032blacklist ${HOME}/.npm
817blacklist ${HOME}/.npmrc 1033blacklist ${HOME}/.npmrc
818blacklist ${HOME}/.nv 1034blacklist ${HOME}/.nv
1035blacklist ${HOME}/.nvm
819blacklist ${HOME}/.nylas-mail 1036blacklist ${HOME}/.nylas-mail
820blacklist ${HOME}/.openarena 1037blacklist ${HOME}/.openarena
821blacklist ${HOME}/.opencity 1038blacklist ${HOME}/.opencity
@@ -825,11 +1042,20 @@ blacklist ${HOME}/.openshot_qt
825blacklist ${HOME}/.openttd 1042blacklist ${HOME}/.openttd
826blacklist ${HOME}/.opera 1043blacklist ${HOME}/.opera
827blacklist ${HOME}/.opera-beta 1044blacklist ${HOME}/.opera-beta
1045blacklist ${HOME}/.opera-developer
828blacklist ${HOME}/.ostrichriders 1046blacklist ${HOME}/.ostrichriders
829blacklist ${HOME}/.paradoxinteractive 1047blacklist ${HOME}/.paradoxinteractive
830blacklist ${HOME}/.parallelrealities/blobwars 1048blacklist ${HOME}/.parallelrealities/blobwars
831blacklist ${HOME}/.pcsxr 1049blacklist ${HOME}/.pcsxr
832blacklist ${HOME}/.penguin-command 1050blacklist ${HOME}/.penguin-command
1051blacklist ${HOME}/.pine-crash
1052blacklist ${HOME}/.pine-debug1
1053blacklist ${HOME}/.pine-debug2
1054blacklist ${HOME}/.pine-debug3
1055blacklist ${HOME}/.pine-debug4
1056blacklist ${HOME}/.pine-interrupted-mail
1057blacklist ${HOME}/.pinerc
1058blacklist ${HOME}/.pinercex
833blacklist ${HOME}/.pingus 1059blacklist ${HOME}/.pingus
834blacklist ${HOME}/.pioneer 1060blacklist ${HOME}/.pioneer
835blacklist ${HOME}/.purple 1061blacklist ${HOME}/.purple
@@ -839,6 +1065,7 @@ blacklist ${HOME}/.qgis2
839blacklist ${HOME}/.qmmp 1065blacklist ${HOME}/.qmmp
840blacklist ${HOME}/.quodlibet 1066blacklist ${HOME}/.quodlibet
841blacklist ${HOME}/.redeclipse 1067blacklist ${HOME}/.redeclipse
1068blacklist ${HOME}/.rednotebook
842blacklist ${HOME}/.remmina 1069blacklist ${HOME}/.remmina
843blacklist ${HOME}/.repo_.gitconfig.json 1070blacklist ${HOME}/.repo_.gitconfig.json
844blacklist ${HOME}/.repoconfig 1071blacklist ${HOME}/.repoconfig
@@ -867,6 +1094,7 @@ blacklist ${HOME}/.teeworlds
867blacklist ${HOME}/.texlive20* 1094blacklist ${HOME}/.texlive20*
868blacklist ${HOME}/.thunderbird 1095blacklist ${HOME}/.thunderbird
869blacklist ${HOME}/.tilp 1096blacklist ${HOME}/.tilp
1097blacklist ${HOME}/.tin
870blacklist ${HOME}/.tooling 1098blacklist ${HOME}/.tooling
871blacklist ${HOME}/.tor-browser* 1099blacklist ${HOME}/.tor-browser*
872blacklist ${HOME}/.torcs 1100blacklist ${HOME}/.torcs
@@ -908,176 +1136,28 @@ blacklist ${HOME}/.yarn-config
908blacklist ${HOME}/.yarncache 1136blacklist ${HOME}/.yarncache
909blacklist ${HOME}/.yarnrc 1137blacklist ${HOME}/.yarnrc
910blacklist ${HOME}/.zoom 1138blacklist ${HOME}/.zoom
911blacklist /tmp/akonadi-* 1139blacklist ${HOME}/Arduino
1140blacklist ${HOME}/Monero/wallets
1141blacklist ${HOME}/Nextcloud
1142blacklist ${HOME}/Nextcloud/Notes
1143blacklist ${HOME}/Seafile/.seafile-data
1144blacklist ${HOME}/SoftMaker
1145blacklist ${HOME}/Standard Notes Backups
1146blacklist ${HOME}/TeamSpeak3-Client-linux_amd64
1147blacklist ${HOME}/TeamSpeak3-Client-linux_x86
1148blacklist ${HOME}/hyperrogue.ini
1149blacklist ${HOME}/i2p
1150blacklist ${HOME}/mps
1151blacklist ${HOME}/openstego.ini
1152blacklist ${HOME}/wallet.dat
1153blacklist ${HOME}/yt-dlp.conf
1154blacklist ${HOME}/yt-dlp.conf.txt
1155blacklist ${RUNUSER}/*firefox*
1156blacklist ${RUNUSER}/akonadi
912blacklist /tmp/.wine-* 1157blacklist /tmp/.wine-*
1158blacklist /tmp/akonadi-*
913blacklist /var/games/nethack 1159blacklist /var/games/nethack
914blacklist /var/games/slashem 1160blacklist /var/games/slashem
915blacklist /var/games/vulturesclaw 1161blacklist /var/games/vulturesclaw
916blacklist /var/games/vultureseye 1162blacklist /var/games/vultureseye
917blacklist /var/lib/games/Maelstrom-Scores 1163blacklist /var/lib/games/Maelstrom-Scores
918
919# ${HOME}/.cache directory
920blacklist ${HOME}/.cache/0ad
921blacklist ${HOME}/.cache/8pecxstudios
922blacklist ${HOME}/.cache/Authenticator
923blacklist ${HOME}/.cache/BraveSoftware
924blacklist ${HOME}/.cache/Clementine
925blacklist ${HOME}/.cache/ENCOM/Spectral
926blacklist ${HOME}/.cache/Enox
927blacklist ${HOME}/.cache/Enpass
928blacklist ${HOME}/.cache/Ferdi
929blacklist ${HOME}/.cache/Flavio Tordini
930blacklist ${HOME}/.cache/Franz
931blacklist ${HOME}/.cache/INRIA
932blacklist ${HOME}/.cache/MusicBrainz
933blacklist ${HOME}/.cache/NewsFlashGTK
934blacklist ${HOME}/.cache/Otter
935blacklist ${HOME}/.cache/PawelStolowski
936blacklist ${HOME}/.cache/Psi
937blacklist ${HOME}/.cache/QuiteRss
938blacklist ${HOME}/.cache/quodlibet
939blacklist ${HOME}/.cache/Quotient/quaternion
940blacklist ${HOME}/.cache/Shortwave
941blacklist ${HOME}/.cache/Tox
942blacklist ${HOME}/.cache/Zeal
943blacklist ${HOME}/.cache/agenda
944blacklist ${HOME}/.cache/akonadi*
945blacklist ${HOME}/.cache/atril
946blacklist ${HOME}/.cache/attic
947blacklist ${HOME}/.cache/babl
948blacklist ${HOME}/.cache/bnox
949blacklist ${HOME}/.cache/borg
950blacklist ${HOME}/.cache/calibre
951blacklist ${HOME}/.cache/cantata
952blacklist ${HOME}/.cache/champlain
953blacklist ${HOME}/.cache/chromium
954blacklist ${HOME}/.cache/chromium-dev
955blacklist ${HOME}/.cache/cliqz
956blacklist ${HOME}/.cache/com.github.johnfactotum.Foliate
957blacklist ${HOME}/.cache/darktable
958blacklist ${HOME}/.cache/deja-dup
959blacklist ${HOME}/.cache/discover
960blacklist ${HOME}/.cache/dnox
961blacklist ${HOME}/.cache/dolphin
962blacklist ${HOME}/.cache/dolphin-emu
963blacklist ${HOME}/.cache/ephemeral
964blacklist ${HOME}/.cache/epiphany
965blacklist ${HOME}/.cache/evolution
966blacklist ${HOME}/.cache/falkon
967blacklist ${HOME}/.cache/feedreader
968blacklist ${HOME}/.cache/firedragon
969blacklist ${HOME}/.cache/flaska.net/trojita
970blacklist ${HOME}/.cache/folks
971blacklist ${HOME}/.cache/font-manager
972blacklist ${HOME}/.cache/fossamail
973blacklist ${HOME}/.cache/fractal
974blacklist ${HOME}/.cache/freecol
975blacklist ${HOME}/.cache/gajim
976blacklist ${HOME}/.cache/geary
977blacklist ${HOME}/.cache/gegl-0.4
978blacklist ${HOME}/.cache/geeqie
979blacklist ${HOME}/.cache/gfeeds
980blacklist ${HOME}/.cache/gimp
981blacklist ${HOME}/.cache/gnome-boxes
982blacklist ${HOME}/.cache/gnome-builder
983blacklist ${HOME}/.cache/gnome-control-center
984blacklist ${HOME}/.cache/gnome-recipes
985blacklist ${HOME}/.cache/gnome-screenshot
986blacklist ${HOME}/.cache/gnome-software
987blacklist ${HOME}/.cache/gnome-twitch
988blacklist ${HOME}/.cache/godot
989blacklist ${HOME}/.cache/google-chrome
990blacklist ${HOME}/.cache/google-chrome-beta
991blacklist ${HOME}/.cache/google-chrome-unstable
992blacklist ${HOME}/.cache/gradio
993blacklist ${HOME}/.cache/gummi
994blacklist ${HOME}/.cache/icedove
995blacklist ${HOME}/.cache/INRIA/Natron
996blacklist ${HOME}/.cache/inkscape
997blacklist ${HOME}/.cache/inox
998blacklist ${HOME}/.cache/iridium
999blacklist ${HOME}/.cache/kcmshell5
1000blacklist ${HOME}/.cache/KDE/neochat
1001blacklist ${HOME}/.cache/kdenlive
1002blacklist ${HOME}/.cache/keepassxc
1003blacklist ${HOME}/.cache/kfind
1004blacklist ${HOME}/.cache/kinfocenter
1005blacklist ${HOME}/.cache/kmail2
1006blacklist ${HOME}/.cache/krunner
1007blacklist ${HOME}/.cache/krunnerbookmarkrunnerfirefoxdbfile.sqlite*
1008blacklist ${HOME}/.cache/kscreenlocker_greet
1009blacklist ${HOME}/.cache/ksmserver-logout-greeter
1010blacklist ${HOME}/.cache/ksplashqml
1011blacklist ${HOME}/.cache/kube
1012blacklist ${HOME}/.cache/kwin
1013blacklist ${HOME}/.cache/libgweather
1014blacklist ${HOME}/.cache/librewolf
1015blacklist ${HOME}/.cache/liferea
1016blacklist ${HOME}/.cache/lutris
1017blacklist ${HOME}/.cache/Mendeley Ltd.
1018blacklist ${HOME}/.cache/marker
1019blacklist ${HOME}/.cache/matrix-mirage
1020blacklist ${HOME}/.cache/microsoft-edge-dev
1021blacklist ${HOME}/.cache/midori
1022blacklist ${HOME}/.cache/minetest
1023blacklist ${HOME}/.cache/mirage
1024blacklist ${HOME}/.cache/moonchild productions/basilisk
1025blacklist ${HOME}/.cache/moonchild productions/pale moon
1026blacklist ${HOME}/.cache/mozilla
1027blacklist ${HOME}/.cache/ms-excel-online
1028blacklist ${HOME}/.cache/ms-office-online
1029blacklist ${HOME}/.cache/ms-onenote-online
1030blacklist ${HOME}/.cache/ms-outlook-online
1031blacklist ${HOME}/.cache/ms-powerpoint-online
1032blacklist ${HOME}/.cache/ms-skype-online
1033blacklist ${HOME}/.cache/ms-word-online
1034blacklist ${HOME}/.cache/mutt
1035blacklist ${HOME}/.cache/mypaint
1036blacklist ${HOME}/.cache/nheko
1037blacklist ${HOME}/.cache/netsurf
1038blacklist ${HOME}/.cache/okular
1039blacklist ${HOME}/.cache/opera
1040blacklist ${HOME}/.cache/opera-beta
1041blacklist ${HOME}/.cache/org.gabmus.gfeeds
1042blacklist ${HOME}/.cache/org.gnome.Books
1043blacklist ${HOME}/.cache/org.gnome.Maps
1044blacklist ${HOME}/.cache/pdfmod
1045blacklist ${HOME}/.cache/peek
1046blacklist ${HOME}/.cache/pip
1047blacklist ${HOME}/.cache/pipe-viewer
1048blacklist ${HOME}/.cache/plasmashell
1049blacklist ${HOME}/.cache/plasmashellbookmarkrunnerfirefoxdbfile.sqlite*
1050blacklist ${HOME}/.cache/psi
1051blacklist ${HOME}/.cache/qBittorrent
1052blacklist ${HOME}/.cache/qupzilla
1053blacklist ${HOME}/.cache/qutebrowser
1054blacklist ${HOME}/.cache/rhythmbox
1055blacklist ${HOME}/.cache/shotwell
1056blacklist ${HOME}/.cache/simple-scan
1057blacklist ${HOME}/.cache/slimjet
1058blacklist ${HOME}/.cache/smuxi
1059blacklist ${HOME}/.cache/snox
1060blacklist ${HOME}/.cache/spotify
1061blacklist ${HOME}/.cache/strawberry
1062blacklist ${HOME}/.cache/straw-viewer
1063blacklist ${HOME}/.cache/supertuxkart
1064blacklist ${HOME}/.cache/systemsettings
1065blacklist ${HOME}/.cache/telepathy
1066blacklist ${HOME}/.cache/thunderbird
1067blacklist ${HOME}/.cache/torbrowser
1068blacklist ${HOME}/.cache/transmission
1069blacklist ${HOME}/.cache/ungoogled-chromium
1070blacklist ${HOME}/.cache/vivaldi
1071blacklist ${HOME}/.cache/vivaldi-snapshot
1072blacklist ${HOME}/.cache/vlc
1073blacklist ${HOME}/.cache/vmware
1074blacklist ${HOME}/.cache/warsow-2.1
1075blacklist ${HOME}/.cache/waterfox
1076blacklist ${HOME}/.cache/wesnoth
1077blacklist ${HOME}/.cache/winetricks
1078blacklist ${HOME}/.cache/xmms2
1079blacklist ${HOME}/.cache/xreader
1080blacklist ${HOME}/.cache/yandex-browser
1081blacklist ${HOME}/.cache/yandex-browser-beta
1082blacklist ${HOME}/.cache/youtube-dl
1083blacklist ${HOME}/.cache/youtube-viewer
diff --git a/etc/inc/whitelist-1793-workaround.inc b/etc/inc/whitelist-1793-workaround.inc
index 862837f12..54fa849b1 100644
--- a/etc/inc/whitelist-1793-workaround.inc
+++ b/etc/inc/whitelist-1793-workaround.inc
@@ -23,6 +23,7 @@ noblacklist ${HOME}/.config/kio_httprc
23noblacklist ${HOME}/.config/kioslaverc 23noblacklist ${HOME}/.config/kioslaverc
24noblacklist ${HOME}/.config/ksslcablacklist 24noblacklist ${HOME}/.config/ksslcablacklist
25noblacklist ${HOME}/.config/qt5ct 25noblacklist ${HOME}/.config/qt5ct
26noblacklist ${HOME}/.config/qt6ct
26noblacklist ${HOME}/.config/qtcurve 27noblacklist ${HOME}/.config/qtcurve
27 28
28blacklist ${HOME}/.config/* 29blacklist ${HOME}/.config/*
diff --git a/etc/inc/whitelist-common.inc b/etc/inc/whitelist-common.inc
index 1d3728521..353a622d3 100644
--- a/etc/inc/whitelist-common.inc
+++ b/etc/inc/whitelist-common.inc
@@ -23,6 +23,7 @@ read-only ${HOME}/.local/share/applications
23whitelist ${HOME}/.local/share/icons 23whitelist ${HOME}/.local/share/icons
24whitelist ${HOME}/.local/share/mime 24whitelist ${HOME}/.local/share/mime
25whitelist ${HOME}/.mime.types 25whitelist ${HOME}/.mime.types
26whitelist ${HOME}/.sndio/cookie
26whitelist ${HOME}/.uim.d 27whitelist ${HOME}/.uim.d
27 28
28# dconf 29# dconf
@@ -68,6 +69,7 @@ whitelist ${HOME}/.config/kio_httprc
68whitelist ${HOME}/.config/kioslaverc 69whitelist ${HOME}/.config/kioslaverc
69whitelist ${HOME}/.config/ksslcablacklist 70whitelist ${HOME}/.config/ksslcablacklist
70whitelist ${HOME}/.config/qt5ct 71whitelist ${HOME}/.config/qt5ct
72whitelist ${HOME}/.config/qt6ct
71whitelist ${HOME}/.config/qtcurve 73whitelist ${HOME}/.config/qtcurve
72whitelist ${HOME}/.kde/share/config/kdeglobals 74whitelist ${HOME}/.kde/share/config/kdeglobals
73whitelist ${HOME}/.kde/share/config/kio_httprc 75whitelist ${HOME}/.kde/share/config/kio_httprc
@@ -82,3 +84,4 @@ whitelist ${HOME}/.kde4/share/config/ksslcablacklist
82whitelist ${HOME}/.kde4/share/config/oxygenrc 84whitelist ${HOME}/.kde4/share/config/oxygenrc
83whitelist ${HOME}/.kde4/share/icons 85whitelist ${HOME}/.kde4/share/icons
84whitelist ${HOME}/.local/share/qt5ct 86whitelist ${HOME}/.local/share/qt5ct
87whitelist ${HOME}/.local/share/qt6ct
diff --git a/etc/inc/whitelist-run-common.inc b/etc/inc/whitelist-run-common.inc
new file mode 100644
index 000000000..26160a10b
--- /dev/null
+++ b/etc/inc/whitelist-run-common.inc
@@ -0,0 +1,16 @@
1# This file is overwritten during software install.
2# Persistent customizations should go in a .local file.
3include whitelist-run-common.local
4
5whitelist /run/NetworkManager/resolv.conf
6whitelist /run/cups/cups.sock
7whitelist /run/dbus/system_bus_socket
8whitelist /run/media
9whitelist /run/resolvconf/resolv.conf
10whitelist /run/netconfig/resolv.conf # openSUSE Leap
11whitelist /run/shm
12whitelist /run/systemd/journal/dev-log
13whitelist /run/systemd/journal/socket
14whitelist /run/systemd/resolve/resolv.conf
15whitelist /run/systemd/resolve/stub-resolv.conf
16whitelist /run/udev/data
diff --git a/etc/inc/whitelist-runuser-common.inc b/etc/inc/whitelist-runuser-common.inc
index 0a1030b34..a8cab8d07 100644
--- a/etc/inc/whitelist-runuser-common.inc
+++ b/etc/inc/whitelist-runuser-common.inc
@@ -10,6 +10,7 @@ whitelist ${RUNUSER}/gdm/Xauthority
10whitelist ${RUNUSER}/ICEauthority 10whitelist ${RUNUSER}/ICEauthority
11whitelist ${RUNUSER}/.mutter-Xwaylandauth.* 11whitelist ${RUNUSER}/.mutter-Xwaylandauth.*
12whitelist ${RUNUSER}/pulse/native 12whitelist ${RUNUSER}/pulse/native
13whitelist ${RUNUSER}/wayland-0 13whitelist ${RUNUSER}/pipewire-?
14whitelist ${RUNUSER}/wayland-1 14whitelist ${RUNUSER}/wayland-?
15whitelist ${RUNUSER}/xauth_* 15whitelist ${RUNUSER}/xauth_*
16whitelist ${RUNUSER}/[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]]-[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]]-[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]]-[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]]-[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]]
diff --git a/etc/inc/whitelist-usr-share-common.inc b/etc/inc/whitelist-usr-share-common.inc
index fe0097934..1dbaf8bdb 100644
--- a/etc/inc/whitelist-usr-share-common.inc
+++ b/etc/inc/whitelist-usr-share-common.inc
@@ -12,6 +12,7 @@ whitelist /usr/share/cursors
12whitelist /usr/share/dconf 12whitelist /usr/share/dconf
13whitelist /usr/share/distro-info 13whitelist /usr/share/distro-info
14whitelist /usr/share/drirc.d 14whitelist /usr/share/drirc.d
15whitelist /usr/share/egl
15whitelist /usr/share/enchant 16whitelist /usr/share/enchant
16whitelist /usr/share/enchant-2 17whitelist /usr/share/enchant-2
17whitelist /usr/share/file 18whitelist /usr/share/file
@@ -45,6 +46,7 @@ whitelist /usr/share/myspell
45whitelist /usr/share/p11-kit 46whitelist /usr/share/p11-kit
46whitelist /usr/share/perl 47whitelist /usr/share/perl
47whitelist /usr/share/perl5 48whitelist /usr/share/perl5
49whitelist /usr/share/pipewire
48whitelist /usr/share/pixmaps 50whitelist /usr/share/pixmaps
49whitelist /usr/share/pki 51whitelist /usr/share/pki
50whitelist /usr/share/plasma 52whitelist /usr/share/plasma
@@ -53,6 +55,7 @@ whitelist /usr/share/qt
53whitelist /usr/share/qt4 55whitelist /usr/share/qt4
54whitelist /usr/share/qt5 56whitelist /usr/share/qt5
55whitelist /usr/share/qt5ct 57whitelist /usr/share/qt5ct
58whitelist /usr/share/qt6ct
56whitelist /usr/share/sounds 59whitelist /usr/share/sounds
57whitelist /usr/share/tcl8.6 60whitelist /usr/share/tcl8.6
58whitelist /usr/share/tcltk 61whitelist /usr/share/tcltk
diff --git a/etc/profile-a-l/0ad.profile b/etc/profile-a-l/0ad.profile
index 454a15ab2..ddc7ecad5 100644
--- a/etc/profile-a-l/0ad.profile
+++ b/etc/profile-a-l/0ad.profile
@@ -10,11 +10,12 @@ noblacklist ${HOME}/.cache/0ad
10noblacklist ${HOME}/.config/0ad 10noblacklist ${HOME}/.config/0ad
11noblacklist ${HOME}/.local/share/0ad 11noblacklist ${HOME}/.local/share/0ad
12 12
13blacklist /usr/libexec
14
13include disable-common.inc 15include disable-common.inc
14include disable-devel.inc 16include disable-devel.inc
15include disable-exec.inc 17include disable-exec.inc
16include disable-interpreters.inc 18include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 19include disable-programs.inc
19include disable-xdg.inc 20include disable-xdg.inc
20 21
diff --git a/etc/profile-a-l/1password.profile b/etc/profile-a-l/1password.profile
new file mode 100644
index 000000000..bc8bfae0d
--- /dev/null
+++ b/etc/profile-a-l/1password.profile
@@ -0,0 +1,20 @@
1# Firejail profile for 1password
2# Description: 1Password is a password manager developed by AgileBits Inc.
3# This file is overwritten after every install/update
4# Persistent local customizations
5include 1password.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.config/1Password
10
11mkdir ${HOME}/.config/1Password
12whitelist ${HOME}/.config/1Password
13
14private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,localtime,machine-id,nsswitch.conf,pki,resolv.conf,ssl
15
16# Needed for keychain things, talking to Firefox, possibly other things? Not sure how to narrow down
17ignore dbus-user none
18
19# Redirect
20include electron.profile
diff --git a/etc/profile-a-l/2048-qt.profile b/etc/profile-a-l/2048-qt.profile
index 1d787cba7..80b032aee 100644
--- a/etc/profile-a-l/2048-qt.profile
+++ b/etc/profile-a-l/2048-qt.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19mkdir ${HOME}/.config/2048-qt 18mkdir ${HOME}/.config/2048-qt
diff --git a/etc/profile-a-l/Books.profile b/etc/profile-a-l/Books.profile
index 76fd21d32..a256e942f 100644
--- a/etc/profile-a-l/Books.profile
+++ b/etc/profile-a-l/Books.profile
@@ -1,5 +1,10 @@
1# Firejail profile for gnome-books 1# Firejail profile for gnome-books
2# This file is overwritten after every install/update 2# This file is overwritten after every install/update
3# Persistent local customizations
4include Books.local
5# Persistent global definitions
6# added by included profile
7#include globals.local
3 8
4 9
5# Temporary fix for https://github.com/netblue30/firejail/issues/2624 10# Temporary fix for https://github.com/netblue30/firejail/issues/2624
diff --git a/etc/profile-a-l/Cryptocat.profile b/etc/profile-a-l/Cryptocat.profile
index 1d86b0fbf..39b39667c 100644
--- a/etc/profile-a-l/Cryptocat.profile
+++ b/etc/profile-a-l/Cryptocat.profile
@@ -10,7 +10,6 @@ noblacklist ${HOME}/.config/Cryptocat
10include disable-common.inc 10include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15 14
16caps.drop all 15caps.drop all
diff --git a/etc/profile-a-l/Fritzing.profile b/etc/profile-a-l/Fritzing.profile
index 7dc6b5ff0..3fe2ddcd5 100644
--- a/etc/profile-a-l/Fritzing.profile
+++ b/etc/profile-a-l/Fritzing.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-a-l/JDownloader.profile b/etc/profile-a-l/JDownloader.profile
index d10b70796..92f8e5c85 100644
--- a/etc/profile-a-l/JDownloader.profile
+++ b/etc/profile-a-l/JDownloader.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
diff --git a/etc/profile-a-l/abiword.profile b/etc/profile-a-l/abiword.profile
index 75da9a956..0e7126458 100644
--- a/etc/profile-a-l/abiword.profile
+++ b/etc/profile-a-l/abiword.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18 17
@@ -43,7 +42,7 @@ tracelog
43private-bin abiword 42private-bin abiword
44private-cache 43private-cache
45private-dev 44private-dev
46private-etc fonts,gtk-3.0,passwd 45private-etc alternatives,fonts,gtk-3.0,ld.so.cache,ld.so.preload,passwd
47private-tmp 46private-tmp
48 47
49# dbus-user none 48# dbus-user none
diff --git a/etc/profile-a-l/agetpkg.profile b/etc/profile-a-l/agetpkg.profile
index 7e3946454..dd3b2e59b 100644
--- a/etc/profile-a-l/agetpkg.profile
+++ b/etc/profile-a-l/agetpkg.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-shell.inc 22include disable-shell.inc
24include disable-xdg.inc 23include disable-xdg.inc
@@ -32,7 +31,6 @@ caps.drop all
32hostname agetpkg 31hostname agetpkg
33ipc-namespace 32ipc-namespace
34machine-id 33machine-id
35noautopulse
36netfilter 34netfilter
37no3d 35no3d
38nodvd 36nodvd
@@ -52,7 +50,7 @@ tracelog
52private-bin agetpkg,python3 50private-bin agetpkg,python3
53private-cache 51private-cache
54private-dev 52private-dev
55private-etc ca-certificates,crypto-policies,pki,resolv.conf,ssl 53private-etc alternatives,ca-certificates,crypto-policies,ld.so.cache,ld.so.preload,pki,resolv.conf,ssl
56private-tmp 54private-tmp
57 55
58dbus-user none 56dbus-user none
diff --git a/etc/profile-a-l/akonadi_control.profile b/etc/profile-a-l/akonadi_control.profile
index 37fdb38b5..2f58d9146 100644
--- a/etc/profile-a-l/akonadi_control.profile
+++ b/etc/profile-a-l/akonadi_control.profile
@@ -17,6 +17,7 @@ noblacklist ${HOME}/.local/share/apps/korganizer
17noblacklist ${HOME}/.local/share/contacts 17noblacklist ${HOME}/.local/share/contacts
18noblacklist ${HOME}/.local/share/local-mail 18noblacklist ${HOME}/.local/share/local-mail
19noblacklist ${HOME}/.local/share/notes 19noblacklist ${HOME}/.local/share/notes
20noblacklist ${RUNUSER}/akonadi
20noblacklist /sbin 21noblacklist /sbin
21noblacklist /tmp/akonadi-* 22noblacklist /tmp/akonadi-*
22noblacklist /usr/sbin 23noblacklist /usr/sbin
@@ -25,9 +26,9 @@ include disable-common.inc
25include disable-devel.inc 26include disable-devel.inc
26include disable-exec.inc 27include disable-exec.inc
27include disable-interpreters.inc 28include disable-interpreters.inc
28include disable-passwdmgr.inc
29include disable-programs.inc 29include disable-programs.inc
30 30
31include whitelist-run-common.inc
31include whitelist-var-common.inc 32include whitelist-var-common.inc
32 33
33# disabled options below are not compatible with the apparmor profile for mysqld-akonadi. 34# disabled options below are not compatible with the apparmor profile for mysqld-akonadi.
diff --git a/etc/profile-a-l/akregator.profile b/etc/profile-a-l/akregator.profile
index 38fcd2dc1..47468a658 100644
--- a/etc/profile-a-l/akregator.profile
+++ b/etc/profile-a-l/akregator.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20 19
@@ -26,6 +25,7 @@ whitelist ${HOME}/.local/share/akregator
26whitelist ${HOME}/.local/share/kssl 25whitelist ${HOME}/.local/share/kssl
27whitelist ${HOME}/.local/share/kxmlgui5/akregator 26whitelist ${HOME}/.local/share/kxmlgui5/akregator
28include whitelist-common.inc 27include whitelist-common.inc
28include whitelist-run-common.inc
29include whitelist-var-common.inc 29include whitelist-var-common.inc
30 30
31caps.drop all 31caps.drop all
@@ -49,3 +49,4 @@ private-bin akregator,akregatorstorageexporter,dbus-launch,kdeinit4,kdeinit4_shu
49private-dev 49private-dev
50private-tmp 50private-tmp
51 51
52deterministic-shutdown
diff --git a/etc/profile-a-l/alacarte.profile b/etc/profile-a-l/alacarte.profile
index 4c6d68020..5a528595b 100644
--- a/etc/profile-a-l/alacarte.profile
+++ b/etc/profile-a-l/alacarte.profile
@@ -15,7 +15,6 @@ include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-programs.inc 17include disable-programs.inc
18include disable-passwdmgr.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
21# Whitelist your system icon directory,varies by distro 20# Whitelist your system icon directory,varies by distro
@@ -54,7 +53,7 @@ disable-mnt
54# private-bin alacarte,bash,python*,sh 53# private-bin alacarte,bash,python*,sh
55private-cache 54private-cache
56private-dev 55private-dev
57private-etc alternatives,dconf,fonts,gtk-3.0,locale.alias,locale.conf,login.defs,mime.types,nsswitch.conf,passwd,pki,X11,xdg 56private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload,locale.alias,locale.conf,login.defs,mime.types,nsswitch.conf,passwd,pki,X11,xdg
58private-tmp 57private-tmp
59 58
60dbus-user none 59dbus-user none
diff --git a/etc/profile-a-l/alienarena.profile b/etc/profile-a-l/alienarena.profile
index 81ee6bd46..68512e37b 100644
--- a/etc/profile-a-l/alienarena.profile
+++ b/etc/profile-a-l/alienarena.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -30,7 +29,6 @@ caps.drop all
30netfilter 29netfilter
31nodvd 30nodvd
32nogroups 31nogroups
33noinput
34nonewprivs 32nonewprivs
35noroot 33noroot
36notv 34notv
diff --git a/etc/profile-a-l/alpine.profile b/etc/profile-a-l/alpine.profile
new file mode 100644
index 000000000..61c3ad21d
--- /dev/null
+++ b/etc/profile-a-l/alpine.profile
@@ -0,0 +1,103 @@
1# Firejail profile for alpine
2# Description: Text-based email and newsgroups reader
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include alpine.local
7# Persistent global definitions
8include globals.local
9
10# Workaround for bug https://github.com/netblue30/firejail/issues/2747
11# firejail --private-bin=sh --include='${CFG}/allow-bin-sh.inc' --profile=alpine sh -c '(alpine)'
12
13noblacklist /var/mail
14noblacklist /var/spool/mail
15noblacklist ${DOCUMENTS}
16noblacklist ${HOME}/.addressbook
17noblacklist ${HOME}/.alpine-smime
18noblacklist ${HOME}/.mailcap
19noblacklist ${HOME}/.mh_profile
20noblacklist ${HOME}/.mime.types
21noblacklist ${HOME}/.newsrc
22noblacklist ${HOME}/.pine-crash
23noblacklist ${HOME}/.pine-debug1
24noblacklist ${HOME}/.pine-debug2
25noblacklist ${HOME}/.pine-debug3
26noblacklist ${HOME}/.pine-debug4
27noblacklist ${HOME}/.pine-interrupted-mail
28noblacklist ${HOME}/.pinerc
29noblacklist ${HOME}/.pinercex
30noblacklist ${HOME}/.signature
31noblacklist ${HOME}/mail
32
33blacklist /tmp/.X11-unix
34blacklist ${RUNUSER}/wayland-*
35
36include disable-common.inc
37include disable-devel.inc
38include disable-exec.inc
39include disable-interpreters.inc
40include disable-programs.inc
41include disable-shell.inc
42include disable-xdg.inc
43
44#whitelist ${DOCUMENTS}
45#whitelist ${DOWNLOADS}
46#whitelist ${HOME}/.addressbook
47#whitelist ${HOME}/.alpine-smime
48#whitelist ${HOME}/.mailcap
49#whitelist ${HOME}/.mh_profile
50#whitelist ${HOME}/.mime.types
51#whitelist ${HOME}/.newsrc
52#whitelist ${HOME}/.pine-crash
53#whitelist ${HOME}/.pine-interrupted-mail
54#whitelist ${HOME}/.pinerc
55#whitelist ${HOME}/.pinercex
56#whitelist ${HOME}/.pine-debug1
57#whitelist ${HOME}/.pine-debug2
58#whitelist ${HOME}/.pine-debug3
59#whitelist ${HOME}/.pine-debug4
60#whitelist ${HOME}/.signature
61#whitelist ${HOME}/mail
62whitelist /var/mail
63whitelist /var/spool/mail
64#include whitelist-common.inc
65include whitelist-runuser-common.inc
66include whitelist-usr-share-common.inc
67include whitelist-var-common.inc
68
69apparmor
70caps.drop all
71ipc-namespace
72machine-id
73netfilter
74no3d
75nodvd
76nogroups
77noinput
78nonewprivs
79noroot
80nosound
81notv
82nou2f
83novideo
84protocol unix,inet,inet6
85seccomp
86seccomp.block-secondary
87shell none
88tracelog
89
90disable-mnt
91private-bin alpine
92private-cache
93private-dev
94private-etc alternatives,c-client.cf,ca-certificates,crypto-policies,host.conf,hostname,hosts,krb5.keytab,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,localtime,mailcap,mime.types,nsswitch.conf,passwd,pine.conf,pinerc.fixed,pki,protocols,resolv.conf,rpc,services,ssl,terminfo,xdg
95private-tmp
96writable-run-user
97writable-var
98
99dbus-user none
100dbus-system none
101
102memory-deny-write-execute
103read-only ${HOME}/.signature
diff --git a/etc/profile-a-l/alpinef.profile b/etc/profile-a-l/alpinef.profile
new file mode 100644
index 000000000..97b97fe5f
--- /dev/null
+++ b/etc/profile-a-l/alpinef.profile
@@ -0,0 +1,14 @@
1# Firejail profile for alpinef
2# Description: Text-based email and newsgroups reader using function keys
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include alpinef.local
7# Persistent global definitions
8# added by included profile
9#include globals.local
10
11private-bin alpinef
12
13# Redirect
14include alpine.profile
diff --git a/etc/profile-a-l/amarok.profile b/etc/profile-a-l/amarok.profile
index a15d3628d..7d8ec481d 100644
--- a/etc/profile-a-l/amarok.profile
+++ b/etc/profile-a-l/amarok.profile
@@ -11,7 +11,6 @@ noblacklist ${MUSIC}
11include disable-common.inc 11include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-xdg.inc 15include disable-xdg.inc
17 16
@@ -35,14 +34,14 @@ private-dev
35# private-etc alternatives,asound.conf,ca-certificates,crypto-policies,machine-id,pki,pulse,ssl 34# private-etc alternatives,asound.conf,ca-certificates,crypto-policies,machine-id,pki,pulse,ssl
36private-tmp 35private-tmp
37 36
38# If you ain't on kde-plasma you need to uncomment the following
39dbus-user filter 37dbus-user filter
40dbus-user.own org.kde.amarok 38dbus-user.own org.kde.amarok
41#dbus-user.own org.kde.kded
42#dbus-user.own org.kde.klauncher
43dbus-user.own org.mpris.amarok 39dbus-user.own org.mpris.amarok
44dbus-user.own org.mpris.MediaPlayer2.amarok 40dbus-user.own org.mpris.MediaPlayer2.amarok
45dbus-user.talk org.freedesktop.Notifications 41dbus-user.talk org.freedesktop.Notifications
42?ALLOW_TRAY: dbus-user.talk org.kde.StatusNotifierWatcher
43# If you're not on kde-plasma add the next lines to your amarok.local.
44#dbus-user.own org.kde.kded
45#dbus-user.own org.kde.klauncher
46#dbus-user.talk org.kde.knotify 46#dbus-user.talk org.kde.knotify
47dbus-user.talk org.kde.StatusNotifierWatcher
48dbus-system none 47dbus-system none
diff --git a/etc/profile-a-l/amule.profile b/etc/profile-a-l/amule.profile
index e3c4164ee..e82c145d1 100644
--- a/etc/profile-a-l/amule.profile
+++ b/etc/profile-a-l/amule.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18mkdir ${HOME}/.aMule 17mkdir ${HOME}/.aMule
@@ -33,6 +32,7 @@ nosound
33notv 32notv
34nou2f 33nou2f
35novideo 34novideo
35# Add netlink protocol to use UPnP
36protocol unix,inet,inet6 36protocol unix,inet,inet6
37seccomp 37seccomp
38shell none 38shell none
diff --git a/etc/profile-a-l/android-studio.profile b/etc/profile-a-l/android-studio.profile
index 5a21744cf..ad44d5f1d 100644
--- a/etc/profile-a-l/android-studio.profile
+++ b/etc/profile-a-l/android-studio.profile
@@ -20,7 +20,6 @@ include allow-common-devel.inc
20include allow-ssh.inc 20include allow-ssh.inc
21 21
22include disable-common.inc 22include disable-common.inc
23include disable-passwdmgr.inc
24include disable-programs.inc 23include disable-programs.inc
25 24
26include whitelist-var-common.inc 25include whitelist-var-common.inc
diff --git a/etc/profile-a-l/anki.profile b/etc/profile-a-l/anki.profile
index ef60e91c2..f6d711b2e 100644
--- a/etc/profile-a-l/anki.profile
+++ b/etc/profile-a-l/anki.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-shell.inc 21include disable-shell.inc
23include disable-xdg.inc 22include disable-xdg.inc
@@ -46,13 +45,12 @@ protocol unix,inet,inet6
46# QtWebengine needs chroot to set up its own sandbox 45# QtWebengine needs chroot to set up its own sandbox
47seccomp !chroot 46seccomp !chroot
48shell none 47shell none
49tracelog
50 48
51disable-mnt 49disable-mnt
52private-bin anki,python* 50private-bin anki,python*
53private-cache 51private-cache
54private-dev 52private-dev
55private-etc alternatives,ca-certificates,fonts,gtk-2.0,hostname,hosts,machine-id,pki,resolv.conf,ssl,Trolltech.conf 53private-etc alternatives,ca-certificates,fonts,gtk-2.0,hostname,hosts,ld.so.cache,ld.so.preload,machine-id,pki,resolv.conf,ssl,Trolltech.conf
56private-tmp 54private-tmp
57 55
58dbus-user none 56dbus-user none
diff --git a/etc/profile-a-l/anydesk.profile b/etc/profile-a-l/anydesk.profile
index fdaf10259..5001b20cb 100644
--- a/etc/profile-a-l/anydesk.profile
+++ b/etc/profile-a-l/anydesk.profile
@@ -10,7 +10,6 @@ noblacklist ${HOME}/.anydesk
10include disable-common.inc 10include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16 15
diff --git a/etc/profile-a-l/aosp.profile b/etc/profile-a-l/aosp.profile
index e7b09283e..9668ba00a 100644
--- a/etc/profile-a-l/aosp.profile
+++ b/etc/profile-a-l/aosp.profile
@@ -20,7 +20,6 @@ include allow-common-devel.inc
20include allow-ssh.inc 20include allow-ssh.inc
21 21
22include disable-common.inc 22include disable-common.inc
23include disable-passwdmgr.inc
24include disable-programs.inc 23include disable-programs.inc
25include disable-xdg.inc 24include disable-xdg.inc
26 25
diff --git a/etc/profile-a-l/apktool.profile b/etc/profile-a-l/apktool.profile
index 4ea43c434..1951748d4 100644
--- a/etc/profile-a-l/apktool.profile
+++ b/etc/profile-a-l/apktool.profile
@@ -9,7 +9,6 @@ include globals.local
9 9
10include disable-common.inc 10include disable-common.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-passwdmgr.inc
13include disable-programs.inc 12include disable-programs.inc
14include disable-xdg.inc 13include disable-xdg.inc
15 14
diff --git a/etc/profile-a-l/apostrophe.profile b/etc/profile-a-l/apostrophe.profile
index 54abdb234..5d45a0804 100644
--- a/etc/profile-a-l/apostrophe.profile
+++ b/etc/profile-a-l/apostrophe.profile
@@ -26,11 +26,11 @@ include disable-common.inc
26include disable-devel.inc 26include disable-devel.inc
27include disable-exec.inc 27include disable-exec.inc
28include disable-interpreters.inc 28include disable-interpreters.inc
29include disable-passwdmgr.inc
30include disable-programs.inc 29include disable-programs.inc
31include disable-shell.inc 30include disable-shell.inc
32include disable-xdg.inc 31include disable-xdg.inc
33 32
33whitelist /usr/libexec/webkit2gtk-4.0
34whitelist /usr/share/apostrophe 34whitelist /usr/share/apostrophe
35whitelist /usr/share/texlive 35whitelist /usr/share/texlive
36whitelist /usr/share/texmf 36whitelist /usr/share/texmf
diff --git a/etc/profile-a-l/arch-audit.profile b/etc/profile-a-l/arch-audit.profile
index accabb6f5..c164073c5 100644
--- a/etc/profile-a-l/arch-audit.profile
+++ b/etc/profile-a-l/arch-audit.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
diff --git a/etc/profile-a-l/archaudit-report.profile b/etc/profile-a-l/archaudit-report.profile
index 19c37f90e..3aebd685d 100644
--- a/etc/profile-a-l/archaudit-report.profile
+++ b/etc/profile-a-l/archaudit-report.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
diff --git a/etc/profile-a-l/archiver-common.profile b/etc/profile-a-l/archiver-common.profile
index 1fab4606b..81733220f 100644
--- a/etc/profile-a-l/archiver-common.profile
+++ b/etc/profile-a-l/archiver-common.profile
@@ -17,7 +17,6 @@ blacklist ${RUNUSER}
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21# Add the next line to your archiver-common.local if you don't need to compress files in disable-programs.inc. 20# Add the next line to your archiver-common.local if you don't need to compress files in disable-programs.inc.
22#include disable-programs.inc 21#include disable-programs.inc
23include disable-shell.inc 22include disable-shell.inc
diff --git a/etc/profile-a-l/ardour5.profile b/etc/profile-a-l/ardour5.profile
index 84b1d6c18..78dea1cd0 100644
--- a/etc/profile-a-l/ardour5.profile
+++ b/etc/profile-a-l/ardour5.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-xdg.inc 20include disable-xdg.inc
22 21
diff --git a/etc/profile-a-l/arduino.profile b/etc/profile-a-l/arduino.profile
index fd1ca9a09..01da63e8e 100644
--- a/etc/profile-a-l/arduino.profile
+++ b/etc/profile-a-l/arduino.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
diff --git a/etc/profile-a-l/aria2c.profile b/etc/profile-a-l/aria2c.profile
index 22b8ecd65..8aef75cd1 100644
--- a/etc/profile-a-l/aria2c.profile
+++ b/etc/profile-a-l/aria2c.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22 21
23include whitelist-usr-share-common.inc 22include whitelist-usr-share-common.inc
@@ -46,7 +45,7 @@ private-bin aria2c,gzip
46# Add 'private-cache' to your aria2c.local if you don't use Lutris/winetricks (see issue #2772). 45# Add 'private-cache' to your aria2c.local if you don't use Lutris/winetricks (see issue #2772).
47#private-cache 46#private-cache
48private-dev 47private-dev
49private-etc alternatives,ca-certificates,crypto-policies,groups,login.defs,machine-id,nsswitch.conf,passwd,pki,resolv.conf,ssl 48private-etc alternatives,ca-certificates,crypto-policies,groups,ld.so.cache,ld.so.preload,login.defs,machine-id,nsswitch.conf,passwd,pki,resolv.conf,ssl
50private-lib libreadline.so.* 49private-lib libreadline.so.*
51private-tmp 50private-tmp
52 51
diff --git a/etc/profile-a-l/ark.profile b/etc/profile-a-l/ark.profile
index a63dd8f5f..a26592f3a 100644
--- a/etc/profile-a-l/ark.profile
+++ b/etc/profile-a-l/ark.profile
@@ -13,10 +13,10 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19whitelist /usr/share/ark 18whitelist /usr/share/ark
19include whitelist-run-common.inc
20include whitelist-usr-share-common.inc 20include whitelist-usr-share-common.inc
21include whitelist-var-common.inc 21include whitelist-var-common.inc
22 22
diff --git a/etc/profile-a-l/arm.profile b/etc/profile-a-l/arm.profile
index 2c8b630ce..6676d42e9 100644
--- a/etc/profile-a-l/arm.profile
+++ b/etc/profile-a-l/arm.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22mkdir ${HOME}/.arm 21mkdir ${HOME}/.arm
@@ -44,6 +43,6 @@ tracelog
44disable-mnt 43disable-mnt
45private-bin arm,bash,ldconfig,lsof,ps,python*,sh,tor 44private-bin arm,bash,ldconfig,lsof,ps,python*,sh,tor
46private-dev 45private-dev
47private-etc alternatives,ca-certificates,crypto-policies,passwd,pki,ssl,tor 46private-etc alternatives,ca-certificates,crypto-policies,ld.so.cache,ld.so.preload,passwd,pki,ssl,tor
48private-tmp 47private-tmp
49 48
diff --git a/etc/profile-a-l/artha.profile b/etc/profile-a-l/artha.profile
index fab72b7d3..254f3f571 100644
--- a/etc/profile-a-l/artha.profile
+++ b/etc/profile-a-l/artha.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-shell.inc 21include disable-shell.inc
23include disable-xdg.inc 22include disable-xdg.inc
@@ -57,7 +56,7 @@ disable-mnt
57private-bin artha,enchant,notify-send 56private-bin artha,enchant,notify-send
58private-cache 57private-cache
59private-dev 58private-dev
60private-etc alternatives,fonts,machine-id 59private-etc alternatives,fonts,ld.so.cache,ld.so.preload,machine-id
61private-lib libnotify.so.* 60private-lib libnotify.so.*
62private-tmp 61private-tmp
63 62
diff --git a/etc/profile-a-l/assogiate.profile b/etc/profile-a-l/assogiate.profile
index 977fe30a4..788a94302 100644
--- a/etc/profile-a-l/assogiate.profile
+++ b/etc/profile-a-l/assogiate.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
diff --git a/etc/profile-a-l/asunder.profile b/etc/profile-a-l/asunder.profile
index c97fd691a..fbc65ffc7 100644
--- a/etc/profile-a-l/asunder.profile
+++ b/etc/profile-a-l/asunder.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-xdg.inc 20include disable-xdg.inc
22 21
diff --git a/etc/profile-a-l/atom.profile b/etc/profile-a-l/atom.profile
index 5f237ac59..c1ca20ec9 100644
--- a/etc/profile-a-l/atom.profile
+++ b/etc/profile-a-l/atom.profile
@@ -11,6 +11,8 @@ ignore include disable-devel.inc
11ignore include disable-interpreters.inc 11ignore include disable-interpreters.inc
12ignore include disable-xdg.inc 12ignore include disable-xdg.inc
13ignore whitelist ${DOWNLOADS} 13ignore whitelist ${DOWNLOADS}
14ignore whitelist ${HOME}/.config/Electron
15ignore whitelist ${HOME}/.config/electron-flag*.conf
14ignore include whitelist-common.inc 16ignore include whitelist-common.inc
15ignore include whitelist-runuser-common.inc 17ignore include whitelist-runuser-common.inc
16ignore include whitelist-usr-share-common.inc 18ignore include whitelist-usr-share-common.inc
diff --git a/etc/profile-a-l/atool.profile b/etc/profile-a-l/atool.profile
index e377de2c8..6399bc1a3 100644
--- a/etc/profile-a-l/atool.profile
+++ b/etc/profile-a-l/atool.profile
@@ -13,7 +13,7 @@ include allow-perl.inc
13noroot 13noroot
14 14
15# without login.defs atool complains and uses UID/GID 1000 by default 15# without login.defs atool complains and uses UID/GID 1000 by default
16private-etc alternatives,group,login.defs,passwd 16private-etc alternatives,group,ld.so.cache,ld.so.preload,login.defs,passwd
17private-tmp 17private-tmp
18 18
19# Redirect 19# Redirect
diff --git a/etc/profile-a-l/atril.profile b/etc/profile-a-l/atril.profile
index 1c3ed66ff..264bc0215 100644
--- a/etc/profile-a-l/atril.profile
+++ b/etc/profile-a-l/atril.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
@@ -43,7 +42,7 @@ tracelog
43 42
44private-bin 7z,7za,7zr,atril,atril-previewer,atril-thumbnailer,sh,tar,unrar,unzip,zipnote 43private-bin 7z,7za,7zr,atril,atril-previewer,atril-thumbnailer,sh,tar,unrar,unzip,zipnote
45private-dev 44private-dev
46private-etc alternatives,fonts,ld.so.cache 45private-etc alternatives,fonts,ld.so.cache,ld.so.preload
47# atril uses webkit gtk to display epub files 46# atril uses webkit gtk to display epub files
48# waiting for globbing support in private-lib; for now hardcoding it to webkit2gtk-4.0 47# waiting for globbing support in private-lib; for now hardcoding it to webkit2gtk-4.0
49#private-lib webkit2gtk-4.0 - problems on Arch with the new version of WebKit 48#private-lib webkit2gtk-4.0 - problems on Arch with the new version of WebKit
diff --git a/etc/profile-a-l/audacious.profile b/etc/profile-a-l/audacious.profile
index f9f209786..e9ecdd72e 100644
--- a/etc/profile-a-l/audacious.profile
+++ b/etc/profile-a-l/audacious.profile
@@ -14,10 +14,10 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
20include whitelist-run-common.inc
21include whitelist-var-common.inc 21include whitelist-var-common.inc
22 22
23apparmor 23apparmor
diff --git a/etc/profile-a-l/audacity.profile b/etc/profile-a-l/audacity.profile
index a2de8436a..88bddfb22 100644
--- a/etc/profile-a-l/audacity.profile
+++ b/etc/profile-a-l/audacity.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
@@ -33,7 +32,7 @@ noroot
33notv 32notv
34nou2f 33nou2f
35novideo 34novideo
36protocol unix 35protocol unix,inet
37seccomp 36seccomp
38shell none 37shell none
39tracelog 38tracelog
diff --git a/etc/profile-a-l/audio-recorder.profile b/etc/profile-a-l/audio-recorder.profile
index 2c7fdc812..58b2efde6 100644
--- a/etc/profile-a-l/audio-recorder.profile
+++ b/etc/profile-a-l/audio-recorder.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-a-l/authenticator-rs.profile b/etc/profile-a-l/authenticator-rs.profile
index 2ebe35dd5..a8af1928b 100644
--- a/etc/profile-a-l/authenticator-rs.profile
+++ b/etc/profile-a-l/authenticator-rs.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -48,7 +47,7 @@ disable-mnt
48private-bin authenticator-rs 47private-bin authenticator-rs
49private-cache 48private-cache
50private-dev 49private-dev
51private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gtk-2.0,gtk-3.0,pki,resolv.conf,ssl,xdg 50private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gtk-2.0,gtk-3.0,ld.so.cache,ld.so.preload,pki,resolv.conf,ssl,xdg
52private-tmp 51private-tmp
53 52
54dbus-user filter 53dbus-user filter
diff --git a/etc/profile-a-l/authenticator.profile b/etc/profile-a-l/authenticator.profile
index 42d9cd56a..f9a03ca68 100644
--- a/etc/profile-a-l/authenticator.profile
+++ b/etc/profile-a-l/authenticator.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22 21
23# apparmor 22# apparmor
@@ -40,7 +39,7 @@ shell none
40disable-mnt 39disable-mnt
41# private-bin authenticator,python* 40# private-bin authenticator,python*
42private-dev 41private-dev
43private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,pki,resolv.conf,ssl 42private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.preload,pki,resolv.conf,ssl
44private-tmp 43private-tmp
45 44
46# makes settings immutable 45# makes settings immutable
diff --git a/etc/profile-a-l/autokey-common.profile b/etc/profile-a-l/autokey-common.profile
index 891928e5a..abd535afe 100644
--- a/etc/profile-a-l/autokey-common.profile
+++ b/etc/profile-a-l/autokey-common.profile
@@ -19,7 +19,6 @@ include disable-devel.inc
19# disable-exec.inc might break scripting functionality 19# disable-exec.inc might break scripting functionality
20#include disable-exec.inc 20#include disable-exec.inc
21include disable-interpreters.inc 21include disable-interpreters.inc
22include disable-passwdmgr.inc
23include disable-programs.inc 22include disable-programs.inc
24include whitelist-var-common.inc 23include whitelist-var-common.inc
25 24
diff --git a/etc/profile-a-l/avidemux.profile b/etc/profile-a-l/avidemux.profile
index 1ecc03da1..468a3fe9f 100644
--- a/etc/profile-a-l/avidemux.profile
+++ b/etc/profile-a-l/avidemux.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
@@ -23,6 +22,7 @@ mkdir ${HOME}/.config/avidemux3_qt5rc
23whitelist ${HOME}/.avidemux6 22whitelist ${HOME}/.avidemux6
24whitelist ${HOME}/.config/avidemux3_qt5rc 23whitelist ${HOME}/.config/avidemux3_qt5rc
25whitelist ${VIDEOS} 24whitelist ${VIDEOS}
25
26include whitelist-common.inc 26include whitelist-common.inc
27include whitelist-runuser-common.inc 27include whitelist-runuser-common.inc
28include whitelist-usr-share-common.inc 28include whitelist-usr-share-common.inc
diff --git a/etc/profile-a-l/aweather.profile b/etc/profile-a-l/aweather.profile
index a57ad4014..e01ea5b5d 100644
--- a/etc/profile-a-l/aweather.profile
+++ b/etc/profile-a-l/aweather.profile
@@ -11,7 +11,6 @@ noblacklist ${HOME}/.config/aweather
11include disable-common.inc 11include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-shell.inc 15include disable-shell.inc
17 16
diff --git a/etc/profile-a-l/ballbuster.profile b/etc/profile-a-l/ballbuster.profile
index 3952921a3..daa13a7ed 100644
--- a/etc/profile-a-l/ballbuster.profile
+++ b/etc/profile-a-l/ballbuster.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
diff --git a/etc/profile-a-l/baloo_file.profile b/etc/profile-a-l/baloo_file.profile
index fe86d9b80..55d2453d8 100644
--- a/etc/profile-a-l/baloo_file.profile
+++ b/etc/profile-a-l/baloo_file.profile
@@ -23,9 +23,9 @@ include disable-common.inc
23include disable-devel.inc 23include disable-devel.inc
24include disable-exec.inc 24include disable-exec.inc
25include disable-interpreters.inc 25include disable-interpreters.inc
26include disable-passwdmgr.inc
27include disable-programs.inc 26include disable-programs.inc
28 27
28include whitelist-run-common.inc
29include whitelist-var-common.inc 29include whitelist-var-common.inc
30 30
31apparmor 31apparmor
diff --git a/etc/profile-a-l/balsa.profile b/etc/profile-a-l/balsa.profile
index 8c69652c5..be3543b08 100644
--- a/etc/profile-a-l/balsa.profile
+++ b/etc/profile-a-l/balsa.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-shell.inc 22include disable-shell.inc
24include disable-xdg.inc 23include disable-xdg.inc
@@ -67,7 +66,7 @@ tracelog
67private-bin balsa,balsa-ab,gpg,gpg-agent,gpg2,gpgsm 66private-bin balsa,balsa-ab,gpg,gpg-agent,gpg2,gpgsm
68private-cache 67private-cache
69private-dev 68private-dev
70private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gcrypt,groups,gtk-2.0,gtk-3.0,hostname,hosts,mailname,passwd,pki,resolv.conf,selinux,ssl,xdg 69private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gcrypt,groups,gtk-2.0,gtk-3.0,hostname,hosts,ld.so.cache,ld.so.preload,mailname,passwd,pki,resolv.conf,selinux,ssl,xdg
71private-tmp 70private-tmp
72writable-run-user 71writable-run-user
73writable-var 72writable-var
@@ -80,4 +79,4 @@ dbus-user.talk org.freedesktop.secrets
80dbus-user.talk org.gnome.keyring.SystemPrompter 79dbus-user.talk org.gnome.keyring.SystemPrompter
81dbus-system none 80dbus-system none
82 81
83read-only ${HOME}/.mozilla/firefox/profiles.ini \ No newline at end of file 82read-only ${HOME}/.mozilla/firefox/profiles.ini
diff --git a/etc/profile-a-l/baobab.profile b/etc/profile-a-l/baobab.profile
index ac03c663a..c8dbcad4e 100644
--- a/etc/profile-a-l/baobab.profile
+++ b/etc/profile-a-l/baobab.profile
@@ -10,7 +10,6 @@ include globals.local
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14# include disable-programs.inc 13# include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16# include disable-xdg.inc 15# include disable-xdg.inc
diff --git a/etc/profile-a-l/barrier.profile b/etc/profile-a-l/barrier.profile
index 7b50e9199..f6775ee01 100644
--- a/etc/profile-a-l/barrier.profile
+++ b/etc/profile-a-l/barrier.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
diff --git a/etc/profile-a-l/bcompare.profile b/etc/profile-a-l/bcompare.profile
index 3ecaea7fe..87bcf9a19 100644
--- a/etc/profile-a-l/bcompare.profile
+++ b/etc/profile-a-l/bcompare.profile
@@ -17,7 +17,6 @@ noblacklist ${HOME}/.config/gwenviewrc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21# Add the next line to your bcompare.local if you don't need to compare files in disable-programs.inc. 20# Add the next line to your bcompare.local if you don't need to compare files in disable-programs.inc.
22#include disable-programs.inc 21#include disable-programs.inc
23#include disable-shell.inc - breaks launch 22#include disable-shell.inc - breaks launch
diff --git a/etc/profile-a-l/bibletime.profile b/etc/profile-a-l/bibletime.profile
index c7a82afbd..602576e56 100644
--- a/etc/profile-a-l/bibletime.profile
+++ b/etc/profile-a-l/bibletime.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22mkdir ${HOME}/.bibletime 21mkdir ${HOME}/.bibletime
@@ -50,10 +49,10 @@ seccomp !chroot
50shell none 49shell none
51 50
52disable-mnt 51disable-mnt
53# private-bin bibletime,qt5ct 52# private-bin bibletime
54private-cache 53private-cache
55private-dev 54private-dev
56private-etc alternatives,ca-certificates,crypto-policies,fonts,login.defs,machine-id,passwd,pki,resolv.conf,ssl,sword,sword.conf 55private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.preload,login.defs,machine-id,passwd,pki,resolv.conf,ssl,sword,sword.conf
57private-tmp 56private-tmp
58 57
59dbus-user none 58dbus-user none
diff --git a/etc/profile-a-l/bijiben.profile b/etc/profile-a-l/bijiben.profile
index ce1ddbb03..b86232860 100644
--- a/etc/profile-a-l/bijiben.profile
+++ b/etc/profile-a-l/bijiben.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -20,8 +19,10 @@ include disable-xdg.inc
20mkdir ${HOME}/.local/share/bijiben 19mkdir ${HOME}/.local/share/bijiben
21whitelist ${HOME}/.local/share/bijiben 20whitelist ${HOME}/.local/share/bijiben
22whitelist ${HOME}/.cache/tracker 21whitelist ${HOME}/.cache/tracker
22whitelist /usr/libexec/webkit2gtk-4.0
23whitelist /usr/share/bijiben 23whitelist /usr/share/bijiben
24whitelist /usr/share/tracker 24whitelist /usr/share/tracker
25whitelist /usr/share/tracker3
25include whitelist-common.inc 26include whitelist-common.inc
26include whitelist-runuser-common.inc 27include whitelist-runuser-common.inc
27include whitelist-usr-share-common.inc 28include whitelist-usr-share-common.inc
@@ -50,7 +51,7 @@ disable-mnt
50private-bin bijiben 51private-bin bijiben
51# private-cache -- access to .cache/tracker is required 52# private-cache -- access to .cache/tracker is required
52private-dev 53private-dev
53private-etc dconf,fonts,gtk-3.0,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload 54private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload
54private-tmp 55private-tmp
55 56
56dbus-user filter 57dbus-user filter
diff --git a/etc/profile-a-l/bitcoin-qt.profile b/etc/profile-a-l/bitcoin-qt.profile
index 932db9b73..ef6ef7a75 100644
--- a/etc/profile-a-l/bitcoin-qt.profile
+++ b/etc/profile-a-l/bitcoin-qt.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19 18
diff --git a/etc/profile-a-l/bitlbee.profile b/etc/profile-a-l/bitlbee.profile
index dd7651979..773fa7500 100644
--- a/etc/profile-a-l/bitlbee.profile
+++ b/etc/profile-a-l/bitlbee.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-xdg.inc 20include disable-xdg.inc
22 21
diff --git a/etc/profile-a-l/bitwarden.profile b/etc/profile-a-l/bitwarden.profile
index bef25276d..f8114c71b 100644
--- a/etc/profile-a-l/bitwarden.profile
+++ b/etc/profile-a-l/bitwarden.profile
@@ -6,54 +6,25 @@ include bitwarden.local
6# Persistent global definitions 6# Persistent global definitions
7include globals.local 7include globals.local
8 8
9# Disabled until someone reported positive feedback
10ignore include whitelist-usr-share-common.inc
11
9ignore noexec /tmp 12ignore noexec /tmp
10 13
11noblacklist ${HOME}/.config/Bitwarden 14noblacklist ${HOME}/.config/Bitwarden
12 15
13include disable-common.inc
14include disable-devel.inc
15include disable-exec.inc
16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc
19include disable-shell.inc 16include disable-shell.inc
20include disable-xdg.inc
21 17
22mkdir ${HOME}/.config/Bitwarden 18mkdir ${HOME}/.config/Bitwarden
23whitelist ${HOME}/.config/Bitwarden 19whitelist ${HOME}/.config/Bitwarden
24whitelist ${DOWNLOADS}
25include whitelist-common.inc
26include whitelist-var-common.inc
27 20
28apparmor
29caps.drop all
30machine-id 21machine-id
31netfilter
32no3d 22no3d
33nodvd
34nogroups
35noinput
36nonewprivs
37noroot
38nosound 23nosound
39notv 24
40nou2f
41novideo
42protocol unix,inet,inet6,netlink
43seccomp !chroot
44shell none
45#tracelog - breaks on Arch
46
47private-bin bitwarden
48private-cache
49?HAS_APPIMAGE: ignore private-dev 25?HAS_APPIMAGE: ignore private-dev
50private-dev 26private-etc alternatives,ca-certificates,crypto-policies,fonts,hosts,ld.so.cache,ld.so.preload,nsswitch.conf,pki,resolv.conf,ssl
51private-etc alternatives,ca-certificates,crypto-policies,fonts,hosts,nsswitch.conf,pki,resolv.conf,ssl
52private-opt Bitwarden 27private-opt Bitwarden
53private-tmp
54
55# breaks appindicator (tray) functionality
56# dbus-user none
57# dbus-system none
58 28
59#memory-deny-write-execute - breaks on Arch (see issue #1803) 29# Redirect
30include electron.profile
diff --git a/etc/profile-a-l/bleachbit.profile b/etc/profile-a-l/bleachbit.profile
index 09fa24577..267e8b539 100644
--- a/etc/profile-a-l/bleachbit.profile
+++ b/etc/profile-a-l/bleachbit.profile
@@ -1,6 +1,7 @@
1# Firejail profile for bleachbit 1# Firejail profile for bleachbit
2# Description: Delete unnecessary files from the system 2# Description: Delete unnecessary files from the system
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 bleachbit.local 6include bleachbit.local
6# Persistent global definitions 7# Persistent global definitions
@@ -14,7 +15,6 @@ include disable-common.inc
14include disable-devel.inc 15include disable-devel.inc
15include disable-exec.inc 16include disable-exec.inc
16include disable-interpreters.inc 17include disable-interpreters.inc
17include disable-passwdmgr.inc
18# include disable-programs.inc 18# include disable-programs.inc
19 19
20caps.drop all 20caps.drop all
diff --git a/etc/profile-a-l/blender.profile b/etc/profile-a-l/blender.profile
index 701ae431e..225fd7cdc 100644
--- a/etc/profile-a-l/blender.profile
+++ b/etc/profile-a-l/blender.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22# Allow usage of AMD GPU by OpenCL 21# Allow usage of AMD GPU by OpenCL
diff --git a/etc/profile-a-l/bless.profile b/etc/profile-a-l/bless.profile
index 80dc750f7..3e20ed133 100644
--- a/etc/profile-a-l/bless.profile
+++ b/etc/profile-a-l/bless.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18include whitelist-var-common.inc 17include whitelist-var-common.inc
@@ -36,7 +35,7 @@ shell none
36# private-bin bash,bless,mono,sh 35# private-bin bash,bless,mono,sh
37private-cache 36private-cache
38private-dev 37private-dev
39private-etc alternatives,fonts,mono 38private-etc alternatives,fonts,ld.so.cache,ld.so.preload,mono
40private-tmp 39private-tmp
41 40
42dbus-user none 41dbus-user none
diff --git a/etc/profile-a-l/blobby.profile b/etc/profile-a-l/blobby.profile
new file mode 100644
index 000000000..d7df3bc49
--- /dev/null
+++ b/etc/profile-a-l/blobby.profile
@@ -0,0 +1,51 @@
1# Firejail profile for blobby
2# Persistent local customizations
3include blobby.local
4# Persistent global definitions
5include globals.local
6
7noblacklist ${HOME}/.blobby
8
9include disable-common.inc
10include disable-devel.inc
11include disable-exec.inc
12include disable-interpreters.inc
13include disable-programs.inc
14include disable-shell.inc
15include disable-xdg.inc
16
17mkdir ${HOME}/.blobby
18whitelist ${HOME}/.blobby
19include whitelist-common.inc
20whitelist /usr/share/blobby
21include whitelist-usr-share-common.inc
22include whitelist-var-common.inc
23
24apparmor
25caps.drop all
26ipc-namespace
27netfilter
28nodvd
29nogroups
30noinput
31nonewprivs
32noroot
33notv
34nou2f
35novideo
36protocol unix,inet,inet6,netlink
37seccomp
38shell none
39tracelog
40
41disable-mnt
42private-bin blobby
43private-dev
44private-etc alsa,alternatives,asound.conf,drirc,group,hosts,ld.so.cache,ld.so.preload,login.defs,machine-id,passwd,pulse
45private-lib
46private-tmp
47
48dbus-user none
49dbus-system none
50
51memory-deny-write-execute
diff --git a/etc/profile-a-l/blobwars.profile b/etc/profile-a-l/blobwars.profile
index 904710cb5..cc2fda3f2 100644
--- a/etc/profile-a-l/blobwars.profile
+++ b/etc/profile-a-l/blobwars.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -20,6 +19,7 @@ include disable-xdg.inc
20mkdir ${HOME}/.parallelrealities/blobwars 19mkdir ${HOME}/.parallelrealities/blobwars
21whitelist ${HOME}/.parallelrealities/blobwars 20whitelist ${HOME}/.parallelrealities/blobwars
22whitelist /usr/share/blobwars 21whitelist /usr/share/blobwars
22whitelist /usr/share/games/blobwars
23include whitelist-common.inc 23include whitelist-common.inc
24include whitelist-usr-share-common.inc 24include whitelist-usr-share-common.inc
25include whitelist-var-common.inc 25include whitelist-var-common.inc
@@ -29,7 +29,6 @@ caps.drop all
29net none 29net none
30nodvd 30nodvd
31nogroups 31nogroups
32noinput
33nonewprivs 32nonewprivs
34noroot 33noroot
35notv 34notv
@@ -44,7 +43,7 @@ disable-mnt
44private-bin blobwars 43private-bin blobwars
45private-cache 44private-cache
46private-dev 45private-dev
47private-etc machine-id 46private-etc alternatives,ld.so.cache,ld.so.preload,machine-id
48private-tmp 47private-tmp
49 48
50dbus-user none 49dbus-user none
diff --git a/etc/profile-a-l/bluefish.profile b/etc/profile-a-l/bluefish.profile
index f28435987..bc5219e29 100644
--- a/etc/profile-a-l/bluefish.profile
+++ b/etc/profile-a-l/bluefish.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15 14
16include whitelist-var-common.inc 15include whitelist-var-common.inc
diff --git a/etc/profile-a-l/bnox.profile b/etc/profile-a-l/bnox.profile
index 6e8f0d7d1..8729d8d40 100644
--- a/etc/profile-a-l/bnox.profile
+++ b/etc/profile-a-l/bnox.profile
@@ -6,7 +6,6 @@ include bnox.local
6include globals.local 6include globals.local
7 7
8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565 8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565
9ignore whitelist /usr/share/chromium
10ignore include whitelist-runuser-common.inc 9ignore include whitelist-runuser-common.inc
11ignore include whitelist-usr-share-common.inc 10ignore include whitelist-usr-share-common.inc
12 11
diff --git a/etc/profile-a-l/brackets.profile b/etc/profile-a-l/brackets.profile
index 0cbac049a..94afc9e0b 100644
--- a/etc/profile-a-l/brackets.profile
+++ b/etc/profile-a-l/brackets.profile
@@ -13,7 +13,6 @@ noblacklist ${HOME}/.config/Brackets
13include allow-common-devel.inc 13include allow-common-devel.inc
14 14
15include disable-common.inc 15include disable-common.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19caps.drop all 18caps.drop all
diff --git a/etc/profile-a-l/brasero.profile b/etc/profile-a-l/brasero.profile
index 417a6b3e0..656701909 100644
--- a/etc/profile-a-l/brasero.profile
+++ b/etc/profile-a-l/brasero.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18include whitelist-var-common.inc 17include whitelist-var-common.inc
diff --git a/etc/profile-a-l/bsdtar.profile b/etc/profile-a-l/bsdtar.profile
index d731a6a6e..fbc7c9056 100644
--- a/etc/profile-a-l/bsdtar.profile
+++ b/etc/profile-a-l/bsdtar.profile
@@ -6,7 +6,7 @@ include bsdtar.local
6# Persistent global definitions 6# Persistent global definitions
7include globals.local 7include globals.local
8 8
9private-etc alternatives,group,localtime,passwd 9private-etc alternatives,group,ld.so.cache,ld.so.preload,localtime,passwd
10 10
11# Redirect 11# Redirect
12include archiver-common.profile 12include archiver-common.profile
diff --git a/etc/profile-a-l/build-systems-common.profile b/etc/profile-a-l/build-systems-common.profile
new file mode 100644
index 000000000..1b199d612
--- /dev/null
+++ b/etc/profile-a-l/build-systems-common.profile
@@ -0,0 +1,66 @@
1# Firejail profile for build-systems-common
2# This file is overwritten after every install/update
3# Persistent local customizations
4include build-systems-common.local
5# Persistent global definitions
6# added by caller profile
7#include globals.local
8
9ignore noexec ${HOME}
10ignore noexec /tmp
11
12# Allow /bin/sh (blacklisted by disable-shell.inc)
13include allow-bin-sh.inc
14
15# Allows files commonly used by IDEs
16include allow-common-devel.inc
17
18# Allow ssh (blacklisted by disable-common.inc)
19#include allow-ssh.inc
20
21blacklist ${RUNUSER}
22
23include disable-common.inc
24include disable-exec.inc
25include disable-interpreters.inc
26include disable-programs.inc
27include disable-shell.inc
28include disable-X11.inc
29include disable-xdg.inc
30
31#whitelist ${HOME}/Projects
32#include whitelist-common.inc
33
34whitelist /usr/share/pkgconfig
35include whitelist-run-common.inc
36include whitelist-usr-share-common.inc
37include whitelist-var-common.inc
38
39caps.drop all
40ipc-namespace
41machine-id
42# net none
43netfilter
44no3d
45nodvd
46nogroups
47noinput
48nonewprivs
49noroot
50nosound
51notv
52nou2f
53novideo
54protocol unix,inet,inet6
55seccomp
56seccomp.block-secondary
57shell none
58tracelog
59
60disable-mnt
61private-cache
62private-dev
63private-tmp
64
65dbus-user none
66dbus-system none
diff --git a/etc/profile-a-l/bundle.profile b/etc/profile-a-l/bundle.profile
new file mode 100644
index 000000000..bb82022b1
--- /dev/null
+++ b/etc/profile-a-l/bundle.profile
@@ -0,0 +1,23 @@
1# Firejail profile for bundle
2# Description: Ruby Dependency Management
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include bundle.local
7# Persistent global definitions
8include globals.local
9
10noblacklist ${HOME}/.bundle
11
12# Allow ruby (blacklisted by disable-interpreters.inc)
13include allow-ruby.inc
14
15#whitelist ${HOME}/.bundle
16#whitelist ${HOME}/.gem
17#whitelist ${HOME}/.local/share/gem
18whitelist /usr/share/gems
19whitelist /usr/share/ruby
20whitelist /usr/share/rubygems
21
22# Redirect
23include build-systems-common.profile
diff --git a/etc/profile-a-l/bzflag.profile b/etc/profile-a-l/bzflag.profile
index bda96bbb3..53cfde352 100644
--- a/etc/profile-a-l/bzflag.profile
+++ b/etc/profile-a-l/bzflag.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
diff --git a/etc/profile-a-l/cachy-browser.profile b/etc/profile-a-l/cachy-browser.profile
new file mode 100644
index 000000000..7a14d9464
--- /dev/null
+++ b/etc/profile-a-l/cachy-browser.profile
@@ -0,0 +1,56 @@
1# Firejail profile for Cachy-Browser
2# Description: Librewolf fork based on enhanced privacy with gentoo patchset
3# This file is overwritten after every install/update
4# Persistent local customizations
5include cachy-browser.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.cache/cachy
10noblacklist ${HOME}/.cachy
11
12mkdir ${HOME}/.cache/cachy
13mkdir ${HOME}/.cachy
14whitelist ${HOME}/.cache/cachy
15whitelist ${HOME}/.cachy
16
17# Add the next lines to your cachy-browser.local if you want to use the migration wizard.
18#noblacklist ${HOME}/.mozilla
19#whitelist ${HOME}/.mozilla
20
21# To enable KeePassXC Plugin add one of the following lines to your cachy-browser.local.
22# NOTE: start KeePassXC before CachyBrowser and keep it open to allow communication between them.
23#whitelist ${RUNUSER}/kpxc_server
24#whitelist ${RUNUSER}/org.keepassxc.KeePassXC.BrowserServer
25
26whitelist /usr/share/doc
27whitelist /usr/share/gtk-doc/html
28whitelist /usr/share/mozilla
29whitelist /usr/share/webext
30include whitelist-usr-share-common.inc
31
32# Add the next line to your cachy-browser.local to enable private-bin (Arch Linux).
33#private-bin dbus-launch,dbus-send,cachy-browser,sh
34# Add the next line to your cachy-browser.local to enable private-etc.
35# NOTE: private-etc must first be enabled in firefox-common.local.
36#private-etc cachy-browser
37
38dbus-user filter
39dbus-user.own org.mozilla.cachybrowser.*
40# Add the next line to your cachy-browser.local to enable native notifications.
41#dbus-user.talk org.freedesktop.Notifications
42# Add the next line to your cachy-browser.local to allow inhibiting screensavers.
43#dbus-user.talk org.freedesktop.ScreenSaver
44# Add the next lines to your cachy-browser.local for plasma browser integration.
45#dbus-user.own org.mpris.MediaPlayer2.plasma-browser-integration
46#dbus-user.talk org.kde.JobViewServer
47#dbus-user.talk org.kde.kuiserver
48# Add the next line to your cachy-browser.local to allow screensharing under Wayland.
49#dbus-user.talk org.freedesktop.portal.Desktop
50# Also add the next line to your cachy-browser.local if screensharing does not work with
51# the above lines (depends on the portal implementation).
52#ignore noroot
53ignore dbus-user none
54
55# Redirect
56include firefox-common.profile
diff --git a/etc/profile-a-l/calibre.profile b/etc/profile-a-l/calibre.profile
index 83571397b..cdc168384 100644
--- a/etc/profile-a-l/calibre.profile
+++ b/etc/profile-a-l/calibre.profile
@@ -13,7 +13,6 @@ noblacklist ${DOCUMENTS}
13include disable-common.inc 13include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-a-l/calligra.profile b/etc/profile-a-l/calligra.profile
index fcff47662..280a61401 100644
--- a/etc/profile-a-l/calligra.profile
+++ b/etc/profile-a-l/calligra.profile
@@ -11,7 +11,6 @@ noblacklist ${HOME}/.local/share/kxmlgui5/calligra
11include disable-common.inc 11include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16 15
17caps.drop all 16caps.drop all
diff --git a/etc/profile-a-l/cameramonitor.profile b/etc/profile-a-l/cameramonitor.profile
index 74c7cc34b..92c455144 100644
--- a/etc/profile-a-l/cameramonitor.profile
+++ b/etc/profile-a-l/cameramonitor.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-shell.inc 19include disable-shell.inc
21include disable-xdg.inc 20include disable-xdg.inc
@@ -47,7 +46,7 @@ tracelog
47disable-mnt 46disable-mnt
48private-bin cameramonitor,python* 47private-bin cameramonitor,python*
49private-cache 48private-cache
50private-etc alternatives,fonts 49private-etc alternatives,fonts,ld.so.cache,ld.so.preload
51private-tmp 50private-tmp
52 51
53# dbus-user none 52# dbus-user none
diff --git a/etc/profile-a-l/cantata.profile b/etc/profile-a-l/cantata.profile
index 96f88a7c4..69cf912ef 100644
--- a/etc/profile-a-l/cantata.profile
+++ b/etc/profile-a-l/cantata.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-shell.inc 22include disable-shell.inc
24include disable-xdg.inc 23include disable-xdg.inc
diff --git a/etc/profile-a-l/cargo.profile b/etc/profile-a-l/cargo.profile
new file mode 100644
index 000000000..4c8afd895
--- /dev/null
+++ b/etc/profile-a-l/cargo.profile
@@ -0,0 +1,24 @@
1# Firejail profile for cargo
2# Description: The Rust package manager
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include cargo.local
7# Persistent global definitions
8include globals.local
9
10ignore read-only ${HOME}/.cargo/bin
11
12noblacklist ${HOME}/.cargo/credentials
13noblacklist ${HOME}/.cargo/credentials.toml
14
15#whitelist ${HOME}/.cargo
16#whitelist ${HOME}/.rustup
17
18#private-bin cargo,rustc
19private-etc alternatives,ca-certificates,crypto-policies,group,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,localtime,magic,magic.mgc,nsswitch.conf,passwd,pki,protocols,resolv.conf,rpc,services,ssl
20
21memory-deny-write-execute
22
23# Redirect
24include build-systems-common.profile
diff --git a/etc/profile-a-l/catfish.profile b/etc/profile-a-l/catfish.profile
index 009d3a049..38a670fdc 100644
--- a/etc/profile-a-l/catfish.profile
+++ b/etc/profile-a-l/catfish.profile
@@ -18,7 +18,6 @@ include allow-python3.inc
18# include disable-common.inc 18# include disable-common.inc
19# include disable-devel.inc 19# include disable-devel.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22# include disable-programs.inc 21# include disable-programs.inc
23 22
24whitelist /var/lib/mlocate 23whitelist /var/lib/mlocate
diff --git a/etc/profile-a-l/cawbird.profile b/etc/profile-a-l/cawbird.profile
index 6e137010c..c7a98250e 100644
--- a/etc/profile-a-l/cawbird.profile
+++ b/etc/profile-a-l/cawbird.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -40,7 +39,7 @@ disable-mnt
40private-bin cawbird 39private-bin cawbird
41private-cache 40private-cache
42private-dev 41private-dev
43private-etc alternatives,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,mime.types,nsswitch.conf,pki,resolv.conf,ssl,X11,xdg 42private-etc alternatives,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,mime.types,nsswitch.conf,pki,resolv.conf,ssl,X11,xdg
44private-tmp 43private-tmp
45 44
46# dbus-user none 45# dbus-user none
diff --git a/etc/profile-a-l/celluloid.profile b/etc/profile-a-l/celluloid.profile
index f02161b9b..1a9340632 100644
--- a/etc/profile-a-l/celluloid.profile
+++ b/etc/profile-a-l/celluloid.profile
@@ -17,14 +17,14 @@ include allow-lua.inc
17include allow-python2.inc 17include allow-python2.inc
18include allow-python3.inc 18include allow-python3.inc
19 19
20blacklist /usr/libexec
21
20include disable-common.inc 22include disable-common.inc
21include disable-devel.inc 23include disable-devel.inc
22include disable-exec.inc 24include disable-exec.inc
23include disable-interpreters.inc 25include disable-interpreters.inc
24include disable-passwdmgr.inc
25include disable-programs.inc 26include disable-programs.inc
26 27
27read-only ${DESKTOP}
28mkdir ${HOME}/.config/celluloid 28mkdir ${HOME}/.config/celluloid
29mkdir ${HOME}/.config/gnome-mpv 29mkdir ${HOME}/.config/gnome-mpv
30mkdir ${HOME}/.config/youtube-dl 30mkdir ${HOME}/.config/youtube-dl
@@ -53,12 +53,13 @@ tracelog
53 53
54private-bin celluloid,env,gnome-mpv,python*,youtube-dl 54private-bin celluloid,env,gnome-mpv,python*,youtube-dl
55private-cache 55private-cache
56private-etc alternatives,ca-certificates,crypto-policies,dconf,drirc,fonts,gtk-3.0,hosts,ld.so.cache,libva.conf,localtime,machine-id,pkcs11,pki,resolv.conf,selinux,ssl,xdg 56private-etc alternatives,ca-certificates,crypto-policies,dconf,drirc,fonts,gtk-3.0,hosts,ld.so.cache,ld.so.preload,libva.conf,localtime,machine-id,pkcs11,pki,resolv.conf,selinux,ssl,xdg
57private-dev 57private-dev
58private-tmp 58private-tmp
59 59
60dbus-user filter 60dbus-user filter
61dbus-user.own io.github.celluloid_player.Celluloid 61dbus-user.own io.github.celluloid_player.Celluloid
62dbus-user.talk ca.desrt.dconf
62dbus-user.talk org.gnome.SettingsDaemon.MediaKeys 63dbus-user.talk org.gnome.SettingsDaemon.MediaKeys
63dbus-system none 64dbus-system none
64 65
diff --git a/etc/profile-a-l/checkbashisms.profile b/etc/profile-a-l/checkbashisms.profile
index 24939fc70..e89f488ea 100644
--- a/etc/profile-a-l/checkbashisms.profile
+++ b/etc/profile-a-l/checkbashisms.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-xdg.inc 22include disable-xdg.inc
24 23
diff --git a/etc/profile-a-l/cheese.profile b/etc/profile-a-l/cheese.profile
index aca1f5876..713d8a5e4 100644
--- a/etc/profile-a-l/cheese.profile
+++ b/etc/profile-a-l/cheese.profile
@@ -9,18 +9,23 @@ include globals.local
9noblacklist ${VIDEOS} 9noblacklist ${VIDEOS}
10noblacklist ${PICTURES} 10noblacklist ${PICTURES}
11 11
12include allow-python3.inc
13
12include disable-common.inc 14include disable-common.inc
13include disable-devel.inc 15include disable-devel.inc
14include disable-exec.inc 16include disable-exec.inc
15include disable-interpreters.inc 17include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 18include disable-programs.inc
19include disable-shell.inc
18include disable-xdg.inc 20include disable-xdg.inc
19 21
20whitelist ${VIDEOS} 22whitelist ${VIDEOS}
21whitelist ${PICTURES} 23whitelist ${PICTURES}
24whitelist /usr/libexec/gstreamer-1.0/gst-plugin-scanner
22whitelist /usr/share/gnome-video-effects 25whitelist /usr/share/gnome-video-effects
26whitelist /usr/share/gstreamer-1.0
23include whitelist-common.inc 27include whitelist-common.inc
28include whitelist-run-common.inc
24include whitelist-runuser-common.inc 29include whitelist-runuser-common.inc
25include whitelist-usr-share-common.inc 30include whitelist-usr-share-common.inc
26include whitelist-var-common.inc 31include whitelist-var-common.inc
@@ -31,21 +36,26 @@ machine-id
31net none 36net none
32nodvd 37nodvd
33nogroups 38nogroups
39noinput
34nonewprivs 40nonewprivs
35noroot 41noroot
42nosound
36notv 43notv
37nou2f 44nou2f
38protocol unix 45protocol unix
39seccomp 46seccomp
47seccomp.block-secondary
40shell none 48shell none
41tracelog 49tracelog
42 50
43disable-mnt 51disable-mnt
44private-bin cheese 52private-bin cheese
45private-cache 53private-cache
46private-etc alternatives,clutter-1.0,dconf,drirc,fonts,gtk-3.0 54private-dev
55private-etc alternatives,clutter-1.0,dconf,drirc,fonts,gtk-3.0,ld.so.cache,ld.so.preload
47private-tmp 56private-tmp
48 57
49dbus-user filter 58dbus-user filter
59dbus-user.own org.gnome.Cheese
50dbus-user.talk ca.desrt.dconf 60dbus-user.talk ca.desrt.dconf
51dbus-system none 61dbus-system none
diff --git a/etc/profile-a-l/cherrytree.profile b/etc/profile-a-l/cherrytree.profile
index 7621b3c8c..e68182b27 100644
--- a/etc/profile-a-l/cherrytree.profile
+++ b/etc/profile-a-l/cherrytree.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
diff --git a/etc/profile-a-l/chromium-browser-privacy.profile b/etc/profile-a-l/chromium-browser-privacy.profile
index 0283a6934..8803a4d9d 100644
--- a/etc/profile-a-l/chromium-browser-privacy.profile
+++ b/etc/profile-a-l/chromium-browser-privacy.profile
@@ -6,6 +6,8 @@ include chromium-browser-privacy.local
6noblacklist ${HOME}/.cache/ungoogled-chromium 6noblacklist ${HOME}/.cache/ungoogled-chromium
7noblacklist ${HOME}/.config/ungoogled-chromium 7noblacklist ${HOME}/.config/ungoogled-chromium
8 8
9blacklist /usr/libexec
10
9mkdir ${HOME}/.cache/ungoogled-chromium 11mkdir ${HOME}/.cache/ungoogled-chromium
10mkdir ${HOME}/.config/ungoogled-chromium 12mkdir ${HOME}/.config/ungoogled-chromium
11whitelist ${HOME}/.cache/ungoogled-chromium 13whitelist ${HOME}/.cache/ungoogled-chromium
diff --git a/etc/profile-a-l/chromium-common-hardened.inc.profile b/etc/profile-a-l/chromium-common-hardened.inc.profile
index 87a0a0994..19addd285 100644
--- a/etc/profile-a-l/chromium-common-hardened.inc.profile
+++ b/etc/profile-a-l/chromium-common-hardened.inc.profile
@@ -6,5 +6,4 @@ caps.drop all
6nonewprivs 6nonewprivs
7noroot 7noroot
8protocol unix,inet,inet6,netlink 8protocol unix,inet,inet6,netlink
9# kcmp is required for ozone-platform=wayland, see #3783. 9seccomp !chroot
10seccomp !chroot,!kcmp
diff --git a/etc/profile-a-l/chromium-common.profile b/etc/profile-a-l/chromium-common.profile
index 134f4665c..998ffd9da 100644
--- a/etc/profile-a-l/chromium-common.profile
+++ b/etc/profile-a-l/chromium-common.profile
@@ -9,8 +9,9 @@ include chromium-common.local
9# noexec ${HOME} breaks DRM binaries. 9# noexec ${HOME} breaks DRM binaries.
10?BROWSER_ALLOW_DRM: ignore noexec ${HOME} 10?BROWSER_ALLOW_DRM: ignore noexec ${HOME}
11 11
12noblacklist ${HOME}/.pki
13noblacklist ${HOME}/.local/share/pki 12noblacklist ${HOME}/.local/share/pki
13noblacklist ${HOME}/.pki
14noblacklist /usr/lib/chromium/chrome-sandbox
14 15
15# Add the next line to your chromium-common.local if you want Google Chrome/Chromium browser 16# Add the next line to your chromium-common.local if you want Google Chrome/Chromium browser
16# to have access to Gnome extensions (extensions.gnome.org) via browser connector 17# to have access to Gnome extensions (extensions.gnome.org) via browser connector
@@ -20,16 +21,18 @@ include disable-common.inc
20include disable-devel.inc 21include disable-devel.inc
21include disable-exec.inc 22include disable-exec.inc
22include disable-interpreters.inc 23include disable-interpreters.inc
23# include disable-passwdmgr.inc
24include disable-programs.inc 24include disable-programs.inc
25include disable-xdg.inc 25include disable-xdg.inc
26 26
27mkdir ${HOME}/.pki
28mkdir ${HOME}/.local/share/pki 27mkdir ${HOME}/.local/share/pki
28mkdir ${HOME}/.pki
29whitelist ${DOWNLOADS} 29whitelist ${DOWNLOADS}
30whitelist ${HOME}/.pki
31whitelist ${HOME}/.local/share/pki 30whitelist ${HOME}/.local/share/pki
31whitelist ${HOME}/.pki
32whitelist /usr/share/mozilla/extensions
33whitelist /usr/share/webext
32include whitelist-common.inc 34include whitelist-common.inc
35include whitelist-run-common.inc
33include whitelist-runuser-common.inc 36include whitelist-runuser-common.inc
34include whitelist-usr-share-common.inc 37include whitelist-usr-share-common.inc
35include whitelist-var-common.inc 38include whitelist-var-common.inc
@@ -37,14 +40,12 @@ include whitelist-var-common.inc
37# Add the next line to your chromium-common.local if your kernel allows unprivileged userns clone. 40# Add the next line to your chromium-common.local if your kernel allows unprivileged userns clone.
38#include chromium-common-hardened.inc.profile 41#include chromium-common-hardened.inc.profile
39 42
40# Add the next line to your chromium-common.local to allow screen sharing under wayland.
41#whitelist ${RUNUSER}/pipewire-0
42
43apparmor 43apparmor
44caps.keep sys_admin,sys_chroot 44caps.keep sys_admin,sys_chroot
45netfilter 45netfilter
46nodvd 46nodvd
47nogroups 47nogroups
48noinput
48notv 49notv
49?BROWSER_DISABLE_U2F: nou2f 50?BROWSER_DISABLE_U2F: nou2f
50shell none 51shell none
@@ -54,6 +55,10 @@ private-cache
54?BROWSER_DISABLE_U2F: private-dev 55?BROWSER_DISABLE_U2F: private-dev
55#private-tmp - issues when using multiple browser sessions 56#private-tmp - issues when using multiple browser sessions
56 57
58blacklist ${PATH}/curl
59blacklist ${PATH}/wget
60blacklist ${PATH}/wget2
61
57#dbus-user none - prevents access to passwords saved in GNOME Keyring and KWallet, also breaks Gnome connector. 62#dbus-user none - prevents access to passwords saved in GNOME Keyring and KWallet, also breaks Gnome connector.
58dbus-system none 63dbus-system none
59 64
diff --git a/etc/profile-a-l/chromium.profile b/etc/profile-a-l/chromium.profile
index 9ac33aa1c..14f1bbe64 100644
--- a/etc/profile-a-l/chromium.profile
+++ b/etc/profile-a-l/chromium.profile
@@ -16,7 +16,6 @@ whitelist ${HOME}/.cache/chromium
16whitelist ${HOME}/.config/chromium 16whitelist ${HOME}/.config/chromium
17whitelist ${HOME}/.config/chromium-flags.conf 17whitelist ${HOME}/.config/chromium-flags.conf
18whitelist /usr/share/chromium 18whitelist /usr/share/chromium
19whitelist /usr/share/mozilla/extensions
20 19
21# private-bin chromium,chromium-browser,chromedriver 20# private-bin chromium,chromium-browser,chromedriver
22 21
diff --git a/etc/profile-a-l/cin.profile b/etc/profile-a-l/cin.profile
index 542d6600d..7d3e0c100 100644
--- a/etc/profile-a-l/cin.profile
+++ b/etc/profile-a-l/cin.profile
@@ -11,7 +11,6 @@ include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16 15
17caps.drop all 16caps.drop all
@@ -26,7 +25,7 @@ nou2f
26noroot 25noroot
27protocol unix 26protocol unix
28 27
29# if an 1-1.2% gap per thread hurts you, comment seccomp 28# If a 1-1.2% gap per thread hurts you, add 'ignore seccomp' to your cin.local.
30seccomp 29seccomp
31shell none 30shell none
32 31
diff --git a/etc/profile-a-l/clawsker.profile b/etc/profile-a-l/clawsker.profile
index 9b62a1f73..677d2b7eb 100644
--- a/etc/profile-a-l/clawsker.profile
+++ b/etc/profile-a-l/clawsker.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20 19
21mkdir ${HOME}/.claws-mail 20mkdir ${HOME}/.claws-mail
@@ -45,7 +44,7 @@ disable-mnt
45private-bin bash,clawsker,perl,sh,which 44private-bin bash,clawsker,perl,sh,which
46private-cache 45private-cache
47private-dev 46private-dev
48private-etc alternatives,fonts 47private-etc alternatives,fonts,ld.so.cache,ld.so.preload
49private-lib girepository-1.*,libdbus-glib-1.so.*,libetpan.so.*,libgirepository-1.*,libgtk-3.so.*,libgtk-x11-2.0.so.*,libstartup-notification-1.so.*,perl* 48private-lib girepository-1.*,libdbus-glib-1.so.*,libetpan.so.*,libgirepository-1.*,libgtk-3.so.*,libgtk-x11-2.0.so.*,libstartup-notification-1.so.*,perl*
50private-tmp 49private-tmp
51 50
diff --git a/etc/profile-a-l/clementine.profile b/etc/profile-a-l/clementine.profile
index fa33795c1..b1509f391 100644
--- a/etc/profile-a-l/clementine.profile
+++ b/etc/profile-a-l/clementine.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
diff --git a/etc/profile-a-l/clion-eap.profile b/etc/profile-a-l/clion-eap.profile
new file mode 100644
index 000000000..3602c3e7b
--- /dev/null
+++ b/etc/profile-a-l/clion-eap.profile
@@ -0,0 +1,10 @@
1# Firejail profile for CLion EAP
2# This file is overwritten after every install/update
3# Persistent local customizations
4include clion-eap.local
5# Persistent global definitions
6# added by included profile
7#include globals.local
8
9# Redirect
10include clion.profile
diff --git a/etc/profile-a-l/clion.profile b/etc/profile-a-l/clion.profile
index 22cecff09..15071d731 100644
--- a/etc/profile-a-l/clion.profile
+++ b/etc/profile-a-l/clion.profile
@@ -5,6 +5,9 @@ include clion.local
5# Persistent global definitions 5# Persistent global definitions
6include globals.local 6include globals.local
7 7
8noblacklist ${HOME}/.config/JetBrains/CLion*
9noblacklist ${HOME}/.cache/JetBrains/CLion*
10noblacklist ${HOME}/.clion*
8noblacklist ${HOME}/.CLion* 11noblacklist ${HOME}/.CLion*
9noblacklist ${HOME}/.config/git 12noblacklist ${HOME}/.config/git
10noblacklist ${HOME}/.gitconfig 13noblacklist ${HOME}/.gitconfig
@@ -17,7 +20,6 @@ noblacklist ${HOME}/.tooling
17include allow-ssh.inc 20include allow-ssh.inc
18 21
19include disable-common.inc 22include disable-common.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 23include disable-programs.inc
22 24
23caps.drop all 25caps.drop all
diff --git a/etc/profile-a-l/clipgrab.profile b/etc/profile-a-l/clipgrab.profile
index c8258da07..084f0ccad 100644
--- a/etc/profile-a-l/clipgrab.profile
+++ b/etc/profile-a-l/clipgrab.profile
@@ -6,15 +6,18 @@ include clipgrab.local
6# Persistent global definitions 6# Persistent global definitions
7include globals.local 7include globals.local
8 8
9noblacklist ${HOME}/.config/ClipGrab
9noblacklist ${HOME}/.config/Philipp Schmieder 10noblacklist ${HOME}/.config/Philipp Schmieder
10noblacklist ${HOME}/.pki 11noblacklist ${HOME}/.pki
11noblacklist ${VIDEOS} 12noblacklist ${VIDEOS}
12 13
14# Allow python (blacklisted by disable-interpreters.inc)
15include allow-python3.inc
16
13include disable-common.inc 17include disable-common.inc
14include disable-devel.inc 18include disable-devel.inc
15include disable-exec.inc 19include disable-exec.inc
16include disable-interpreters.inc 20include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 21include disable-programs.inc
19include disable-xdg.inc 22include disable-xdg.inc
20 23
diff --git a/etc/profile-a-l/clipit.profile b/etc/profile-a-l/clipit.profile
index d421903a3..4c7cb86bf 100644
--- a/etc/profile-a-l/clipit.profile
+++ b/etc/profile-a-l/clipit.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-a-l/cmake.profile b/etc/profile-a-l/cmake.profile
new file mode 100644
index 000000000..26cc2a00a
--- /dev/null
+++ b/etc/profile-a-l/cmake.profile
@@ -0,0 +1,13 @@
1# Firejail profile for cargo
2# Description: The Rust package manager
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include cargo.local
7# Persistent global definitions
8include globals.local
9
10memory-deny-write-execute
11
12# Redirect
13include build-systems-common.profile
diff --git a/etc/profile-a-l/cmus.profile b/etc/profile-a-l/cmus.profile
index bcd557787..7421debe0 100644
--- a/etc/profile-a-l/cmus.profile
+++ b/etc/profile-a-l/cmus.profile
@@ -12,7 +12,6 @@ noblacklist ${MUSIC}
12include disable-common.inc 12include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -28,4 +27,4 @@ seccomp
28shell none 27shell none
29 28
30private-bin cmus 29private-bin cmus
31private-etc alternatives,asound.conf,ca-certificates,crypto-policies,group,machine-id,pki,pulse,resolv.conf,ssl 30private-etc alternatives,asound.conf,ca-certificates,crypto-policies,group,ld.so.cache,ld.so.preload,machine-id,pki,pulse,resolv.conf,ssl
diff --git a/etc/profile-a-l/code.profile b/etc/profile-a-l/code.profile
index e19b78908..4cade5749 100644
--- a/etc/profile-a-l/code.profile
+++ b/etc/profile-a-l/code.profile
@@ -5,6 +5,23 @@ include code.local
5# Persistent global definitions 5# Persistent global definitions
6include globals.local 6include globals.local
7 7
8# Disabled until someone reported positive feedback
9ignore include disable-devel.inc
10ignore include disable-exec.inc
11ignore include disable-interpreters.inc
12ignore include disable-xdg.inc
13ignore whitelist ${DOWNLOADS}
14ignore whitelist ${HOME}/.config/Electron
15ignore whitelist ${HOME}/.config/electron-flag*.conf
16ignore include whitelist-common.inc
17ignore include whitelist-runuser-common.inc
18ignore include whitelist-usr-share-common.inc
19ignore include whitelist-var-common.inc
20ignore apparmor
21ignore disable-mnt
22ignore dbus-user none
23ignore dbus-system none
24
8noblacklist ${HOME}/.config/Code 25noblacklist ${HOME}/.config/Code
9noblacklist ${HOME}/.config/Code - OSS 26noblacklist ${HOME}/.config/Code - OSS
10noblacklist ${HOME}/.vscode 27noblacklist ${HOME}/.vscode
@@ -13,31 +30,13 @@ noblacklist ${HOME}/.vscode-oss
13# Allows files commonly used by IDEs 30# Allows files commonly used by IDEs
14include allow-common-devel.inc 31include allow-common-devel.inc
15 32
16include disable-common.inc
17include disable-passwdmgr.inc
18include disable-programs.inc
19
20caps.drop all
21netfilter
22nodvd
23nogroups
24noinput
25nonewprivs
26noroot
27nosound 33nosound
28notv
29nou2f
30novideo
31protocol unix,inet,inet6,netlink
32seccomp
33shell none
34
35private-cache
36private-dev
37private-tmp
38 34
39# Disabling noexec ${HOME} for now since it will 35# Disabling noexec ${HOME} for now since it will
40# probably interfere with running some programmes 36# probably interfere with running some programmes
41# in VS Code 37# in VS Code
42# noexec ${HOME} 38# noexec ${HOME}
43noexec /tmp 39noexec /tmp
40
41# Redirect
42include electron.profile
diff --git a/etc/profile-a-l/codium.profile b/etc/profile-a-l/codium.profile
new file mode 100644
index 000000000..9ff87ed8a
--- /dev/null
+++ b/etc/profile-a-l/codium.profile
@@ -0,0 +1,10 @@
1# Firejail profile alias for VSCodium
2# This file is overwritten after every install/update
3# Persistent local customizations
4include codium.local
5# Persistent global definitions
6# added by included profile
7#include globals.local
8
9# Redirect
10include vscodium.profile
diff --git a/etc/profile-a-l/cointop.profile b/etc/profile-a-l/cointop.profile
new file mode 100644
index 000000000..4349f58fc
--- /dev/null
+++ b/etc/profile-a-l/cointop.profile
@@ -0,0 +1,63 @@
1# Firejail profile for cointop
2# Description: TUI for tracking cryptocurrency stats
3# This file is overwritten after every install/update
4# Persistent local customizations
5include cointop.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.config/cointop
10
11blacklist ${RUNUSER}
12
13include disable-common.inc
14include disable-devel.inc
15include disable-exec.inc
16include disable-interpreters.inc
17include disable-proc.inc
18include disable-programs.inc
19include disable-shell.inc
20include disable-X11.inc
21include disable-xdg.inc
22
23mkdir ${HOME}/.config/cointop
24whitelist ${HOME}/.config/cointop
25include whitelist-common.inc
26include whitelist-runuser-common.inc
27include whitelist-usr-share-common.inc
28include whitelist-var-common.inc
29
30apparmor
31caps.drop all
32ipc-namespace
33machine-id
34netfilter
35no3d
36nodvd
37nogroups
38noinput
39nonewprivs
40noprinters
41noroot
42nosound
43notv
44nou2f
45novideo
46protocol inet,inet6
47seccomp
48seccomp.block-secondary
49shell none
50tracelog
51
52disable-mnt
53private-bin cointop
54private-cache
55private-dev
56private-etc alternatives,ca-certificates,crypto-policies,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,nsswitch.conf,pki,protocols,resolv.conf,rpc,services,ssl
57private-lib
58private-tmp
59
60dbus-user none
61dbus-system none
62
63memory-deny-write-execute
diff --git a/etc/profile-a-l/cola.profile b/etc/profile-a-l/cola.profile
index e5debfd82..97bf6d394 100644
--- a/etc/profile-a-l/cola.profile
+++ b/etc/profile-a-l/cola.profile
@@ -7,4 +7,4 @@ include cola.local
7include globals.local 7include globals.local
8 8
9# Redirect 9# Redirect
10include git-cola.profile \ No newline at end of file 10include git-cola.profile
diff --git a/etc/profile-a-l/colorful.profile b/etc/profile-a-l/colorful.profile
index bd6d8f5b0..33ee0d0ee 100644
--- a/etc/profile-a-l/colorful.profile
+++ b/etc/profile-a-l/colorful.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
diff --git a/etc/profile-a-l/com.github.bleakgrey.tootle.profile b/etc/profile-a-l/com.github.bleakgrey.tootle.profile
index c8bdfec23..27780b669 100644
--- a/etc/profile-a-l/com.github.bleakgrey.tootle.profile
+++ b/etc/profile-a-l/com.github.bleakgrey.tootle.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -46,7 +45,7 @@ disable-mnt
46private-bin com.github.bleakgrey.tootle 45private-bin com.github.bleakgrey.tootle
47private-cache 46private-cache
48private-dev 47private-dev
49private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,dconf,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,machine-id mime.types,nsswitch.conf,pki,pulse,resolv.conf,ssl,X11,xdg 48private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,dconf,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,machine-id mime.types,nsswitch.conf,pki,pulse,resolv.conf,ssl,X11,xdg
50private-tmp 49private-tmp
51 50
52# Settings are immutable 51# Settings are immutable
diff --git a/etc/profile-a-l/com.github.dahenson.agenda.profile b/etc/profile-a-l/com.github.dahenson.agenda.profile
index b467a0f7a..0e29d90de 100644
--- a/etc/profile-a-l/com.github.dahenson.agenda.profile
+++ b/etc/profile-a-l/com.github.dahenson.agenda.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
@@ -53,7 +52,7 @@ disable-mnt
53private-bin com.github.dahenson.agenda 52private-bin com.github.dahenson.agenda
54private-cache 53private-cache
55private-dev 54private-dev
56private-etc dconf,fonts,gtk-3.0 55private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload
57private-tmp 56private-tmp
58 57
59dbus-user filter 58dbus-user filter
diff --git a/etc/profile-a-l/com.github.johnfactotum.Foliate.profile b/etc/profile-a-l/com.github.johnfactotum.Foliate.profile
index c13f9618b..24222164b 100644
--- a/etc/profile-a-l/com.github.johnfactotum.Foliate.profile
+++ b/etc/profile-a-l/com.github.johnfactotum.Foliate.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-shell.inc 21include disable-shell.inc
23include disable-xdg.inc 22include disable-xdg.inc
@@ -56,7 +55,7 @@ disable-mnt
56private-bin com.github.johnfactotum.Foliate,gjs 55private-bin com.github.johnfactotum.Foliate,gjs
57private-cache 56private-cache
58private-dev 57private-dev
59private-etc dconf,fonts,gconf,gtk-3.0 58private-etc alternatives,dconf,fonts,gconf,gtk-3.0,ld.so.cache,ld.so.preload
60private-tmp 59private-tmp
61 60
62read-only ${HOME} 61read-only ${HOME}
diff --git a/etc/profile-a-l/com.github.phase1geo.minder.profile b/etc/profile-a-l/com.github.phase1geo.minder.profile
index d0402d188..b10d1b5b0 100644
--- a/etc/profile-a-l/com.github.phase1geo.minder.profile
+++ b/etc/profile-a-l/com.github.phase1geo.minder.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
diff --git a/etc/profile-a-l/com.github.tchx84.Flatseal.profile b/etc/profile-a-l/com.github.tchx84.Flatseal.profile
new file mode 100644
index 000000000..a095104f0
--- /dev/null
+++ b/etc/profile-a-l/com.github.tchx84.Flatseal.profile
@@ -0,0 +1,65 @@
1# Firejail profile for flatseal
2# This file is overwritten after every install/update
3# Persistent local customizations
4include com.github.tchx84.Flatseal.local
5# Persistent global definitions
6include globals.local
7
8noblacklist ${HOME}/.local/share/flatpak/overrides
9noblacklist /var/lib/flatpak/app
10
11# Allow gjs (blacklisted by disable-interpreters.inc)
12include allow-gjs.inc
13
14include disable-common.inc
15include disable-devel.inc
16include disable-exec.inc
17include disable-interpreters.inc
18include disable-proc.inc
19include disable-programs.inc
20include disable-shell.inc
21include disable-xdg.inc
22
23mkdir ${HOME}/.local/share/flatpak/overrides
24whitelist ${HOME}/.local/share/flatpak/overrides
25include whitelist-common.inc
26include whitelist-run-common.inc
27include whitelist-runuser-common.inc
28include whitelist-usr-share-common.inc
29include whitelist-var-common.inc
30
31apparmor
32caps.drop all
33net none
34no3d
35nodvd
36nogroups
37noinput
38nonewprivs
39noprinters
40noroot
41nosound
42notv
43nou2f
44novideo
45protocol unix
46seccomp
47seccomp.block-secondary
48shell none
49tracelog
50
51disable-mnt
52private-bin com.github.tchx84.Flatseal,gjs
53private-cache
54private-dev
55private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload
56private-tmp
57
58dbus-user filter
59dbus-user.own com.github.tchx84.Flatseal
60dbus-user.talk ca.desrt.dconf
61dbus-user.talk org.freedesktop.impl.portal.PermissionStore
62dbus-user.talk org.gnome.Software
63dbus-system none
64
65read-write ${HOME}/.local/share/flatpak/overrides
diff --git a/etc/profile-a-l/conky.profile b/etc/profile-a-l/conky.profile
index eaa18739d..7ccc101bf 100644
--- a/etc/profile-a-l/conky.profile
+++ b/etc/profile-a-l/conky.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-xdg.inc 19include disable-xdg.inc
21 20
diff --git a/etc/profile-a-l/corebird.profile b/etc/profile-a-l/corebird.profile
index 2fb446e2a..537381f64 100644
--- a/etc/profile-a-l/corebird.profile
+++ b/etc/profile-a-l/corebird.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
diff --git a/etc/profile-a-l/cower.profile b/etc/profile-a-l/cower.profile
index 1635995dc..351ca0dab 100644
--- a/etc/profile-a-l/cower.profile
+++ b/etc/profile-a-l/cower.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
diff --git a/etc/profile-a-l/coyim.profile b/etc/profile-a-l/coyim.profile
index 7ece35c2b..099253b21 100644
--- a/etc/profile-a-l/coyim.profile
+++ b/etc/profile-a-l/coyim.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -41,7 +40,7 @@ tracelog
41disable-mnt 40disable-mnt
42private-cache 41private-cache
43private-dev 42private-dev
44private-etc alternatives,ca-certificates,crypto-policies,fonts,machine-id,pki,ssl 43private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.preload,machine-id,pki,ssl
45private-tmp 44private-tmp
46 45
47dbus-user none 46dbus-user none
diff --git a/etc/profile-a-l/crawl.profile b/etc/profile-a-l/crawl.profile
index b10216895..7cbbcd8d3 100644
--- a/etc/profile-a-l/crawl.profile
+++ b/etc/profile-a-l/crawl.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
diff --git a/etc/profile-a-l/crow.profile b/etc/profile-a-l/crow.profile
index 02b15ecc2..ed1213687 100644
--- a/etc/profile-a-l/crow.profile
+++ b/etc/profile-a-l/crow.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-shell.inc 19include disable-shell.inc
21include disable-xdg.inc 20include disable-xdg.inc
@@ -40,7 +39,7 @@ shell none
40disable-mnt 39disable-mnt
41private-bin crow 40private-bin crow
42private-dev 41private-dev
43private-etc alternatives,asound.conf,ca-certificates,crypto-policies,dconf,fonts,machine-id,nsswitch.conf,pki,pulse,resolv.conf,ssl 42private-etc alternatives,asound.conf,ca-certificates,crypto-policies,dconf,fonts,ld.so.cache,ld.so.preload,machine-id,nsswitch.conf,pki,pulse,resolv.conf,ssl
44private-opt none 43private-opt none
45private-tmp 44private-tmp
46private-srv none 45private-srv none
diff --git a/etc/profile-a-l/curl.profile b/etc/profile-a-l/curl.profile
index c9867c5d7..448d8b655 100644
--- a/etc/profile-a-l/curl.profile
+++ b/etc/profile-a-l/curl.profile
@@ -20,7 +20,6 @@ blacklist ${RUNUSER}
20 20
21include disable-common.inc 21include disable-common.inc
22include disable-exec.inc 22include disable-exec.inc
23include disable-passwdmgr.inc
24include disable-programs.inc 23include disable-programs.inc
25# Depending on workflow you can add 'include disable-xdg.inc' to your curl.local. 24# Depending on workflow you can add 'include disable-xdg.inc' to your curl.local.
26#include disable-xdg.inc 25#include disable-xdg.inc
diff --git a/etc/profile-a-l/d-feet.profile b/etc/profile-a-l/d-feet.profile
index ba1e7adad..c75bc756f 100644
--- a/etc/profile-a-l/d-feet.profile
+++ b/etc/profile-a-l/d-feet.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-shell.inc 20include disable-shell.inc
22include disable-xdg.inc 21include disable-xdg.inc
@@ -51,7 +50,7 @@ disable-mnt
51private-bin d-feet,python* 50private-bin d-feet,python*
52private-cache 51private-cache
53private-dev 52private-dev
54private-etc alternatives,dbus-1,fonts,machine-id 53private-etc alternatives,dbus-1,fonts,ld.so.cache,ld.so.preload,machine-id
55private-tmp 54private-tmp
56 55
57#memory-deny-write-execute - breaks on Arch (see issue #1803) 56#memory-deny-write-execute - breaks on Arch (see issue #1803)
diff --git a/etc/profile-a-l/darktable.profile b/etc/profile-a-l/darktable.profile
index 61fa52928..a3590281c 100644
--- a/etc/profile-a-l/darktable.profile
+++ b/etc/profile-a-l/darktable.profile
@@ -10,11 +10,12 @@ noblacklist ${HOME}/.cache/darktable
10noblacklist ${HOME}/.config/darktable 10noblacklist ${HOME}/.config/darktable
11noblacklist ${PICTURES} 11noblacklist ${PICTURES}
12 12
13include allow-lua.inc
14
13include disable-common.inc 15include disable-common.inc
14include disable-devel.inc 16include disable-devel.inc
15include disable-exec.inc 17include disable-exec.inc
16include disable-interpreters.inc 18include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 19include disable-programs.inc
19include disable-xdg.inc 20include disable-xdg.inc
20 21
diff --git a/etc/profile-a-l/dbus-send.profile b/etc/profile-a-l/dbus-send.profile
index 67a61bb60..e1b96f186 100644
--- a/etc/profile-a-l/dbus-send.profile
+++ b/etc/profile-a-l/dbus-send.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-write-mnt.inc 19include disable-write-mnt.inc
@@ -52,7 +51,7 @@ private
52private-bin dbus-send 51private-bin dbus-send
53private-cache 52private-cache
54private-dev 53private-dev
55private-etc alternatives,dbus-1 54private-etc alternatives,dbus-1,ld.so.cache,ld.so.preload
56private-lib libpcre* 55private-lib libpcre*
57private-tmp 56private-tmp
58 57
diff --git a/etc/profile-a-l/dconf-editor.profile b/etc/profile-a-l/dconf-editor.profile
index 0c221850a..8c3c22dcf 100644
--- a/etc/profile-a-l/dconf-editor.profile
+++ b/etc/profile-a-l/dconf-editor.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16include disable-xdg.inc 15include disable-xdg.inc
@@ -44,7 +43,7 @@ disable-mnt
44private-bin dconf-editor 43private-bin dconf-editor
45private-cache 44private-cache
46private-dev 45private-dev
47private-etc alternatives,dconf,fonts,gtk-3.0,machine-id 46private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload,machine-id
48private-lib 47private-lib
49private-tmp 48private-tmp
50 49
diff --git a/etc/profile-a-l/dconf.profile b/etc/profile-a-l/dconf.profile
index be7514cbf..b170842c3 100644
--- a/etc/profile-a-l/dconf.profile
+++ b/etc/profile-a-l/dconf.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
@@ -47,7 +46,7 @@ disable-mnt
47private-bin dconf,gsettings 46private-bin dconf,gsettings
48private-cache 47private-cache
49private-dev 48private-dev
50private-etc alternatives,dconf 49private-etc alternatives,dconf,ld.so.cache,ld.so.preload
51private-lib 50private-lib
52private-tmp 51private-tmp
53 52
diff --git a/etc/profile-a-l/ddgr.profile b/etc/profile-a-l/ddgr.profile
new file mode 100644
index 000000000..b1d41ddf7
--- /dev/null
+++ b/etc/profile-a-l/ddgr.profile
@@ -0,0 +1,13 @@
1# Firejail profile for ddgr
2# Description: Search DuckDuckGo from your terminal
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include ddgr.local
7# Persistent global definitions
8include globals.local
9
10private-bin ddgr
11
12# Redirect
13include googler-common.profile
diff --git a/etc/profile-a-l/ddgtk.profile b/etc/profile-a-l/ddgtk.profile
index 5b95b74be..e9b8f5c47 100644
--- a/etc/profile-a-l/ddgtk.profile
+++ b/etc/profile-a-l/ddgtk.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
@@ -46,7 +45,7 @@ tracelog
46disable-mnt 45disable-mnt
47private-bin bash,dd,ddgtk,grep,lsblk,python*,sed,sh,tr 46private-bin bash,dd,ddgtk,grep,lsblk,python*,sed,sh,tr
48private-cache 47private-cache
49private-etc alternatives,fonts 48private-etc alternatives,fonts,ld.so.cache,ld.so.preload
50private-tmp 49private-tmp
51 50
52dbus-user none 51dbus-user none
diff --git a/etc/profile-a-l/deadbeef.profile b/etc/profile-a-l/deadbeef.profile
index a221ebbd7..d9ff941da 100644
--- a/etc/profile-a-l/deadbeef.profile
+++ b/etc/profile-a-l/deadbeef.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-a-l/default.profile b/etc/profile-a-l/default.profile
index 2ecf1a45d..dac842bb6 100644
--- a/etc/profile-a-l/default.profile
+++ b/etc/profile-a-l/default.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12# include disable-devel.inc 12# include disable-devel.inc
13# include disable-exec.inc 13# include disable-exec.inc
14# include disable-interpreters.inc 14# include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17# include disable-shell.inc 16# include disable-shell.inc
18# include disable-write-mnt.inc 17# include disable-write-mnt.inc
@@ -32,12 +31,13 @@ netfilter
32# no3d 31# no3d
33# nodvd 32# nodvd
34# nogroups 33# nogroups
34noinput
35nonewprivs 35nonewprivs
36noroot 36noroot
37# nosound 37# nosound
38# notv 38notv
39# nou2f 39# nou2f
40# novideo 40novideo
41protocol unix,inet,inet6 41protocol unix,inet,inet6
42seccomp 42seccomp
43# shell none 43# shell none
@@ -57,5 +57,6 @@ seccomp
57# dbus-user none 57# dbus-user none
58# dbus-system none 58# dbus-system none
59 59
60# deterministic-shutdown
60# memory-deny-write-execute 61# memory-deny-write-execute
61# read-only ${HOME} 62# read-only ${HOME}
diff --git a/etc/profile-a-l/deluge.profile b/etc/profile-a-l/deluge.profile
index ad7aa6ed5..3697243e0 100644
--- a/etc/profile-a-l/deluge.profile
+++ b/etc/profile-a-l/deluge.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16# include disable-devel.inc 16# include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22mkdir ${HOME}/.config/deluge 21mkdir ${HOME}/.config/deluge
diff --git a/etc/profile-a-l/desktopeditors.profile b/etc/profile-a-l/desktopeditors.profile
index 212cdab60..5175146db 100644
--- a/etc/profile-a-l/desktopeditors.profile
+++ b/etc/profile-a-l/desktopeditors.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19 18
20include whitelist-usr-share-common.inc 19include whitelist-usr-share-common.inc
diff --git a/etc/profile-a-l/devhelp.profile b/etc/profile-a-l/devhelp.profile
index 5007f8e74..562f6b105 100644
--- a/etc/profile-a-l/devhelp.profile
+++ b/etc/profile-a-l/devhelp.profile
@@ -11,7 +11,6 @@ include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-shell.inc 15include disable-shell.inc
17include disable-xdg.inc 16include disable-xdg.inc
@@ -43,7 +42,7 @@ disable-mnt
43private-bin devhelp 42private-bin devhelp
44private-cache 43private-cache
45private-dev 44private-dev
46private-etc alternatives,dconf,fonts,ld.so.cache,machine-id,ssl 45private-etc alternatives,dconf,fonts,ld.so.cache,ld.so.preload,machine-id,ssl
47private-tmp 46private-tmp
48 47
49# makes settings immutable 48# makes settings immutable
diff --git a/etc/profile-a-l/devilspie.profile b/etc/profile-a-l/devilspie.profile
index 6267b5709..a0f24c388 100644
--- a/etc/profile-a-l/devilspie.profile
+++ b/etc/profile-a-l/devilspie.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
@@ -49,7 +48,7 @@ disable-mnt
49private-bin devilspie 48private-bin devilspie
50private-cache 49private-cache
51private-dev 50private-dev
52private-etc alternatives 51private-etc alternatives,ld.so.cache,ld.so.preload
53private-lib gconv 52private-lib gconv
54private-tmp 53private-tmp
55 54
diff --git a/etc/profile-a-l/dex2jar.profile b/etc/profile-a-l/dex2jar.profile
index 8f3703369..9c1cf72f0 100644
--- a/etc/profile-a-l/dex2jar.profile
+++ b/etc/profile-a-l/dex2jar.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-a-l/dia.profile b/etc/profile-a-l/dia.profile
index 531734b7d..902148756 100644
--- a/etc/profile-a-l/dia.profile
+++ b/etc/profile-a-l/dia.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
diff --git a/etc/profile-a-l/dig.profile b/etc/profile-a-l/dig.profile
index 247159a8a..a925781af 100644
--- a/etc/profile-a-l/dig.profile
+++ b/etc/profile-a-l/dig.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17# include disable-devel.inc 17# include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19# include disable-interpreters.inc 19# include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
diff --git a/etc/profile-a-l/digikam.profile b/etc/profile-a-l/digikam.profile
index 2ca7bd400..41625e12e 100644
--- a/etc/profile-a-l/digikam.profile
+++ b/etc/profile-a-l/digikam.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
diff --git a/etc/profile-a-l/dillo.profile b/etc/profile-a-l/dillo.profile
index 9871a6095..19b99b5fd 100644
--- a/etc/profile-a-l/dillo.profile
+++ b/etc/profile-a-l/dillo.profile
@@ -11,7 +11,6 @@ noblacklist ${HOME}/.dillo
11include disable-common.inc 11include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16 15
17mkdir ${HOME}/.dillo 16mkdir ${HOME}/.dillo
@@ -36,3 +35,5 @@ tracelog
36 35
37private-dev 36private-dev
38private-tmp 37private-tmp
38
39deterministic-shutdown
diff --git a/etc/profile-a-l/dino.profile b/etc/profile-a-l/dino.profile
index 968c0b114..77fc98223 100644
--- a/etc/profile-a-l/dino.profile
+++ b/etc/profile-a-l/dino.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18 17
@@ -20,22 +19,24 @@ mkdir ${HOME}/.local/share/dino
20whitelist ${HOME}/.local/share/dino 19whitelist ${HOME}/.local/share/dino
21whitelist ${DOWNLOADS} 20whitelist ${DOWNLOADS}
22include whitelist-common.inc 21include whitelist-common.inc
22include whitelist-runuser-common.inc
23include whitelist-usr-share-common.inc
24include whitelist-var-common.inc
23 25
24caps.drop all 26caps.drop all
25netfilter 27netfilter
26no3d
27nodvd 28nodvd
28nogroups 29nogroups
29noinput 30noinput
30nonewprivs 31nonewprivs
31noroot 32noroot
32nosound
33notv 33notv
34nou2f 34nou2f
35novideo 35protocol unix,inet,inet6,netlink
36protocol unix,inet,inet6
37seccomp 36seccomp
37seccomp.block-secondary
38shell none 38shell none
39tracelog
39 40
40disable-mnt 41disable-mnt
41private-bin dino 42private-bin dino
@@ -43,3 +44,13 @@ private-dev
43# private-etc alternatives,ca-certificates,crypto-policies,fonts,pki,ssl -- breaks server connection 44# private-etc alternatives,ca-certificates,crypto-policies,fonts,pki,ssl -- breaks server connection
44private-tmp 45private-tmp
45 46
47dbus-user filter
48# Integration with notification and other desktop environment functionalities
49dbus-user.own im.dino.Dino
50# dconf integration
51dbus-user.talk ca.desrt.dconf
52# Notification support
53dbus-user.talk org.freedesktop.Notifications
54dbus-system filter
55# Integration with systemd-logind or elogind
56dbus-system.talk org.freedesktop.login1
diff --git a/etc/profile-a-l/discord-common.profile b/etc/profile-a-l/discord-common.profile
index b83e626d9..c04e38899 100644
--- a/etc/profile-a-l/discord-common.profile
+++ b/etc/profile-a-l/discord-common.profile
@@ -23,8 +23,10 @@ ignore novideo
23whitelist ${HOME}/.config/BetterDiscord 23whitelist ${HOME}/.config/BetterDiscord
24whitelist ${HOME}/.local/share/betterdiscordctl 24whitelist ${HOME}/.local/share/betterdiscordctl
25 25
26private-bin bash,cut,echo,egrep,fish,grep,head,sed,sh,tclsh,tr,xdg-mime,xdg-open,zsh 26private-bin bash,cut,echo,egrep,electron,electron[0-9],electron[0-9][0-9],fish,grep,head,sed,sh,tclsh,tr,xdg-mime,xdg-open,zsh
27private-etc alternatives,ca-certificates,crypto-policies,fonts,group,ld.so.cache,localtime,login.defs,machine-id,password,pki,pulse,resolv.conf,ssl 27private-etc alternatives,ca-certificates,crypto-policies,fonts,group,ld.so.cache,ld.so.preload,localtime,login.defs,machine-id,password,pki,pulse,resolv.conf,ssl
28
29join-or-start discord
28 30
29# Redirect 31# Redirect
30include electron.profile 32include electron.profile
diff --git a/etc/profile-a-l/display.profile b/etc/profile-a-l/display.profile
index 11f3fd36e..1def961b2 100644
--- a/etc/profile-a-l/display.profile
+++ b/etc/profile-a-l/display.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-shell.inc 19include disable-shell.inc
21include disable-xdg.inc 20include disable-xdg.inc
@@ -41,7 +40,8 @@ shell none
41private-bin display,python* 40private-bin display,python*
42private-dev 41private-dev
43# On Debian-based systems, display is a symlink in /etc/alternatives 42# On Debian-based systems, display is a symlink in /etc/alternatives
44private-etc alternatives 43private-etc alternatives,ImageMagick-6,ImageMagick-7,ld.so.cache,ld.so.preload
44private-lib gcc/*/*/libgcc_s.so.*,gcc/*/*/libgomp.so.*,ImageMagick*,libfreetype.so.*,libltdl.so.*,libMagickWand-*.so.*,libXext.so.*
45private-tmp 45private-tmp
46 46
47dbus-user none 47dbus-user none
diff --git a/etc/profile-a-l/dnox.profile b/etc/profile-a-l/dnox.profile
index 51ba6f8b7..2169c8552 100644
--- a/etc/profile-a-l/dnox.profile
+++ b/etc/profile-a-l/dnox.profile
@@ -6,7 +6,6 @@ include dnox.local
6include globals.local 6include globals.local
7 7
8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565 8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565
9ignore whitelist /usr/share/chromium
10ignore include whitelist-runuser-common.inc 9ignore include whitelist-runuser-common.inc
11ignore include whitelist-usr-share-common.inc 10ignore include whitelist-usr-share-common.inc
12 11
diff --git a/etc/profile-a-l/dnscrypt-proxy.profile b/etc/profile-a-l/dnscrypt-proxy.profile
index f8fb1a331..906089663 100644
--- a/etc/profile-a-l/dnscrypt-proxy.profile
+++ b/etc/profile-a-l/dnscrypt-proxy.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
diff --git a/etc/profile-a-l/dnsmasq.profile b/etc/profile-a-l/dnsmasq.profile
index 01398c2b2..2db1548a4 100644
--- a/etc/profile-a-l/dnsmasq.profile
+++ b/etc/profile-a-l/dnsmasq.profile
@@ -16,7 +16,6 @@ blacklist ${RUNUSER}/wayland-*
16include disable-common.inc 16include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-xdg.inc 20include disable-xdg.inc
22 21
diff --git a/etc/profile-a-l/dolphin-emu.profile b/etc/profile-a-l/dolphin-emu.profile
index 49feec32e..ac86ef75a 100644
--- a/etc/profile-a-l/dolphin-emu.profile
+++ b/etc/profile-a-l/dolphin-emu.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-write-mnt.inc 20include disable-write-mnt.inc
22include disable-xdg.inc 21include disable-xdg.inc
diff --git a/etc/profile-a-l/dooble.profile b/etc/profile-a-l/dooble.profile
index 37a4113cb..f1b630ac8 100644
--- a/etc/profile-a-l/dooble.profile
+++ b/etc/profile-a-l/dooble.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19mkdir ${HOME}/.dooble 18mkdir ${HOME}/.dooble
diff --git a/etc/profile-a-l/dosbox.profile b/etc/profile-a-l/dosbox.profile
index 988f66f28..ad7049d3d 100644
--- a/etc/profile-a-l/dosbox.profile
+++ b/etc/profile-a-l/dosbox.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
diff --git a/etc/profile-a-l/dragon.profile b/etc/profile-a-l/dragon.profile
index 8fa01d504..d5591adfb 100644
--- a/etc/profile-a-l/dragon.profile
+++ b/etc/profile-a-l/dragon.profile
@@ -14,12 +14,12 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
21 20
22whitelist /usr/share/dragonplayer 21whitelist /usr/share/dragonplayer
22include whitelist-run-common.inc
23include whitelist-usr-share-common.inc 23include whitelist-usr-share-common.inc
24include whitelist-var-common.inc 24include whitelist-var-common.inc
25 25
diff --git a/etc/profile-a-l/drawio.profile b/etc/profile-a-l/drawio.profile
index 82d96e405..df7be55de 100644
--- a/etc/profile-a-l/drawio.profile
+++ b/etc/profile-a-l/drawio.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -46,7 +45,7 @@ shell none
46private-bin drawio 45private-bin drawio
47private-cache 46private-cache
48private-dev 47private-dev
49private-etc alternatives,fonts 48private-etc alternatives,fonts,ld.so.cache,ld.so.preload
50private-tmp 49private-tmp
51 50
52dbus-user none 51dbus-user none
diff --git a/etc/profile-a-l/drill.profile b/etc/profile-a-l/drill.profile
index 068bd88d8..2a09270f7 100644
--- a/etc/profile-a-l/drill.profile
+++ b/etc/profile-a-l/drill.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16# include disable-devel.inc 16# include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18# include disable-interpreters.inc 18# include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-xdg.inc 20include disable-xdg.inc
22 21
diff --git a/etc/profile-a-l/dropbox.profile b/etc/profile-a-l/dropbox.profile
index b3b2aaf40..73d9cfbbc 100644
--- a/etc/profile-a-l/dropbox.profile
+++ b/etc/profile-a-l/dropbox.profile
@@ -15,7 +15,6 @@ include allow-python3.inc
15include disable-common.inc 15include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20 19
21mkdir ${HOME}/.dropbox 20mkdir ${HOME}/.dropbox
diff --git a/etc/profile-a-l/easystroke.profile b/etc/profile-a-l/easystroke.profile
index 38e4b16f7..20cffae73 100644
--- a/etc/profile-a-l/easystroke.profile
+++ b/etc/profile-a-l/easystroke.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
@@ -46,7 +45,7 @@ disable-mnt
46#private-bin bash,easystroke,sh 45#private-bin bash,easystroke,sh
47private-cache 46private-cache
48private-dev 47private-dev
49private-etc alternatives,fonts,group,passwd 48private-etc alternatives,fonts,group,ld.so.cache,ld.so.preload,passwd
50# breaks custom shell command functionality 49# breaks custom shell command functionality
51#private-lib gdk-pixbuf-2.*,gio,gvfs/libgvfscommon.so,libgconf-2.so.*,librsvg-2.so.* 50#private-lib gdk-pixbuf-2.*,gio,gvfs/libgvfscommon.so,libgconf-2.so.*,librsvg-2.so.*
52private-tmp 51private-tmp
diff --git a/etc/profile-a-l/electron-mail.profile b/etc/profile-a-l/electron-mail.profile
index 278dd6cbd..09d14045a 100644
--- a/etc/profile-a-l/electron-mail.profile
+++ b/etc/profile-a-l/electron-mail.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -46,7 +45,7 @@ shell none
46private-bin electron-mail 45private-bin electron-mail
47private-cache 46private-cache
48private-dev 47private-dev
49private-etc alternatives,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,nsswitch.conf,pki,resolv.conf,selinux,ssl,xdg 48private-etc alternatives,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,ld.so.cache,ld.so.preload,nsswitch.conf,pki,resolv.conf,selinux,ssl,xdg
50private-opt ElectronMail 49private-opt ElectronMail
51private-tmp 50private-tmp
52 51
diff --git a/etc/profile-a-l/electron.profile b/etc/profile-a-l/electron.profile
index 493af79d4..cedef34ff 100644
--- a/etc/profile-a-l/electron.profile
+++ b/etc/profile-a-l/electron.profile
@@ -4,15 +4,19 @@
4# Persistent local customizations 4# Persistent local customizations
5include electron.local 5include electron.local
6 6
7noblacklist ${HOME}/.config/Electron
8noblacklist ${HOME}/.config/electron-flag*.conf
9
7include disable-common.inc 10include disable-common.inc
8include disable-devel.inc 11include disable-devel.inc
9include disable-exec.inc 12include disable-exec.inc
10include disable-interpreters.inc 13include disable-interpreters.inc
11include disable-passwdmgr.inc
12include disable-programs.inc 14include disable-programs.inc
13include disable-xdg.inc 15include disable-xdg.inc
14 16
15whitelist ${DOWNLOADS} 17whitelist ${DOWNLOADS}
18whitelist ${HOME}/.config/Electron
19whitelist ${HOME}/.config/electron-flag*.conf
16include whitelist-common.inc 20include whitelist-common.inc
17include whitelist-runuser-common.inc 21include whitelist-runuser-common.inc
18include whitelist-usr-share-common.inc 22include whitelist-usr-share-common.inc
diff --git a/etc/profile-a-l/electrum.profile b/etc/profile-a-l/electrum.profile
index ad636d71a..dfbe5cee4 100644
--- a/etc/profile-a-l/electrum.profile
+++ b/etc/profile-a-l/electrum.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-shell.inc 20include disable-shell.inc
22include disable-xdg.inc 21include disable-xdg.inc
@@ -48,7 +47,7 @@ private-bin electrum,python*
48private-cache 47private-cache
49?HAS_APPIMAGE: ignore private-dev 48?HAS_APPIMAGE: ignore private-dev
50private-dev 49private-dev
51private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,machine-id,pki,resolv.conf,ssl 50private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,ld.so.cache,ld.so.preload,machine-id,pki,resolv.conf,ssl
52private-tmp 51private-tmp
53 52
54# dbus-user none 53# dbus-user none
diff --git a/etc/profile-a-l/elinks.profile b/etc/profile-a-l/elinks.profile
index 8120725d2..a3596bb5e 100644
--- a/etc/profile-a-l/elinks.profile
+++ b/etc/profile-a-l/elinks.profile
@@ -1,6 +1,7 @@
1# Firejail profile for elinks 1# Firejail profile for elinks
2# Description: Advanced text-mode WWW browser 2# Description: Advanced text-mode WWW browser
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 elinks.local 6include elinks.local
6# Persistent global definitions 7# Persistent global definitions
@@ -8,37 +9,13 @@ include globals.local
8 9
9noblacklist ${HOME}/.elinks 10noblacklist ${HOME}/.elinks
10 11
11blacklist /tmp/.X11-unix 12# Allow lua (blacklisted by disable-interpreters.inc)
12blacklist ${RUNUSER}/wayland-* 13include allow-lua.inc
13 14
14include disable-common.inc 15mkdir ${HOME}/.elinks
15include disable-devel.inc 16whitelist ${HOME}/.elinks
16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc
19include disable-xdg.inc
20 17
21include whitelist-runuser-common.inc 18private-bin elinks
22 19
23caps.drop all 20# Redirect
24netfilter 21include links-common.profile
25no3d
26nodvd
27nogroups
28noinput
29nonewprivs
30noroot
31nosound
32notv
33nou2f
34novideo
35protocol unix,inet,inet6
36seccomp
37shell none
38tracelog
39
40# private-bin elinks
41private-cache
42private-dev
43# private-etc alternatives,ca-certificates,crypto-policies,pki,ssl
44private-tmp
diff --git a/etc/profile-a-l/emacs.profile b/etc/profile-a-l/emacs.profile
index 55bf743ef..7e9be653d 100644
--- a/etc/profile-a-l/emacs.profile
+++ b/etc/profile-a-l/emacs.profile
@@ -15,7 +15,6 @@ noblacklist ${HOME}/.emacs.d
15include allow-common-devel.inc 15include allow-common-devel.inc
16 16
17include disable-common.inc 17include disable-common.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20 19
21caps.drop all 20caps.drop all
diff --git a/etc/profile-a-l/email-common.profile b/etc/profile-a-l/email-common.profile
index 6c9a8a6ea..b45f6e25e 100644
--- a/etc/profile-a-l/email-common.profile
+++ b/etc/profile-a-l/email-common.profile
@@ -7,11 +7,12 @@ include email-common.local
7# added by caller profile 7# added by caller profile
8#include globals.local 8#include globals.local
9 9
10noblacklist ${HOME}/.bogofilter
10noblacklist ${HOME}/.gnupg 11noblacklist ${HOME}/.gnupg
11noblacklist ${HOME}/.mozilla 12noblacklist ${HOME}/.mozilla
12noblacklist ${HOME}/.signature 13noblacklist ${HOME}/.signature
13# when storing mail outside the default ${HOME}/Mail path, 'noblacklist' the custom path in your email-common.local 14# when storing mail outside the default ${HOME}/Mail path, 'noblacklist' the custom path in your email-common.local
14# and 'blacklist' it in your disable-common.local too so it is kept hidden from other applications 15# and 'blacklist' it in your disable-common.local too so it is kept hidden from other applications
15noblacklist ${HOME}/Mail 16noblacklist ${HOME}/Mail
16 17
17noblacklist ${DOCUMENTS} 18noblacklist ${DOCUMENTS}
@@ -20,7 +21,6 @@ include disable-common.inc
20include disable-devel.inc 21include disable-devel.inc
21include disable-exec.inc 22include disable-exec.inc
22include disable-interpreters.inc 23include disable-interpreters.inc
23include disable-passwdmgr.inc
24include disable-programs.inc 24include disable-programs.inc
25include disable-xdg.inc 25include disable-xdg.inc
26 26
@@ -66,7 +66,7 @@ tracelog
66# disable-mnt 66# disable-mnt
67private-cache 67private-cache
68private-dev 68private-dev
69private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gcrypt,gnupg,groups,gtk-2.0,gtk-3.0,hostname,hosts,hosts.conf,mailname,nsswitch.conf,passwd,pki,resolv.conf,selinux,ssl,xdg 69private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gcrypt,gnupg,groups,gtk-2.0,gtk-3.0,hostname,hosts,hosts.conf,ld.so.cache,ld.so.preload,machine-id,mailname,nsswitch.conf,passwd,pki,resolv.conf,selinux,ssl,xdg
70private-tmp 70private-tmp
71# encrypting and signing email 71# encrypting and signing email
72writable-run-user 72writable-run-user
diff --git a/etc/profile-a-l/enchant.profile b/etc/profile-a-l/enchant.profile
index ac17b1726..eff0f64ea 100644
--- a/etc/profile-a-l/enchant.profile
+++ b/etc/profile-a-l/enchant.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
@@ -49,7 +48,7 @@ x11 none
49private-bin enchant,enchant-* 48private-bin enchant,enchant-*
50private-cache 49private-cache
51private-dev 50private-dev
52private-etc alternatives 51private-etc alternatives,ld.so.cache,ld.so.preload
53private-lib 52private-lib
54private-tmp 53private-tmp
55 54
diff --git a/etc/profile-a-l/engrampa.profile b/etc/profile-a-l/engrampa.profile
index f926610e2..1aca416d8 100644
--- a/etc/profile-a-l/engrampa.profile
+++ b/etc/profile-a-l/engrampa.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15 14
16include whitelist-var-common.inc 15include whitelist-var-common.inc
diff --git a/etc/profile-a-l/enox.profile b/etc/profile-a-l/enox.profile
index d982433e2..ef766c654 100644
--- a/etc/profile-a-l/enox.profile
+++ b/etc/profile-a-l/enox.profile
@@ -6,7 +6,6 @@ include enox.local
6include globals.local 6include globals.local
7 7
8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565 8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565
9ignore whitelist /usr/share/chromium
10ignore include whitelist-runuser-common.inc 9ignore include whitelist-runuser-common.inc
11ignore include whitelist-usr-share-common.inc 10ignore include whitelist-usr-share-common.inc
12 11
diff --git a/etc/profile-a-l/enpass.profile b/etc/profile-a-l/enpass.profile
index feae5abb3..0d0d6f083 100644
--- a/etc/profile-a-l/enpass.profile
+++ b/etc/profile-a-l/enpass.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-xdg.inc 20include disable-xdg.inc
22 21
@@ -32,10 +31,10 @@ whitelist ${DOCUMENTS}
32include whitelist-common.inc 31include whitelist-common.inc
33include whitelist-var-common.inc 32include whitelist-var-common.inc
34 33
35# machine-id and nosound break audio notification functionality 34# machine-id and nosound break audio notification functionality.
36# comment both if you need that functionality or put 'ignore machine-id' 35# Add the next lines to your enpass.local if you need that functionality.
37# and 'ignore nosound' in your enpass.local 36#ignore machine-id
38 37#ignore nosound
39caps.drop all 38caps.drop all
40machine-id 39machine-id
41netfilter 40netfilter
diff --git a/etc/profile-a-l/eo-common.profile b/etc/profile-a-l/eo-common.profile
index 8e8047b00..31f39e210 100644
--- a/etc/profile-a-l/eo-common.profile
+++ b/etc/profile-a-l/eo-common.profile
@@ -11,11 +11,12 @@ noblacklist ${HOME}/.local/share/Trash
11noblacklist ${HOME}/.Steam 11noblacklist ${HOME}/.Steam
12noblacklist ${HOME}/.steam 12noblacklist ${HOME}/.steam
13 13
14blacklist /usr/libexec
15
14include disable-common.inc 16include disable-common.inc
15include disable-devel.inc 17include disable-devel.inc
16include disable-exec.inc 18include disable-exec.inc
17include disable-interpreters.inc 19include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 20include disable-programs.inc
20include disable-write-mnt.inc 21include disable-write-mnt.inc
21 22
@@ -46,6 +47,6 @@ tracelog
46 47
47private-cache 48private-cache
48private-dev 49private-dev
49private-etc alternatives,dconf,fonts,gtk-3.0 50private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload
50private-lib eog,eom,gdk-pixbuf-2.*,gio,girepository-1.*,gvfs,libgconf-2.so.* 51private-lib eog,eom,gdk-pixbuf-2.*,gio,girepository-1.*,gvfs,libgconf-2.so.*
51private-tmp 52private-tmp
diff --git a/etc/profile-a-l/eog.profile b/etc/profile-a-l/eog.profile
index aabef65fc..65e5c6e69 100644
--- a/etc/profile-a-l/eog.profile
+++ b/etc/profile-a-l/eog.profile
@@ -10,13 +10,15 @@ noblacklist ${HOME}/.config/eog
10 10
11whitelist /usr/share/eog 11whitelist /usr/share/eog
12 12
13# private-bin, private-etc and private-lib break 'Open With' / 'Open in file manager' 13# private-bin, private-etc and private-lib break 'Open With' / 'Open in file manager'.
14# comment those if you need that functionality 14# Add the next lines to your eog.local if you need that functionality.
15# or put 'ignore private-bin', 'ignore private-etc' and 'ignore private-lib' in your eog.local 15#ignore private-bin
16private-bin eog 16#ignore private-etc
17#ignore private-lib
17 18
19private-bin eog
18 20
19# broken on Debian 10 (buster) running LXDE got the folowing error: 21# broken on Debian 10 (buster) running LXDE got the following error:
20# Failed to register: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown 22# Failed to register: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
21#dbus-user filter 23#dbus-user filter
22#dbus-user.own org.gnome.eog 24#dbus-user.own org.gnome.eog
diff --git a/etc/profile-a-l/eom.profile b/etc/profile-a-l/eom.profile
index 5bfeb8c8f..7143a8e03 100644
--- a/etc/profile-a-l/eom.profile
+++ b/etc/profile-a-l/eom.profile
@@ -10,9 +10,12 @@ noblacklist ${HOME}/.config/mate/eom
10 10
11whitelist /usr/share/eom 11whitelist /usr/share/eom
12 12
13# private-bin, private-etc and private-lib break 'Open With' / 'Open in file manager' 13# private-bin, private-etc and private-lib break 'Open With' / 'Open in file manager'.
14# comment those if you need that functionality 14# Add the next lines to your eom.local if you need that functionality.
15# or put 'ignore private-bin', 'ignore private-etc' and 'ignore private-lib' in your eom.local 15#ignore private-bin
16#ignore private-etc
17#ignore private-lib
18
16private-bin eom 19private-bin eom
17 20
18# Redirect 21# Redirect
diff --git a/etc/profile-a-l/ephemeral.profile b/etc/profile-a-l/ephemeral.profile
index 029f613c6..f88c64b23 100644
--- a/etc/profile-a-l/ephemeral.profile
+++ b/etc/profile-a-l/ephemeral.profile
@@ -9,8 +9,8 @@ include globals.local
9# enforce private-cache 9# enforce private-cache
10#noblacklist ${HOME}/.cache/ephemeral 10#noblacklist ${HOME}/.cache/ephemeral
11 11
12noblacklist ${HOME}/.pki
13noblacklist ${HOME}/.local/share/pki 12noblacklist ${HOME}/.local/share/pki
13noblacklist ${HOME}/.pki
14 14
15# noexec ${HOME} breaks DRM binaries. 15# noexec ${HOME} breaks DRM binaries.
16?BROWSER_ALLOW_DRM: ignore noexec ${HOME} 16?BROWSER_ALLOW_DRM: ignore noexec ${HOME}
@@ -23,12 +23,12 @@ include disable-programs.inc
23 23
24# enforce private-cache 24# enforce private-cache
25#mkdir ${HOME}/.cache/ephemeral 25#mkdir ${HOME}/.cache/ephemeral
26mkdir ${HOME}/.pki
27mkdir ${HOME}/.local/share/pki 26mkdir ${HOME}/.local/share/pki
27mkdir ${HOME}/.pki
28# enforce private-cache 28# enforce private-cache
29#whitelist ${HOME}/.cache/ephemeral 29#whitelist ${HOME}/.cache/ephemeral
30whitelist ${HOME}/.pki
31whitelist ${HOME}/.local/share/pki 30whitelist ${HOME}/.local/share/pki
31whitelist ${HOME}/.pki
32whitelist ${DOWNLOADS} 32whitelist ${DOWNLOADS}
33include whitelist-common.inc 33include whitelist-common.inc
34include whitelist-usr-share-common.inc 34include whitelist-usr-share-common.inc
@@ -41,6 +41,7 @@ caps.drop all
41netfilter 41netfilter
42nodvd 42nodvd
43nogroups 43nogroups
44noinput
44nonewprivs 45nonewprivs
45# noroot breaks GTK_USE_PORTAL=1 usage, see https://github.com/netblue30/firejail/issues/2506. 46# noroot breaks GTK_USE_PORTAL=1 usage, see https://github.com/netblue30/firejail/issues/2506.
46noroot 47noroot
diff --git a/etc/profile-a-l/equalx.profile b/etc/profile-a-l/equalx.profile
index 964d3b7ca..0c3b790d5 100644
--- a/etc/profile-a-l/equalx.profile
+++ b/etc/profile-a-l/equalx.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
@@ -55,7 +54,7 @@ disable-mnt
55private-bin equalx,gs,pdflatex,pdftocairo 54private-bin equalx,gs,pdflatex,pdftocairo
56private-cache 55private-cache
57private-dev 56private-dev
58private-etc equalx,equalx.conf,fonts,gtk-2.0,latexmk.conf,machine-id,papersize,passwd,texlive,Trolltech.conf 57private-etc alternatives,equalx,equalx.conf,fonts,gtk-2.0,latexmk.conf,ld.so.cache,ld.so.preload,machine-id,papersize,passwd,texlive,Trolltech.conf
59private-tmp 58private-tmp
60 59
61dbus-user none 60dbus-user none
diff --git a/etc/profile-a-l/etr.profile b/etc/profile-a-l/etr.profile
index b970b0dfd..edeed69bf 100644
--- a/etc/profile-a-l/etr.profile
+++ b/etc/profile-a-l/etr.profile
@@ -8,11 +8,12 @@ include globals.local
8 8
9noblacklist ${HOME}/.etr 9noblacklist ${HOME}/.etr
10 10
11blacklist /usr/libexec
12
11include disable-common.inc 13include disable-common.inc
12include disable-devel.inc 14include disable-devel.inc
13include disable-exec.inc 15include disable-exec.inc
14include disable-interpreters.inc 16include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 17include disable-programs.inc
17include disable-shell.inc 18include disable-shell.inc
18include disable-xdg.inc 19include disable-xdg.inc
@@ -20,6 +21,8 @@ include disable-xdg.inc
20mkdir ${HOME}/.etr 21mkdir ${HOME}/.etr
21whitelist ${HOME}/.etr 22whitelist ${HOME}/.etr
22whitelist /usr/share/etr 23whitelist /usr/share/etr
24# Debian version
25whitelist /usr/share/games/etr
23include whitelist-common.inc 26include whitelist-common.inc
24include whitelist-runuser-common.inc 27include whitelist-runuser-common.inc
25include whitelist-usr-share-common.inc 28include whitelist-usr-share-common.inc
diff --git a/etc/profile-a-l/evince.profile b/etc/profile-a-l/evince.profile
index adcb29063..5c6710748 100644
--- a/etc/profile-a-l/evince.profile
+++ b/etc/profile-a-l/evince.profile
@@ -13,11 +13,13 @@ include globals.local
13noblacklist ${HOME}/.config/evince 13noblacklist ${HOME}/.config/evince
14noblacklist ${DOCUMENTS} 14noblacklist ${DOCUMENTS}
15 15
16blacklist /usr/libexec
17
18include allow-bin-sh.inc
16include disable-common.inc 19include disable-common.inc
17include disable-devel.inc 20include disable-devel.inc
18include disable-exec.inc 21include disable-exec.inc
19include disable-interpreters.inc 22include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 23include disable-programs.inc
22include disable-shell.inc 24include disable-shell.inc
23include disable-xdg.inc 25include disable-xdg.inc
@@ -50,12 +52,12 @@ seccomp.block-secondary
50shell none 52shell none
51tracelog 53tracelog
52 54
53private-bin evince,evince-previewer,evince-thumbnailer 55private-bin evince,evince-previewer,evince-thumbnailer,sh
54private-cache 56private-cache
55private-dev 57private-dev
56private-etc alternatives,fonts,group,ld.so.cache,machine-id,passwd 58private-etc alternatives,fonts,group,ld.so.cache,ld.so.preload,machine-id,passwd
57# private-lib might break two-page-view on some systems 59# private-lib might break two-page-view on some systems
58private-lib evince,gcc/*/*/libgcc_s.so.*,gcc/*/*/libstdc++.so.*,gconv,gdk-pixbuf-2.*,gio,gvfs/libgvfscommon.so,libdjvulibre.so.*,libgconf-2.so.*,libgraphite2.so.*,libpoppler-glib.so.*,librsvg-2.so.*,libspectre.so.* 60private-lib evince,gcc/*/*/libgcc_s.so.*,gcc/*/*/libstdc++.so.*,gconv,gdk-pixbuf-2.*,gio,gvfs/libgvfscommon.so,libarchive.so.*,libdjvulibre.so.*,libgconf-2.so.*,libgraphite2.so.*,libpoppler-glib.so.*,librsvg-2.so.*,libspectre.so.*
59private-tmp 61private-tmp
60 62
61# dbus-user filtering might break two-page-view on some systems 63# dbus-user filtering might break two-page-view on some systems
diff --git a/etc/profile-a-l/evolution.profile b/etc/profile-a-l/evolution.profile
index 7222493ac..a80327234 100644
--- a/etc/profile-a-l/evolution.profile
+++ b/etc/profile-a-l/evolution.profile
@@ -20,7 +20,6 @@ include disable-common.inc
20include disable-devel.inc 20include disable-devel.inc
21include disable-exec.inc 21include disable-exec.inc
22include disable-interpreters.inc 22include disable-interpreters.inc
23include disable-passwdmgr.inc
24include disable-programs.inc 23include disable-programs.inc
25 24
26include whitelist-runuser-common.inc 25include whitelist-runuser-common.inc
diff --git a/etc/profile-a-l/exiftool.profile b/etc/profile-a-l/exiftool.profile
index 7b09a2c64..ae550e842 100644
--- a/etc/profile-a-l/exiftool.profile
+++ b/etc/profile-a-l/exiftool.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20 19
21whitelist /usr/share/perl-image-exiftool 20whitelist /usr/share/perl-image-exiftool
@@ -49,7 +48,7 @@ x11 none
49#private-bin exiftool,perl 48#private-bin exiftool,perl
50private-cache 49private-cache
51private-dev 50private-dev
52private-etc alternatives 51private-etc alternatives,ld.so.cache,ld.so.preload
53private-tmp 52private-tmp
54 53
55dbus-user none 54dbus-user none
diff --git a/etc/profile-a-l/falkon.profile b/etc/profile-a-l/falkon.profile
index b2061db79..321cb0145 100644
--- a/etc/profile-a-l/falkon.profile
+++ b/etc/profile-a-l/falkon.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
@@ -24,6 +23,7 @@ whitelist ${HOME}/.cache/falkon
24whitelist ${HOME}/.config/falkon 23whitelist ${HOME}/.config/falkon
25whitelist /usr/share/falkon 24whitelist /usr/share/falkon
26include whitelist-common.inc 25include whitelist-common.inc
26include whitelist-run-common.inc
27include whitelist-runuser-common.inc 27include whitelist-runuser-common.inc
28include whitelist-usr-share-common.inc 28include whitelist-usr-share-common.inc
29include whitelist-var-common.inc 29include whitelist-var-common.inc
@@ -47,7 +47,7 @@ disable-mnt
47# private-bin falkon 47# private-bin falkon
48private-cache 48private-cache
49private-dev 49private-dev
50private-etc adobe,alternatives,asound.conf,ati,ca-certificates,crypto-policies,dconf,drirc,fonts,group,gtk-2.0,gtk-3.0,hostname,hosts,localtime,machine-id,mailcap,mime.types,nsswitch.conf,pango,passwd,pki,pulse,resolv.conf,selinux,ssl,xdg 50private-etc adobe,alternatives,asound.conf,ati,ca-certificates,crypto-policies,dconf,drirc,fonts,group,gtk-2.0,gtk-3.0,hostname,hosts,ld.so.cache,ld.so.preload,localtime,machine-id,mailcap,mime.types,nsswitch.conf,pango,passwd,pki,pulse,resolv.conf,selinux,ssl,xdg
51private-tmp 51private-tmp
52 52
53# dbus-user filter 53# dbus-user filter
diff --git a/etc/profile-a-l/fbreader.profile b/etc/profile-a-l/fbreader.profile
index 8e81000fd..121c5ba26 100644
--- a/etc/profile-a-l/fbreader.profile
+++ b/etc/profile-a-l/fbreader.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
diff --git a/etc/profile-a-l/fdns.profile b/etc/profile-a-l/fdns.profile
index 31cb1776c..ee775566e 100644
--- a/etc/profile-a-l/fdns.profile
+++ b/etc/profile-a-l/fdns.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-xdg.inc 19include disable-xdg.inc
21 20
@@ -43,7 +42,7 @@ private
43private-bin bash,fdns,sh 42private-bin bash,fdns,sh
44private-cache 43private-cache
45#private-dev 44#private-dev
46private-etc ca-certificates,crypto-policies,fdns,ld.so.cache,ld.so.preload,localtime,nsswitch.conf,passwd,pki,ssl 45private-etc alternatives,ca-certificates,crypto-policies,fdns,ld.so.cache,ld.so.preload,localtime,nsswitch.conf,passwd,pki,ssl
47# private-lib 46# private-lib
48private-tmp 47private-tmp
49 48
diff --git a/etc/profile-a-l/feedreader.profile b/etc/profile-a-l/feedreader.profile
index 664ec2da6..e45df21fc 100644
--- a/etc/profile-a-l/feedreader.profile
+++ b/etc/profile-a-l/feedreader.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
diff --git a/etc/profile-a-l/feh-network.inc.profile b/etc/profile-a-l/feh-network.inc.profile
index 690b39171..7293e89a8 100644
--- a/etc/profile-a-l/feh-network.inc.profile
+++ b/etc/profile-a-l/feh-network.inc.profile
@@ -5,4 +5,4 @@ include feh-network.inc.local
5ignore net none 5ignore net none
6netfilter 6netfilter
7protocol unix,inet,inet6 7protocol unix,inet,inet6
8private-etc ca-certificates,crypto-policies,hosts,pki,resolv.conf,ssl 8private-etc alternatives,ca-certificates,crypto-policies,hosts,ld.so.cache,ld.so.preload,pki,resolv.conf,ssl
diff --git a/etc/profile-a-l/feh.profile b/etc/profile-a-l/feh.profile
index 2f2d8a4c7..4b8d41170 100644
--- a/etc/profile-a-l/feh.profile
+++ b/etc/profile-a-l/feh.profile
@@ -11,7 +11,6 @@ include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-shell.inc 15include disable-shell.inc
17 16
@@ -37,7 +36,7 @@ shell none
37private-bin feh,jpegexiforient,jpegtran 36private-bin feh,jpegexiforient,jpegtran
38private-cache 37private-cache
39private-dev 38private-dev
40private-etc alternatives,feh 39private-etc alternatives,feh,ld.so.cache,ld.so.preload
41private-tmp 40private-tmp
42 41
43dbus-user none 42dbus-user none
diff --git a/etc/profile-a-l/ferdi.profile b/etc/profile-a-l/ferdi.profile
index a2372ec8a..b6f69ccb9 100644
--- a/etc/profile-a-l/ferdi.profile
+++ b/etc/profile-a-l/ferdi.profile
@@ -9,8 +9,8 @@ ignore noexec /tmp
9 9
10noblacklist ${HOME}/.cache/Ferdi 10noblacklist ${HOME}/.cache/Ferdi
11noblacklist ${HOME}/.config/Ferdi 11noblacklist ${HOME}/.config/Ferdi
12noblacklist ${HOME}/.pki
13noblacklist ${HOME}/.local/share/pki 12noblacklist ${HOME}/.local/share/pki
13noblacklist ${HOME}/.pki
14 14
15include disable-common.inc 15include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
@@ -20,13 +20,13 @@ include disable-programs.inc
20 20
21mkdir ${HOME}/.cache/Ferdi 21mkdir ${HOME}/.cache/Ferdi
22mkdir ${HOME}/.config/Ferdi 22mkdir ${HOME}/.config/Ferdi
23mkdir ${HOME}/.pki
24mkdir ${HOME}/.local/share/pki 23mkdir ${HOME}/.local/share/pki
24mkdir ${HOME}/.pki
25whitelist ${DOWNLOADS} 25whitelist ${DOWNLOADS}
26whitelist ${HOME}/.cache/Ferdi 26whitelist ${HOME}/.cache/Ferdi
27whitelist ${HOME}/.config/Ferdi 27whitelist ${HOME}/.config/Ferdi
28whitelist ${HOME}/.pki
29whitelist ${HOME}/.local/share/pki 28whitelist ${HOME}/.local/share/pki
29whitelist ${HOME}/.pki
30include whitelist-common.inc 30include whitelist-common.inc
31 31
32caps.drop all 32caps.drop all
diff --git a/etc/profile-a-l/fetchmail.profile b/etc/profile-a-l/fetchmail.profile
index 7358ed5c7..babfeab61 100644
--- a/etc/profile-a-l/fetchmail.profile
+++ b/etc/profile-a-l/fetchmail.profile
@@ -12,7 +12,6 @@ noblacklist ${HOME}/.netrc
12include disable-common.inc 12include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18caps.drop all 17caps.drop all
diff --git a/etc/profile-a-l/ffmpeg.profile b/etc/profile-a-l/ffmpeg.profile
index 13ef1beb9..637e6fbf5 100644
--- a/etc/profile-a-l/ffmpeg.profile
+++ b/etc/profile-a-l/ffmpeg.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
diff --git a/etc/profile-a-l/ffplay.profile b/etc/profile-a-l/ffplay.profile
index 04134cbf4..52abb99d4 100644
--- a/etc/profile-a-l/ffplay.profile
+++ b/etc/profile-a-l/ffplay.profile
@@ -14,7 +14,7 @@ ignore nogroups
14ignore nosound 14ignore nosound
15 15
16private-bin ffplay 16private-bin ffplay
17private-etc alsa,asound.conf,group 17private-etc alsa,alternatives,asound.conf,group,ld.so.cache,ld.so.preload
18 18
19# Redirect 19# Redirect
20include ffmpeg.profile 20include ffmpeg.profile
diff --git a/etc/profile-a-l/file-manager-common.profile b/etc/profile-a-l/file-manager-common.profile
index 23ec4a432..dbae06f19 100644
--- a/etc/profile-a-l/file-manager-common.profile
+++ b/etc/profile-a-l/file-manager-common.profile
@@ -26,7 +26,6 @@ include allow-python3.inc
26include disable-devel.inc 26include disable-devel.inc
27include disable-exec.inc 27include disable-exec.inc
28include disable-interpreters.inc 28include disable-interpreters.inc
29include disable-passwdmgr.inc
30#include disable-programs.inc 29#include disable-programs.inc
31 30
32allusers 31allusers
diff --git a/etc/profile-a-l/file-roller.profile b/etc/profile-a-l/file-roller.profile
index 0b8a8cd6c..06a8f6170 100644
--- a/etc/profile-a-l/file-roller.profile
+++ b/etc/profile-a-l/file-roller.profile
@@ -10,9 +10,10 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15 14
15whitelist /usr/libexec/file-roller
16whitelist /usr/libexec/p7zip
16whitelist /usr/share/file-roller 17whitelist /usr/share/file-roller
17include whitelist-runuser-common.inc 18include whitelist-runuser-common.inc
18include whitelist-usr-share-common.inc 19include whitelist-usr-share-common.inc
@@ -42,7 +43,7 @@ tracelog
42private-bin 7z,7za,7zr,ar,arj,atool,bash,brotli,bsdtar,bzip2,compress,cp,cpio,dpkg-deb,file-roller,gtar,gzip,isoinfo,lha,lrzip,lsar,lz4,lzip,lzma,lzop,mv,p7zip,rar,rm,rzip,sh,tar,unace,unalz,unar,uncompress,unrar,unsquashfs,unstuff,unzip,unzstd,xz,xzdec,zip,zoo,zstd 43private-bin 7z,7za,7zr,ar,arj,atool,bash,brotli,bsdtar,bzip2,compress,cp,cpio,dpkg-deb,file-roller,gtar,gzip,isoinfo,lha,lrzip,lsar,lz4,lzip,lzma,lzop,mv,p7zip,rar,rm,rzip,sh,tar,unace,unalz,unar,uncompress,unrar,unsquashfs,unstuff,unzip,unzstd,xz,xzdec,zip,zoo,zstd
43private-cache 44private-cache
44private-dev 45private-dev
45private-etc dconf,fonts,gtk-3.0,xdg 46private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload,xdg
46# private-tmp 47# private-tmp
47 48
48dbus-system none 49dbus-system none
diff --git a/etc/profile-a-l/file.profile b/etc/profile-a-l/file.profile
index 5c7583605..397120a0b 100644
--- a/etc/profile-a-l/file.profile
+++ b/etc/profile-a-l/file.profile
@@ -11,7 +11,6 @@ blacklist ${RUNUSER}
11 11
12include disable-common.inc 12include disable-common.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16 15
17apparmor 16apparmor
diff --git a/etc/profile-a-l/firefox-common-addons.profile b/etc/profile-a-l/firefox-common-addons.profile
index d282f9a60..b2b7c362a 100644
--- a/etc/profile-a-l/firefox-common-addons.profile
+++ b/etc/profile-a-l/firefox-common-addons.profile
@@ -2,6 +2,7 @@
2# Persistent customizations should go in a .local file. 2# Persistent customizations should go in a .local file.
3include firefox-common-addons.local 3include firefox-common-addons.local
4 4
5ignore whitelist ${RUNUSER}/*firefox*
5ignore include whitelist-runuser-common.inc 6ignore include whitelist-runuser-common.inc
6ignore private-cache 7ignore private-cache
7 8
diff --git a/etc/profile-a-l/firefox-common.profile b/etc/profile-a-l/firefox-common.profile
index b0ead7590..373f41ffe 100644
--- a/etc/profile-a-l/firefox-common.profile
+++ b/etc/profile-a-l/firefox-common.profile
@@ -12,21 +12,23 @@ include firefox-common.local
12# Add the next line to your firefox-common.local to allow access to common programs/addons/plugins. 12# Add the next line to your firefox-common.local to allow access to common programs/addons/plugins.
13#include firefox-common-addons.profile 13#include firefox-common-addons.profile
14 14
15noblacklist ${HOME}/.pki
16noblacklist ${HOME}/.local/share/pki 15noblacklist ${HOME}/.local/share/pki
16noblacklist ${HOME}/.pki
17 17
18include disable-common.inc 18include disable-common.inc
19include disable-devel.inc 19include disable-devel.inc
20include disable-exec.inc 20include disable-exec.inc
21include disable-interpreters.inc 21include disable-interpreters.inc
22include disable-proc.inc
22include disable-programs.inc 23include disable-programs.inc
23 24
24mkdir ${HOME}/.pki
25mkdir ${HOME}/.local/share/pki 25mkdir ${HOME}/.local/share/pki
26mkdir ${HOME}/.pki
26whitelist ${DOWNLOADS} 27whitelist ${DOWNLOADS}
27whitelist ${HOME}/.pki
28whitelist ${HOME}/.local/share/pki 28whitelist ${HOME}/.local/share/pki
29whitelist ${HOME}/.pki
29include whitelist-common.inc 30include whitelist-common.inc
31include whitelist-run-common.inc
30include whitelist-runuser-common.inc 32include whitelist-runuser-common.inc
31include whitelist-var-common.inc 33include whitelist-var-common.inc
32 34
@@ -37,6 +39,7 @@ caps.drop all
37netfilter 39netfilter
38nodvd 40nodvd
39nogroups 41nogroups
42noinput
40nonewprivs 43nonewprivs
41# noroot breaks GTK_USE_PORTAL=1 usage, see https://github.com/netblue30/firejail/issues/2506. 44# noroot breaks GTK_USE_PORTAL=1 usage, see https://github.com/netblue30/firejail/issues/2506.
42noroot 45noroot
@@ -56,6 +59,10 @@ disable-mnt
56#private-etc alternatives,asound.conf,ca-certificates,crypto-policies,dconf,fonts,group,gtk-2.0,gtk-3.0,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,localtime,machine-id,mailcap,mime.types,nsswitch.conf,pango,passwd,pki,pulse,resolv.conf,selinux,ssl,X11,xdg 59#private-etc alternatives,asound.conf,ca-certificates,crypto-policies,dconf,fonts,group,gtk-2.0,gtk-3.0,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,localtime,machine-id,mailcap,mime.types,nsswitch.conf,pango,passwd,pki,pulse,resolv.conf,selinux,ssl,X11,xdg
57private-tmp 60private-tmp
58 61
62blacklist ${PATH}/curl
63blacklist ${PATH}/wget
64blacklist ${PATH}/wget2
65
59# 'dbus-user none' breaks various desktop integration features like global menus, native notifications, 66# 'dbus-user none' breaks various desktop integration features like global menus, native notifications,
60# Gnome connector, KDE connect and power management on KDE Plasma. 67# Gnome connector, KDE connect and power management on KDE Plasma.
61dbus-user none 68dbus-user none
diff --git a/etc/profile-a-l/firefox-developer-edition.profile b/etc/profile-a-l/firefox-developer-edition.profile
index 8c7ca3887..3a9b8cf92 100644
--- a/etc/profile-a-l/firefox-developer-edition.profile
+++ b/etc/profile-a-l/firefox-developer-edition.profile
@@ -7,5 +7,9 @@ include firefox-developer-edition.local
7# added by included profile 7# added by included profile
8#include globals.local 8#include globals.local
9 9
10# Edition-specific DBus filters
11dbus-user.own org.mozilla.FirefoxDeveloperEdition.*
12dbus-user.own org.mozilla.firefoxdeveloperedition.*
13
10# Redirect 14# Redirect
11include firefox.profile 15include firefox.profile
diff --git a/etc/profile-a-l/firefox.profile b/etc/profile-a-l/firefox.profile
index b22a78458..9138fed90 100644
--- a/etc/profile-a-l/firefox.profile
+++ b/etc/profile-a-l/firefox.profile
@@ -16,6 +16,9 @@ include globals.local
16 16
17noblacklist ${HOME}/.cache/mozilla 17noblacklist ${HOME}/.cache/mozilla
18noblacklist ${HOME}/.mozilla 18noblacklist ${HOME}/.mozilla
19noblacklist ${RUNUSER}/*firefox*
20
21blacklist /usr/libexec
19 22
20mkdir ${HOME}/.cache/mozilla/firefox 23mkdir ${HOME}/.cache/mozilla/firefox
21mkdir ${HOME}/.mozilla 24mkdir ${HOME}/.mozilla
@@ -33,6 +36,7 @@ whitelist /usr/share/gnome-shell/search-providers/firefox-search-provider.ini
33whitelist /usr/share/gtk-doc/html 36whitelist /usr/share/gtk-doc/html
34whitelist /usr/share/mozilla 37whitelist /usr/share/mozilla
35whitelist /usr/share/webext 38whitelist /usr/share/webext
39whitelist ${RUNUSER}/*firefox*
36include whitelist-usr-share-common.inc 40include whitelist-usr-share-common.inc
37 41
38# firefox requires a shell to launch on Arch - add the next line to your firefox.local to enable private-bin. 42# firefox requires a shell to launch on Arch - add the next line to your firefox.local to enable private-bin.
@@ -54,9 +58,8 @@ dbus-user.own org.mpris.MediaPlayer2.firefox.*
54#dbus-user.own org.mpris.MediaPlayer2.plasma-browser-integration 58#dbus-user.own org.mpris.MediaPlayer2.plasma-browser-integration
55#dbus-user.talk org.kde.JobViewServer 59#dbus-user.talk org.kde.JobViewServer
56#dbus-user.talk org.kde.kuiserver 60#dbus-user.talk org.kde.kuiserver
57# Add the next two lines to your firefox.local to allow screen sharing under wayland. 61# Add the next line to your firefox.local to allow screen sharing under wayland.
58#whitelist ${RUNUSER}/pipewire-0 62#dbus-user.talk org.freedesktop.portal.Desktop
59#dbus-user.talk org.freedesktop.portal.*
60# Add the next line to your firefox.local if screen sharing sharing still does not work 63# Add the next line to your firefox.local if screen sharing sharing still does not work
61# with the above lines (might depend on the portal implementation). 64# with the above lines (might depend on the portal implementation).
62#ignore noroot 65#ignore noroot
diff --git a/etc/profile-a-l/flameshot.profile b/etc/profile-a-l/flameshot.profile
index 55af96c84..f80297022 100644
--- a/etc/profile-a-l/flameshot.profile
+++ b/etc/profile-a-l/flameshot.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-shell.inc 19include disable-shell.inc
21include disable-xdg.inc 20include disable-xdg.inc
@@ -53,7 +52,7 @@ tracelog
53disable-mnt 52disable-mnt
54private-bin flameshot 53private-bin flameshot
55private-cache 54private-cache
56private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.conf,machine-id,pki,resolv.conf,ssl 55private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.conf,ld.so.preload,machine-id,pki,resolv.conf,ssl
57private-dev 56private-dev
58#private-tmp 57#private-tmp
59 58
@@ -64,6 +63,6 @@ dbus-user.talk org.freedesktop.Notifications
64dbus-user.talk org.freedesktop.portal.Desktop 63dbus-user.talk org.freedesktop.portal.Desktop
65dbus-user.talk org.gnome.Shell 64dbus-user.talk org.gnome.Shell
66dbus-user.talk org.kde.KWin 65dbus-user.talk org.kde.KWin
67dbus-user.talk org.kde.StatusNotifierWatcher 66?ALLOW_TRAY: dbus-user.talk org.kde.StatusNotifierWatcher
68dbus-user.own org.kde.* 67?ALLOW_TRAY: dbus-user.own org.kde.*
69dbus-system none 68dbus-system none
diff --git a/etc/profile-a-l/flashpeak-slimjet.profile b/etc/profile-a-l/flashpeak-slimjet.profile
index 310fb378f..317a20bb7 100644
--- a/etc/profile-a-l/flashpeak-slimjet.profile
+++ b/etc/profile-a-l/flashpeak-slimjet.profile
@@ -6,7 +6,6 @@ include flashpeak-slimjet.local
6include globals.local 6include globals.local
7 7
8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565 8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565
9ignore whitelist /usr/share/chromium
10ignore include whitelist-runuser-common.inc 9ignore include whitelist-runuser-common.inc
11ignore include whitelist-usr-share-common.inc 10ignore include whitelist-usr-share-common.inc
12 11
diff --git a/etc/profile-a-l/flowblade.profile b/etc/profile-a-l/flowblade.profile
index a4421e3ce..bc173d0f1 100644
--- a/etc/profile-a-l/flowblade.profile
+++ b/etc/profile-a-l/flowblade.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22 21
23caps.drop all 22caps.drop all
diff --git a/etc/profile-a-l/font-manager.profile b/etc/profile-a-l/font-manager.profile
index cd0129436..02db368b7 100644
--- a/etc/profile-a-l/font-manager.profile
+++ b/etc/profile-a-l/font-manager.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-shell.inc 21include disable-shell.inc
23include disable-xdg.inc 22include disable-xdg.inc
diff --git a/etc/profile-a-l/fontforge.profile b/etc/profile-a-l/fontforge.profile
index bd1495877..6020464b3 100644
--- a/etc/profile-a-l/fontforge.profile
+++ b/etc/profile-a-l/fontforge.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
diff --git a/etc/profile-a-l/fractal.profile b/etc/profile-a-l/fractal.profile
index 1b1d031b4..265eec1ca 100644
--- a/etc/profile-a-l/fractal.profile
+++ b/etc/profile-a-l/fractal.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-shell.inc 20include disable-shell.inc
22include disable-xdg.inc 21include disable-xdg.inc
diff --git a/etc/profile-a-l/franz.profile b/etc/profile-a-l/franz.profile
index 9b780a572..b16c90caf 100644
--- a/etc/profile-a-l/franz.profile
+++ b/etc/profile-a-l/franz.profile
@@ -9,8 +9,8 @@ ignore noexec /tmp
9 9
10noblacklist ${HOME}/.cache/Franz 10noblacklist ${HOME}/.cache/Franz
11noblacklist ${HOME}/.config/Franz 11noblacklist ${HOME}/.config/Franz
12noblacklist ${HOME}/.pki
13noblacklist ${HOME}/.local/share/pki 12noblacklist ${HOME}/.local/share/pki
13noblacklist ${HOME}/.pki
14 14
15include disable-common.inc 15include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
@@ -20,13 +20,13 @@ include disable-programs.inc
20 20
21mkdir ${HOME}/.cache/Franz 21mkdir ${HOME}/.cache/Franz
22mkdir ${HOME}/.config/Franz 22mkdir ${HOME}/.config/Franz
23mkdir ${HOME}/.pki
24mkdir ${HOME}/.local/share/pki 23mkdir ${HOME}/.local/share/pki
24mkdir ${HOME}/.pki
25whitelist ${DOWNLOADS} 25whitelist ${DOWNLOADS}
26whitelist ${HOME}/.cache/Franz 26whitelist ${HOME}/.cache/Franz
27whitelist ${HOME}/.config/Franz 27whitelist ${HOME}/.config/Franz
28whitelist ${HOME}/.pki
29whitelist ${HOME}/.local/share/pki 28whitelist ${HOME}/.local/share/pki
29whitelist ${HOME}/.pki
30include whitelist-common.inc 30include whitelist-common.inc
31 31
32caps.drop all 32caps.drop all
diff --git a/etc/profile-a-l/freecad.profile b/etc/profile-a-l/freecad.profile
index 8043d0530..827dc8be9 100644
--- a/etc/profile-a-l/freecad.profile
+++ b/etc/profile-a-l/freecad.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
diff --git a/etc/profile-a-l/freeciv.profile b/etc/profile-a-l/freeciv.profile
index 23c19682c..5126e2d37 100644
--- a/etc/profile-a-l/freeciv.profile
+++ b/etc/profile-a-l/freeciv.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
diff --git a/etc/profile-a-l/freecol.profile b/etc/profile-a-l/freecol.profile
index 93fa7da03..4467b5869 100644
--- a/etc/profile-a-l/freecol.profile
+++ b/etc/profile-a-l/freecol.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-xdg.inc 22include disable-xdg.inc
24 23
diff --git a/etc/profile-a-l/freemind.profile b/etc/profile-a-l/freemind.profile
index 699177039..fbe3d45e3 100644
--- a/etc/profile-a-l/freemind.profile
+++ b/etc/profile-a-l/freemind.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-xdg.inc 20include disable-xdg.inc
22 21
diff --git a/etc/profile-a-l/freetube.profile b/etc/profile-a-l/freetube.profile
index e6aff533d..cb00ce11b 100644
--- a/etc/profile-a-l/freetube.profile
+++ b/etc/profile-a-l/freetube.profile
@@ -8,13 +8,15 @@ include globals.local
8 8
9noblacklist ${HOME}/.config/FreeTube 9noblacklist ${HOME}/.config/FreeTube
10 10
11include allow-bin-sh.inc
12
11include disable-shell.inc 13include disable-shell.inc
12 14
13mkdir ${HOME}/.config/FreeTube 15mkdir ${HOME}/.config/FreeTube
14whitelist ${HOME}/.config/FreeTube 16whitelist ${HOME}/.config/FreeTube
15 17
16private-bin freetube 18private-bin electron,electron[0-9],electron[0-9][0-9],freetube,sh
17private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,mime.types,nsswitch.conf,pki,pulse,resolv.conf,ssl,X11,xdg 19private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,mime.types,nsswitch.conf,pki,pulse,resolv.conf,ssl,X11,xdg
18 20
19# Redirect 21# Redirect
20include electron.profile 22include electron.profile
diff --git a/etc/profile-a-l/frogatto.profile b/etc/profile-a-l/frogatto.profile
index fa56d2b2d..8419998de 100644
--- a/etc/profile-a-l/frogatto.profile
+++ b/etc/profile-a-l/frogatto.profile
@@ -12,12 +12,12 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
19mkdir ${HOME}/.frogatto 18mkdir ${HOME}/.frogatto
20whitelist ${HOME}/.frogatto 19whitelist ${HOME}/.frogatto
20whitelist /usr/libexec/frogatto
21whitelist /usr/share/frogatto 21whitelist /usr/share/frogatto
22include whitelist-common.inc 22include whitelist-common.inc
23include whitelist-runuser-common.inc 23include whitelist-runuser-common.inc
@@ -45,7 +45,7 @@ disable-mnt
45private-bin frogatto,sh 45private-bin frogatto,sh
46private-cache 46private-cache
47private-dev 47private-dev
48private-etc machine-id 48private-etc alternatives,ld.so.cache,ld.so.preload,machine-id
49private-tmp 49private-tmp
50 50
51dbus-user none 51dbus-user none
diff --git a/etc/profile-a-l/frozen-bubble.profile b/etc/profile-a-l/frozen-bubble.profile
index 76352e41e..88943760a 100644
--- a/etc/profile-a-l/frozen-bubble.profile
+++ b/etc/profile-a-l/frozen-bubble.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-xdg.inc 19include disable-xdg.inc
21 20
@@ -31,7 +30,6 @@ caps.drop all
31net none 30net none
32nodvd 31nodvd
33nogroups 32nogroups
34noinput
35nonewprivs 33nonewprivs
36noroot 34noroot
37notv 35notv
diff --git a/etc/profile-a-l/ftp.profile b/etc/profile-a-l/ftp.profile
new file mode 100644
index 000000000..29470360c
--- /dev/null
+++ b/etc/profile-a-l/ftp.profile
@@ -0,0 +1,54 @@
1# Firejail profile for ftp
2# Description: standard File Access Protocol utility
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include ftp.local
7# Persistent global definitions
8include globals.local
9
10noblacklist ${PATH}/ftp
11
12include disable-common.inc
13include disable-devel.inc
14include disable-exec.inc
15include disable-interpreters.inc
16include disable-proc.inc
17include disable-programs.inc
18#include disable-shell.inc
19include disable-write-mnt.inc
20include disable-X11.inc
21include disable-xdg.inc
22
23apparmor
24caps.drop all
25ipc-namespace
26machine-id
27netfilter
28no3d
29nodvd
30nogroups
31noinput
32nonewprivs
33noroot
34nosound
35notv
36nou2f
37novideo
38protocol inet,inet6
39seccomp
40shell none
41tracelog
42
43#disable-mnt
44#private-bin PROGRAMS
45private-cache
46private-dev
47#private-etc FILES
48private-tmp
49
50dbus-user none
51dbus-system none
52
53memory-deny-write-execute
54noexec ${HOME}
diff --git a/etc/profile-a-l/funnyboat.profile b/etc/profile-a-l/funnyboat.profile
new file mode 100644
index 000000000..4a08fca9b
--- /dev/null
+++ b/etc/profile-a-l/funnyboat.profile
@@ -0,0 +1,55 @@
1# Firejail profile for funnyboat
2# This file is overwritten after every install/update
3# Persistent local customizations
4include funnyboat.local
5# Persistent global definitions
6include globals.local
7
8noblacklist ${HOME}/.funnyboat
9
10ignore noexec /dev/shm
11include allow-python2.inc
12include allow-python3.inc
13
14include disable-common.inc
15include disable-devel.inc
16include disable-exec.inc
17include disable-interpreters.inc
18include disable-programs.inc
19# include disable-shell.inc
20include disable-xdg.inc
21
22mkdir ${HOME}/.funnyboat
23whitelist ${HOME}/.funnyboat
24include whitelist-common.inc
25include whitelist-runuser-common.inc
26whitelist /usr/share/funnyboat
27# Debian:
28whitelist /usr/share/games/funnyboat
29include whitelist-usr-share-common.inc
30include whitelist-var-common.inc
31
32apparmor
33caps.drop all
34ipc-namespace
35netfilter
36nodvd
37nogroups
38nonewprivs
39noroot
40notv
41novideo
42protocol unix,inet,inet6
43seccomp
44shell none
45# tracelog
46
47disable-mnt
48private-cache
49private-dev
50private-tmp
51
52dbus-user none
53dbus-system none
54
55memory-deny-write-execute
diff --git a/etc/profile-a-l/gajim.profile b/etc/profile-a-l/gajim.profile
index ed3f0357d..6d764a0f9 100644
--- a/etc/profile-a-l/gajim.profile
+++ b/etc/profile-a-l/gajim.profile
@@ -19,7 +19,6 @@ include disable-common.inc
19include disable-devel.inc 19include disable-devel.inc
20include disable-exec.inc 20include disable-exec.inc
21include disable-interpreters.inc 21include disable-interpreters.inc
22include disable-passwdmgr.inc
23include disable-programs.inc 22include disable-programs.inc
24# Add 'ignore include disable-xdg.inc' to your gajim.local if you need to whitelist folders other than ~/Downloads. 23# Add 'ignore include disable-xdg.inc' to your gajim.local if you need to whitelist folders other than ~/Downloads.
25include disable-xdg.inc 24include disable-xdg.inc
@@ -60,7 +59,7 @@ disable-mnt
60private-bin bash,gajim,gajim-history-manager,gpg,gpg2,paplay,python*,sh,zsh 59private-bin bash,gajim,gajim-history-manager,gpg,gpg2,paplay,python*,sh,zsh
61private-cache 60private-cache
62private-dev 61private-dev
63private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,group,hostname,hosts,ld.so.cache,ld.so.conf,localtime,machine-id,passwd,pki,pulse,resolv.conf,ssl,xdg 62private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,group,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.preload,localtime,machine-id,passwd,pki,pulse,resolv.conf,ssl,xdg
64private-tmp 63private-tmp
65writable-run-user 64writable-run-user
66 65
diff --git a/etc/profile-a-l/galculator.profile b/etc/profile-a-l/galculator.profile
index 550b3808b..4efe41f8d 100644
--- a/etc/profile-a-l/galculator.profile
+++ b/etc/profile-a-l/galculator.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -44,7 +43,7 @@ tracelog
44private-bin galculator 43private-bin galculator
45private-cache 44private-cache
46private-dev 45private-dev
47private-etc alternatives,fonts 46private-etc alternatives,fonts,ld.so.cache,ld.so.preload
48private-lib 47private-lib
49private-tmp 48private-tmp
50 49
diff --git a/etc/profile-a-l/gallery-dl.profile b/etc/profile-a-l/gallery-dl.profile
new file mode 100644
index 000000000..2947873ef
--- /dev/null
+++ b/etc/profile-a-l/gallery-dl.profile
@@ -0,0 +1,18 @@
1# Firejail profile for gallery-dl
2# Description: Downloader of images from various sites
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include gallery-dl.local
7# Persistent global definitions
8# added by included profile
9#include globals.local
10
11noblacklist ${HOME}/.config/gallery-dl
12noblacklist ${HOME}/.gallery-dl.conf
13
14private-bin gallery-dl
15private-etc alternatives,gallery-dl.conf,ld.so.cache,ld.so.preload
16
17# Redirect
18include youtube-dl.profile
diff --git a/etc/profile-a-l/gapplication.profile b/etc/profile-a-l/gapplication.profile
index f2da60c87..ec5b733c8 100644
--- a/etc/profile-a-l/gapplication.profile
+++ b/etc/profile-a-l/gapplication.profile
@@ -7,12 +7,12 @@ include gapplication.local
7include globals.local 7include globals.local
8 8
9blacklist ${RUNUSER}/wayland-* 9blacklist ${RUNUSER}/wayland-*
10blacklist /usr/libexec
10 11
11include disable-common.inc 12include disable-common.inc
12include disable-devel.inc 13include disable-devel.inc
13include disable-exec.inc 14include disable-exec.inc
14include disable-interpreters.inc 15include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 16include disable-programs.inc
17include disable-shell.inc 17include disable-shell.inc
18include disable-xdg.inc 18include disable-xdg.inc
@@ -49,7 +49,7 @@ private
49private-bin gapplication 49private-bin gapplication
50private-cache 50private-cache
51private-dev 51private-dev
52private-etc none 52private-etc alternatives,ld.so.cache,ld.so.preload
53private-tmp 53private-tmp
54 54
55# Add the next line to your gapplication.local to filter D-Bus names. 55# Add the next line to your gapplication.local to filter D-Bus names.
diff --git a/etc/profile-a-l/gcloud.profile b/etc/profile-a-l/gcloud.profile
index 388f4c0df..297e5d345 100644
--- a/etc/profile-a-l/gcloud.profile
+++ b/etc/profile-a-l/gcloud.profile
@@ -36,7 +36,7 @@ tracelog
36 36
37disable-mnt 37disable-mnt
38private-dev 38private-dev
39private-etc alternatives,ca-certificates,crypto-policies,hosts,ld.so.cache,localtime,nsswitch.conf,pki,resolv.conf,ssl 39private-etc alternatives,ca-certificates,crypto-policies,hosts,ld.so.cache,ld.so.preload,localtime,nsswitch.conf,pki,resolv.conf,ssl
40private-tmp 40private-tmp
41 41
42dbus-user none 42dbus-user none
diff --git a/etc/profile-a-l/gconf-editor.profile b/etc/profile-a-l/gconf-editor.profile
index cb39174e5..67eddd2e5 100644
--- a/etc/profile-a-l/gconf-editor.profile
+++ b/etc/profile-a-l/gconf-editor.profile
@@ -13,5 +13,7 @@ whitelist /usr/share/gconf-editor
13 13
14ignore x11 none 14ignore x11 none
15 15
16ignore memory-deny-write-execute
17
16# Redirect 18# Redirect
17include gconf.profile 19include gconf.profile
diff --git a/etc/profile-a-l/gconf.profile b/etc/profile-a-l/gconf.profile
index fec1a555a..a45374d4e 100644
--- a/etc/profile-a-l/gconf.profile
+++ b/etc/profile-a-l/gconf.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-xdg.inc 22include disable-xdg.inc
24 23
@@ -55,7 +54,7 @@ disable-mnt
55private-bin gconf-editor,gconf-merge-*,gconfpkg,gconftool-2,gsettings-*-convert,python2* 54private-bin gconf-editor,gconf-merge-*,gconfpkg,gconftool-2,gsettings-*-convert,python2*
56private-cache 55private-cache
57private-dev 56private-dev
58private-etc alternatives,fonts,gconf 57private-etc alternatives,fonts,gconf,ld.so.cache,ld.so.preload
59private-lib GConf,libpython*,python2* 58private-lib GConf,libpython*,python2*
60private-tmp 59private-tmp
61 60
diff --git a/etc/profile-a-l/geany.profile b/etc/profile-a-l/geany.profile
index 6fdb9b37a..f244cb526 100644
--- a/etc/profile-a-l/geany.profile
+++ b/etc/profile-a-l/geany.profile
@@ -12,7 +12,6 @@ noblacklist ${HOME}/.config/geany
12include allow-common-devel.inc 12include allow-common-devel.inc
13 13
14include disable-common.inc 14include disable-common.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18caps.drop all 17caps.drop all
diff --git a/etc/profile-a-l/geary.profile b/etc/profile-a-l/geary.profile
index 74e135a7c..221fbff01 100644
--- a/etc/profile-a-l/geary.profile
+++ b/etc/profile-a-l/geary.profile
@@ -13,13 +13,16 @@ noblacklist ${HOME}/.config/evolution
13noblacklist ${HOME}/.config/geary 13noblacklist ${HOME}/.config/geary
14noblacklist ${HOME}/.local/share/evolution 14noblacklist ${HOME}/.local/share/evolution
15noblacklist ${HOME}/.local/share/geary 15noblacklist ${HOME}/.local/share/geary
16noblacklist ${HOME}/.local/share/pki
16noblacklist ${HOME}/.mozilla 17noblacklist ${HOME}/.mozilla
18noblacklist ${HOME}/.pki
19
20include allow-bin-sh.inc
17 21
18include disable-common.inc 22include disable-common.inc
19include disable-devel.inc 23include disable-devel.inc
20include disable-exec.inc 24include disable-exec.inc
21include disable-interpreters.inc 25include disable-interpreters.inc
22include disable-passwdmgr.inc
23include disable-programs.inc 26include disable-programs.inc
24include disable-shell.inc 27include disable-shell.inc
25include disable-xdg.inc 28include disable-xdg.inc
@@ -39,7 +42,9 @@ whitelist ${HOME}/.config/evolution
39whitelist ${HOME}/.config/geary 42whitelist ${HOME}/.config/geary
40whitelist ${HOME}/.local/share/evolution 43whitelist ${HOME}/.local/share/evolution
41whitelist ${HOME}/.local/share/geary 44whitelist ${HOME}/.local/share/geary
45whitelist ${HOME}/.local/share/pki
42whitelist ${HOME}/.mozilla/firefox/profiles.ini 46whitelist ${HOME}/.mozilla/firefox/profiles.ini
47whitelist ${HOME}/.pki
43whitelist /usr/share/geary 48whitelist /usr/share/geary
44include whitelist-common.inc 49include whitelist-common.inc
45include whitelist-runuser-common.inc 50include whitelist-runuser-common.inc
@@ -48,7 +53,8 @@ include whitelist-var-common.inc
48 53
49apparmor 54apparmor
50caps.drop all 55caps.drop all
51machine-id 56#ipc-namespace - may cause issues with X11
57#machine-id
52netfilter 58netfilter
53no3d 59no3d
54nodvd 60nodvd
@@ -56,7 +62,7 @@ nogroups
56noinput 62noinput
57nonewprivs 63nonewprivs
58noroot 64noroot
59nosound 65#nosound
60notv 66notv
61nou2f 67nou2f
62novideo 68novideo
@@ -67,21 +73,22 @@ shell none
67tracelog 73tracelog
68 74
69# disable-mnt 75# disable-mnt
70# Add 'ignore private-bin' to geary.local for hyperlink support 76#private-bin geary,sh
71private-bin geary
72private-cache 77private-cache
73private-dev 78private-dev
74private-etc alternatives,ca-certificates,crypto-policies,fonts,hostname,hosts,pki,resolv.conf,ssl,xdg 79private-etc alternatives,ca-certificates,crypto-policies,fonts,group,gtk-3.0,hostname,hosts,ld.so.cache,ld.so.preload,machine-id,mailcap,mime.types,nsswitch.conf,passwd,pki,resolv.conf,ssl,xdg
75private-tmp 80private-tmp
76 81
77dbus-user filter 82dbus-user filter
78dbus-user.own org.gnome.Geary 83dbus-user.own org.gnome.Geary
79dbus-user.talk ca.desrt.dconf 84dbus-user.talk ca.desrt.dconf
85dbus-user.talk org.freedesktop.Notifications
80dbus-user.talk org.freedesktop.secrets 86dbus-user.talk org.freedesktop.secrets
81dbus-user.talk org.gnome.Contacts 87dbus-user.talk org.gnome.Contacts
82dbus-user.talk org.gnome.OnlineAccounts 88dbus-user.talk org.gnome.OnlineAccounts
83dbus-user.talk org.gnome.evolution.dataserver.AddressBook10 89dbus-user.talk org.gnome.evolution.dataserver.AddressBook10
84dbus-user.talk org.gnome.evolution.dataserver.Sources5 90dbus-user.talk org.gnome.evolution.dataserver.Sources5
91?ALLOW_TRAY: dbus-user.talk org.kde.StatusNotifierWatcher
85dbus-system none 92dbus-system none
86 93
87read-only ${HOME}/.mozilla/firefox/profiles.ini 94read-only ${HOME}/.mozilla/firefox/profiles.ini
diff --git a/etc/profile-a-l/gedit.profile b/etc/profile-a-l/gedit.profile
index 108b7041d..0726d17bd 100644
--- a/etc/profile-a-l/gedit.profile
+++ b/etc/profile-a-l/gedit.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16# include disable-devel.inc 16# include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18# include disable-interpreters.inc 18# include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22include whitelist-runuser-common.inc 21include whitelist-runuser-common.inc
diff --git a/etc/profile-a-l/geekbench.profile b/etc/profile-a-l/geekbench.profile
index e0aadff24..243b893b9 100644
--- a/etc/profile-a-l/geekbench.profile
+++ b/etc/profile-a-l/geekbench.profile
@@ -6,14 +6,19 @@ include geekbench.local
6# Persistent global definitions 6# Persistent global definitions
7include globals.local 7include globals.local
8 8
9noblacklist ${HOME}/.geekbench5
10noblacklist /sbin
11noblacklist /usr/sbin
12
9include disable-common.inc 13include disable-common.inc
10include disable-devel.inc 14include disable-devel.inc
11include disable-exec.inc 15include disable-exec.inc
12include disable-interpreters.inc 16include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 17include disable-programs.inc
15include disable-xdg.inc 18include disable-xdg.inc
16 19
20mkdir ${HOME}/.geekbench5
21whitelist ${HOME}/.geekbench5
17include whitelist-common.inc 22include whitelist-common.inc
18include whitelist-usr-share-common.inc 23include whitelist-usr-share-common.inc
19include whitelist-var-common.inc 24include whitelist-var-common.inc
@@ -40,16 +45,14 @@ shell none
40tracelog 45tracelog
41 46
42disable-mnt 47disable-mnt
43private-bin bash,geekbenc*,sh 48#private-bin bash,geekbench*,sh -- #4576
44private-cache 49private-cache
45private-dev 50private-dev
46private-etc alternatives,group,lsb-release,passwd 51private-etc alternatives,group,ld.so.cache,ld.so.preload,lsb-release,passwd
47private-lib gcc/*/*/libstdc++.so.*
48private-opt none
49private-tmp 52private-tmp
50 53
51dbus-user none 54dbus-user none
52dbus-system none 55dbus-system none
53 56
54#memory-deny-write-execute - breaks on Arch (see issue #1803)
55read-only ${HOME} 57read-only ${HOME}
58read-write ${HOME}/.geekbench5
diff --git a/etc/profile-a-l/geeqie.profile b/etc/profile-a-l/geeqie.profile
index dd33b3fb5..b79a82c83 100644
--- a/etc/profile-a-l/geeqie.profile
+++ b/etc/profile-a-l/geeqie.profile
@@ -13,7 +13,6 @@ noblacklist ${HOME}/.local/share/geeqie
13include disable-common.inc 13include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19caps.drop all 18caps.drop all
@@ -26,7 +25,8 @@ nosound
26notv 25notv
27nou2f 26nou2f
28novideo 27novideo
29protocol unix 28# remove inet,inet6 to disable network access
29protocol unix,inet,inet6
30seccomp 30seccomp
31shell none 31shell none
32 32
diff --git a/etc/profile-a-l/gfeeds.profile b/etc/profile-a-l/gfeeds.profile
index 7ec8ba810..388f6496d 100644
--- a/etc/profile-a-l/gfeeds.profile
+++ b/etc/profile-a-l/gfeeds.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-shell.inc 22include disable-shell.inc
24include disable-xdg.inc 23include disable-xdg.inc
@@ -31,6 +30,7 @@ whitelist ${HOME}/.cache/gfeeds
31whitelist ${HOME}/.cache/org.gabmus.gfeeds 30whitelist ${HOME}/.cache/org.gabmus.gfeeds
32whitelist ${HOME}/.config/org.gabmus.gfeeds.json 31whitelist ${HOME}/.config/org.gabmus.gfeeds.json
33whitelist ${HOME}/.config/org.gabmus.gfeeds.saved_articles 32whitelist ${HOME}/.config/org.gabmus.gfeeds.saved_articles
33whitelist /usr/libexec/webkit2gtk-4.0
34whitelist /usr/share/gfeeds 34whitelist /usr/share/gfeeds
35include whitelist-common.inc 35include whitelist-common.inc
36include whitelist-runuser-common.inc 36include whitelist-runuser-common.inc
diff --git a/etc/profile-a-l/gget.profile b/etc/profile-a-l/gget.profile
index d9c5a0d9a..bc1199914 100644
--- a/etc/profile-a-l/gget.profile
+++ b/etc/profile-a-l/gget.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
@@ -50,7 +49,7 @@ disable-mnt
50private-bin gget 49private-bin gget
51private-cache 50private-cache
52private-dev 51private-dev
53private-etc alternatives,ca-certificates,crypto-policies,pki,resolv.conf,ssl 52private-etc alternatives,ca-certificates,crypto-policies,ld.so.cache,ld.so.preload,pki,resolv.conf,ssl
54private-lib 53private-lib
55private-tmp 54private-tmp
56 55
diff --git a/etc/profile-a-l/ghostwriter.profile b/etc/profile-a-l/ghostwriter.profile
index 276ab76df..3dfdc0184 100644
--- a/etc/profile-a-l/ghostwriter.profile
+++ b/etc/profile-a-l/ghostwriter.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-shell.inc 21include disable-shell.inc
23include disable-xdg.inc 22include disable-xdg.inc
diff --git a/etc/profile-a-l/gimp.profile b/etc/profile-a-l/gimp.profile
index dfc1304d1..28070cb9c 100644
--- a/etc/profile-a-l/gimp.profile
+++ b/etc/profile-a-l/gimp.profile
@@ -13,7 +13,6 @@ include globals.local
13#ignore net 13#ignore net
14#protocol unix,inet,inet6 14#protocol unix,inet,inet6
15 15
16
17# gimp plugins are installed by the user in ${HOME}/.gimp-2.8/plug-ins/ directory 16# gimp plugins are installed by the user in ${HOME}/.gimp-2.8/plug-ins/ directory
18# If you are not using external plugins, you can add 'noexec ${HOME}' to your gimp.local. 17# If you are not using external plugins, you can add 'noexec ${HOME}' to your gimp.local.
19ignore noexec ${HOME} 18ignore noexec ${HOME}
@@ -26,10 +25,13 @@ noblacklist ${HOME}/.gimp*
26noblacklist ${DOCUMENTS} 25noblacklist ${DOCUMENTS}
27noblacklist ${PICTURES} 26noblacklist ${PICTURES}
28 27
28# See issue #4367, gimp 2.10.22-3: gegl:introspect broken
29noblacklist /sbin
30noblacklist /usr/sbin
31
29include disable-common.inc 32include disable-common.inc
30include disable-exec.inc 33include disable-exec.inc
31include disable-devel.inc 34include disable-devel.inc
32include disable-passwdmgr.inc
33include disable-programs.inc 35include disable-programs.inc
34include disable-xdg.inc 36include disable-xdg.inc
35 37
@@ -37,6 +39,7 @@ whitelist /usr/share/gegl-0.4
37whitelist /usr/share/gimp 39whitelist /usr/share/gimp
38whitelist /usr/share/mypaint-data 40whitelist /usr/share/mypaint-data
39whitelist /usr/share/lensfun 41whitelist /usr/share/lensfun
42include whitelist-run-common.inc
40include whitelist-usr-share-common.inc 43include whitelist-usr-share-common.inc
41include whitelist-var-common.inc 44include whitelist-var-common.inc
42 45
diff --git a/etc/profile-a-l/gist.profile b/etc/profile-a-l/gist.profile
index 661c3a375..506ab7127 100644
--- a/etc/profile-a-l/gist.profile
+++ b/etc/profile-a-l/gist.profile
@@ -19,7 +19,6 @@ include disable-common.inc
19include disable-devel.inc 19include disable-devel.inc
20include disable-exec.inc 20include disable-exec.inc
21include disable-interpreters.inc 21include disable-interpreters.inc
22include disable-passwdmgr.inc
23include disable-programs.inc 22include disable-programs.inc
24include disable-xdg.inc 23include disable-xdg.inc
25 24
@@ -53,7 +52,7 @@ tracelog
53disable-mnt 52disable-mnt
54private-cache 53private-cache
55private-dev 54private-dev
56private-etc alternatives 55private-etc alternatives,ld.so.cache,ld.so.preload
57private-tmp 56private-tmp
58 57
59dbus-user none 58dbus-user none
diff --git a/etc/profile-a-l/git-cola.profile b/etc/profile-a-l/git-cola.profile
index 5e4249376..6439c8821 100644
--- a/etc/profile-a-l/git-cola.profile
+++ b/etc/profile-a-l/git-cola.profile
@@ -28,7 +28,6 @@ include disable-common.inc
28include disable-devel.inc 28include disable-devel.inc
29include disable-exec.inc 29include disable-exec.inc
30include disable-interpreters.inc 30include disable-interpreters.inc
31include disable-passwdmgr.inc
32include disable-programs.inc 31include disable-programs.inc
33include disable-xdg.inc 32include disable-xdg.inc
34 33
@@ -71,7 +70,7 @@ tracelog
71private-bin basename,bash,cola,envsubst,gettext,git,git-cola,git-dag,git-gui,gitk,gpg,gpg-agent,nano,ps,python*,sh,ssh,ssh-agent,tclsh,tr,wc,which,xed 70private-bin basename,bash,cola,envsubst,gettext,git,git-cola,git-dag,git-gui,gitk,gpg,gpg-agent,nano,ps,python*,sh,ssh,ssh-agent,tclsh,tr,wc,which,xed
72private-cache 71private-cache
73private-dev 72private-dev
74private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gcrypt,gitconfig,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,localtime,login.defs,machine-id,mime.types,nsswitch.conf,passwd,pki,resolv.conf,selinux,ssh,ssl,X11,xdg 73private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gcrypt,gitconfig,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,localtime,login.defs,machine-id,mime.types,nsswitch.conf,passwd,pki,resolv.conf,selinux,ssh,ssl,X11,xdg
75private-tmp 74private-tmp
76writable-run-user 75writable-run-user
77 76
diff --git a/etc/profile-a-l/git.profile b/etc/profile-a-l/git.profile
index bfa0081c6..b0318e4a3 100644
--- a/etc/profile-a-l/git.profile
+++ b/etc/profile-a-l/git.profile
@@ -26,7 +26,6 @@ blacklist ${RUNUSER}/wayland-*
26 26
27include disable-common.inc 27include disable-common.inc
28include disable-exec.inc 28include disable-exec.inc
29include disable-passwdmgr.inc
30include disable-programs.inc 29include disable-programs.inc
31 30
32whitelist /usr/share/git 31whitelist /usr/share/git
diff --git a/etc/profile-a-l/gitg.profile b/etc/profile-a-l/gitg.profile
index 05d7dffa9..314b797c0 100644
--- a/etc/profile-a-l/gitg.profile
+++ b/etc/profile-a-l/gitg.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23 22
24#whitelist ${HOME}/YOUR_GIT_PROJECTS_DIRECTORY 23#whitelist ${HOME}/YOUR_GIT_PROJECTS_DIRECTORY
diff --git a/etc/profile-a-l/github-desktop.profile b/etc/profile-a-l/github-desktop.profile
index 325c54ced..943a3c8c3 100644
--- a/etc/profile-a-l/github-desktop.profile
+++ b/etc/profile-a-l/github-desktop.profile
@@ -14,6 +14,8 @@ include globals.local
14# Disabled until someone reported positive feedback 14# Disabled until someone reported positive feedback
15ignore include disable-xdg.inc 15ignore include disable-xdg.inc
16ignore whitelist ${DOWNLOADS} 16ignore whitelist ${DOWNLOADS}
17ignore whitelist ${HOME}/.config/Electron
18ignore whitelist ${HOME}/.config/electron-flag*.conf
17ignore include whitelist-common.inc 19ignore include whitelist-common.inc
18ignore include whitelist-runuser-common.inc 20ignore include whitelist-runuser-common.inc
19ignore include whitelist-usr-share-common.inc 21ignore include whitelist-usr-share-common.inc
diff --git a/etc/profile-a-l/gitter.profile b/etc/profile-a-l/gitter.profile
index 460e2b990..16358d064 100644
--- a/etc/profile-a-l/gitter.profile
+++ b/etc/profile-a-l/gitter.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18mkdir ${HOME}/.config/Gitter 17mkdir ${HOME}/.config/Gitter
@@ -38,7 +37,7 @@ shell none
38 37
39disable-mnt 38disable-mnt
40private-bin bash,env,gitter 39private-bin bash,env,gitter
41private-etc alternatives,ca-certificates,crypto-policies,fonts,pki,pulse,resolv.conf,ssl 40private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.preload,pki,pulse,resolv.conf,ssl
42private-opt Gitter 41private-opt Gitter
43private-dev 42private-dev
44private-tmp 43private-tmp
diff --git a/etc/profile-a-l/gjs.profile b/etc/profile-a-l/gjs.profile
index ed68b3c2d..a52272852 100644
--- a/etc/profile-a-l/gjs.profile
+++ b/etc/profile-a-l/gjs.profile
@@ -19,7 +19,6 @@ include allow-gjs.inc
19include disable-common.inc 19include disable-common.inc
20include disable-devel.inc 20include disable-devel.inc
21include disable-interpreters.inc 21include disable-interpreters.inc
22include disable-passwdmgr.inc
23include disable-programs.inc 22include disable-programs.inc
24 23
25include whitelist-runuser-common.inc 24include whitelist-runuser-common.inc
diff --git a/etc/profile-a-l/gl-117.profile b/etc/profile-a-l/gl-117.profile
index c8cefc67e..edb85048b 100644
--- a/etc/profile-a-l/gl-117.profile
+++ b/etc/profile-a-l/gl-117.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -30,7 +29,6 @@ caps.drop all
30net none 29net none
31nodvd 30nodvd
32nogroups 31nogroups
33noinput
34nonewprivs 32nonewprivs
35noroot 33noroot
36notv 34notv
diff --git a/etc/profile-a-l/glaxium.profile b/etc/profile-a-l/glaxium.profile
index ee7af0546..b5f98b411 100644
--- a/etc/profile-a-l/glaxium.profile
+++ b/etc/profile-a-l/glaxium.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -30,7 +29,6 @@ caps.drop all
30net none 29net none
31nodvd 30nodvd
32nogroups 31nogroups
33noinput
34nonewprivs 32nonewprivs
35noroot 33noroot
36notv 34notv
diff --git a/etc/profile-a-l/globaltime.profile b/etc/profile-a-l/globaltime.profile
index 14b3ef811..d07f0ace4 100644
--- a/etc/profile-a-l/globaltime.profile
+++ b/etc/profile-a-l/globaltime.profile
@@ -11,7 +11,6 @@ include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-xdg.inc 15include disable-xdg.inc
17 16
diff --git a/etc/profile-a-l/gmpc.profile b/etc/profile-a-l/gmpc.profile
index b3aad8b2c..e53297c06 100644
--- a/etc/profile-a-l/gmpc.profile
+++ b/etc/profile-a-l/gmpc.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
@@ -45,7 +44,7 @@ tracelog
45disable-mnt 44disable-mnt
46#private-bin gmpc 45#private-bin gmpc
47private-cache 46private-cache
48private-etc alternatives,fonts 47private-etc alternatives,fonts,ld.so.cache,ld.so.preload
49private-tmp 48private-tmp
50writable-run-user 49writable-run-user
51 50
diff --git a/etc/profile-a-l/gnome-books.profile b/etc/profile-a-l/gnome-books.profile
index 34a7f557c..5b7eaa78d 100644
--- a/etc/profile-a-l/gnome-books.profile
+++ b/etc/profile-a-l/gnome-books.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
diff --git a/etc/profile-a-l/gnome-builder.profile b/etc/profile-a-l/gnome-builder.profile
index 37ca5aeff..9fe9ed6ba 100644
--- a/etc/profile-a-l/gnome-builder.profile
+++ b/etc/profile-a-l/gnome-builder.profile
@@ -16,7 +16,6 @@ noblacklist ${HOME}/.local/share/gnome-builder
16include allow-common-devel.inc 16include allow-common-devel.inc
17 17
18include disable-common.inc 18include disable-common.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22include whitelist-runuser-common.inc 21include whitelist-runuser-common.inc
diff --git a/etc/profile-a-l/gnome-calculator.profile b/etc/profile-a-l/gnome-calculator.profile
index 4c465cc49..ac130da21 100644
--- a/etc/profile-a-l/gnome-calculator.profile
+++ b/etc/profile-a-l/gnome-calculator.profile
@@ -10,7 +10,6 @@ include globals.local
10include disable-common.inc 10include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-passwdmgr.inc
14include disable-interpreters.inc 13include disable-interpreters.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-shell.inc 15include disable-shell.inc
diff --git a/etc/profile-a-l/gnome-calendar.profile b/etc/profile-a-l/gnome-calendar.profile
index eaf25b177..f9df83e2a 100644
--- a/etc/profile-a-l/gnome-calendar.profile
+++ b/etc/profile-a-l/gnome-calendar.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16include disable-xdg.inc 15include disable-xdg.inc
@@ -46,7 +45,7 @@ private
46private-bin gnome-calendar 45private-bin gnome-calendar
47private-cache 46private-cache
48private-dev 47private-dev
49private-etc ca-certificates,crypto-policies,dconf,fonts,gtk-3.0,nsswitch.conf,pki,resolv.conf,ssl 48private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload,localtime,nsswitch.conf,pki,resolv.conf,ssl
50private-tmp 49private-tmp
51 50
52dbus-user filter 51dbus-user filter
diff --git a/etc/profile-a-l/gnome-characters.profile b/etc/profile-a-l/gnome-characters.profile
index 741fe9bf7..aaa1e3f5a 100644
--- a/etc/profile-a-l/gnome-characters.profile
+++ b/etc/profile-a-l/gnome-characters.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
diff --git a/etc/profile-a-l/gnome-chess.profile b/etc/profile-a-l/gnome-chess.profile
index bd39f625c..dc9092a93 100644
--- a/etc/profile-a-l/gnome-chess.profile
+++ b/etc/profile-a-l/gnome-chess.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
@@ -51,5 +50,5 @@ disable-mnt
51private-bin fairymax,gnome-chess,gnuchess,hoichess 50private-bin fairymax,gnome-chess,gnuchess,hoichess
52private-cache 51private-cache
53private-dev 52private-dev
54private-etc alternatives,dconf,fonts,gnome-chess,gtk-3.0 53private-etc alternatives,dconf,fonts,gnome-chess,gtk-3.0,ld.so.cache,ld.so.preload
55private-tmp 54private-tmp
diff --git a/etc/profile-a-l/gnome-clocks.profile b/etc/profile-a-l/gnome-clocks.profile
index 1e7c70b84..90665add6 100644
--- a/etc/profile-a-l/gnome-clocks.profile
+++ b/etc/profile-a-l/gnome-clocks.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16include disable-xdg.inc 15include disable-xdg.inc
@@ -43,6 +42,6 @@ disable-mnt
43private-bin gnome-clocks,gsound-play 42private-bin gnome-clocks,gsound-play
44private-cache 43private-cache
45private-dev 44private-dev
46private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gtk-3.0,hosts,localtime,machine-id,pkcs11,pki,ssl 45private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gtk-3.0,hosts,ld.so.cache,ld.so.preload,localtime,machine-id,pkcs11,pki,ssl
47private-tmp 46private-tmp
48 47
diff --git a/etc/profile-a-l/gnome-contacts.profile b/etc/profile-a-l/gnome-contacts.profile
index dcc6163b6..f96f750dd 100644
--- a/etc/profile-a-l/gnome-contacts.profile
+++ b/etc/profile-a-l/gnome-contacts.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
diff --git a/etc/profile-a-l/gnome-documents.profile b/etc/profile-a-l/gnome-documents.profile
index 29ad67af8..0ed3c7541 100644
--- a/etc/profile-a-l/gnome-documents.profile
+++ b/etc/profile-a-l/gnome-documents.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-xdg.inc 22include disable-xdg.inc
24 23
diff --git a/etc/profile-a-l/gnome-font-viewer.profile b/etc/profile-a-l/gnome-font-viewer.profile
index aa0844b8b..294729152 100644
--- a/etc/profile-a-l/gnome-font-viewer.profile
+++ b/etc/profile-a-l/gnome-font-viewer.profile
@@ -11,7 +11,6 @@ include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-xdg.inc 15include disable-xdg.inc
17 16
diff --git a/etc/profile-a-l/gnome-hexgl.profile b/etc/profile-a-l/gnome-hexgl.profile
index 2db956faf..ab6279608 100644
--- a/etc/profile-a-l/gnome-hexgl.profile
+++ b/etc/profile-a-l/gnome-hexgl.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16include disable-xdg.inc 15include disable-xdg.inc
@@ -43,7 +42,7 @@ private
43private-bin gnome-hexgl 42private-bin gnome-hexgl
44private-cache 43private-cache
45private-dev 44private-dev
46private-etc alsa,asound.conf,machine-id,pulse 45private-etc alsa,alternatives,asound.conf,ld.so.cache,ld.so.preload,machine-id,pulse
47private-tmp 46private-tmp
48 47
49dbus-user none 48dbus-user none
diff --git a/etc/profile-a-l/gnome-keyring.profile b/etc/profile-a-l/gnome-keyring.profile
index 25b4c47de..b74325102 100644
--- a/etc/profile-a-l/gnome-keyring.profile
+++ b/etc/profile-a-l/gnome-keyring.profile
@@ -12,7 +12,6 @@ noblacklist ${HOME}/.gnupg
12include disable-common.inc 12include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-passwdmgr.inc
16include disable-interpreters.inc 15include disable-interpreters.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
diff --git a/etc/profile-a-l/gnome-latex.profile b/etc/profile-a-l/gnome-latex.profile
index 1a7eafeca..39a6718a6 100644
--- a/etc/profile-a-l/gnome-latex.profile
+++ b/etc/profile-a-l/gnome-latex.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22whitelist /usr/share/gnome-latex 21whitelist /usr/share/gnome-latex
@@ -49,6 +48,6 @@ tracelog
49private-cache 48private-cache
50private-dev 49private-dev
51# passwd,login.defs,firejail are a temporary workaround for #2877 and can be removed once it is fixed 50# passwd,login.defs,firejail are a temporary workaround for #2877 and can be removed once it is fixed
52private-etc alternatives,dconf,fonts,gtk-3.0,latexmk.conf,login.defs,passwd,texlive 51private-etc alternatives,dconf,fonts,gtk-3.0,latexmk.conf,ld.so.cache,ld.so.preload,login.defs,passwd,texlive
53 52
54dbus-system none 53dbus-system none
diff --git a/etc/profile-a-l/gnome-logs.profile b/etc/profile-a-l/gnome-logs.profile
index 9d2ea7b7b..7ee4d8b75 100644
--- a/etc/profile-a-l/gnome-logs.profile
+++ b/etc/profile-a-l/gnome-logs.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16include disable-xdg.inc 15include disable-xdg.inc
@@ -41,7 +40,7 @@ disable-mnt
41private-bin gnome-logs 40private-bin gnome-logs
42private-cache 41private-cache
43private-dev 42private-dev
44private-etc alternatives,fonts,localtime,machine-id 43private-etc alternatives,fonts,ld.so.cache,ld.so.preload,localtime,machine-id
45private-lib gdk-pixbuf-2.*,gio,gvfs/libgvfscommon.so,libgconf-2.so.*,librsvg-2.so.* 44private-lib gdk-pixbuf-2.*,gio,gvfs/libgvfscommon.so,libgconf-2.so.*,librsvg-2.so.*
46private-tmp 45private-tmp
47writable-var-log 46writable-var-log
diff --git a/etc/profile-a-l/gnome-maps.profile b/etc/profile-a-l/gnome-maps.profile
index cf2ac2f75..7732117ac 100644
--- a/etc/profile-a-l/gnome-maps.profile
+++ b/etc/profile-a-l/gnome-maps.profile
@@ -18,11 +18,12 @@ noblacklist ${HOME}/.local/share/maps-places.json
18# Allow gjs (blacklisted by disable-interpreters.inc) 18# Allow gjs (blacklisted by disable-interpreters.inc)
19include allow-gjs.inc 19include allow-gjs.inc
20 20
21blacklist /usr/libexec
22
21include disable-common.inc 23include disable-common.inc
22include disable-devel.inc 24include disable-devel.inc
23include disable-exec.inc 25include disable-exec.inc
24include disable-interpreters.inc 26include disable-interpreters.inc
25include disable-passwdmgr.inc
26include disable-programs.inc 27include disable-programs.inc
27include disable-shell.inc 28include disable-shell.inc
28include disable-xdg.inc 29include disable-xdg.inc
diff --git a/etc/profile-a-l/gnome-mplayer.profile b/etc/profile-a-l/gnome-mplayer.profile
index 43fe71f5e..f8f40ea54 100644
--- a/etc/profile-a-l/gnome-mplayer.profile
+++ b/etc/profile-a-l/gnome-mplayer.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
diff --git a/etc/profile-a-l/gnome-music.profile b/etc/profile-a-l/gnome-music.profile
index 2fcbe9910..7b79fa15d 100644
--- a/etc/profile-a-l/gnome-music.profile
+++ b/etc/profile-a-l/gnome-music.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
@@ -43,6 +42,6 @@ tracelog
43# private-bin calls a file manager - whatever is installed! 42# private-bin calls a file manager - whatever is installed!
44#private-bin env,gio-launch-desktop,gnome-music,python*,yelp 43#private-bin env,gio-launch-desktop,gnome-music,python*,yelp
45private-dev 44private-dev
46private-etc alternatives,asound.conf,dconf,fonts,fonts,gtk-3.0,machine-id,pulse,selinux,xdg 45private-etc alternatives,asound.conf,dconf,fonts,fonts,gtk-3.0,ld.so.cache,ld.so.preload,machine-id,pulse,selinux,xdg
47private-tmp 46private-tmp
48 47
diff --git a/etc/profile-a-l/gnome-nettool.profile b/etc/profile-a-l/gnome-nettool.profile
index 814751db3..abf3dd759 100644
--- a/etc/profile-a-l/gnome-nettool.profile
+++ b/etc/profile-a-l/gnome-nettool.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-xdg.inc 14include disable-xdg.inc
16 15
diff --git a/etc/profile-a-l/gnome-passwordsafe.profile b/etc/profile-a-l/gnome-passwordsafe.profile
index 763d67b92..a96ec6f05 100644
--- a/etc/profile-a-l/gnome-passwordsafe.profile
+++ b/etc/profile-a-l/gnome-passwordsafe.profile
@@ -13,11 +13,12 @@ noblacklist ${HOME}/*.kdbx
13# Allow python (blacklisted by disable-interpreters.inc) 13# Allow python (blacklisted by disable-interpreters.inc)
14include allow-python3.inc 14include allow-python3.inc
15 15
16blacklist /usr/libexec
17
16include disable-common.inc 18include disable-common.inc
17include disable-devel.inc 19include disable-devel.inc
18include disable-exec.inc 20include disable-exec.inc
19include disable-interpreters.inc 21include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 22include disable-programs.inc
22include disable-shell.inc 23include disable-shell.inc
23include disable-xdg.inc 24include disable-xdg.inc
@@ -52,7 +53,7 @@ disable-mnt
52private-bin gnome-passwordsafe,python3* 53private-bin gnome-passwordsafe,python3*
53private-cache 54private-cache
54private-dev 55private-dev
55private-etc dconf,fonts,gtk-3.0,passwd 56private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload,passwd
56private-tmp 57private-tmp
57 58
58dbus-user filter 59dbus-user filter
diff --git a/etc/profile-a-l/gnome-photos.profile b/etc/profile-a-l/gnome-photos.profile
index 58bf3f349..4fd78eaab 100644
--- a/etc/profile-a-l/gnome-photos.profile
+++ b/etc/profile-a-l/gnome-photos.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19 18
20include whitelist-runuser-common.inc 19include whitelist-runuser-common.inc
diff --git a/etc/profile-a-l/gnome-pie.profile b/etc/profile-a-l/gnome-pie.profile
index 41903b136..6d30213cb 100644
--- a/etc/profile-a-l/gnome-pie.profile
+++ b/etc/profile-a-l/gnome-pie.profile
@@ -12,7 +12,6 @@ noblacklist ${HOME}/.config/gnome-pie
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14#include disable-interpreters.inc 14#include disable-interpreters.inc
15include disable-passwdmgr.inc
16#include disable-programs.inc 15#include disable-programs.inc
17 16
18caps.drop all 17caps.drop all
@@ -35,7 +34,7 @@ shell none
35disable-mnt 34disable-mnt
36private-cache 35private-cache
37private-dev 36private-dev
38private-etc alternatives,fonts,machine-id 37private-etc alternatives,fonts,ld.so.cache,ld.so.preload,machine-id
39private-lib gdk-pixbuf-2.*,gio,gvfs/libgvfscommon.so,libgconf-2.so.*,librsvg-2.so.* 38private-lib gdk-pixbuf-2.*,gio,gvfs/libgvfscommon.so,libgconf-2.so.*,librsvg-2.so.*
40private-tmp 39private-tmp
41 40
diff --git a/etc/profile-a-l/gnome-pomodoro.profile b/etc/profile-a-l/gnome-pomodoro.profile
index c2ba7556d..99d569a04 100644
--- a/etc/profile-a-l/gnome-pomodoro.profile
+++ b/etc/profile-a-l/gnome-pomodoro.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
@@ -45,7 +44,7 @@ disable-mnt
45private-bin gnome-pomodoro 44private-bin gnome-pomodoro
46private-cache 45private-cache
47private-dev 46private-dev
48private-etc dconf,fonts,gtk-3.0,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,localtime,machine-id 47private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,localtime,machine-id
49private-tmp 48private-tmp
50 49
51dbus-user filter 50dbus-user filter
diff --git a/etc/profile-a-l/gnome-recipes.profile b/etc/profile-a-l/gnome-recipes.profile
index 48c98ebe0..b2ce4a92a 100644
--- a/etc/profile-a-l/gnome-recipes.profile
+++ b/etc/profile-a-l/gnome-recipes.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20 19
@@ -48,7 +47,7 @@ shell none
48disable-mnt 47disable-mnt
49private-bin gnome-recipes,tar 48private-bin gnome-recipes,tar
50private-dev 49private-dev
51private-etc alternatives,ca-certificates,crypto-policies,fonts,pki,ssl 50private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.preload,pki,ssl
52private-lib gdk-pixbuf-2.0,gio,gvfs/libgvfscommon.so,libgconf-2.so.*,libgnutls.so.*,libjpeg.so.*,libp11-kit.so.*,libproxy.so.*,librsvg-2.so.* 51private-lib gdk-pixbuf-2.0,gio,gvfs/libgvfscommon.so,libgconf-2.so.*,libgnutls.so.*,libjpeg.so.*,libp11-kit.so.*,libproxy.so.*,librsvg-2.so.*
53private-tmp 52private-tmp
54 53
diff --git a/etc/profile-a-l/gnome-ring.profile b/etc/profile-a-l/gnome-ring.profile
index 78ceb9c4f..7ee01dec1 100644
--- a/etc/profile-a-l/gnome-ring.profile
+++ b/etc/profile-a-l/gnome-ring.profile
@@ -11,7 +11,6 @@ include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16 15
17include whitelist-var-common.inc 16include whitelist-var-common.inc
diff --git a/etc/profile-a-l/gnome-schedule.profile b/etc/profile-a-l/gnome-schedule.profile
index 69c90b33d..8c3db651f 100644
--- a/etc/profile-a-l/gnome-schedule.profile
+++ b/etc/profile-a-l/gnome-schedule.profile
@@ -29,7 +29,6 @@ include disable-common.inc
29include disable-devel.inc 29include disable-devel.inc
30include disable-exec.inc 30include disable-exec.inc
31include disable-interpreters.inc 31include disable-interpreters.inc
32include disable-passwdmgr.inc
33include disable-programs.inc 32include disable-programs.inc
34include disable-xdg.inc 33include disable-xdg.inc
35 34
diff --git a/etc/profile-a-l/gnome-screenshot.profile b/etc/profile-a-l/gnome-screenshot.profile
index b683b6f6c..36c6693a9 100644
--- a/etc/profile-a-l/gnome-screenshot.profile
+++ b/etc/profile-a-l/gnome-screenshot.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
@@ -43,7 +42,7 @@ tracelog
43disable-mnt 42disable-mnt
44private-bin gnome-screenshot 43private-bin gnome-screenshot
45private-dev 44private-dev
46private-etc dconf,fonts,gtk-3.0,localtime,machine-id 45private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload,localtime,machine-id
47private-tmp 46private-tmp
48 47
49dbus-user filter 48dbus-user filter
diff --git a/etc/profile-a-l/gnome-sound-recorder.profile b/etc/profile-a-l/gnome-sound-recorder.profile
index 34f5fdeff..28a0205b9 100644
--- a/etc/profile-a-l/gnome-sound-recorder.profile
+++ b/etc/profile-a-l/gnome-sound-recorder.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-xdg.inc 20include disable-xdg.inc
22 21
@@ -41,5 +40,5 @@ tracelog
41disable-mnt 40disable-mnt
42private-cache 41private-cache
43private-dev 42private-dev
44private-etc alsa,asound.conf,dconf,fonts,gtk-2.0,gtk-3.0,machine-id,openal,pango,pulse,xdg 43private-etc alsa,alternatives,asound.conf,dconf,fonts,gtk-2.0,gtk-3.0,ld.so.cache,ld.so.preload,machine-id,openal,pango,pulse,xdg
45private-tmp 44private-tmp
diff --git a/etc/profile-a-l/gnome-system-log.profile b/etc/profile-a-l/gnome-system-log.profile
index 8a818695d..02b023855 100644
--- a/etc/profile-a-l/gnome-system-log.profile
+++ b/etc/profile-a-l/gnome-system-log.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16include disable-xdg.inc 15include disable-xdg.inc
@@ -44,7 +43,7 @@ disable-mnt
44private-bin gnome-system-log 43private-bin gnome-system-log
45private-cache 44private-cache
46private-dev 45private-dev
47private-etc alternatives,fonts,localtime,machine-id 46private-etc alternatives,fonts,ld.so.cache,ld.so.preload,localtime,machine-id
48private-lib 47private-lib
49private-tmp 48private-tmp
50writable-var-log 49writable-var-log
diff --git a/etc/profile-a-l/gnome-todo.profile b/etc/profile-a-l/gnome-todo.profile
index 3b147cd48..c6cd12250 100644
--- a/etc/profile-a-l/gnome-todo.profile
+++ b/etc/profile-a-l/gnome-todo.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
@@ -47,7 +46,7 @@ disable-mnt
47private-bin gnome-todo 46private-bin gnome-todo
48private-cache 47private-cache
49private-dev 48private-dev
50private-etc dconf,fonts,gtk-3.0,localtime,passwd,xdg 49private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload,localtime,passwd,xdg
51private-tmp 50private-tmp
52 51
53dbus-user filter 52dbus-user filter
diff --git a/etc/profile-a-l/gnome-twitch.profile b/etc/profile-a-l/gnome-twitch.profile
index b8ec195d3..aef6b0fdd 100644
--- a/etc/profile-a-l/gnome-twitch.profile
+++ b/etc/profile-a-l/gnome-twitch.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19mkdir ${HOME}/.cache/gnome-twitch 18mkdir ${HOME}/.cache/gnome-twitch
diff --git a/etc/profile-a-l/gnome-weather.profile b/etc/profile-a-l/gnome-weather.profile
index 2e08fa41d..5592879ec 100644
--- a/etc/profile-a-l/gnome-weather.profile
+++ b/etc/profile-a-l/gnome-weather.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
diff --git a/etc/profile-a-l/gnome_games-common.profile b/etc/profile-a-l/gnome_games-common.profile
index 5627842f5..9b4f68808 100644
--- a/etc/profile-a-l/gnome_games-common.profile
+++ b/etc/profile-a-l/gnome_games-common.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16include disable-xdg.inc 15include disable-xdg.inc
@@ -42,7 +41,7 @@ tracelog
42disable-mnt 41disable-mnt
43private-cache 42private-cache
44private-dev 43private-dev
45private-etc dconf,fonts,gconf,gtk-2.0,gtk-3.0,machine-id,pango,passwd,X11 44private-etc alternatives,dconf,fonts,gconf,gtk-2.0,gtk-3.0,ld.so.cache,ld.so.preload,machine-id,pango,passwd,X11
46private-tmp 45private-tmp
47 46
48dbus-user filter 47dbus-user filter
diff --git a/etc/profile-a-l/gnote.profile b/etc/profile-a-l/gnote.profile
index c3014a288..928f2c548 100644
--- a/etc/profile-a-l/gnote.profile
+++ b/etc/profile-a-l/gnote.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
@@ -22,6 +21,7 @@ mkdir ${HOME}/.config/gnote
22mkdir ${HOME}/.local/share/gnote 21mkdir ${HOME}/.local/share/gnote
23whitelist ${HOME}/.config/gnote 22whitelist ${HOME}/.config/gnote
24whitelist ${HOME}/.local/share/gnote 23whitelist ${HOME}/.local/share/gnote
24whitelist /usr/libexec/webkit2gtk-4.0
25whitelist /usr/share/gnote 25whitelist /usr/share/gnote
26include whitelist-common.inc 26include whitelist-common.inc
27include whitelist-runuser-common.inc 27include whitelist-runuser-common.inc
@@ -51,7 +51,7 @@ disable-mnt
51private-bin gnote 51private-bin gnote
52private-cache 52private-cache
53private-dev 53private-dev
54private-etc dconf,fonts,gtk-3.0,pango,X11 54private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload,pango,X11
55private-tmp 55private-tmp
56 56
57dbus-user filter 57dbus-user filter
diff --git a/etc/profile-a-l/gnubik.profile b/etc/profile-a-l/gnubik.profile
index 22851ce9f..c895b4ce9 100644
--- a/etc/profile-a-l/gnubik.profile
+++ b/etc/profile-a-l/gnubik.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16include disable-xdg.inc 15include disable-xdg.inc
@@ -44,7 +43,7 @@ private
44private-bin gnubik 43private-bin gnubik
45private-cache 44private-cache
46private-dev 45private-dev
47private-etc drirc,fonts,gtk-2.0 46private-etc alternatives,drirc,fonts,gtk-2.0,ld.so.cache,ld.so.preload
48private-tmp 47private-tmp
49 48
50dbus-user none 49dbus-user none
diff --git a/etc/profile-a-l/godot.profile b/etc/profile-a-l/godot.profile
index 09ca17caa..46b362db9 100644
--- a/etc/profile-a-l/godot.profile
+++ b/etc/profile-a-l/godot.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
@@ -39,7 +38,7 @@ tracelog
39# private-bin godot 38# private-bin godot
40private-cache 39private-cache
41private-dev 40private-dev
42private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,drirc,fonts,machine-id,mono,nsswitch.conf,openal,pki,pulse,resolv.conf,ssl 41private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,drirc,fonts,ld.so.cache,ld.so.preload,machine-id,mono,nsswitch.conf,openal,pki,pulse,resolv.conf,ssl
43private-tmp 42private-tmp
44 43
45dbus-user none 44dbus-user none
diff --git a/etc/profile-a-l/goldendict.profile b/etc/profile-a-l/goldendict.profile
new file mode 100644
index 000000000..cffb03d57
--- /dev/null
+++ b/etc/profile-a-l/goldendict.profile
@@ -0,0 +1,58 @@
1# Firejail profile for goldendict
2# This file is overwritten after every install/update
3# Persistent local customizations
4include goldendict.local
5# Persistent global definitions
6include globals.local
7
8noblacklist ${HOME}/.goldendict
9noblacklist ${HOME}/.cache/GoldenDict
10
11include disable-common.inc
12include disable-devel.inc
13include disable-exec.inc
14include disable-interpreters.inc
15include disable-programs.inc
16include disable-shell.inc
17include disable-xdg.inc
18
19mkdir ${HOME}/.goldendict
20mkdir ${HOME}/.cache/GoldenDict
21whitelist ${HOME}/.goldendict
22whitelist ${HOME}/.cache/GoldenDict
23whitelist /usr/share/goldendict
24# The default path of dictionaries
25whitelist /usr/share/stardict/dic
26include whitelist-common.inc
27include whitelist-runuser-common.inc
28include whitelist-usr-share-common.inc
29include whitelist-var-common.inc
30
31apparmor
32caps.drop all
33netfilter
34# no3d leads to the libGL MESA-LOADER errors
35#no3d
36nodvd
37nogroups
38noinput
39nonewprivs
40noroot
41notv
42nou2f
43novideo
44protocol unix,inet,inet6,netlink
45seccomp
46seccomp.block-secondary
47shell none
48tracelog
49
50disable-mnt
51private-bin goldendict
52private-cache
53private-dev
54private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.preload,machine-id,nsswitch.conf,pki,resolv.conf,ssl
55private-tmp
56
57dbus-user none
58dbus-system none
diff --git a/etc/profile-a-l/goobox.profile b/etc/profile-a-l/goobox.profile
index 8399d77c4..2ff3bc8d9 100644
--- a/etc/profile-a-l/goobox.profile
+++ b/etc/profile-a-l/goobox.profile
@@ -11,7 +11,6 @@ noblacklist ${MUSIC}
11include disable-common.inc 11include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-xdg.inc 15include disable-xdg.inc
17 16
diff --git a/etc/profile-a-l/google-chrome-beta.profile b/etc/profile-a-l/google-chrome-beta.profile
index ebe5e870b..fed227b06 100644
--- a/etc/profile-a-l/google-chrome-beta.profile
+++ b/etc/profile-a-l/google-chrome-beta.profile
@@ -6,7 +6,6 @@ include google-chrome-beta.local
6include globals.local 6include globals.local
7 7
8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565 8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565
9ignore whitelist /usr/share/chromium
10ignore include whitelist-runuser-common.inc 9ignore include whitelist-runuser-common.inc
11ignore include whitelist-usr-share-common.inc 10ignore include whitelist-usr-share-common.inc
12 11
diff --git a/etc/profile-a-l/google-chrome-unstable.profile b/etc/profile-a-l/google-chrome-unstable.profile
index 4d303f71b..91962c62a 100644
--- a/etc/profile-a-l/google-chrome-unstable.profile
+++ b/etc/profile-a-l/google-chrome-unstable.profile
@@ -6,7 +6,6 @@ include google-chrome-unstable.local
6include globals.local 6include globals.local
7 7
8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565 8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565
9ignore whitelist /usr/share/chromium
10ignore include whitelist-runuser-common.inc 9ignore include whitelist-runuser-common.inc
11ignore include whitelist-usr-share-common.inc 10ignore include whitelist-usr-share-common.inc
12 11
diff --git a/etc/profile-a-l/google-chrome.profile b/etc/profile-a-l/google-chrome.profile
index ed2595f72..7a4cb5fc9 100644
--- a/etc/profile-a-l/google-chrome.profile
+++ b/etc/profile-a-l/google-chrome.profile
@@ -6,7 +6,6 @@ include google-chrome.local
6include globals.local 6include globals.local
7 7
8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565 8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565
9ignore whitelist /usr/share/chromium
10ignore include whitelist-runuser-common.inc 9ignore include whitelist-runuser-common.inc
11ignore include whitelist-usr-share-common.inc 10ignore include whitelist-usr-share-common.inc
12 11
diff --git a/etc/profile-a-l/google-earth.profile b/etc/profile-a-l/google-earth.profile
index 65ac04771..0153a58d1 100644
--- a/etc/profile-a-l/google-earth.profile
+++ b/etc/profile-a-l/google-earth.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18mkdir ${HOME}/.config/Google 17mkdir ${HOME}/.config/Google
diff --git a/etc/profile-a-l/google-play-music-desktop-player.profile b/etc/profile-a-l/google-play-music-desktop-player.profile
index a7aabe105..fe61d727e 100644
--- a/etc/profile-a-l/google-play-music-desktop-player.profile
+++ b/etc/profile-a-l/google-play-music-desktop-player.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19 18
20mkdir ${HOME}/.config/Google Play Music Desktop Player 19mkdir ${HOME}/.config/Google Play Music Desktop Player
diff --git a/etc/profile-a-l/googler-common.profile b/etc/profile-a-l/googler-common.profile
new file mode 100644
index 000000000..a35813a09
--- /dev/null
+++ b/etc/profile-a-l/googler-common.profile
@@ -0,0 +1,61 @@
1# Firejail profile for googler clones
2# Description: common profile for googler clones
3# This file is overwritten after every install/update
4# Persistent local customizations
5include googler-common.local
6# Persistent global definitions
7# added by caller profile
8#include globals.local
9
10blacklist /tmp/.X11-unix
11blacklist ${RUNUSER}
12
13noblacklist ${HOME}/.w3m
14
15# Allow /bin/sh (blacklisted by disable-shell.inc)
16include allow-bin-sh.inc
17# Allow python (blacklisted by disable-interpreters.inc)
18include allow-python3.inc
19
20include disable-common.inc
21include disable-devel.inc
22include disable-exec.inc
23include disable-interpreters.inc
24include disable-programs.inc
25include disable-shell.inc
26include disable-xdg.inc
27
28whitelist ${HOME}/.w3m
29include whitelist-usr-share-common.inc
30include whitelist-var-common.inc
31
32apparmor
33caps.drop all
34ipc-namespace
35machine-id
36netfilter
37no3d
38nodvd
39nogroups
40noinput
41nonewprivs
42noroot
43nosound
44notv
45nou2f
46novideo
47protocol unix,inet,inet6
48seccomp
49seccomp.block-secondary
50shell none
51tracelog
52
53disable-mnt
54private-bin env,python3*,sh,w3m
55private-cache
56private-dev
57private-etc alternatives,ca-certificates,crypto-policies,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,nsswitch.conf,pki,protocols,resolv.conf,rpc,services,ssl
58private-tmp
59
60dbus-user none
61dbus-system none
diff --git a/etc/profile-a-l/googler.profile b/etc/profile-a-l/googler.profile
new file mode 100644
index 000000000..9d67006f6
--- /dev/null
+++ b/etc/profile-a-l/googler.profile
@@ -0,0 +1,13 @@
1# Firejail profile for googler
2# Description: Search Google from your terminal
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include googler.local
7# Persistent global definitions
8include globals.local
9
10private-bin googler
11
12# Redirect
13include googler-common.profile
diff --git a/etc/profile-a-l/gpa.profile b/etc/profile-a-l/gpa.profile
index 37b4f0b1c..091851fa8 100644
--- a/etc/profile-a-l/gpa.profile
+++ b/etc/profile-a-l/gpa.profile
@@ -11,7 +11,6 @@ noblacklist ${HOME}/.gnupg
11include disable-common.inc 11include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16 15
17caps.drop all 16caps.drop all
diff --git a/etc/profile-a-l/gpg-agent.profile b/etc/profile-a-l/gpg-agent.profile
index 7f0b614b1..c6ecef5ec 100644
--- a/etc/profile-a-l/gpg-agent.profile
+++ b/etc/profile-a-l/gpg-agent.profile
@@ -15,7 +15,6 @@ blacklist ${RUNUSER}/wayland-*
15include disable-common.inc 15include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-xdg.inc 19include disable-xdg.inc
21 20
diff --git a/etc/profile-a-l/gpg.profile b/etc/profile-a-l/gpg.profile
index 4a4d6527c..cf58ebdb0 100644
--- a/etc/profile-a-l/gpg.profile
+++ b/etc/profile-a-l/gpg.profile
@@ -15,7 +15,6 @@ blacklist ${RUNUSER}/wayland-*
15include disable-common.inc 15include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20 19
21whitelist ${RUNUSER}/gnupg 20whitelist ${RUNUSER}/gnupg
diff --git a/etc/profile-a-l/gpicview.profile b/etc/profile-a-l/gpicview.profile
index fa53c26c8..26afe6e49 100644
--- a/etc/profile-a-l/gpicview.profile
+++ b/etc/profile-a-l/gpicview.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18 17
@@ -42,7 +41,7 @@ tracelog
42private-bin gpicview 41private-bin gpicview
43private-cache 42private-cache
44private-dev 43private-dev
45private-etc alternatives,fonts,group,passwd 44private-etc alternatives,fonts,group,ld.so.cache,ld.so.preload,passwd
46private-lib 45private-lib
47private-tmp 46private-tmp
48 47
diff --git a/etc/profile-a-l/gpredict.profile b/etc/profile-a-l/gpredict.profile
index 253d644f1..511be6fcc 100644
--- a/etc/profile-a-l/gpredict.profile
+++ b/etc/profile-a-l/gpredict.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18 17
@@ -37,6 +36,6 @@ tracelog
37 36
38private-bin gpredict 37private-bin gpredict
39private-dev 38private-dev
40private-etc alternatives,ca-certificates,crypto-policies,fonts,pki,resolv.conf,ssl 39private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.preload,pki,resolv.conf,ssl
41private-tmp 40private-tmp
42 41
diff --git a/etc/profile-a-l/gradio.profile b/etc/profile-a-l/gradio.profile
index 2b4c536d2..9cc25e45c 100644
--- a/etc/profile-a-l/gradio.profile
+++ b/etc/profile-a-l/gradio.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
@@ -46,7 +45,7 @@ disable-mnt
46private-bin gradio 45private-bin gradio
47private-cache 46private-cache
48private-dev 47private-dev
49private-etc alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-3.0,host.conf,hostname,hosts,machine-id,pki,pulse,resolv.conf,ssl,xdg 48private-etc alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,machine-id,pki,pulse,resolv.conf,ssl,xdg
50private-tmp 49private-tmp
51 50
52dbus-user filter 51dbus-user filter
diff --git a/etc/profile-a-l/gramps.profile b/etc/profile-a-l/gramps.profile
index c7e0c2977..4baca353b 100644
--- a/etc/profile-a-l/gramps.profile
+++ b/etc/profile-a-l/gramps.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-xdg.inc 20include disable-xdg.inc
22 21
diff --git a/etc/profile-a-l/gravity-beams-and-evaporating-stars.profile b/etc/profile-a-l/gravity-beams-and-evaporating-stars.profile
index 890ba2560..d76ca105f 100644
--- a/etc/profile-a-l/gravity-beams-and-evaporating-stars.profile
+++ b/etc/profile-a-l/gravity-beams-and-evaporating-stars.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16include disable-xdg.inc 15include disable-xdg.inc
@@ -41,7 +40,7 @@ private
41private-bin gravity-beams-and-evaporating-stars 40private-bin gravity-beams-and-evaporating-stars
42private-cache 41private-cache
43private-dev 42private-dev
44private-etc fonts,machine-id 43private-etc alternatives,fonts,ld.so.cache,ld.so.preload,machine-id
45private-tmp 44private-tmp
46 45
47dbus-user none 46dbus-user none
diff --git a/etc/profile-a-l/gthumb.profile b/etc/profile-a-l/gthumb.profile
index 5927e8c4d..4218f8545 100644
--- a/etc/profile-a-l/gthumb.profile
+++ b/etc/profile-a-l/gthumb.profile
@@ -13,7 +13,6 @@ noblacklist ${HOME}/.steam
13include disable-common.inc 13include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19 18
diff --git a/etc/profile-a-l/gtk-pipe-viewer.profile b/etc/profile-a-l/gtk-pipe-viewer.profile
new file mode 100644
index 000000000..9c212ff6e
--- /dev/null
+++ b/etc/profile-a-l/gtk-pipe-viewer.profile
@@ -0,0 +1,12 @@
1# Firejail profile for gtk-pipe-viewer
2# Description: Gtk front-end to pipe-viewer
3# This file is overwritten after every install/update
4# Persistent local customizations
5include gtk-pipe-viewer.local
6# added by included profile
7#include globals.local
8
9ignore quiet
10
11# Redirect
12include pipe-viewer.profile
diff --git a/etc/profile-a-l/gtk-straw-viewer.profile b/etc/profile-a-l/gtk-straw-viewer.profile
index e2721360b..978b3d896 100644
--- a/etc/profile-a-l/gtk-straw-viewer.profile
+++ b/etc/profile-a-l/gtk-straw-viewer.profile
@@ -8,7 +8,5 @@ include gtk-straw-viewer.local
8 8
9ignore quiet 9ignore quiet
10 10
11include whitelist-runuser-common.inc
12
13# Redirect 11# Redirect
14include straw-viewer.profile 12include straw-viewer.profile
diff --git a/etc/profile-a-l/gtk-update-icon-cache.profile b/etc/profile-a-l/gtk-update-icon-cache.profile
index c8addae75..ec8a614fd 100644
--- a/etc/profile-a-l/gtk-update-icon-cache.profile
+++ b/etc/profile-a-l/gtk-update-icon-cache.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
@@ -47,7 +46,7 @@ disable-mnt
47private-bin gtk-update-icon-cache 46private-bin gtk-update-icon-cache
48private-cache 47private-cache
49private-dev 48private-dev
50private-etc none 49private-etc alternatives,ld.so.cache,ld.so.preload
51private-lib 50private-lib
52private-tmp 51private-tmp
53 52
diff --git a/etc/profile-a-l/gtk-youtube-viewer.profile b/etc/profile-a-l/gtk-youtube-viewer.profile
index 848979b52..c814f0fef 100644
--- a/etc/profile-a-l/gtk-youtube-viewer.profile
+++ b/etc/profile-a-l/gtk-youtube-viewer.profile
@@ -8,7 +8,5 @@ include gtk-youtube-viewer.local
8 8
9ignore quiet 9ignore quiet
10 10
11include whitelist-runuser-common.inc
12
13# Redirect 11# Redirect
14include youtube-viewer.profile 12include youtube-viewer.profile
diff --git a/etc/profile-a-l/guayadeque.profile b/etc/profile-a-l/guayadeque.profile
index 3d2b71e9d..39fb177dd 100644
--- a/etc/profile-a-l/guayadeque.profile
+++ b/etc/profile-a-l/guayadeque.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
diff --git a/etc/profile-a-l/gucharmap.profile b/etc/profile-a-l/gucharmap.profile
index 6adb79852..d47000e89 100644
--- a/etc/profile-a-l/gucharmap.profile
+++ b/etc/profile-a-l/gucharmap.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16include disable-xdg.inc 15include disable-xdg.inc
diff --git a/etc/profile-a-l/gunzip.profile b/etc/profile-a-l/gunzip.profile
index 6e97c6b78..584d88f85 100644
--- a/etc/profile-a-l/gunzip.profile
+++ b/etc/profile-a-l/gunzip.profile
@@ -7,5 +7,7 @@ include gunzip.local
7# added by included profile 7# added by included profile
8#include globals.local 8#include globals.local
9 9
10include allow-bin-sh.inc
11
10# Redirect 12# Redirect
11include gzip.profile 13include gzip.profile
diff --git a/etc/profile-a-l/guvcview.profile b/etc/profile-a-l/guvcview.profile
index 9221ca31c..8ddde3c47 100644
--- a/etc/profile-a-l/guvcview.profile
+++ b/etc/profile-a-l/guvcview.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-shell.inc 19include disable-shell.inc
21include disable-xdg.inc 20include disable-xdg.inc
diff --git a/etc/profile-a-l/gwenview.profile b/etc/profile-a-l/gwenview.profile
index d33e2a673..d98d341ae 100644
--- a/etc/profile-a-l/gwenview.profile
+++ b/etc/profile-a-l/gwenview.profile
@@ -22,10 +22,10 @@ include disable-common.inc
22include disable-devel.inc 22include disable-devel.inc
23include disable-exec.inc 23include disable-exec.inc
24include disable-interpreters.inc 24include disable-interpreters.inc
25include disable-passwdmgr.inc
26include disable-programs.inc 25include disable-programs.inc
27include disable-shell.inc 26include disable-shell.inc
28 27
28include whitelist-run-common.inc
29include whitelist-var-common.inc 29include whitelist-var-common.inc
30 30
31apparmor 31apparmor
@@ -47,7 +47,7 @@ shell none
47 47
48private-bin gimp*,gwenview,kbuildsycoca4,kdeinit4 48private-bin gimp*,gwenview,kbuildsycoca4,kdeinit4
49private-dev 49private-dev
50private-etc alternatives,fonts,gimp,gtk-2.0,kde4rc,kde5rc,ld.so.cache,machine-id,passwd,pulse,xdg 50private-etc alternatives,fonts,gimp,gtk-2.0,kde4rc,kde5rc,ld.so.cache,ld.so.preload,machine-id,passwd,pulse,xdg
51 51
52# dbus-user none 52# dbus-user none
53# dbus-system none 53# dbus-system none
diff --git a/etc/profile-a-l/handbrake.profile b/etc/profile-a-l/handbrake.profile
index 847e1ec1e..9ad9aef33 100644
--- a/etc/profile-a-l/handbrake.profile
+++ b/etc/profile-a-l/handbrake.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
diff --git a/etc/profile-a-l/hashcat.profile b/etc/profile-a-l/hashcat.profile
index aab4b0c21..3be349176 100644
--- a/etc/profile-a-l/hashcat.profile
+++ b/etc/profile-a-l/hashcat.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
diff --git a/etc/profile-a-l/hasher-common.profile b/etc/profile-a-l/hasher-common.profile
index 44584f26b..8c1ada1d1 100644
--- a/etc/profile-a-l/hasher-common.profile
+++ b/etc/profile-a-l/hasher-common.profile
@@ -17,7 +17,6 @@ blacklist ${RUNUSER}
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21# Add the next line to your hasher-common.local if you don't need to hash files in disable-programs.inc. 20# Add the next line to your hasher-common.local if you don't need to hash files in disable-programs.inc.
22#include disable-programs.inc 21#include disable-programs.inc
23include disable-shell.inc 22include disable-shell.inc
diff --git a/etc/profile-a-l/hedgewars.profile b/etc/profile-a-l/hedgewars.profile
index c0675d8ec..9c6f162c6 100644
--- a/etc/profile-a-l/hedgewars.profile
+++ b/etc/profile-a-l/hedgewars.profile
@@ -13,7 +13,6 @@ include allow-lua.inc
13include disable-common.inc 13include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19mkdir ${HOME}/.hedgewars 18mkdir ${HOME}/.hedgewars
diff --git a/etc/profile-a-l/hexchat.profile b/etc/profile-a-l/hexchat.profile
index f72af0b4a..88448ad45 100644
--- a/etc/profile-a-l/hexchat.profile
+++ b/etc/profile-a-l/hexchat.profile
@@ -8,6 +8,9 @@ include globals.local
8 8
9noblacklist ${HOME}/.config/hexchat 9noblacklist ${HOME}/.config/hexchat
10 10
11# Allow /bin/sh (blacklisted by disable-shell.inc)
12include allow-bin-sh.inc
13
11# Allow perl (blacklisted by disable-interpreters.inc) 14# Allow perl (blacklisted by disable-interpreters.inc)
12include allow-perl.inc 15include allow-perl.inc
13 16
@@ -19,7 +22,6 @@ include disable-common.inc
19include disable-devel.inc 22include disable-devel.inc
20include disable-exec.inc 23include disable-exec.inc
21include disable-interpreters.inc 24include disable-interpreters.inc
22include disable-passwdmgr.inc
23include disable-programs.inc 25include disable-programs.inc
24include disable-shell.inc 26include disable-shell.inc
25include disable-xdg.inc 27include disable-xdg.inc
@@ -48,7 +50,7 @@ tracelog
48 50
49disable-mnt 51disable-mnt
50# debug note: private-bin requires perl, python, etc on some systems 52# debug note: private-bin requires perl, python, etc on some systems
51private-bin hexchat,python* 53private-bin hexchat,python*,sh
52private-dev 54private-dev
53#private-lib - python problems 55#private-lib - python problems
54private-tmp 56private-tmp
diff --git a/etc/profile-a-l/highlight.profile b/etc/profile-a-l/highlight.profile
index 643736ac7..97f190723 100644
--- a/etc/profile-a-l/highlight.profile
+++ b/etc/profile-a-l/highlight.profile
@@ -8,10 +8,12 @@ include globals.local
8 8
9blacklist ${RUNUSER} 9blacklist ${RUNUSER}
10 10
11# Allow lua (blacklisted by disable-interpreters.inc)
12include allow-lua.inc
13
11include disable-common.inc 14include disable-common.inc
12include disable-devel.inc 15include disable-devel.inc
13include disable-interpreters.inc 16include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 17include disable-programs.inc
16include disable-shell.inc 18include disable-shell.inc
17 19
diff --git a/etc/profile-a-l/homebank.profile b/etc/profile-a-l/homebank.profile
index 199b1a5e5..f2dac5881 100644
--- a/etc/profile-a-l/homebank.profile
+++ b/etc/profile-a-l/homebank.profile
@@ -13,7 +13,6 @@ include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-programs.inc 15include disable-programs.inc
16include disable-passwdmgr.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-a-l/host.profile b/etc/profile-a-l/host.profile
index 00d9f7a76..984e90e1f 100644
--- a/etc/profile-a-l/host.profile
+++ b/etc/profile-a-l/host.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
diff --git a/etc/profile-a-l/hugin.profile b/etc/profile-a-l/hugin.profile
index 267712c87..0a9c831f3 100644
--- a/etc/profile-a-l/hugin.profile
+++ b/etc/profile-a-l/hugin.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
diff --git a/etc/profile-a-l/hyperrogue.profile b/etc/profile-a-l/hyperrogue.profile
index e66ffd7e1..498853b5d 100644
--- a/etc/profile-a-l/hyperrogue.profile
+++ b/etc/profile-a-l/hyperrogue.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -43,9 +42,9 @@ tracelog
43disable-mnt 42disable-mnt
44private-bin hyperrogue 43private-bin hyperrogue
45private-cache 44private-cache
46private-cwd ${HOME} 45private-cwd
47private-dev 46private-dev
48private-etc fonts,machine-id 47private-etc alternatives,fonts,ld.so.cache,ld.so.preload,machine-id
49private-tmp 48private-tmp
50 49
51dbus-user none 50dbus-user none
diff --git a/etc/profile-a-l/i2prouter.profile b/etc/profile-a-l/i2prouter.profile
index 47c984175..200b4c8b1 100644
--- a/etc/profile-a-l/i2prouter.profile
+++ b/etc/profile-a-l/i2prouter.profile
@@ -28,7 +28,6 @@ include disable-common.inc
28include disable-devel.inc 28include disable-devel.inc
29include disable-exec.inc 29include disable-exec.inc
30include disable-interpreters.inc 30include disable-interpreters.inc
31include disable-passwdmgr.inc
32include disable-programs.inc 31include disable-programs.inc
33include disable-xdg.inc 32include disable-xdg.inc
34 33
@@ -69,5 +68,5 @@ shell none
69disable-mnt 68disable-mnt
70private-cache 69private-cache
71private-dev 70private-dev
72private-etc alternatives,ca-certificates,crypto-policies,dconf,group,hostname,hosts,i2p,java-10-openjdk,java-11-openjdk,java-12-openjdk,java-13-openjdk,java-8-openjdk,java-9-openjdk,java-openjdk,ld.so.cache,localtime,machine-id,nsswitch.conf,passwd,pki,resolv.conf,ssl 71private-etc alternatives,ca-certificates,crypto-policies,dconf,group,hostname,hosts,i2p,java-10-openjdk,java-11-openjdk,java-12-openjdk,java-13-openjdk,java-8-openjdk,java-9-openjdk,java-openjdk,ld.so.cache,ld.so.preload,localtime,machine-id,nsswitch.conf,passwd,pki,resolv.conf,ssl
73private-tmp 72private-tmp
diff --git a/etc/profile-a-l/iagno.profile b/etc/profile-a-l/iagno.profile
index 363d3dc2e..863dc8acf 100644
--- a/etc/profile-a-l/iagno.profile
+++ b/etc/profile-a-l/iagno.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16 15
diff --git a/etc/profile-a-l/idea.sh.profile b/etc/profile-a-l/idea.sh.profile
index 680b8e777..7716a5f1a 100644
--- a/etc/profile-a-l/idea.sh.profile
+++ b/etc/profile-a-l/idea.sh.profile
@@ -19,7 +19,6 @@ include allow-common-devel.inc
19include allow-ssh.inc 19include allow-ssh.inc
20 20
21include disable-common.inc 21include disable-common.inc
22include disable-passwdmgr.inc
23include disable-programs.inc 22include disable-programs.inc
24 23
25caps.drop all 24caps.drop all
diff --git a/etc/profile-a-l/imagej.profile b/etc/profile-a-l/imagej.profile
index 12ce7976b..4da127fab 100644
--- a/etc/profile-a-l/imagej.profile
+++ b/etc/profile-a-l/imagej.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20 19
21caps.drop all 20caps.drop all
diff --git a/etc/profile-a-l/img2txt.profile b/etc/profile-a-l/img2txt.profile
index c26958d06..dd08e46f5 100644
--- a/etc/profile-a-l/img2txt.profile
+++ b/etc/profile-a-l/img2txt.profile
@@ -1,5 +1,6 @@
1# Firejail profile for img2txt 1# Firejail profile for img2txt
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 img2txt.local 5include img2txt.local
5# Persistent global definitions 6# Persistent global definitions
@@ -14,7 +15,6 @@ include disable-common.inc
14include disable-devel.inc 15include disable-devel.inc
15include disable-exec.inc 16include disable-exec.inc
16include disable-interpreters.inc 17include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 18include disable-programs.inc
19include disable-xdg.inc 19include disable-xdg.inc
20 20
diff --git a/etc/profile-a-l/impressive.profile b/etc/profile-a-l/impressive.profile
index c152be01c..31ad641c1 100644
--- a/etc/profile-a-l/impressive.profile
+++ b/etc/profile-a-l/impressive.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-xdg.inc 22include disable-xdg.inc
24 23
diff --git a/etc/profile-a-l/imv.profile b/etc/profile-a-l/imv.profile
new file mode 100644
index 000000000..65e7537bf
--- /dev/null
+++ b/etc/profile-a-l/imv.profile
@@ -0,0 +1,57 @@
1# Firejail profile for imv
2# Description: imv is an image viewer.
3# This file is overwritten after every install/update
4# Persistent local customizations
5include imv.local
6# Persistent global definitions
7include globals.local
8
9include allow-bin-sh.inc
10
11blacklist /usr/libexec
12
13include disable-common.inc
14include disable-devel.inc
15include disable-exec.inc
16include disable-interpreters.inc
17include disable-programs.inc
18include disable-shell.inc
19include disable-write-mnt.inc
20# Users may want to view images in ${HOME}
21#include disable-xdg.inc
22
23# Users may want to view images in ${HOME}
24#include whitelist-common.inc
25include whitelist-run-common.inc
26include whitelist-runuser-common.inc
27# Users may want to view images in /usr/share
28#include whitelist-usr-share-common.inc
29include whitelist-var-common.inc
30
31apparmor
32caps.drop all
33net none
34nodvd
35nogroups
36noinput
37nonewprivs
38noroot
39nosound
40notv
41nou2f
42novideo
43protocol unix
44seccomp
45seccomp.block-secondary
46shell none
47tracelog
48
49private-bin imv,imv-wayland,imv-x11,sh
50private-cache
51private-dev
52private-tmp
53
54dbus-user none
55dbus-system none
56
57read-only ${HOME}
diff --git a/etc/profile-a-l/inkscape.profile b/etc/profile-a-l/inkscape.profile
index 35dd86b32..016a4d6c8 100644
--- a/etc/profile-a-l/inkscape.profile
+++ b/etc/profile-a-l/inkscape.profile
@@ -1,6 +1,7 @@
1# Firejail profile for inkscape 1# Firejail profile for inkscape
2# Description: Vector-based drawing program 2# Description: Vector-based drawing program
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 inkscape.local 6include inkscape.local
6# Persistent global definitions 7# Persistent global definitions
@@ -24,11 +25,11 @@ include disable-common.inc
24include disable-devel.inc 25include disable-devel.inc
25include disable-exec.inc 26include disable-exec.inc
26include disable-interpreters.inc 27include disable-interpreters.inc
27include disable-passwdmgr.inc
28include disable-programs.inc 28include disable-programs.inc
29include disable-xdg.inc 29include disable-xdg.inc
30 30
31whitelist /usr/share/inkscape 31whitelist /usr/share/inkscape
32include whitelist-run-common.inc
32include whitelist-usr-share-common.inc 33include whitelist-usr-share-common.inc
33include whitelist-var-common.inc 34include whitelist-var-common.inc
34 35
diff --git a/etc/profile-a-l/io.github.lainsce.Notejot.profile b/etc/profile-a-l/io.github.lainsce.Notejot.profile
new file mode 100644
index 000000000..6753cb332
--- /dev/null
+++ b/etc/profile-a-l/io.github.lainsce.Notejot.profile
@@ -0,0 +1,60 @@
1# Firejail profile for notejot
2# Description: Jot your ideas
3# This file is overwritten after every install/update
4# Persistent local customizations
5include io.github.lainsce.Notejot.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.cache/io.github.lainsce.Notejot
10noblacklist ${HOME}/.local/share/io.github.lainsce.Notejot
11
12include disable-common.inc
13include disable-devel.inc
14include disable-exec.inc
15include disable-interpreters.inc
16include disable-programs.inc
17include disable-shell.inc
18include disable-xdg.inc
19
20mkdir ${HOME}/.cache/io.github.lainsce.Notejot
21mkdir ${HOME}/.local/share/io.github.lainsce.Notejot
22whitelist ${HOME}/.cache/io.github.lainsce.Notejot
23whitelist ${HOME}/.local/share/io.github.lainsce.Notejot
24whitelist /usr/libexec/webkit2gtk-4.0
25include whitelist-common.inc
26include whitelist-runuser-common.inc
27include whitelist-usr-share-common.inc
28include whitelist-var-common.inc
29
30apparmor
31caps.drop all
32machine-id
33net none
34no3d
35nodvd
36nogroups
37noinput
38nonewprivs
39noroot
40nosound
41notv
42nou2f
43novideo
44protocol unix
45seccomp
46seccomp.block-secondary
47shell none
48tracelog
49
50disable-mnt
51private-bin io.github.lainsce.Notejot
52private-cache
53private-dev
54private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,pango,X11
55private-tmp
56
57dbus-user filter
58dbus-user.own io.github.lainsce.Notejot
59dbus-user.talk ca.desrt.dconf
60dbus-system none
diff --git a/etc/profile-a-l/ipcalc.profile b/etc/profile-a-l/ipcalc.profile
index 791065c1a..6eefd2945 100644
--- a/etc/profile-a-l/ipcalc.profile
+++ b/etc/profile-a-l/ipcalc.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18# include disable-shell.inc 17# include disable-shell.inc
19include disable-write-mnt.inc 18include disable-write-mnt.inc
@@ -51,7 +50,7 @@ private-bin bash,ipcalc,ipcalc-ng,perl,sh
51# private-cache 50# private-cache
52private-dev 51private-dev
53# empty etc directory 52# empty etc directory
54private-etc none 53private-etc alternatives,ld.so.cache,ld.so.preload
55private-lib 54private-lib
56private-opt none 55private-opt none
57private-tmp 56private-tmp
diff --git a/etc/profile-a-l/iridium.profile b/etc/profile-a-l/iridium.profile
index 3037d00e9..ebb39b0a3 100644
--- a/etc/profile-a-l/iridium.profile
+++ b/etc/profile-a-l/iridium.profile
@@ -5,11 +5,6 @@ include iridium.local
5# Persistent global definitions 5# Persistent global definitions
6include globals.local 6include globals.local
7 7
8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565
9ignore whitelist /usr/share/chromium
10ignore include whitelist-runuser-common.inc
11ignore include whitelist-usr-share-common.inc
12
13noblacklist ${HOME}/.cache/iridium 8noblacklist ${HOME}/.cache/iridium
14noblacklist ${HOME}/.config/iridium 9noblacklist ${HOME}/.config/iridium
15 10
diff --git a/etc/profile-a-l/itch.profile b/etc/profile-a-l/itch.profile
index e02dcbdb1..37cde1577 100644
--- a/etc/profile-a-l/itch.profile
+++ b/etc/profile-a-l/itch.profile
@@ -14,7 +14,6 @@ noblacklist ${HOME}/.config/itch
14include disable-common.inc 14include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19 18
20mkdir ${HOME}/.itch 19mkdir ${HOME}/.itch
diff --git a/etc/profile-a-l/jami-gnome.profile b/etc/profile-a-l/jami-gnome.profile
index 3e9abf369..5c4cc74c2 100644
--- a/etc/profile-a-l/jami-gnome.profile
+++ b/etc/profile-a-l/jami-gnome.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15#include disable-interpreters.inc 15#include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19mkdir ${HOME}/.config/jami 18mkdir ${HOME}/.config/jami
diff --git a/etc/profile-a-l/jd-gui.profile b/etc/profile-a-l/jd-gui.profile
index 7d29f1068..37f99c2f0 100644
--- a/etc/profile-a-l/jd-gui.profile
+++ b/etc/profile-a-l/jd-gui.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
diff --git a/etc/profile-a-l/jerry.profile b/etc/profile-a-l/jerry.profile
index 85b1f2120..6ca977512 100644
--- a/etc/profile-a-l/jerry.profile
+++ b/etc/profile-a-l/jerry.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
@@ -35,7 +34,7 @@ tracelog
35 34
36private-bin bash,jerry,sh,stockfish 35private-bin bash,jerry,sh,stockfish
37private-dev 36private-dev
38private-etc fonts,gtk-2.0,gtk-3.0 37private-etc alternatives,fonts,gtk-2.0,gtk-3.0,ld.so.cache,ld.so.preload
39private-tmp 38private-tmp
40 39
41dbus-user none 40dbus-user none
diff --git a/etc/profile-a-l/jitsi.profile b/etc/profile-a-l/jitsi.profile
index 223c360b8..0e578909a 100644
--- a/etc/profile-a-l/jitsi.profile
+++ b/etc/profile-a-l/jitsi.profile
@@ -13,7 +13,6 @@ include allow-java.inc
13include disable-common.inc 13include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19caps.drop all 18caps.drop all
diff --git a/etc/profile-a-l/jumpnbump-menu.profile b/etc/profile-a-l/jumpnbump-menu.profile
index 8d391b90f..59d762f55 100644
--- a/etc/profile-a-l/jumpnbump-menu.profile
+++ b/etc/profile-a-l/jumpnbump-menu.profile
@@ -10,7 +10,7 @@ include jumpnbump-menu.local
10# Allow python (blacklisted by disable-interpreters.inc) 10# Allow python (blacklisted by disable-interpreters.inc)
11include allow-python3.inc 11include allow-python3.inc
12 12
13private-bin jumpnbump-menu,python3* 13private-bin env,jumpnbump-menu,python3*
14 14
15# Redirect 15# Redirect
16include jumpnbump.profile 16include jumpnbump.profile
diff --git a/etc/profile-a-l/jumpnbump.profile b/etc/profile-a-l/jumpnbump.profile
index 9954b8aea..4a9232344 100644
--- a/etc/profile-a-l/jumpnbump.profile
+++ b/etc/profile-a-l/jumpnbump.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
@@ -28,7 +27,6 @@ caps.drop all
28net none 27net none
29nodvd 28nodvd
30nogroups 29nogroups
31noinput
32nonewprivs 30nonewprivs
33noroot 31noroot
34notv 32notv
@@ -43,7 +41,7 @@ disable-mnt
43private-bin jumpnbump 41private-bin jumpnbump
44private-cache 42private-cache
45private-dev 43private-dev
46private-etc none 44private-etc alternatives,ld.so.cache,ld.so.preload
47private-tmp 45private-tmp
48 46
49dbus-user none 47dbus-user none
diff --git a/etc/profile-a-l/k3b.profile b/etc/profile-a-l/k3b.profile
index 5ae90dff6..655257f08 100644
--- a/etc/profile-a-l/k3b.profile
+++ b/etc/profile-a-l/k3b.profile
@@ -15,7 +15,6 @@ noblacklist ${MUSIC}
15include disable-common.inc 15include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-xdg.inc 19include disable-xdg.inc
21 20
diff --git a/etc/profile-a-l/kaffeine.profile b/etc/profile-a-l/kaffeine.profile
index d55fd22cb..e74c57546 100644
--- a/etc/profile-a-l/kaffeine.profile
+++ b/etc/profile-a-l/kaffeine.profile
@@ -19,10 +19,10 @@ include disable-common.inc
19include disable-devel.inc 19include disable-devel.inc
20include disable-exec.inc 20include disable-exec.inc
21include disable-interpreters.inc 21include disable-interpreters.inc
22include disable-passwdmgr.inc
23include disable-programs.inc 22include disable-programs.inc
24include disable-xdg.inc 23include disable-xdg.inc
25 24
25include whitelist-run-common.inc
26include whitelist-var-common.inc 26include whitelist-var-common.inc
27 27
28caps.drop all 28caps.drop all
diff --git a/etc/profile-a-l/kalgebra.profile b/etc/profile-a-l/kalgebra.profile
index 503dac4b6..6ad50cf14 100644
--- a/etc/profile-a-l/kalgebra.profile
+++ b/etc/profile-a-l/kalgebra.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
@@ -43,7 +42,7 @@ disable-mnt
43private-bin kalgebra,kalgebramobile 42private-bin kalgebra,kalgebramobile
44private-cache 43private-cache
45private-dev 44private-dev
46private-etc fonts,machine-id 45private-etc alternatives,fonts,ld.so.cache,ld.so.preload,machine-id
47private-tmp 46private-tmp
48 47
49dbus-user none 48dbus-user none
diff --git a/etc/profile-a-l/kate.profile b/etc/profile-a-l/kate.profile
index 27b87e7c3..8c340d536 100644
--- a/etc/profile-a-l/kate.profile
+++ b/etc/profile-a-l/kate.profile
@@ -27,9 +27,9 @@ include disable-common.inc
27# include disable-devel.inc 27# include disable-devel.inc
28include disable-exec.inc 28include disable-exec.inc
29# include disable-interpreters.inc 29# include disable-interpreters.inc
30include disable-passwdmgr.inc
31include disable-programs.inc 30include disable-programs.inc
32 31
32include whitelist-run-common.inc
33include whitelist-var-common.inc 33include whitelist-var-common.inc
34 34
35# apparmor 35# apparmor
diff --git a/etc/profile-a-l/kazam.profile b/etc/profile-a-l/kazam.profile
index 9795cf168..277db1c24 100644
--- a/etc/profile-a-l/kazam.profile
+++ b/etc/profile-a-l/kazam.profile
@@ -21,7 +21,6 @@ include disable-devel.inc
21include disable-exec.inc 21include disable-exec.inc
22include disable-interpreters.inc 22include disable-interpreters.inc
23include disable-programs.inc 23include disable-programs.inc
24include disable-passwdmgr.inc
25include disable-shell.inc 24include disable-shell.inc
26include disable-xdg.inc 25include disable-xdg.inc
27 26
@@ -50,7 +49,7 @@ disable-mnt
50# private-bin kazam,python* 49# private-bin kazam,python*
51private-cache 50private-cache
52private-dev 51private-dev
53private-etc alsa,alternatives,asound.conf,dconf,fonts,gtk-2.0,gtk-3.0,machine-id,pulse,selinux,X11,xdg 52private-etc alsa,alternatives,asound.conf,dconf,fonts,gtk-2.0,gtk-3.0,ld.so.cache,ld.so.preload,machine-id,pulse,selinux,X11,xdg
54private-tmp 53private-tmp
55 54
56dbus-system none 55dbus-system none
diff --git a/etc/profile-a-l/kcalc.profile b/etc/profile-a-l/kcalc.profile
index e36ee5ed2..06978cbf1 100644
--- a/etc/profile-a-l/kcalc.profile
+++ b/etc/profile-a-l/kcalc.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -29,6 +28,7 @@ whitelist /usr/share/config.kcfg/kcalc.kcfg
29whitelist /usr/share/kcalc 28whitelist /usr/share/kcalc
30whitelist /usr/share/kconf_update/kcalcrc.upd 29whitelist /usr/share/kconf_update/kcalcrc.upd
31include whitelist-common.inc 30include whitelist-common.inc
31include whitelist-run-common.inc
32include whitelist-runuser-common.inc 32include whitelist-runuser-common.inc
33include whitelist-usr-share-common.inc 33include whitelist-usr-share-common.inc
34include whitelist-var-common.inc 34include whitelist-var-common.inc
@@ -56,7 +56,7 @@ disable-mnt
56private-bin kcalc 56private-bin kcalc
57private-cache 57private-cache
58private-dev 58private-dev
59private-etc alternatives,fonts,ld.so.cache,locale,locale.conf 59private-etc alternatives,fonts,ld.so.cache,ld.so.preload,locale,locale.conf
60# private-lib - problems on Arch 60# private-lib - problems on Arch
61private-tmp 61private-tmp
62 62
diff --git a/etc/profile-a-l/kdeinit4.profile b/etc/profile-a-l/kdeinit4.profile
index 925ab3517..4ddd5dac5 100644
--- a/etc/profile-a-l/kdeinit4.profile
+++ b/etc/profile-a-l/kdeinit4.profile
@@ -11,7 +11,6 @@ include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-shell.inc 15include disable-shell.inc
17 16
diff --git a/etc/profile-a-l/kdenlive.profile b/etc/profile-a-l/kdenlive.profile
index d2a08a269..87808ced7 100644
--- a/etc/profile-a-l/kdenlive.profile
+++ b/etc/profile-a-l/kdenlive.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22 21
23apparmor 22apparmor
diff --git a/etc/profile-a-l/kdiff3.profile b/etc/profile-a-l/kdiff3.profile
index 7c1cb2294..df7ee31dc 100644
--- a/etc/profile-a-l/kdiff3.profile
+++ b/etc/profile-a-l/kdiff3.profile
@@ -18,12 +18,13 @@ blacklist ${HOME}/.gnupg
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22# Add the next line to your kdiff3.local if you don't need to compare files in disable-programs.inc. 21# Add the next line to your kdiff3.local if you don't need to compare files in disable-programs.inc.
23#include disable-programs.inc 22#include disable-programs.inc
24include disable-shell.inc 23include disable-shell.inc
25include disable-xdg.inc 24include disable-xdg.inc
26 25
26# Add the next line to your kdiff3.local if you don't need to compare files in /run.
27#include whitelist-run-common.inc
27include whitelist-runuser-common.inc 28include whitelist-runuser-common.inc
28# Add the next line to your kdiff3.local if you don't need to compare files in /usr/share. 29# Add the next line to your kdiff3.local if you don't need to compare files in /usr/share.
29#include whitelist-usr-share-common.inc 30#include whitelist-usr-share-common.inc
@@ -49,7 +50,7 @@ shell none
49tracelog 50tracelog
50 51
51disable-mnt 52disable-mnt
52private-bin kdiff3 53private-bin kdiff3
53private-cache 54private-cache
54private-dev 55private-dev
55 56
diff --git a/etc/profile-a-l/keepass.profile b/etc/profile-a-l/keepass.profile
index ae8971ab4..8aa21308d 100644
--- a/etc/profile-a-l/keepass.profile
+++ b/etc/profile-a-l/keepass.profile
@@ -19,7 +19,6 @@ include disable-common.inc
19include disable-devel.inc 19include disable-devel.inc
20include disable-exec.inc 20include disable-exec.inc
21include disable-interpreters.inc 21include disable-interpreters.inc
22include disable-passwdmgr.inc
23include disable-programs.inc 22include disable-programs.inc
24include disable-xdg.inc 23include disable-xdg.inc
25 24
@@ -33,13 +32,15 @@ nonewprivs
33noroot 32noroot
34nosound 33nosound
35notv 34notv
36nou2f
37novideo 35novideo
38protocol unix,inet,inet6,netlink 36protocol unix,inet,inet6,netlink
39seccomp 37seccomp
40shell none 38shell none
41 39
42private-cache 40private-cache
41# Note: private-dev prevents the program from seeing new devices (such as
42# hardware keys) on /dev after it has already started; add "ignore private-dev"
43# to keepassxc.local if this is an issue (see #4883).
43private-dev 44private-dev
44private-tmp 45private-tmp
45 46
diff --git a/etc/profile-a-l/keepassx.profile b/etc/profile-a-l/keepassx.profile
index ac364986d..5e2d6d8df 100644
--- a/etc/profile-a-l/keepassx.profile
+++ b/etc/profile-a-l/keepassx.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-xdg.inc 20include disable-xdg.inc
22 21
@@ -42,7 +41,7 @@ tracelog
42 41
43private-bin keepassx,keepassx2 42private-bin keepassx,keepassx2
44private-dev 43private-dev
45private-etc alternatives,fonts,machine-id 44private-etc alternatives,fonts,ld.so.cache,ld.so.preload,machine-id
46private-tmp 45private-tmp
47 46
48dbus-user none 47dbus-user none
diff --git a/etc/profile-a-l/keepassxc-cli.profile b/etc/profile-a-l/keepassxc-cli.profile
index 925609384..c292041f3 100644
--- a/etc/profile-a-l/keepassxc-cli.profile
+++ b/etc/profile-a-l/keepassxc-cli.profile
@@ -1,6 +1,7 @@
1# Firejail profile for keepassxc-cli 1# Firejail profile for keepassxc-cli
2# Description: command line interface for KeePassXC 2# Description: command line interface for KeePassXC
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 keepassxc-cli.local 6include keepassxc-cli.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/profile-a-l/keepassxc.profile b/etc/profile-a-l/keepassxc.profile
index c352a5d89..a65c35804 100644
--- a/etc/profile-a-l/keepassxc.profile
+++ b/etc/profile-a-l/keepassxc.profile
@@ -22,11 +22,12 @@ noblacklist ${HOME}/.config/vivaldi
22noblacklist ${HOME}/.local/share/torbrowser 22noblacklist ${HOME}/.local/share/torbrowser
23noblacklist ${HOME}/.mozilla 23noblacklist ${HOME}/.mozilla
24 24
25blacklist /usr/libexec
26
25include disable-common.inc 27include disable-common.inc
26include disable-devel.inc 28include disable-devel.inc
27include disable-exec.inc 29include disable-exec.inc
28include disable-interpreters.inc 30include disable-interpreters.inc
29include disable-passwdmgr.inc
30include disable-programs.inc 31include disable-programs.inc
31include disable-shell.inc 32include disable-shell.inc
32include disable-xdg.inc 33include disable-xdg.inc
@@ -36,16 +37,22 @@ include disable-xdg.inc
36#mkdir ${HOME}/Documents/KeePassXC 37#mkdir ${HOME}/Documents/KeePassXC
37#whitelist ${HOME}/Documents/KeePassXC 38#whitelist ${HOME}/Documents/KeePassXC
38# Needed for KeePassXC-Browser. 39# Needed for KeePassXC-Browser.
40#mkdir ${HOME}/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts
39#mkfile ${HOME}/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json 41#mkfile ${HOME}/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json
40#whitelist ${HOME}/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json 42#whitelist ${HOME}/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json
43#mkdir ${HOME}/.config/chromium/NativeMessagingHosts
41#mkfile ${HOME}/.config/chromium/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json 44#mkfile ${HOME}/.config/chromium/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json
42#whitelist ${HOME}/.config/chromium/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json 45#whitelist ${HOME}/.config/chromium/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json
46#mkdir ${HOME}/.config/google-chrome/NativeMessagingHosts
43#mkfile ${HOME}/.config/google-chrome/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json 47#mkfile ${HOME}/.config/google-chrome/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json
44#whitelist ${HOME}/.config/google-chrome/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json 48#whitelist ${HOME}/.config/google-chrome/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json
49#mkdir ${HOME}/.config/vivaldi/NativeMessagingHosts
45#mkfile ${HOME}/.config/vivaldi/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json 50#mkfile ${HOME}/.config/vivaldi/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json
46#whitelist ${HOME}/.config/vivaldi/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json 51#whitelist ${HOME}/.config/vivaldi/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json
52#mkdir ${HOME}/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts
47#mkfile ${HOME}/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json 53#mkfile ${HOME}/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json
48#whitelist ${HOME}/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json 54#whitelist ${HOME}/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json
55#mkdir ${HOME}/.mozilla/native-messaging-hosts
49#mkfile ${HOME}/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json 56#mkfile ${HOME}/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json
50#whitelist ${HOME}/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json 57#whitelist ${HOME}/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json
51#mkdir ${HOME}/.cache/keepassxc 58#mkdir ${HOME}/.cache/keepassxc
@@ -56,6 +63,7 @@ include disable-xdg.inc
56#include whitelist-common.inc 63#include whitelist-common.inc
57 64
58whitelist /usr/share/keepassxc 65whitelist /usr/share/keepassxc
66include whitelist-run-common.inc
59include whitelist-usr-share-common.inc 67include whitelist-usr-share-common.inc
60include whitelist-var-common.inc 68include whitelist-var-common.inc
61 69
@@ -70,34 +78,34 @@ nonewprivs
70noroot 78noroot
71nosound 79nosound
72notv 80notv
73nou2f
74novideo 81novideo
75protocol unix,netlink 82protocol unix
76seccomp !name_to_handle_at 83seccomp !name_to_handle_at
77seccomp.block-secondary 84seccomp.block-secondary
78shell none 85shell none
79tracelog 86tracelog
80 87
81private-bin keepassxc,keepassxc-cli,keepassxc-proxy 88private-bin keepassxc,keepassxc-cli,keepassxc-proxy
89# Note: private-dev prevents the program from seeing new devices (such as
90# hardware keys) on /dev after it has already started; add "ignore private-dev"
91# to keepassxc.local if this is an issue (see #4883).
82private-dev 92private-dev
83private-etc alternatives,fonts,ld.so.cache,machine-id 93private-etc alternatives,fonts,ld.so.cache,ld.so.preload,machine-id
84private-tmp 94private-tmp
85 95
86dbus-user filter 96dbus-user filter
87#dbus-user.own org.keepassxc.KeePassXC 97dbus-user.own org.keepassxc.KeePassXC.*
88dbus-user.talk com.canonical.Unity.Session 98dbus-user.talk com.canonical.Unity
89dbus-user.talk org.freedesktop.ScreenSaver 99dbus-user.talk org.freedesktop.ScreenSaver
90dbus-user.talk org.freedesktop.login1.Manager
91dbus-user.talk org.freedesktop.login1.Session
92dbus-user.talk org.gnome.ScreenSaver 100dbus-user.talk org.gnome.ScreenSaver
93dbus-user.talk org.gnome.SessionManager 101dbus-user.talk org.gnome.SessionManager
94dbus-user.talk org.gnome.SessionManager.Presence 102dbus-user.talk org.xfce.ScreenSaver
103?ALLOW_TRAY: dbus-user.talk org.kde.StatusNotifierWatcher
104?ALLOW_TRAY: dbus-user.own org.kde.*
95# Add the next line to your keepassxc.local to allow notifications. 105# Add the next line to your keepassxc.local to allow notifications.
96#dbus-user.talk org.freedesktop.Notifications 106#dbus-user.talk org.freedesktop.Notifications
97# Add the next line to your keepassxc.local to allow the tray menu. 107dbus-system filter
98#dbus-user.talk org.kde.StatusNotifierWatcher 108dbus-system.talk org.freedesktop.login1
99#dbus-user.own org.kde.*
100dbus-system none
101 109
102# Mutex is stored in /tmp by default, which is broken by private-tmp. 110# Mutex is stored in /tmp by default, which is broken by private-tmp.
103join-or-start keepassxc 111join-or-start keepassxc
diff --git a/etc/profile-a-l/kfind.profile b/etc/profile-a-l/kfind.profile
index 6f6fe8d0a..40fe65e3f 100644
--- a/etc/profile-a-l/kfind.profile
+++ b/etc/profile-a-l/kfind.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22# include disable-programs.inc 21# include disable-programs.inc
23 22
24apparmor 23apparmor
diff --git a/etc/profile-a-l/kget.profile b/etc/profile-a-l/kget.profile
index 2c684504b..9b6646725 100644
--- a/etc/profile-a-l/kget.profile
+++ b/etc/profile-a-l/kget.profile
@@ -18,9 +18,9 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23 22
23include whitelist-run-common.inc
24include whitelist-var-common.inc 24include whitelist-var-common.inc
25 25
26caps.drop all 26caps.drop all
diff --git a/etc/profile-a-l/kid3.profile b/etc/profile-a-l/kid3.profile
index e18292e99..5563aa410 100644
--- a/etc/profile-a-l/kid3.profile
+++ b/etc/profile-a-l/kid3.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
@@ -38,7 +37,7 @@ tracelog
38 37
39private-cache 38private-cache
40private-dev 39private-dev
41private-etc alternatives,ca-certificates,crypto-policies,dconf,drirc,fonts,gtk-3.0,hostname,hosts,kde5rc,machine-id,pki,pulse,resolv.conf,ssl 40private-etc alternatives,ca-certificates,crypto-policies,dconf,drirc,fonts,gtk-3.0,hostname,hosts,kde5rc,ld.so.cache,ld.so.preload,machine-id,pki,pulse,resolv.conf,ssl
42private-tmp 41private-tmp
43private-opt none 42private-opt none
44private-srv none 43private-srv none
diff --git a/etc/profile-a-l/kino.profile b/etc/profile-a-l/kino.profile
index 74014ffe6..1f42526d3 100644
--- a/etc/profile-a-l/kino.profile
+++ b/etc/profile-a-l/kino.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19include whitelist-var-common.inc 18include whitelist-var-common.inc
diff --git a/etc/profile-a-l/kiwix-desktop.profile b/etc/profile-a-l/kiwix-desktop.profile
index 40ee0bbc7..837ea9e36 100644
--- a/etc/profile-a-l/kiwix-desktop.profile
+++ b/etc/profile-a-l/kiwix-desktop.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
@@ -45,7 +44,7 @@ shell none
45disable-mnt 44disable-mnt
46private-cache 45private-cache
47private-dev 46private-dev
48private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,hostname,hosts,ld.so.cache,machine-id,pki,pulse,resolv.conf,ssl 47private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,hostname,hosts,ld.so.cache,ld.so.preload,machine-id,pki,pulse,resolv.conf,ssl
49private-tmp 48private-tmp
50 49
51dbus-user none 50dbus-user none
diff --git a/etc/profile-a-l/klatexformula.profile b/etc/profile-a-l/klatexformula.profile
index c6a9023f1..f089658af 100644
--- a/etc/profile-a-l/klatexformula.profile
+++ b/etc/profile-a-l/klatexformula.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22 21
23apparmor 22apparmor
diff --git a/etc/profile-a-l/klavaro.profile b/etc/profile-a-l/klavaro.profile
index f5cd3a48c..46164403b 100644
--- a/etc/profile-a-l/klavaro.profile
+++ b/etc/profile-a-l/klavaro.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
@@ -46,7 +45,7 @@ disable-mnt
46private-bin bash,klavaro,sh,tclsh,tclsh* 45private-bin bash,klavaro,sh,tclsh,tclsh*
47private-cache 46private-cache
48private-dev 47private-dev
49private-etc alternatives,fonts 48private-etc alternatives,fonts,ld.so.cache,ld.so.preload
50private-tmp 49private-tmp
51private-opt none 50private-opt none
52private-srv none 51private-srv none
diff --git a/etc/profile-a-l/kmail.profile b/etc/profile-a-l/kmail.profile
index 95ae98e53..1bbc141e8 100644
--- a/etc/profile-a-l/kmail.profile
+++ b/etc/profile-a-l/kmail.profile
@@ -29,15 +29,16 @@ noblacklist ${HOME}/.local/share/kxmlgui5/kmail
29noblacklist ${HOME}/.local/share/kxmlgui5/kmail2 29noblacklist ${HOME}/.local/share/kxmlgui5/kmail2
30noblacklist ${HOME}/.local/share/local-mail 30noblacklist ${HOME}/.local/share/local-mail
31noblacklist ${HOME}/.local/share/notes 31noblacklist ${HOME}/.local/share/notes
32noblacklist ${RUNUSER}/akonadi
32noblacklist /tmp/akonadi-* 33noblacklist /tmp/akonadi-*
33 34
34include disable-common.inc 35include disable-common.inc
35include disable-devel.inc 36include disable-devel.inc
36include disable-exec.inc 37include disable-exec.inc
37include disable-interpreters.inc 38include disable-interpreters.inc
38include disable-passwdmgr.inc
39include disable-programs.inc 39include disable-programs.inc
40 40
41include whitelist-run-common.inc
41include whitelist-var-common.inc 42include whitelist-var-common.inc
42 43
43# apparmor 44# apparmor
diff --git a/etc/profile-a-l/kmplayer.profile b/etc/profile-a-l/kmplayer.profile
index e88b53499..8d462c44c 100644
--- a/etc/profile-a-l/kmplayer.profile
+++ b/etc/profile-a-l/kmplayer.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-xdg.inc 20include disable-xdg.inc
22 21
diff --git a/etc/profile-a-l/kodi.profile b/etc/profile-a-l/kodi.profile
index b72632bf4..2277a74fe 100644
--- a/etc/profile-a-l/kodi.profile
+++ b/etc/profile-a-l/kodi.profile
@@ -8,6 +8,16 @@ include globals.local
8 8
9# noexec ${HOME} breaks plugins 9# noexec ${HOME} breaks plugins
10ignore noexec ${HOME} 10ignore noexec ${HOME}
11# Add the following to your kodi.local if you use a CEC Adapter.
12#ignore nogroups
13#ignore noroot
14#ignore private-dev
15# Add the following to your kodi.local if you use the Lutris Kodi Addon
16#noblacklist /sbin
17#noblacklist /usr/sbin
18#noblacklist ${HOME}/.cache/lutris
19#noblacklist ${HOME}/.config/lutris
20#noblacklist ${HOME}/.local/share/lutris
11 21
12noblacklist ${HOME}/.kodi 22noblacklist ${HOME}/.kodi
13noblacklist ${MUSIC} 23noblacklist ${MUSIC}
@@ -22,7 +32,6 @@ include disable-common.inc
22include disable-devel.inc 32include disable-devel.inc
23include disable-exec.inc 33include disable-exec.inc
24include disable-interpreters.inc 34include disable-interpreters.inc
25include disable-passwdmgr.inc
26include disable-programs.inc 35include disable-programs.inc
27include disable-xdg.inc 36include disable-xdg.inc
28 37
@@ -34,7 +43,6 @@ netfilter
34nogroups 43nogroups
35noinput 44noinput
36nonewprivs 45nonewprivs
37# Seems to cause issues with Nvidia drivers sometimes (#3501)
38noroot 46noroot
39nou2f 47nou2f
40protocol unix,inet,inet6,netlink 48protocol unix,inet,inet6,netlink
diff --git a/etc/profile-a-l/konversation.profile b/etc/profile-a-l/konversation.profile
index 5b5ed6e24..1121dc8a5 100644
--- a/etc/profile-a-l/konversation.profile
+++ b/etc/profile-a-l/konversation.profile
@@ -16,11 +16,11 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-shell.inc 20include disable-shell.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
23include whitelist-run-common.inc
24include whitelist-var-common.inc 24include whitelist-var-common.inc
25 25
26caps.drop all 26caps.drop all
diff --git a/etc/profile-a-l/kopete.profile b/etc/profile-a-l/kopete.profile
index 88f47d1bf..9e75b03eb 100644
--- a/etc/profile-a-l/kopete.profile
+++ b/etc/profile-a-l/kopete.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22whitelist /var/lib/winpopup 21whitelist /var/lib/winpopup
diff --git a/etc/profile-a-l/krita.profile b/etc/profile-a-l/krita.profile
index 8604e63d0..2d3225421 100644
--- a/etc/profile-a-l/krita.profile
+++ b/etc/profile-a-l/krita.profile
@@ -22,7 +22,6 @@ include disable-common.inc
22include disable-devel.inc 22include disable-devel.inc
23include disable-exec.inc 23include disable-exec.inc
24include disable-interpreters.inc 24include disable-interpreters.inc
25include disable-passwdmgr.inc
26include disable-programs.inc 25include disable-programs.inc
27include disable-xdg.inc 26include disable-xdg.inc
28 27
diff --git a/etc/profile-a-l/krunner.profile b/etc/profile-a-l/krunner.profile
index 9cb5eff87..96eb6978d 100644
--- a/etc/profile-a-l/krunner.profile
+++ b/etc/profile-a-l/krunner.profile
@@ -22,7 +22,6 @@ noblacklist ${HOME}/.kde4/share/config/krunnerrc
22include disable-common.inc 22include disable-common.inc
23# include disable-devel.inc 23# include disable-devel.inc
24# include disable-interpreters.inc 24# include disable-interpreters.inc
25# include disable-passwdmgr.inc
26# include disable-programs.inc 25# include disable-programs.inc
27 26
28include whitelist-var-common.inc 27include whitelist-var-common.inc
diff --git a/etc/profile-a-l/ktorrent.profile b/etc/profile-a-l/ktorrent.profile
index 5a85194e0..f3eae6780 100644
--- a/etc/profile-a-l/ktorrent.profile
+++ b/etc/profile-a-l/ktorrent.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-shell.inc 22include disable-shell.inc
24 23
@@ -38,6 +37,7 @@ whitelist ${HOME}/.kde4/share/config/ktorrentrc
38whitelist ${HOME}/.local/share/ktorrent 37whitelist ${HOME}/.local/share/ktorrent
39whitelist ${HOME}/.local/share/kxmlgui5/ktorrent 38whitelist ${HOME}/.local/share/kxmlgui5/ktorrent
40include whitelist-common.inc 39include whitelist-common.inc
40include whitelist-run-common.inc
41include whitelist-var-common.inc 41include whitelist-var-common.inc
42 42
43caps.drop all 43caps.drop all
@@ -62,4 +62,5 @@ private-dev
62# private-lib - problems on Arch 62# private-lib - problems on Arch
63private-tmp 63private-tmp
64 64
65deterministic-shutdown
65# memory-deny-write-execute 66# memory-deny-write-execute
diff --git a/etc/profile-a-l/ktouch.profile b/etc/profile-a-l/ktouch.profile
index 4cf72b74c..44da8acca 100644
--- a/etc/profile-a-l/ktouch.profile
+++ b/etc/profile-a-l/ktouch.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
@@ -47,7 +46,7 @@ disable-mnt
47private-bin ktouch 46private-bin ktouch
48private-cache 47private-cache
49private-dev 48private-dev
50private-etc alternatives,fonts,kde5rc,machine-id 49private-etc alternatives,fonts,kde5rc,ld.so.cache,ld.so.preload,machine-id
51private-tmp 50private-tmp
52 51
53dbus-user none 52dbus-user none
diff --git a/etc/profile-a-l/kube.profile b/etc/profile-a-l/kube.profile
index 4e9a12e5f..718cbbf40 100644
--- a/etc/profile-a-l/kube.profile
+++ b/etc/profile-a-l/kube.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-shell.inc 22include disable-shell.inc
24include disable-xdg.inc 23include disable-xdg.inc
@@ -69,7 +68,7 @@ tracelog
69private-bin kube,sink_synchronizer 68private-bin kube,sink_synchronizer
70private-cache 69private-cache
71private-dev 70private-dev
72private-etc alternatives,ca-certificates,crypto-policies,fonts,gcrypt,gtk-2.0,gtk-3.0,hostname,hosts,pki,resolv.conf,selinux,ssl,xdg 71private-etc alternatives,ca-certificates,crypto-policies,fonts,gcrypt,gtk-2.0,gtk-3.0,hostname,hosts,ld.so.cache,ld.so.preload,pki,resolv.conf,selinux,ssl,xdg
73private-tmp 72private-tmp
74writable-run-user 73writable-run-user
75 74
diff --git a/etc/profile-a-l/kwin_x11.profile b/etc/profile-a-l/kwin_x11.profile
index 15e7ceb17..0b8763c29 100644
--- a/etc/profile-a-l/kwin_x11.profile
+++ b/etc/profile-a-l/kwin_x11.profile
@@ -17,11 +17,11 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-shell.inc 21include disable-shell.inc
23include disable-xdg.inc 22include disable-xdg.inc
24 23
24include whitelist-run-common.inc
25include whitelist-var-common.inc 25include whitelist-var-common.inc
26 26
27caps.drop all 27caps.drop all
@@ -43,5 +43,5 @@ tracelog
43disable-mnt 43disable-mnt
44private-bin kwin_x11 44private-bin kwin_x11
45private-dev 45private-dev
46private-etc alternatives,drirc,fonts,kde5rc,ld.so.cache,machine-id,xdg 46private-etc alternatives,drirc,fonts,kde5rc,ld.so.cache,ld.so.preload,machine-id,xdg
47private-tmp 47private-tmp
diff --git a/etc/profile-a-l/kwrite.profile b/etc/profile-a-l/kwrite.profile
index 804ffafeb..aff6f3181 100644
--- a/etc/profile-a-l/kwrite.profile
+++ b/etc/profile-a-l/kwrite.profile
@@ -20,11 +20,11 @@ include disable-common.inc
20include disable-devel.inc 20include disable-devel.inc
21include disable-exec.inc 21include disable-exec.inc
22include disable-interpreters.inc 22include disable-interpreters.inc
23include disable-passwdmgr.inc
24include disable-programs.inc 23include disable-programs.inc
25include disable-shell.inc 24include disable-shell.inc
26include disable-xdg.inc 25include disable-xdg.inc
27 26
27include whitelist-run-common.inc
28include whitelist-var-common.inc 28include whitelist-var-common.inc
29 29
30apparmor 30apparmor
@@ -47,7 +47,7 @@ tracelog
47 47
48private-bin kbuildsycoca4,kdeinit4,kwrite 48private-bin kbuildsycoca4,kdeinit4,kwrite
49private-dev 49private-dev
50private-etc alternatives,fonts,kde4rc,kde5rc,ld.so.cache,machine-id,pulse,xdg 50private-etc alternatives,fonts,kde4rc,kde5rc,ld.so.cache,ld.so.preload,machine-id,pulse,xdg
51private-tmp 51private-tmp
52 52
53# dbus-user none 53# dbus-user none
diff --git a/etc/profile-a-l/latex-common.profile b/etc/profile-a-l/latex-common.profile
index ac1b8785d..7993e97e3 100644
--- a/etc/profile-a-l/latex-common.profile
+++ b/etc/profile-a-l/latex-common.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15 14
16whitelist /var/lib 15whitelist /var/lib
diff --git a/etc/profile-a-l/leafpad.profile b/etc/profile-a-l/leafpad.profile
index 4bbb0a86d..75105abf2 100644
--- a/etc/profile-a-l/leafpad.profile
+++ b/etc/profile-a-l/leafpad.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18 17
diff --git a/etc/profile-a-l/less.profile b/etc/profile-a-l/less.profile
index 8eb5ad0c2..db61bf941 100644
--- a/etc/profile-a-l/less.profile
+++ b/etc/profile-a-l/less.profile
@@ -14,7 +14,6 @@ noblacklist ${HOME}/.lesshst
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18 17
19apparmor 18apparmor
20caps.drop all 19caps.drop all
diff --git a/etc/profile-a-l/librecad.profile b/etc/profile-a-l/librecad.profile
new file mode 100644
index 000000000..c1ce4bb8d
--- /dev/null
+++ b/etc/profile-a-l/librecad.profile
@@ -0,0 +1,50 @@
1# Firejail profile for librecad
2# Persistent local customizations
3include librecad.local
4# Persistent global definitions
5include globals.local
6
7noblacklist ${HOME}/.config/LibreCAD
8noblacklist ${HOME}/.local/share/LibreCAD
9
10include disable-common.inc
11include disable-devel.inc
12include disable-exec.inc
13include disable-interpreters.inc
14include disable-programs.inc
15include disable-shell.inc
16include disable-xdg.inc
17
18whitelist /usr/share/librecad
19include whitelist-usr-share-common.inc
20include whitelist-var-common.inc
21
22apparmor
23caps.drop all
24ipc-namespace
25netfilter
26nodvd
27#nogroups
28#noinput
29nonewprivs
30noroot
31notv
32#nou2f
33novideo
34protocol unix,inet,inet6
35netfilter
36seccomp
37shell none
38#tracelog
39
40#disable-mnt
41private-bin librecad
42private-dev
43# private-etc cups,drirc,fonts,passwd,xdg
44#private-lib
45private-tmp
46
47dbus-user none
48dbus-system none
49
50memory-deny-write-execute
diff --git a/etc/profile-a-l/libreoffice.profile b/etc/profile-a-l/libreoffice.profile
index 0041f2540..12ff79748 100644
--- a/etc/profile-a-l/libreoffice.profile
+++ b/etc/profile-a-l/libreoffice.profile
@@ -9,39 +9,43 @@ include globals.local
9noblacklist /usr/local/sbin 9noblacklist /usr/local/sbin
10noblacklist ${HOME}/.config/libreoffice 10noblacklist ${HOME}/.config/libreoffice
11 11
12# libreoffice uses java for some certain operations 12# libreoffice uses java for some functionality.
13# comment if you don't care about java functionality 13# Add 'ignore include allow-java.inc' to your libreoffice.local if you don't need that functionality.
14# Allow java (blacklisted by disable-devel.inc) 14# Allow java (blacklisted by disable-devel.inc)
15include allow-java.inc 15include allow-java.inc
16 16
17blacklist /usr/libexec
18
17include disable-common.inc 19include disable-common.inc
18include disable-devel.inc 20include disable-devel.inc
19include disable-exec.inc 21include disable-exec.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 22include disable-programs.inc
22 23
24include whitelist-run-common.inc
23include whitelist-var-common.inc 25include whitelist-var-common.inc
24 26
25# ubuntu 18.04 comes with its own apparmor profile, but it is not in enforce mode. 27# Debian 10/Ubuntu 18.04 come with their own apparmor profile, but it is not in enforce mode.
26# comment the next line to use the ubuntu profile instead of firejail's apparmor profile 28# Add the next lines to your libreoffice.local to use the Ubuntu profile instead of firejail's apparmor profile.
29#ignore apparmor
30#ignore nonewprivs
31#ignore protocol
32#ignore seccomp
33#ignore tracelog
34
27apparmor 35apparmor
28caps.drop all 36caps.drop all
29netfilter 37netfilter
30nodvd 38nodvd
31nogroups 39nogroups
32noinput 40noinput
33# comment nonewprivs when using the ubuntu 18.04/debian 10 apparmor profile
34nonewprivs 41nonewprivs
35noroot 42noroot
36notv 43notv
37nou2f 44nou2f
38novideo 45novideo
39# comment the protocol line when using the ubuntu 18.04/debian 10 apparmor profile
40protocol unix,inet,inet6 46protocol unix,inet,inet6
41# comment seccomp when using the ubuntu 18.04/debian 10 apparmor profile
42seccomp 47seccomp
43shell none 48shell none
44# comment tracelog when using the ubuntu 18.04/debian 10 apparmor profile
45tracelog 49tracelog
46 50
47#private-bin libreoffice,sh,uname,dirname,grep,sed,basename,ls 51#private-bin libreoffice,sh,uname,dirname,grep,sed,basename,ls
diff --git a/etc/profile-a-l/librewolf.profile b/etc/profile-a-l/librewolf.profile
index 0934e1271..b84cbb119 100644
--- a/etc/profile-a-l/librewolf.profile
+++ b/etc/profile-a-l/librewolf.profile
@@ -18,39 +18,41 @@ whitelist ${HOME}/.librewolf
18#noblacklist ${HOME}/.mozilla 18#noblacklist ${HOME}/.mozilla
19#whitelist ${HOME}/.mozilla 19#whitelist ${HOME}/.mozilla
20 20
21# Uncomment or put in your librewolf.local one of the following whitelist to enable KeePassXC Plugin 21# To enable KeePassXC Plugin add one of the following lines to your librewolf.local.
22# NOTE: start KeePassXC before Librewolf and keep it open to allow communication between them 22# NOTE: start KeePassXC before Librewolf and keep it open to allow communication between them.
23#whitelist ${RUNUSER}/kpxc_server 23#whitelist ${RUNUSER}/kpxc_server
24#whitelist ${RUNUSER}/org.keepassxc.KeePassXC.BrowserServer 24#whitelist ${RUNUSER}/org.keepassxc.KeePassXC.BrowserServer
25 25
26whitelist /usr/share/doc 26whitelist /usr/share/doc
27whitelist /usr/share/gtk-doc/html 27whitelist /usr/share/gtk-doc/html
28whitelist /usr/share/librewolf
28whitelist /usr/share/mozilla 29whitelist /usr/share/mozilla
29whitelist /usr/share/webext 30whitelist /usr/share/webext
30include whitelist-usr-share-common.inc 31include whitelist-usr-share-common.inc
31 32
32# Add the next line to your librewolf.local to enable private-bin (Arch Linux). 33# Add the next line to your librewolf.local to enable private-bin (Arch Linux).
33#private-bin dbus-launch,dbus-send,librewolf,sh 34#private-bin dbus-launch,dbus-send,librewolf,sh
34# Add the next line to your librewolf.local to enable private-etc. Note 35# Add the next line to your librewolf.local to enable private-etc.
35# that private-etc must first be enabled in firefox-common.local. 36# NOTE: private-etc must first be enabled in firefox-common.local.
36#private-etc librewolf 37#private-etc librewolf
37 38
38dbus-user filter 39dbus-user filter
39# Uncomment or put in your librewolf.local to enable native notifications. 40dbus-user.own io.gitlab.librewolf.*
41dbus-user.own org.mozilla.librewolf.*
42# Add the next line to your librewolf.local to enable native notifications.
40#dbus-user.talk org.freedesktop.Notifications 43#dbus-user.talk org.freedesktop.Notifications
41# Uncomment or put in your librewolf.local to allow to inhibit screensavers 44# Add the next line to your librewolf.local to allow inhibiting screensavers.
42#dbus-user.talk org.freedesktop.ScreenSaver 45#dbus-user.talk org.freedesktop.ScreenSaver
43# Uncomment or put in your librewolf.local for plasma browser integration 46# Add the next lines to your librewolf.local for plasma browser integration.
44#dbus-user.own org.mpris.MediaPlayer2.plasma-browser-integration 47#dbus-user.own org.mpris.MediaPlayer2.plasma-browser-integration
45#dbus-user.talk org.kde.JobViewServer 48#dbus-user.talk org.kde.JobViewServer
46#dbus-user.talk org.kde.kuiserver 49#dbus-user.talk org.kde.kuiserver
47# Uncomment or put in your librewolf.local to allow screen sharing under wayland. 50# Add the next line to your librewolf.local to allow screensharing under Wayland.
48#whitelist ${RUNUSER}/pipewire-0 51#dbus-user.talk org.freedesktop.portal.Desktop
49#dbus-user.talk org.freedesktop.portal.* 52# Also add the next line to your librewolf.local if screensharing does not work with
50# Also uncomment or put in your librewolf.local if screen sharing sharing still 53# the above lines (depends on the portal implementation).
51# does not work with the above lines (might depend on the portal
52# implementation)
53#ignore noroot 54#ignore noroot
55ignore apparmor
54ignore dbus-user none 56ignore dbus-user none
55 57
56# Redirect 58# Redirect
diff --git a/etc/profile-a-l/lifeograph.profile b/etc/profile-a-l/lifeograph.profile
new file mode 100644
index 000000000..747fd85fa
--- /dev/null
+++ b/etc/profile-a-l/lifeograph.profile
@@ -0,0 +1,57 @@
1# Firejail profile for lifeograph
2# Description: Lifeograph is a diary program to take personal notes
3# This file is overwritten after every install/update
4# Persistent local customizations
5include lifeograph.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${DOCUMENTS}
10
11blacklist /usr/libexec
12
13include disable-common.inc
14include disable-devel.inc
15include disable-exec.inc
16include disable-interpreters.inc
17include disable-programs.inc
18include disable-shell.inc
19include disable-xdg.inc
20
21whitelist ${DOCUMENTS}
22whitelist /usr/share/lifeograph
23include whitelist-common.inc
24include whitelist-runuser-common.inc
25include whitelist-usr-share-common.inc
26include whitelist-var-common.inc
27
28apparmor
29caps.drop all
30machine-id
31net none
32no3d
33nodvd
34nogroups
35noinput
36nonewprivs
37noroot
38nosound
39notv
40nou2f
41novideo
42protocol unix
43seccomp
44seccomp.block-secondary
45shell none
46tracelog
47
48disable-mnt
49private-bin lifeograph
50private-cache
51private-dev
52private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,pango,X11
53private-tmp
54
55dbus-user filter
56dbus-user.talk ca.desrt.dconf
57dbus-system none
diff --git a/etc/profile-a-l/liferea.profile b/etc/profile-a-l/liferea.profile
index 7afca1d5f..f7955e352 100644
--- a/etc/profile-a-l/liferea.profile
+++ b/etc/profile-a-l/liferea.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23 22
24mkdir ${HOME}/.cache/liferea 23mkdir ${HOME}/.cache/liferea
diff --git a/etc/profile-a-l/lincity-ng.profile b/etc/profile-a-l/lincity-ng.profile
index 4254b7f33..073d814ec 100644
--- a/etc/profile-a-l/lincity-ng.profile
+++ b/etc/profile-a-l/lincity-ng.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
diff --git a/etc/profile-a-l/links-common.profile b/etc/profile-a-l/links-common.profile
new file mode 100644
index 000000000..84f5dc50d
--- /dev/null
+++ b/etc/profile-a-l/links-common.profile
@@ -0,0 +1,62 @@
1# This file is overwritten during software install.
2# Persistent customizations should go in a .local file.
3include links-common.local
4
5# common profile for links browsers
6
7blacklist /tmp/.X11-unix
8blacklist ${RUNUSER}/wayland-*
9
10include disable-common.inc
11include disable-devel.inc
12include disable-exec.inc
13include disable-interpreters.inc
14# Additional noblacklist files/directories (blacklisted in disable-programs.inc)
15# used as associated programs can be added in your links-common.local.
16include disable-programs.inc
17include disable-xdg.inc
18
19whitelist ${DOWNLOADS}
20include whitelist-runuser-common.inc
21include whitelist-usr-share-common.inc
22include whitelist-var-common.inc
23
24caps.drop all
25ipc-namespace
26# Add 'ignore machine-id' to your links-common.local if you want to restrict access to
27# the user-configured associated media player.
28machine-id
29netfilter
30# Add 'ignore no3d' to your links-common.local if you want to restrict access to
31# the user-configured associated media player.
32no3d
33nodvd
34nogroups
35noinput
36nonewprivs
37noroot
38# Add 'ignore nosound' to your links-common.local if you want to restrict access to
39# the user-configured associated media player.
40nosound
41notv
42nou2f
43novideo
44protocol unix,inet,inet6
45seccomp
46shell none
47tracelog
48
49disable-mnt
50# Add 'private-bin PROGRAM1,PROGRAM2' to your links-common.local if you want to use user-configured programs.
51private-bin sh
52private-cache
53private-dev
54private-etc alternatives,ca-certificates,crypto-policies,ld.so.cache,ld.so.preload,nsswitch.conf,pki,resolv.conf,ssl
55# Add the next line to your links-common.local to allow external media players.
56# private-etc alsa,asound.conf,machine-id,openal,pulse
57private-tmp
58
59dbus-user none
60dbus-system none
61
62memory-deny-write-execute
diff --git a/etc/profile-a-l/links.profile b/etc/profile-a-l/links.profile
index a1eeda14a..8ce39cc7f 100644
--- a/etc/profile-a-l/links.profile
+++ b/etc/profile-a-l/links.profile
@@ -9,58 +9,10 @@ include globals.local
9 9
10noblacklist ${HOME}/.links 10noblacklist ${HOME}/.links
11 11
12blacklist /tmp/.X11-unix
13blacklist ${RUNUSER}/wayland-*
14
15include disable-common.inc
16include disable-devel.inc
17include disable-exec.inc
18include disable-interpreters.inc
19include disable-passwdmgr.inc
20# Additional noblacklist files/directories (blacklisted in disable-programs.inc)
21# used as associated programs can be added in your links.local.
22include disable-programs.inc
23include disable-xdg.inc
24
25mkdir ${HOME}/.links 12mkdir ${HOME}/.links
26whitelist ${HOME}/.links 13whitelist ${HOME}/.links
27whitelist ${DOWNLOADS}
28include whitelist-runuser-common.inc
29include whitelist-var-common.inc
30
31caps.drop all
32ipc-namespace
33# Add 'ignore machine-id' to your links.local if you want to restrict access to
34# the user-configured associated media player.
35machine-id
36netfilter
37# Add 'ignore no3d' to your links.local if you want to restrict access to
38# the user-configured associated media player.
39no3d
40nodvd
41nogroups
42noinput
43nonewprivs
44noroot
45# Add 'ignore nosound' to your links.local if you want to restrict access to
46# the user-configured associated media player.
47nosound
48notv
49nou2f
50novideo
51protocol unix,inet,inet6
52seccomp
53shell none
54tracelog
55 14
56disable-mnt 15private-bin links
57# Add 'private-bin PROGRAM1,PROGRAM2' to your links.local if you want to use user-configured programs.
58private-bin links,sh
59private-cache
60private-dev
61private-etc alternatives,ca-certificates,crypto-policies,nsswitch.conf,pki,resolv.conf,ssl
62# Add the next line to your links.local to allow external media players.
63# private-etc alsa,asound.conf,machine-id,openal,pulse
64private-tmp
65 16
66memory-deny-write-execute 17# Redirect
18include links-common.profile
diff --git a/etc/profile-a-l/links2.profile b/etc/profile-a-l/links2.profile
new file mode 100644
index 000000000..5f91dfcd2
--- /dev/null
+++ b/etc/profile-a-l/links2.profile
@@ -0,0 +1,18 @@
1# Firejail profile for links2
2# Description: Text WWW browser with a graphic version
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include links2.local
7# Persistent global definitions
8include globals.local
9
10noblacklist ${HOME}/.links2
11
12mkdir ${HOME}/.links2
13whitelist ${HOME}/.links2
14
15private-bin links2
16
17# Redirect
18include links-common.profile
diff --git a/etc/profile-a-l/linphone.profile b/etc/profile-a-l/linphone.profile
index 7ebdbef4c..f821c7512 100644
--- a/etc/profile-a-l/linphone.profile
+++ b/etc/profile-a-l/linphone.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20 19
21# linphone 4.0 (released 2017-06-26) moved config and database files to respect 20# linphone 4.0 (released 2017-06-26) moved config and database files to respect
diff --git a/etc/profile-a-l/lmms.profile b/etc/profile-a-l/lmms.profile
index 48b0e14dc..d1a754a6e 100644
--- a/etc/profile-a-l/lmms.profile
+++ b/etc/profile-a-l/lmms.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
diff --git a/etc/profile-a-l/lollypop.profile b/etc/profile-a-l/lollypop.profile
index f2676fec5..fde338ff0 100644
--- a/etc/profile-a-l/lollypop.profile
+++ b/etc/profile-a-l/lollypop.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
@@ -38,6 +37,6 @@ seccomp
38shell none 37shell none
39 38
40private-dev 39private-dev
41private-etc alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-3.0,host.conf,hostname,hosts,machine-id,pki,pulse,resolv.conf,ssl,xdg 40private-etc alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,machine-id,pki,pulse,resolv.conf,ssl,xdg
42private-tmp 41private-tmp
43 42
diff --git a/etc/profile-a-l/lugaru.profile b/etc/profile-a-l/lugaru.profile
index 174c65a65..3d52d1266 100644
--- a/etc/profile-a-l/lugaru.profile
+++ b/etc/profile-a-l/lugaru.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-shell.inc 19include disable-shell.inc
21include disable-xdg.inc 20include disable-xdg.inc
diff --git a/etc/profile-a-l/luminance-hdr.profile b/etc/profile-a-l/luminance-hdr.profile
index 31067034e..179bc37f2 100644
--- a/etc/profile-a-l/luminance-hdr.profile
+++ b/etc/profile-a-l/luminance-hdr.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-a-l/lutris.profile b/etc/profile-a-l/lutris.profile
index d750e5fcd..71309b48f 100644
--- a/etc/profile-a-l/lutris.profile
+++ b/etc/profile-a-l/lutris.profile
@@ -9,11 +9,16 @@ include globals.local
9noblacklist ${PATH}/llvm* 9noblacklist ${PATH}/llvm*
10noblacklist ${HOME}/Games 10noblacklist ${HOME}/Games
11noblacklist ${HOME}/.cache/lutris 11noblacklist ${HOME}/.cache/lutris
12noblacklist ${HOME}/.cache/wine
12noblacklist ${HOME}/.cache/winetricks 13noblacklist ${HOME}/.cache/winetricks
13noblacklist ${HOME}/.config/lutris 14noblacklist ${HOME}/.config/lutris
14noblacklist ${HOME}/.local/share/lutris 15noblacklist ${HOME}/.local/share/lutris
15# noblacklist ${HOME}/.wine 16# noblacklist ${HOME}/.wine
16noblacklist /tmp/.wine-* 17noblacklist /tmp/.wine-*
18# Don't block access to /sbin and /usr/sbin to allow using ldconfig. Otherwise
19# Lutris won't even start.
20noblacklist /sbin
21noblacklist /usr/sbin
17 22
18ignore noexec ${HOME} 23ignore noexec ${HOME}
19 24
@@ -25,12 +30,12 @@ include disable-common.inc
25include disable-devel.inc 30include disable-devel.inc
26include disable-exec.inc 31include disable-exec.inc
27include disable-interpreters.inc 32include disable-interpreters.inc
28include disable-passwdmgr.inc
29include disable-programs.inc 33include disable-programs.inc
30include disable-xdg.inc 34include disable-xdg.inc
31 35
32mkdir ${HOME}/Games 36mkdir ${HOME}/Games
33mkdir ${HOME}/.cache/lutris 37mkdir ${HOME}/.cache/lutris
38mkdir ${HOME}/.cache/wine
34mkdir ${HOME}/.cache/winetricks 39mkdir ${HOME}/.cache/winetricks
35mkdir ${HOME}/.config/lutris 40mkdir ${HOME}/.config/lutris
36mkdir ${HOME}/.local/share/lutris 41mkdir ${HOME}/.local/share/lutris
@@ -38,6 +43,7 @@ mkdir ${HOME}/.local/share/lutris
38whitelist ${DOWNLOADS} 43whitelist ${DOWNLOADS}
39whitelist ${HOME}/Games 44whitelist ${HOME}/Games
40whitelist ${HOME}/.cache/lutris 45whitelist ${HOME}/.cache/lutris
46whitelist ${HOME}/.cache/wine
41whitelist ${HOME}/.cache/winetricks 47whitelist ${HOME}/.cache/winetricks
42whitelist ${HOME}/.config/lutris 48whitelist ${HOME}/.config/lutris
43whitelist ${HOME}/.local/share/lutris 49whitelist ${HOME}/.local/share/lutris
@@ -70,5 +76,7 @@ shell none
70#private-dev 76#private-dev
71private-tmp 77private-tmp
72 78
73dbus-user none 79dbus-user filter
80dbus-user.own net.lutris.Lutris
81dbus-user.talk com.feralinteractive.GameMode
74dbus-system none 82dbus-system none
diff --git a/etc/profile-a-l/lximage-qt.profile b/etc/profile-a-l/lximage-qt.profile
index b2a56012e..404535f91 100644
--- a/etc/profile-a-l/lximage-qt.profile
+++ b/etc/profile-a-l/lximage-qt.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include whitelist-var-common.inc 16include whitelist-var-common.inc
18 17
diff --git a/etc/profile-a-l/lxmusic.profile b/etc/profile-a-l/lxmusic.profile
index cc4b95551..0651b8329 100644
--- a/etc/profile-a-l/lxmusic.profile
+++ b/etc/profile-a-l/lxmusic.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
diff --git a/etc/profile-a-l/lynx.profile b/etc/profile-a-l/lynx.profile
index a919e924b..05a92e39d 100644
--- a/etc/profile-a-l/lynx.profile
+++ b/etc/profile-a-l/lynx.profile
@@ -13,7 +13,6 @@ blacklist ${RUNUSER}/wayland-*
13include disable-common.inc 13include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-a-l/lyx.profile b/etc/profile-a-l/lyx.profile
index fa69463d1..ae2f2d434 100644
--- a/etc/profile-a-l/lyx.profile
+++ b/etc/profile-a-l/lyx.profile
@@ -32,7 +32,7 @@ apparmor
32machine-id 32machine-id
33 33
34# private-bin atril,dvilualatex,env,latex,lua*,luatex,lyx,lyxclient,okular,pdf2latex,pdflatex,pdftex,perl*,python*,qpdf,qpdfview,sh,tex2lyx,texmf,xelatex 34# private-bin atril,dvilualatex,env,latex,lua*,luatex,lyx,lyxclient,okular,pdf2latex,pdflatex,pdftex,perl*,python*,qpdf,qpdfview,sh,tex2lyx,texmf,xelatex
35private-etc alternatives,dconf,fonts,gtk-2.0,gtk-3.0,locale,locale.alias,locale.conf,lyx,machine-id,mime.types,passwd,texmf,X11,xdg 35private-etc alternatives,dconf,fonts,gtk-2.0,gtk-3.0,ld.so.cache,ld.so.preload,locale,locale.alias,locale.conf,lyx,machine-id,mime.types,passwd,texmf,X11,xdg
36 36
37# Redirect 37# Redirect
38include latex-common.profile 38include latex-common.profile
diff --git a/etc/profile-m-z/Maelstrom.profile b/etc/profile-m-z/Maelstrom.profile
index 62d0a8b3a..3acb88e0e 100644
--- a/etc/profile-m-z/Maelstrom.profile
+++ b/etc/profile-m-z/Maelstrom.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
diff --git a/etc/profile-m-z/Mathematica.profile b/etc/profile-m-z/Mathematica.profile
index c2734b1c1..6286f066e 100644
--- a/etc/profile-m-z/Mathematica.profile
+++ b/etc/profile-m-z/Mathematica.profile
@@ -11,7 +11,6 @@ noblacklist ${HOME}/.Wolfram Research
11include disable-common.inc 11include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16 15
17mkdir ${HOME}/.Mathematica 16mkdir ${HOME}/.Mathematica
diff --git a/etc/profile-m-z/PCSX2.profile b/etc/profile-m-z/PCSX2.profile
index e678b7204..59150f4c4 100644
--- a/etc/profile-m-z/PCSX2.profile
+++ b/etc/profile-m-z/PCSX2.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-write-mnt.inc 19include disable-write-mnt.inc
diff --git a/etc/profile-m-z/QMediathekView.profile b/etc/profile-m-z/QMediathekView.profile
index 86120587b..17ea38073 100644
--- a/etc/profile-m-z/QMediathekView.profile
+++ b/etc/profile-m-z/QMediathekView.profile
@@ -23,7 +23,6 @@ include disable-common.inc
23include disable-devel.inc 23include disable-devel.inc
24include disable-exec.inc 24include disable-exec.inc
25include disable-interpreters.inc 25include disable-interpreters.inc
26include disable-passwdmgr.inc
27include disable-programs.inc 26include disable-programs.inc
28include disable-shell.inc 27include disable-shell.inc
29include disable-xdg.inc 28include disable-xdg.inc
diff --git a/etc/profile-m-z/QOwnNotes.profile b/etc/profile-m-z/QOwnNotes.profile
index 660378089..235640eeb 100644
--- a/etc/profile-m-z/QOwnNotes.profile
+++ b/etc/profile-m-z/QOwnNotes.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-shell.inc 19include disable-shell.inc
21include disable-xdg.inc 20include disable-xdg.inc
@@ -51,6 +50,6 @@ tracelog
51disable-mnt 50disable-mnt
52private-bin gio,QOwnNotes 51private-bin gio,QOwnNotes
53private-dev 52private-dev
54private-etc alternatives,ca-certificates,crypto-policies,fonts,host.conf,hosts,ld.so.cache,machine-id,nsswitch.conf,pki,pulse,resolv.conf,ssl 53private-etc alternatives,ca-certificates,crypto-policies,fonts,host.conf,hosts,ld.so.cache,ld.so.preload,machine-id,nsswitch.conf,pki,pulse,resolv.conf,ssl
55private-tmp 54private-tmp
56 55
diff --git a/etc/profile-m-z/Viber.profile b/etc/profile-m-z/Viber.profile
index 3195e39fa..89ca53af6 100644
--- a/etc/profile-m-z/Viber.profile
+++ b/etc/profile-m-z/Viber.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18mkdir ${HOME}/.ViberPC 17mkdir ${HOME}/.ViberPC
@@ -34,5 +33,5 @@ shell none
34 33
35disable-mnt 34disable-mnt
36private-bin awk,bash,dig,sh,Viber 35private-bin awk,bash,dig,sh,Viber
37private-etc alternatives,asound.conf,ca-certificates,crypto-policies,fonts,hosts,localtime,machine-id,mailcap,nsswitch.conf,pki,proxychains.conf,pulse,resolv.conf,ssl,X11 36private-etc alternatives,asound.conf,ca-certificates,crypto-policies,fonts,hosts,ld.so.cache,ld.so.preload,localtime,machine-id,mailcap,nsswitch.conf,pki,proxychains.conf,pulse,resolv.conf,ssl,X11
38private-tmp 37private-tmp
diff --git a/etc/profile-m-z/XMind.profile b/etc/profile-m-z/XMind.profile
index d78e04595..9c797a3e5 100644
--- a/etc/profile-m-z/XMind.profile
+++ b/etc/profile-m-z/XMind.profile
@@ -11,7 +11,6 @@ include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16 15
17mkdir ${HOME}/.xmind 16mkdir ${HOME}/.xmind
diff --git a/etc/profile-m-z/Xvfb.profile b/etc/profile-m-z/Xvfb.profile
index 1acd43023..722e12d9c 100644
--- a/etc/profile-m-z/Xvfb.profile
+++ b/etc/profile-m-z/Xvfb.profile
@@ -43,5 +43,5 @@ private
43# private-bin sh,xkbcomp,Xvfb 43# private-bin sh,xkbcomp,Xvfb
44# private-bin bash,cat,ls,sh,strace,xkbcomp,Xvfb 44# private-bin bash,cat,ls,sh,strace,xkbcomp,Xvfb
45private-dev 45private-dev
46private-etc alternatives,gai.conf,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,nsswitch.conf,resolv.conf 46private-etc alternatives,gai.conf,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.preload,nsswitch.conf,resolv.conf
47private-tmp 47private-tmp
diff --git a/etc/profile-m-z/ZeGrapher.profile b/etc/profile-m-z/ZeGrapher.profile
index 7686c3442..21482a161 100644
--- a/etc/profile-m-z/ZeGrapher.profile
+++ b/etc/profile-m-z/ZeGrapher.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18 17
diff --git a/etc/profile-m-z/macrofusion.profile b/etc/profile-m-z/macrofusion.profile
index d1dcb6fe0..88b68d43f 100644
--- a/etc/profile-m-z/macrofusion.profile
+++ b/etc/profile-m-z/macrofusion.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-shell.inc 20include disable-shell.inc
22include disable-xdg.inc 21include disable-xdg.inc
diff --git a/etc/profile-m-z/magicor.profile b/etc/profile-m-z/magicor.profile
index 8a27b2626..47165dd3d 100644
--- a/etc/profile-m-z/magicor.profile
+++ b/etc/profile-m-z/magicor.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-shell.inc 19include disable-shell.inc
21include disable-xdg.inc 20include disable-xdg.inc
@@ -46,7 +45,7 @@ disable-mnt
46private-bin magicor,python2* 45private-bin magicor,python2*
47private-cache 46private-cache
48private-dev 47private-dev
49private-etc machine-id 48private-etc alternatives,ld.so.cache,ld.so.preload,machine-id
50private-tmp 49private-tmp
51 50
52dbus-user none 51dbus-user none
diff --git a/etc/profile-m-z/make.profile b/etc/profile-m-z/make.profile
new file mode 100644
index 000000000..7e9638fe4
--- /dev/null
+++ b/etc/profile-m-z/make.profile
@@ -0,0 +1,13 @@
1# Firejail profile for make
2# Description: GNU make utility to maintain groups of programs
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include make.local
7# Persistent global definitions
8include globals.local
9
10memory-deny-write-execute
11
12# Redirect
13include build-systems-common.profile
diff --git a/etc/profile-m-z/makepkg.profile b/etc/profile-m-z/makepkg.profile
index 513fcae55..3a68cce00 100644
--- a/etc/profile-m-z/makepkg.profile
+++ b/etc/profile-m-z/makepkg.profile
@@ -32,7 +32,6 @@ noblacklist /var/lib/pacman
32 32
33include disable-common.inc 33include disable-common.inc
34include disable-exec.inc 34include disable-exec.inc
35include disable-passwdmgr.inc
36include disable-programs.inc 35include disable-programs.inc
37 36
38caps.drop all 37caps.drop all
diff --git a/etc/profile-m-z/man.profile b/etc/profile-m-z/man.profile
index bd510fcac..ed3dac10e 100644
--- a/etc/profile-m-z/man.profile
+++ b/etc/profile-m-z/man.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-xdg.inc 20include disable-xdg.inc
22 21
@@ -26,7 +25,6 @@ include disable-xdg.inc
26whitelist /usr/share/groff 25whitelist /usr/share/groff
27whitelist /usr/share/info 26whitelist /usr/share/info
28whitelist /usr/share/lintian 27whitelist /usr/share/lintian
29whitelist /usr/share/locale
30whitelist /usr/share/man 28whitelist /usr/share/man
31whitelist /var/cache/man 29whitelist /var/cache/man
32#include whitelist-common.inc 30#include whitelist-common.inc
@@ -59,7 +57,7 @@ disable-mnt
59#private-bin apropos,bash,cat,catman,col,gpreconv,groff,grotty,gunzip,gzip,less,man,most,nroff,preconv,sed,sh,tbl,tr,troff,whatis,which,xtotroff,zcat,zsoelim 57#private-bin apropos,bash,cat,catman,col,gpreconv,groff,grotty,gunzip,gzip,less,man,most,nroff,preconv,sed,sh,tbl,tr,troff,whatis,which,xtotroff,zcat,zsoelim
60private-cache 58private-cache
61private-dev 59private-dev
62private-etc alternatives,fonts,groff,locale,locale.alias,locale.conf,man_db.conf,manpath.config,selinux,sysless,xdg 60private-etc alternatives,fonts,groff,ld.so.cache,ld.so.preload,locale,locale.alias,locale.conf,man_db.conf,manpath.config,selinux,sysless,xdg
63#private-tmp 61#private-tmp
64 62
65dbus-user none 63dbus-user none
@@ -67,4 +65,4 @@ dbus-system none
67 65
68memory-deny-write-execute 66memory-deny-write-execute
69read-only ${HOME} 67read-only ${HOME}
70read-only /tmp 68#read-only /tmp # breaks mandoc (see #4927)
diff --git a/etc/profile-m-z/manaplus.profile b/etc/profile-m-z/manaplus.profile
index f59a56ac6..28dc5d914 100644
--- a/etc/profile-m-z/manaplus.profile
+++ b/etc/profile-m-z/manaplus.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
diff --git a/etc/profile-m-z/marker.profile b/etc/profile-m-z/marker.profile
index 087c02964..746135ae5 100644
--- a/etc/profile-m-z/marker.profile
+++ b/etc/profile-m-z/marker.profile
@@ -20,11 +20,11 @@ include disable-common.inc
20include disable-devel.inc 20include disable-devel.inc
21include disable-exec.inc 21include disable-exec.inc
22include disable-interpreters.inc 22include disable-interpreters.inc
23include disable-passwdmgr.inc
24include disable-programs.inc 23include disable-programs.inc
25include disable-shell.inc 24include disable-shell.inc
26include disable-xdg.inc 25include disable-xdg.inc
27 26
27whitelist /usr/libexec/webkit2gtk-4.0
28whitelist /usr/share/com.github.fabiocolacio.marker 28whitelist /usr/share/com.github.fabiocolacio.marker
29include whitelist-runuser-common.inc 29include whitelist-runuser-common.inc
30include whitelist-usr-share-common.inc 30include whitelist-usr-share-common.inc
diff --git a/etc/profile-m-z/masterpdfeditor.profile b/etc/profile-m-z/masterpdfeditor.profile
index de1135071..764d040ab 100644
--- a/etc/profile-m-z/masterpdfeditor.profile
+++ b/etc/profile-m-z/masterpdfeditor.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19include whitelist-var-common.inc 18include whitelist-var-common.inc
@@ -37,6 +36,6 @@ tracelog
37 36
38private-cache 37private-cache
39private-dev 38private-dev
40private-etc alternatives,fonts 39private-etc alternatives,fonts,ld.so.cache,ld.so.preload
41private-tmp 40private-tmp
42 41
diff --git a/etc/profile-m-z/mate-calc.profile b/etc/profile-m-z/mate-calc.profile
index 39ee7439d..2be6b9af1 100644
--- a/etc/profile-m-z/mate-calc.profile
+++ b/etc/profile-m-z/mate-calc.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18mkdir ${HOME}/.cache/mate-calc 17mkdir ${HOME}/.cache/mate-calc
@@ -43,7 +42,7 @@ shell none
43 42
44disable-mnt 43disable-mnt
45private-bin mate-calc,mate-calculator 44private-bin mate-calc,mate-calculator
46private-etc alternatives,dconf,fonts,gtk-3.0 45private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload
47private-dev 46private-dev
48private-opt none 47private-opt none
49private-tmp 48private-tmp
diff --git a/etc/profile-m-z/mate-color-select.profile b/etc/profile-m-z/mate-color-select.profile
index 007bab30d..e16b0fc6c 100644
--- a/etc/profile-m-z/mate-color-select.profile
+++ b/etc/profile-m-z/mate-color-select.profile
@@ -9,7 +9,6 @@ include disable-common.inc
9include disable-devel.inc 9include disable-devel.inc
10include disable-exec.inc 10include disable-exec.inc
11include disable-interpreters.inc 11include disable-interpreters.inc
12include disable-passwdmgr.inc
13include disable-programs.inc 12include disable-programs.inc
14include disable-shell.inc 13include disable-shell.inc
15 14
@@ -34,7 +33,7 @@ shell none
34 33
35disable-mnt 34disable-mnt
36private-bin mate-color-select 35private-bin mate-color-select
37private-etc alternatives,fonts 36private-etc alternatives,fonts,ld.so.cache,ld.so.preload
38private-dev 37private-dev
39private-lib 38private-lib
40private-tmp 39private-tmp
diff --git a/etc/profile-m-z/mate-dictionary.profile b/etc/profile-m-z/mate-dictionary.profile
index ae1fcbf62..469416304 100644
--- a/etc/profile-m-z/mate-dictionary.profile
+++ b/etc/profile-m-z/mate-dictionary.profile
@@ -11,7 +11,6 @@ include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-shell.inc 15include disable-shell.inc
17 16
@@ -38,7 +37,7 @@ shell none
38 37
39disable-mnt 38disable-mnt
40private-bin mate-dictionary 39private-bin mate-dictionary
41private-etc alternatives,ca-certificates,crypto-policies,fonts,pki,resolv.conf,ssl 40private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.preload,pki,resolv.conf,ssl
42private-opt mate-dictionary 41private-opt mate-dictionary
43private-dev 42private-dev
44private-tmp 43private-tmp
diff --git a/etc/profile-m-z/mcabber.profile b/etc/profile-m-z/mcabber.profile
index 38d2d8d63..4c4a6aa76 100644
--- a/etc/profile-m-z/mcabber.profile
+++ b/etc/profile-m-z/mcabber.profile
@@ -12,7 +12,6 @@ noblacklist ${HOME}/.mcabberrc
12include disable-common.inc 12include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18 17
@@ -32,4 +31,4 @@ shell none
32 31
33private-bin mcabber 32private-bin mcabber
34private-dev 33private-dev
35private-etc alternatives,ca-certificates,crypto-policies,pki,ssl 34private-etc alternatives,ca-certificates,crypto-policies,ld.so.cache,ld.so.preload,pki,ssl
diff --git a/etc/profile-m-z/mcomix.profile b/etc/profile-m-z/mcomix.profile
new file mode 100644
index 000000000..5c965f55c
--- /dev/null
+++ b/etc/profile-m-z/mcomix.profile
@@ -0,0 +1,73 @@
1# Firejail profile for mcomix
2# Description: A comic book and manga viewer in python
3# This file is overwritten after every install/update
4# Persistent local customizations
5include mcomix.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.config/mcomix
10noblacklist ${HOME}/.local/share/mcomix
11noblacklist ${DOCUMENTS}
12
13# Allow /bin/sh (blacklisted by disable-shell.inc)
14include allow-bin-sh.inc
15
16# Allow python (blacklisted by disable-interpreters.inc)
17# mcomix <= 1.2 uses python2
18include allow-python2.inc
19include allow-python3.inc
20
21include disable-common.inc
22include disable-devel.inc
23include disable-exec.inc
24include disable-interpreters.inc
25include disable-programs.inc
26include disable-shell.inc
27include disable-write-mnt.inc
28include disable-xdg.inc
29
30mkdir ${HOME}/.config/mcomix
31mkdir ${HOME}/.local/share/mcomix
32whitelist /usr/share/mcomix
33include whitelist-usr-share-common.inc
34include whitelist-var-common.inc
35include whitelist-runuser-common.inc
36
37apparmor
38caps.drop all
39machine-id
40net none
41nodvd
42nogroups
43noinput
44nonewprivs
45noroot
46nosound
47notv
48nou2f
49novideo
50protocol unix
51seccomp
52seccomp.block-secondary
53shell none
54tracelog
55
56# mcomix <= 1.2 uses python2
57private-bin 7z,lha,mcomix,mutool,python*,rar,sh,unrar,unzip
58private-cache
59private-dev
60# mcomix <= 1.2 uses gtk-2.0
61private-etc alternatives,dconf,fonts,gconf,gtk-2.0,gtk-3.0,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,localtime,machine-id,mime.types,pango,passwd,X11,xdg
62private-tmp
63
64dbus-user none
65dbus-system none
66
67read-only ${HOME}
68read-write ${HOME}/.config/mcomix
69read-write ${HOME}/.local/share/mcomix
70#to allow ${HOME}/.local/share/recently-used.xbel
71read-write ${HOME}/.local/share
72# used by mcomix <= 1.2, tip, make a symbolic link to .cache/thumbnails
73read-write ${HOME}/.thumbnails
diff --git a/etc/profile-m-z/mdr.profile b/etc/profile-m-z/mdr.profile
index 5d3f8dc41..bcfd59cbb 100644
--- a/etc/profile-m-z/mdr.profile
+++ b/etc/profile-m-z/mdr.profile
@@ -11,7 +11,6 @@ include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-shell.inc 15include disable-shell.inc
17include disable-xdg.inc 16include disable-xdg.inc
@@ -46,7 +45,7 @@ disable-mnt
46private-bin mdr 45private-bin mdr
47private-cache 46private-cache
48private-dev 47private-dev
49private-etc none 48private-etc alternatives,ld.so.cache,ld.so.preload
50private-lib 49private-lib
51private-tmp 50private-tmp
52 51
diff --git a/etc/profile-m-z/mediainfo.profile b/etc/profile-m-z/mediainfo.profile
index 17363624f..6a10edb9e 100644
--- a/etc/profile-m-z/mediainfo.profile
+++ b/etc/profile-m-z/mediainfo.profile
@@ -1,6 +1,7 @@
1# Firejail profile for mediainfo 1# Firejail profile for mediainfo
2# Description: Command-line utility for reading information from audio/video files 2# Description: Command-line utility for reading information from audio/video 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 mediainfo.local 6include mediainfo.local
6# Persistent global definitions 7# Persistent global definitions
@@ -12,7 +13,6 @@ include disable-common.inc
12include disable-devel.inc 13include disable-devel.inc
13include disable-exec.inc 14include disable-exec.inc
14include disable-interpreters.inc 15include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 16include disable-programs.inc
17include disable-shell.inc 17include disable-shell.inc
18 18
@@ -43,7 +43,7 @@ x11 none
43private-bin mediainfo 43private-bin mediainfo
44private-cache 44private-cache
45private-dev 45private-dev
46private-etc alternatives 46private-etc alternatives,ld.so.cache,ld.so.preload
47private-tmp 47private-tmp
48 48
49dbus-user none 49dbus-user none
diff --git a/etc/profile-m-z/mediathekview.profile b/etc/profile-m-z/mediathekview.profile
index 0063badd8..f0ef7d010 100644
--- a/etc/profile-m-z/mediathekview.profile
+++ b/etc/profile-m-z/mediathekview.profile
@@ -17,6 +17,8 @@ noblacklist ${HOME}/.mediathek3
17noblacklist ${HOME}/.mplayer 17noblacklist ${HOME}/.mplayer
18noblacklist ${VIDEOS} 18noblacklist ${VIDEOS}
19 19
20ignore noexec /tmp
21
20# Allow java (blacklisted by disable-devel.inc) 22# Allow java (blacklisted by disable-devel.inc)
21include allow-java.inc 23include allow-java.inc
22 24
@@ -24,10 +26,11 @@ include disable-common.inc
24include disable-devel.inc 26include disable-devel.inc
25include disable-exec.inc 27include disable-exec.inc
26include disable-interpreters.inc 28include disable-interpreters.inc
27include disable-passwdmgr.inc
28include disable-programs.inc 29include disable-programs.inc
29include disable-xdg.inc 30include disable-xdg.inc
30 31
32mkdir ${HOME}/.mediathek3
33whitelist ${HOME}/.mediathek3
31include whitelist-var-common.inc 34include whitelist-var-common.inc
32 35
33caps.drop all 36caps.drop all
diff --git a/etc/profile-m-z/megaglest.profile b/etc/profile-m-z/megaglest.profile
index 972838729..d55745698 100644
--- a/etc/profile-m-z/megaglest.profile
+++ b/etc/profile-m-z/megaglest.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -20,6 +19,7 @@ include disable-xdg.inc
20mkdir ${HOME}/.megaglest 19mkdir ${HOME}/.megaglest
21whitelist ${HOME}/.megaglest 20whitelist ${HOME}/.megaglest
22whitelist /usr/share/megaglest 21whitelist /usr/share/megaglest
22whitelist /usr/share/games/megaglest # Debian version
23include whitelist-common.inc 23include whitelist-common.inc
24include whitelist-runuser-common.inc 24include whitelist-runuser-common.inc
25include whitelist-usr-share-common.inc 25include whitelist-usr-share-common.inc
diff --git a/etc/profile-m-z/meld.profile b/etc/profile-m-z/meld.profile
index 1225cc107..4aeca0f28 100644
--- a/etc/profile-m-z/meld.profile
+++ b/etc/profile-m-z/meld.profile
@@ -29,12 +29,13 @@ include allow-python3.inc
29# Allow ssh (blacklisted by disable-common.inc) 29# Allow ssh (blacklisted by disable-common.inc)
30include allow-ssh.inc 30include allow-ssh.inc
31 31
32blacklist /usr/libexec
33
32# Add the next line to your meld.local if you don't need to compare files in disable-common.inc. 34# Add the next line to your meld.local if you don't need to compare files in disable-common.inc.
33#include disable-common.inc 35#include disable-common.inc
34include disable-devel.inc 36include disable-devel.inc
35include disable-exec.inc 37include disable-exec.inc
36include disable-interpreters.inc 38include disable-interpreters.inc
37include disable-passwdmgr.inc
38# Add the next line to your meld.local if you don't need to compare files in disable-programs.inc. 39# Add the next line to your meld.local if you don't need to compare files in disable-programs.inc.
39#include disable-programs.inc 40#include disable-programs.inc
40include disable-shell.inc 41include disable-shell.inc
diff --git a/etc/profile-m-z/mencoder.profile b/etc/profile-m-z/mencoder.profile
index caf238785..3909e543e 100644
--- a/etc/profile-m-z/mencoder.profile
+++ b/etc/profile-m-z/mencoder.profile
@@ -11,7 +11,6 @@ include mencoder.local
11#include disable-common.inc 11#include disable-common.inc
12#include disable-devel.inc 12#include disable-devel.inc
13#include disable-interpreters.inc 13#include disable-interpreters.inc
14#include disable-passwdmgr.inc
15#include disable-programs.inc 14#include disable-programs.inc
16 15
17ipc-namespace 16ipc-namespace
diff --git a/etc/profile-m-z/mendeleydesktop.profile b/etc/profile-m-z/mendeleydesktop.profile
index c0bdbb230..446109e9a 100644
--- a/etc/profile-m-z/mendeleydesktop.profile
+++ b/etc/profile-m-z/mendeleydesktop.profile
@@ -22,7 +22,6 @@ include disable-common.inc
22include disable-devel.inc 22include disable-devel.inc
23include disable-exec.inc 23include disable-exec.inc
24include disable-interpreters.inc 24include disable-interpreters.inc
25include disable-passwdmgr.inc
26include disable-programs.inc 25include disable-programs.inc
27 26
28include whitelist-var-common.inc 27include whitelist-var-common.inc
diff --git a/etc/profile-m-z/menulibre.profile b/etc/profile-m-z/menulibre.profile
index 2081b8c96..ed0758a49 100644
--- a/etc/profile-m-z/menulibre.profile
+++ b/etc/profile-m-z/menulibre.profile
@@ -15,7 +15,6 @@ include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-programs.inc 17include disable-programs.inc
18include disable-passwdmgr.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
21# Whitelist your system icon directory,varies by distro 20# Whitelist your system icon directory,varies by distro
@@ -53,7 +52,7 @@ tracelog
53disable-mnt 52disable-mnt
54private-cache 53private-cache
55private-dev 54private-dev
56private-etc alternatives,dconf,fonts,gtk-3.0,locale.alias,locale.conf,mime.types,nsswitch.conf,passwd,pki,selinux,X11,xdg 55private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload,locale.alias,locale.conf,mime.types,nsswitch.conf,passwd,pki,selinux,X11,xdg
57private-tmp 56private-tmp
58 57
59dbus-user none 58dbus-user none
diff --git a/etc/profile-m-z/meson.profile b/etc/profile-m-z/meson.profile
new file mode 100644
index 000000000..b4909a9d8
--- /dev/null
+++ b/etc/profile-m-z/meson.profile
@@ -0,0 +1,14 @@
1# Firejail profile for meson
2# Description: A high productivity build system
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include meson.local
7# Persistent global definitions
8include globals.local
9
10# Allow python3 (blacklisted by disable-interpreters.inc)
11include allow-python3.inc
12
13# Redirect
14include build-systems-common.profile
diff --git a/etc/profile-m-z/meteo-qt.profile b/etc/profile-m-z/meteo-qt.profile
index 85ed7bc74..bdd36949b 100644
--- a/etc/profile-m-z/meteo-qt.profile
+++ b/etc/profile-m-z/meteo-qt.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-shell.inc 20include disable-shell.inc
22include disable-xdg.inc 21include disable-xdg.inc
diff --git a/etc/profile-m-z/microsoft-edge-beta.profile b/etc/profile-m-z/microsoft-edge-beta.profile
new file mode 100644
index 000000000..095038f08
--- /dev/null
+++ b/etc/profile-m-z/microsoft-edge-beta.profile
@@ -0,0 +1,20 @@
1# Firejail profile for Microsoft Edge Beta
2# Description: Web browser from Microsoft,beta channel
3# This file is overwritten after every install/update
4# Persistent local customizations
5include microsoft-edge-beta.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.cache/microsoft-edge-beta
10noblacklist ${HOME}/.config/microsoft-edge-beta
11
12mkdir ${HOME}/.cache/microsoft-edge-beta
13mkdir ${HOME}/.config/microsoft-edge-beta
14whitelist ${HOME}/.cache/microsoft-edge-beta
15whitelist ${HOME}/.config/microsoft-edge-beta
16
17private-opt microsoft
18
19# Redirect
20include chromium-common.profile
diff --git a/etc/profile-m-z/midori.profile b/etc/profile-m-z/midori.profile
index e15259608..eb037f51b 100644
--- a/etc/profile-m-z/midori.profile
+++ b/etc/profile-m-z/midori.profile
@@ -12,10 +12,10 @@ include globals.local
12noblacklist ${HOME}/.cache/midori 12noblacklist ${HOME}/.cache/midori
13noblacklist ${HOME}/.config/midori 13noblacklist ${HOME}/.config/midori
14noblacklist ${HOME}/.local/share/midori 14noblacklist ${HOME}/.local/share/midori
15noblacklist ${HOME}/.local/share/pki
15# noblacklist ${HOME}/.local/share/webkit 16# noblacklist ${HOME}/.local/share/webkit
16# noblacklist ${HOME}/.local/share/webkitgtk 17# noblacklist ${HOME}/.local/share/webkitgtk
17noblacklist ${HOME}/.pki 18noblacklist ${HOME}/.pki
18noblacklist ${HOME}/.local/share/pki
19 19
20noblacklist ${HOME}/.cache/gnome-mplayer 20noblacklist ${HOME}/.cache/gnome-mplayer
21noblacklist ${HOME}/.config/gnome-mplayer 21noblacklist ${HOME}/.config/gnome-mplayer
@@ -25,17 +25,16 @@ include disable-common.inc
25include disable-devel.inc 25include disable-devel.inc
26include disable-exec.inc 26include disable-exec.inc
27include disable-interpreters.inc 27include disable-interpreters.inc
28#include disable-passwdmgr.inc
29include disable-programs.inc 28include disable-programs.inc
30include disable-xdg.inc 29include disable-xdg.inc
31 30
32mkdir ${HOME}/.cache/midori 31mkdir ${HOME}/.cache/midori
33mkdir ${HOME}/.config/midori 32mkdir ${HOME}/.config/midori
34mkdir ${HOME}/.local/share/midori 33mkdir ${HOME}/.local/share/midori
34mkdir ${HOME}/.local/share/pki
35mkdir ${HOME}/.local/share/webkit 35mkdir ${HOME}/.local/share/webkit
36mkdir ${HOME}/.local/share/webkitgtk 36mkdir ${HOME}/.local/share/webkitgtk
37mkdir ${HOME}/.pki 37mkdir ${HOME}/.pki
38mkdir ${HOME}/.local/share/pki
39whitelist ${DOWNLOADS} 38whitelist ${DOWNLOADS}
40whitelist ${HOME}/.cache/gnome-mplayer/plugin 39whitelist ${HOME}/.cache/gnome-mplayer/plugin
41whitelist ${HOME}/.cache/midori 40whitelist ${HOME}/.cache/midori
@@ -43,10 +42,10 @@ whitelist ${HOME}/.config/gnome-mplayer
43whitelist ${HOME}/.config/midori 42whitelist ${HOME}/.config/midori
44whitelist ${HOME}/.lastpass 43whitelist ${HOME}/.lastpass
45whitelist ${HOME}/.local/share/midori 44whitelist ${HOME}/.local/share/midori
45whitelist ${HOME}/.local/share/pki
46whitelist ${HOME}/.local/share/webkit 46whitelist ${HOME}/.local/share/webkit
47whitelist ${HOME}/.local/share/webkitgtk 47whitelist ${HOME}/.local/share/webkitgtk
48whitelist ${HOME}/.pki 48whitelist ${HOME}/.pki
49whitelist ${HOME}/.local/share/pki
50include whitelist-common.inc 49include whitelist-common.inc
51include whitelist-var-common.inc 50include whitelist-var-common.inc
52 51
diff --git a/etc/profile-m-z/mindless.profile b/etc/profile-m-z/mindless.profile
index fbf6b58e8..16ace7ce4 100644
--- a/etc/profile-m-z/mindless.profile
+++ b/etc/profile-m-z/mindless.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16include disable-xdg.inc 15include disable-xdg.inc
@@ -43,7 +42,7 @@ private
43private-bin mindless 42private-bin mindless
44private-cache 43private-cache
45private-dev 44private-dev
46private-etc fonts 45private-etc alternatives,fonts,ld.so.cache,ld.so.preload
47private-tmp 46private-tmp
48 47
49dbus-user none 48dbus-user none
diff --git a/etc/profile-m-z/minecraft-launcher.profile b/etc/profile-m-z/minecraft-launcher.profile
index cdea91b8f..d4f3e344e 100644
--- a/etc/profile-m-z/minecraft-launcher.profile
+++ b/etc/profile-m-z/minecraft-launcher.profile
@@ -6,7 +6,8 @@ include minecraft-launcher.local
6# Persistent global definitions 6# Persistent global definitions
7include globals.local 7include globals.local
8 8
9# On some distros executable may be in '/opt/minecraft-launcher/', if so, run 'firejail /opt/minecraft-launcher/minecraft-launcher' to start it. 9# Some distros put the executable in /opt/minecraft-launcher.
10# Run 'firejail /opt/minecraft-launcher/minecraft-launcher' to start it.
10 11
11ignore noexec ${HOME} 12ignore noexec ${HOME}
12 13
@@ -18,7 +19,6 @@ include disable-common.inc
18include disable-devel.inc 19include disable-devel.inc
19include disable-exec.inc 20include disable-exec.inc
20include disable-interpreters.inc 21include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 22include disable-programs.inc
23include disable-shell.inc 23include disable-shell.inc
24include disable-xdg.inc 24include disable-xdg.inc
@@ -30,7 +30,6 @@ include whitelist-runuser-common.inc
30include whitelist-usr-share-common.inc 30include whitelist-usr-share-common.inc
31include whitelist-var-common.inc 31include whitelist-var-common.inc
32 32
33apparmor
34caps.drop all 33caps.drop all
35netfilter 34netfilter
36nodvd 35nodvd
@@ -50,7 +49,8 @@ disable-mnt
50private-bin java,java-config,minecraft-launcher 49private-bin java,java-config,minecraft-launcher
51private-cache 50private-cache
52private-dev 51private-dev
53# If multiplayer or realms break add your own java folder from /etc or comment the line below. 52# If multiplayer or realms break, add 'private-etc <your-own-java-folder-from-/etc>'
53# or 'ignore private-etc' to your minecraft-launcher.local.
54private-etc alternatives,asound.conf,ati,ca-certificates,crypto-policies,drirc,fonts,group,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,java-10-openjdk,java-11-openjdk,java-12-openjdk,java-13-openjdk,java-14-openjdk,java-7-openjdk,java-8-openjdk,java-9-openjdk,java-openjdk,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,localtime,login.defs,machine-id,mime.types,nvidia,passwd,pki,pulse,resolv.conf,selinux,services,ssl,timezone,X11,xdg 54private-etc alternatives,asound.conf,ati,ca-certificates,crypto-policies,drirc,fonts,group,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,java-10-openjdk,java-11-openjdk,java-12-openjdk,java-13-openjdk,java-14-openjdk,java-7-openjdk,java-8-openjdk,java-9-openjdk,java-openjdk,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,localtime,login.defs,machine-id,mime.types,nvidia,passwd,pki,pulse,resolv.conf,selinux,services,ssl,timezone,X11,xdg
55private-opt minecraft-launcher 55private-opt minecraft-launcher
56private-tmp 56private-tmp
diff --git a/etc/profile-m-z/minetest.profile b/etc/profile-m-z/minetest.profile
index cad1adbda..ec5de821a 100644
--- a/etc/profile-m-z/minetest.profile
+++ b/etc/profile-m-z/minetest.profile
@@ -19,7 +19,6 @@ include disable-common.inc
19include disable-devel.inc 19include disable-devel.inc
20include disable-exec.inc 20include disable-exec.inc
21include disable-interpreters.inc 21include disable-interpreters.inc
22include disable-passwdmgr.inc
23include disable-programs.inc 22include disable-programs.inc
24include disable-shell.inc 23include disable-shell.inc
25include disable-xdg.inc 24include disable-xdg.inc
diff --git a/etc/profile-m-z/minitube.profile b/etc/profile-m-z/minitube.profile
index 3fe3428d0..581af9b81 100644
--- a/etc/profile-m-z/minitube.profile
+++ b/etc/profile-m-z/minitube.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-shell.inc 21include disable-shell.inc
23include disable-xdg.inc 22include disable-xdg.inc
@@ -47,7 +46,7 @@ notv
47nou2f 46nou2f
48novideo 47novideo
49protocol unix,inet,inet6,netlink 48protocol unix,inet,inet6,netlink
50seccomp !kcmp 49seccomp
51shell none 50shell none
52tracelog 51tracelog
53 52
diff --git a/etc/profile-m-z/mirage.profile b/etc/profile-m-z/mirage.profile
index 505009283..5a8544965 100644
--- a/etc/profile-m-z/mirage.profile
+++ b/etc/profile-m-z/mirage.profile
@@ -19,7 +19,6 @@ include disable-common.inc
19include disable-devel.inc 19include disable-devel.inc
20include disable-exec.inc 20include disable-exec.inc
21include disable-interpreters.inc 21include disable-interpreters.inc
22include disable-passwdmgr.inc
23include disable-programs.inc 22include disable-programs.inc
24include disable-shell.inc 23include disable-shell.inc
25include disable-xdg.inc 24include disable-xdg.inc
diff --git a/etc/profile-m-z/mirrormagic.profile b/etc/profile-m-z/mirrormagic.profile
index 58dfd56f5..be846ce63 100644
--- a/etc/profile-m-z/mirrormagic.profile
+++ b/etc/profile-m-z/mirrormagic.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -45,7 +44,7 @@ private
45private-bin mirrormagic 44private-bin mirrormagic
46private-cache 45private-cache
47private-dev 46private-dev
48private-etc machine-id 47private-etc alternatives,ld.so.cache,ld.so.preload,machine-id
49private-tmp 48private-tmp
50 49
51dbus-user none 50dbus-user none
diff --git a/etc/profile-m-z/mocp.profile b/etc/profile-m-z/mocp.profile
index e71ba4569..313d78030 100644
--- a/etc/profile-m-z/mocp.profile
+++ b/etc/profile-m-z/mocp.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
@@ -43,7 +42,7 @@ tracelog
43private-bin mocp 42private-bin mocp
44private-cache 43private-cache
45private-dev 44private-dev
46private-etc alternatives,asound.conf,ca-certificates,crypto-policies,group,machine-id,pki,pulse,resolv.conf,ssl 45private-etc alternatives,asound.conf,ca-certificates,crypto-policies,group,ld.so.cache,ld.so.preload,machine-id,pki,pulse,resolv.conf,ssl
47private-tmp 46private-tmp
48 47
49dbus-user none 48dbus-user none
diff --git a/etc/profile-m-z/mousepad.profile b/etc/profile-m-z/mousepad.profile
index 98063fa7c..2939d9bde 100644
--- a/etc/profile-m-z/mousepad.profile
+++ b/etc/profile-m-z/mousepad.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18 17
diff --git a/etc/profile-m-z/mp3splt-gtk.profile b/etc/profile-m-z/mp3splt-gtk.profile
index 37ce60e04..fe3c78b55 100644
--- a/etc/profile-m-z/mp3splt-gtk.profile
+++ b/etc/profile-m-z/mp3splt-gtk.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18 17
@@ -38,7 +37,7 @@ tracelog
38private-bin mp3splt-gtk 37private-bin mp3splt-gtk
39private-cache 38private-cache
40private-dev 39private-dev
41private-etc alsa,alternatives,asound.conf,dconf,fonts,gtk-3.0,machine-id,openal,pulse 40private-etc alsa,alternatives,asound.conf,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload,machine-id,openal,pulse
42private-tmp 41private-tmp
43 42
44dbus-user none 43dbus-user none
diff --git a/etc/profile-m-z/mp3splt.profile b/etc/profile-m-z/mp3splt.profile
index 070de8451..c89c72ce4 100644
--- a/etc/profile-m-z/mp3splt.profile
+++ b/etc/profile-m-z/mp3splt.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
@@ -45,7 +44,7 @@ disable-mnt
45private-bin flacsplt,mp3splt,mp3wrap,oggsplt 44private-bin flacsplt,mp3splt,mp3wrap,oggsplt
46private-cache 45private-cache
47private-dev 46private-dev
48private-etc alternatives 47private-etc alternatives,ld.so.cache,ld.so.preload
49private-tmp 48private-tmp
50 49
51memory-deny-write-execute 50memory-deny-write-execute
diff --git a/etc/profile-m-z/mpDris2.profile b/etc/profile-m-z/mpDris2.profile
index 55a0b5897..18a839363 100644
--- a/etc/profile-m-z/mpDris2.profile
+++ b/etc/profile-m-z/mpDris2.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-shell.inc 22include disable-shell.inc
24include disable-xdg.inc 23include disable-xdg.inc
@@ -50,7 +49,7 @@ shell none
50private-bin mpDris2,notify-send,python* 49private-bin mpDris2,notify-send,python*
51private-cache 50private-cache
52private-dev 51private-dev
53private-etc alternatives,hosts,nsswitch.conf 52private-etc alternatives,hosts,ld.so.cache,ld.so.preload,nsswitch.conf
54private-lib libdbus-1.so.*,libdbus-glib-1.so.*,libgirepository-1.0.so.*,libnotify.so.*,libpython*,python2*,python3* 53private-lib libdbus-1.so.*,libdbus-glib-1.so.*,libgirepository-1.0.so.*,libnotify.so.*,libpython*,python2*,python3*
55private-tmp 54private-tmp
56 55
diff --git a/etc/profile-m-z/mpd.profile b/etc/profile-m-z/mpd.profile
index b517d4ab2..761d5b041 100644
--- a/etc/profile-m-z/mpd.profile
+++ b/etc/profile-m-z/mpd.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-xdg.inc 19include disable-xdg.inc
21 20
diff --git a/etc/profile-m-z/mpg123.profile b/etc/profile-m-z/mpg123.profile
index 25187e894..c3bff23bc 100644
--- a/etc/profile-m-z/mpg123.profile
+++ b/etc/profile-m-z/mpg123.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-m-z/mplayer.profile b/etc/profile-m-z/mplayer.profile
index 5d023b7f1..2d51d9884 100644
--- a/etc/profile-m-z/mplayer.profile
+++ b/etc/profile-m-z/mplayer.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18read-only ${DESKTOP} 17read-only ${DESKTOP}
diff --git a/etc/profile-m-z/mpsyt.profile b/etc/profile-m-z/mpsyt.profile
index bfe57a132..ffc7698c7 100644
--- a/etc/profile-m-z/mpsyt.profile
+++ b/etc/profile-m-z/mpsyt.profile
@@ -27,7 +27,6 @@ include disable-common.inc
27include disable-devel.inc 27include disable-devel.inc
28include disable-exec.inc 28include disable-exec.inc
29include disable-interpreters.inc 29include disable-interpreters.inc
30include disable-passwdmgr.inc
31include disable-programs.inc 30include disable-programs.inc
32include disable-shell.inc 31include disable-shell.inc
33include disable-xdg.inc 32include disable-xdg.inc
@@ -51,7 +50,6 @@ apparmor
51caps.drop all 50caps.drop all
52netfilter 51netfilter
53nodvd 52nodvd
54# Seems to cause issues with Nvidia drivers sometimes
55nogroups 53nogroups
56noinput 54noinput
57nonewprivs 55nonewprivs
diff --git a/etc/profile-m-z/mpv.profile b/etc/profile-m-z/mpv.profile
index 310f36ea1..e58beec0c 100644
--- a/etc/profile-m-z/mpv.profile
+++ b/etc/profile-m-z/mpv.profile
@@ -11,7 +11,7 @@ include globals.local
11# edit ~/.config/mpv/foobar.conf: 11# edit ~/.config/mpv/foobar.conf:
12# screenshot-directory=~/Pictures 12# screenshot-directory=~/Pictures
13 13
14# Mpv has a powerfull lua-API, some off these lua-scripts interact 14# Mpv has a powerful lua-API, some off these lua-scripts interact
15# with external resources which are blocked by firejail. In such cases 15# with external resources which are blocked by firejail. In such cases
16# you need to allow these resources by 16# you need to allow these resources by
17# - adding additional binaries to private-bin 17# - adding additional binaries to private-bin
@@ -26,7 +26,11 @@ include globals.local
26 26
27noblacklist ${HOME}/.config/mpv 27noblacklist ${HOME}/.config/mpv
28noblacklist ${HOME}/.config/youtube-dl 28noblacklist ${HOME}/.config/youtube-dl
29noblacklist ${HOME}/.config/yt-dlp
30noblacklist ${HOME}/.config/yt-dlp.conf
29noblacklist ${HOME}/.netrc 31noblacklist ${HOME}/.netrc
32noblacklist ${HOME}/yt-dlp.conf
33noblacklist ${HOME}/yt-dlp.conf.txt
30 34
31# Allow lua (blacklisted by disable-interpreters.inc) 35# Allow lua (blacklisted by disable-interpreters.inc)
32include allow-lua.inc 36include allow-lua.inc
@@ -35,33 +39,36 @@ include allow-lua.inc
35include allow-python2.inc 39include allow-python2.inc
36include allow-python3.inc 40include allow-python3.inc
37 41
42blacklist /usr/libexec
43
38include disable-common.inc 44include disable-common.inc
39include disable-devel.inc 45include disable-devel.inc
40include disable-exec.inc 46include disable-exec.inc
41include disable-interpreters.inc 47include disable-interpreters.inc
42include disable-passwdmgr.inc
43include disable-programs.inc 48include disable-programs.inc
44include disable-shell.inc 49include disable-shell.inc
45 50
46read-only ${DESKTOP} 51read-only ${DESKTOP}
47mkdir ${HOME}/.config/mpv 52mkdir ${HOME}/.config/mpv
48mkdir ${HOME}/.config/youtube-dl
49mkfile ${HOME}/.netrc 53mkfile ${HOME}/.netrc
50whitelist ${HOME}/.config/mpv 54whitelist ${HOME}/.config/mpv
51whitelist ${HOME}/.config/youtube-dl 55whitelist ${HOME}/.config/youtube-dl
56whitelist ${HOME}/.config/yt-dlp
57whitelist ${HOME}/.config/yt-dlp.conf
52whitelist ${HOME}/.netrc 58whitelist ${HOME}/.netrc
53include whitelist-common.inc 59whitelist ${HOME}/yt-dlp.conf
54include whitelist-player-common.inc 60whitelist ${HOME}/yt-dlp.conf.txt
55whitelist /usr/share/lua 61whitelist /usr/share/lua
56whitelist /usr/share/lua* 62whitelist /usr/share/lua*
57whitelist /usr/share/vulkan 63whitelist /usr/share/vulkan
64include whitelist-common.inc
65include whitelist-player-common.inc
58include whitelist-usr-share-common.inc 66include whitelist-usr-share-common.inc
59include whitelist-var-common.inc 67include whitelist-var-common.inc
60 68
61apparmor 69apparmor
62caps.drop all 70caps.drop all
63netfilter 71netfilter
64# nogroups seems to cause issues with Nvidia drivers sometimes
65nogroups 72nogroups
66noinput 73noinput
67nonewprivs 74nonewprivs
@@ -73,7 +80,7 @@ seccomp.block-secondary
73shell none 80shell none
74tracelog 81tracelog
75 82
76private-bin env,mpv,python*,waf,youtube-dl 83private-bin env,mpv,python*,waf,youtube-dl,yt-dlp
77# private-cache causes slow OSD, see #2838 84# private-cache causes slow OSD, see #2838
78#private-cache 85#private-cache
79private-dev 86private-dev
diff --git a/etc/profile-m-z/mrrescue.profile b/etc/profile-m-z/mrrescue.profile
index 035a7e625..3fe88ec7f 100644
--- a/etc/profile-m-z/mrrescue.profile
+++ b/etc/profile-m-z/mrrescue.profile
@@ -14,11 +14,12 @@ include allow-bin-sh.inc
14# Allow lua (blacklisted by disable-interpreters.inc) 14# Allow lua (blacklisted by disable-interpreters.inc)
15include allow-lua.inc 15include allow-lua.inc
16 16
17blacklist /usr/libexec
18
17include disable-common.inc 19include disable-common.inc
18include disable-devel.inc 20include disable-devel.inc
19include disable-exec.inc 21include disable-exec.inc
20include disable-interpreters.inc 22include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 23include disable-programs.inc
23include disable-shell.inc 24include disable-shell.inc
24include disable-xdg.inc 25include disable-xdg.inc
@@ -36,7 +37,6 @@ caps.drop all
36net none 37net none
37nodvd 38nodvd
38nogroups 39nogroups
39noinput
40nonewprivs 40nonewprivs
41noroot 41noroot
42notv 42notv
@@ -52,7 +52,7 @@ disable-mnt
52private-bin love,mrrescue,sh 52private-bin love,mrrescue,sh
53private-cache 53private-cache
54private-dev 54private-dev
55private-etc machine-id 55private-etc alternatives,ld.so.cache,ld.so.preload,machine-id
56private-tmp 56private-tmp
57 57
58dbus-user none 58dbus-user none
diff --git a/etc/profile-m-z/ms-office.profile b/etc/profile-m-z/ms-office.profile
index 38fc84ecc..e15b14db7 100644
--- a/etc/profile-m-z/ms-office.profile
+++ b/etc/profile-m-z/ms-office.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22caps.drop all 21caps.drop all
@@ -36,7 +35,7 @@ tracelog
36 35
37disable-mnt 36disable-mnt
38private-bin bash,env,fonts,jak,ms-office,python*,sh 37private-bin bash,env,fonts,jak,ms-office,python*,sh
39private-etc alternatives,ca-certificates,crypto-policies,pki,resolv.conf,ssl 38private-etc alternatives,ca-certificates,crypto-policies,ld.so.cache,ld.so.preload,pki,resolv.conf,ssl
40private-dev 39private-dev
41private-tmp 40private-tmp
42 41
diff --git a/etc/profile-m-z/mtpaint.profile b/etc/profile-m-z/mtpaint.profile
index 85c3ee9f2..126336cb3 100644
--- a/etc/profile-m-z/mtpaint.profile
+++ b/etc/profile-m-z/mtpaint.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
diff --git a/etc/profile-m-z/multimc5.profile b/etc/profile-m-z/multimc5.profile
index 6df681df1..a61f9001d 100644
--- a/etc/profile-m-z/multimc5.profile
+++ b/etc/profile-m-z/multimc5.profile
@@ -9,6 +9,10 @@ noblacklist ${HOME}/.local/share/multimc
9noblacklist ${HOME}/.local/share/multimc5 9noblacklist ${HOME}/.local/share/multimc5
10noblacklist ${HOME}/.multimc5 10noblacklist ${HOME}/.multimc5
11 11
12# Ignore noexec on ${HOME} as MultiMC installs LWJGL native
13# libraries in ${HOME}/.local/share/multimc
14ignore noexec ${HOME}
15
12# Allow java (blacklisted by disable-devel.inc) 16# Allow java (blacklisted by disable-devel.inc)
13include allow-java.inc 17include allow-java.inc
14 18
@@ -16,7 +20,6 @@ include disable-common.inc
16include disable-devel.inc 20include disable-devel.inc
17include disable-exec.inc 21include disable-exec.inc
18include disable-interpreters.inc 22include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 23include disable-programs.inc
21 24
22mkdir ${HOME}/.local/share/multimc 25mkdir ${HOME}/.local/share/multimc
diff --git a/etc/profile-m-z/mumble.profile b/etc/profile-m-z/mumble.profile
index c7f59c5ee..ad0920979 100644
--- a/etc/profile-m-z/mumble.profile
+++ b/etc/profile-m-z/mumble.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20 19
diff --git a/etc/profile-m-z/mupdf-x11-curl.profile b/etc/profile-m-z/mupdf-x11-curl.profile
index a04d386a2..006f64ba8 100644
--- a/etc/profile-m-z/mupdf-x11-curl.profile
+++ b/etc/profile-m-z/mupdf-x11-curl.profile
@@ -12,7 +12,7 @@ ignore net none
12netfilter 12netfilter
13protocol unix,inet,inet6 13protocol unix,inet,inet6
14 14
15private-etc ca-certificates,crypto-policies,hosts,nsswitch.conf,pki,resolv.conf,ssl 15private-etc alternatives,ca-certificates,crypto-policies,hosts,ld.so.cache,ld.so.preload,nsswitch.conf,pki,resolv.conf,ssl
16 16
17# Redirect 17# Redirect
18include mupdf.profile 18include mupdf.profile
diff --git a/etc/profile-m-z/mupdf.profile b/etc/profile-m-z/mupdf.profile
index 9e4609c48..22cb83cc4 100644
--- a/etc/profile-m-z/mupdf.profile
+++ b/etc/profile-m-z/mupdf.profile
@@ -4,7 +4,7 @@
4# Persistent local customizations 4# Persistent local customizations
5include mupdf.local 5include mupdf.local
6# Persistent global definitions 6# Persistent global definitions
7#include globals.local 7include globals.local
8 8
9noblacklist ${DOCUMENTS} 9noblacklist ${DOCUMENTS}
10 10
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
diff --git a/etc/profile-m-z/mupen64plus.profile b/etc/profile-m-z/mupen64plus.profile
index 00983a8f3..093767c27 100644
--- a/etc/profile-m-z/mupen64plus.profile
+++ b/etc/profile-m-z/mupen64plus.profile
@@ -11,8 +11,6 @@ noblacklist ${HOME}/.local/share/mupen64plus
11 11
12include disable-common.inc 12include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-passwdmgr.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 14include disable-programs.inc
17 15
18# you'll need to manually whitelist ROM files 16# you'll need to manually whitelist ROM files
diff --git a/etc/profile-m-z/musescore.profile b/etc/profile-m-z/musescore.profile
index 679e82ae8..12bb653a8 100644
--- a/etc/profile-m-z/musescore.profile
+++ b/etc/profile-m-z/musescore.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
diff --git a/etc/profile-m-z/musictube.profile b/etc/profile-m-z/musictube.profile
index 04500ac6a..226fb4810 100644
--- a/etc/profile-m-z/musictube.profile
+++ b/etc/profile-m-z/musictube.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
diff --git a/etc/profile-m-z/musixmatch.profile b/etc/profile-m-z/musixmatch.profile
index 74b3e9a5f..796d7fbb0 100644
--- a/etc/profile-m-z/musixmatch.profile
+++ b/etc/profile-m-z/musixmatch.profile
@@ -10,7 +10,6 @@ noblacklist ${MUSIC}
10include disable-common.inc 10include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-xdg.inc 14include disable-xdg.inc
16 15
@@ -30,9 +29,9 @@ notv
30nou2f 29nou2f
31novideo 30novideo
32protocol unix,inet,inet6,netlink 31protocol unix,inet,inet6,netlink
33seccomp 32seccomp !chroot
34 33
35disable-mnt 34disable-mnt
36private-dev 35private-dev
37private-etc alternatives,asound.conf,ca-certificates,crypto-policies,machine-id,pki,pulse,ssl 36private-etc alternatives,asound.conf,ca-certificates,crypto-policies,ld.so.cache,ld.so.preload,machine-id,pki,pulse,ssl
38 37
diff --git a/etc/profile-m-z/mutt.profile b/etc/profile-m-z/mutt.profile
index debf81659..d10c55549 100644
--- a/etc/profile-m-z/mutt.profile
+++ b/etc/profile-m-z/mutt.profile
@@ -47,7 +47,6 @@ include disable-common.inc
47include disable-devel.inc 47include disable-devel.inc
48include disable-exec.inc 48include disable-exec.inc
49include disable-interpreters.inc 49include disable-interpreters.inc
50include disable-passwdmgr.inc
51include disable-programs.inc 50include disable-programs.inc
52include disable-xdg.inc 51include disable-xdg.inc
53 52
@@ -135,7 +134,7 @@ tracelog
135# disable-mnt 134# disable-mnt
136private-cache 135private-cache
137private-dev 136private-dev
138private-etc alternatives,ca-certificates,crypto-policies,fonts,gai.conf,gcrypt,gnupg,gnutls,hostname,hosts,hosts.conf,mail,mailname,Mutt,Muttrc,Muttrc.d,nntpserver,nsswitch.conf,passwd,pki,resolv.conf,ssl,terminfo,xdg 137private-etc alternatives,ca-certificates,crypto-policies,fonts,gai.conf,gcrypt,gnupg,gnutls,hostname,hosts,hosts.conf,ld.so.cache,ld.so.preload,mail,mailname,Mutt,Muttrc,Muttrc.d,nntpserver,nsswitch.conf,passwd,pki,resolv.conf,ssl,terminfo,xdg
139private-tmp 138private-tmp
140writable-run-user 139writable-run-user
141writable-var 140writable-var
diff --git a/etc/profile-m-z/mypaint.profile b/etc/profile-m-z/mypaint.profile
index d8d487fe7..74301df06 100644
--- a/etc/profile-m-z/mypaint.profile
+++ b/etc/profile-m-z/mypaint.profile
@@ -19,7 +19,6 @@ include disable-common.inc
19include disable-devel.inc 19include disable-devel.inc
20include disable-exec.inc 20include disable-exec.inc
21include disable-interpreters.inc 21include disable-interpreters.inc
22include disable-passwdmgr.inc
23include disable-programs.inc 22include disable-programs.inc
24include disable-xdg.inc 23include disable-xdg.inc
25 24
@@ -44,7 +43,7 @@ tracelog
44 43
45private-cache 44private-cache
46private-dev 45private-dev
47private-etc alternatives,dconf,fonts,gtk-3.0 46private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload
48private-tmp 47private-tmp
49 48
50dbus-user none 49dbus-user none
diff --git a/etc/profile-m-z/nano.profile b/etc/profile-m-z/nano.profile
index 45d5f59dd..f7c1f0ff7 100644
--- a/etc/profile-m-z/nano.profile
+++ b/etc/profile-m-z/nano.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22whitelist /usr/share/nano 21whitelist /usr/share/nano
@@ -47,8 +46,12 @@ x11 none
47private-bin nano,rnano 46private-bin nano,rnano
48private-cache 47private-cache
49private-dev 48private-dev
50# Comment the next line if you want to edit files in /etc directly 49# Add the next lines to your nano.local if you want to edit files in /etc directly.
51private-etc alternatives,nanorc 50#ignore private-etc
51#writable-etc
52private-etc alternatives,ld.so.cache,ld.so.preload,nanorc
53# Add the next line to your nano.local if you want to edit files in /var directly.
54#writable-var
52 55
53dbus-user none 56dbus-user none
54dbus-system none 57dbus-system none
diff --git a/etc/profile-m-z/natron.profile b/etc/profile-m-z/natron.profile
index 5bf152f84..2464844c4 100644
--- a/etc/profile-m-z/natron.profile
+++ b/etc/profile-m-z/natron.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22 21
23caps.drop all 22caps.drop all
diff --git a/etc/profile-m-z/ncdu.profile b/etc/profile-m-z/ncdu.profile
index 063e30366..5578cfc9c 100644
--- a/etc/profile-m-z/ncdu.profile
+++ b/etc/profile-m-z/ncdu.profile
@@ -1,6 +1,7 @@
1# Firejail profile for ncdu 1# Firejail profile for ncdu
2# Description: Ncurses disk usage viewer 2# Description: Ncurses disk usage viewer
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 ncdu.local 6include ncdu.local
6# Persistent global definitions 7# Persistent global definitions
diff --git a/etc/profile-m-z/ncdu2.profile b/etc/profile-m-z/ncdu2.profile
new file mode 100644
index 000000000..220692b3a
--- /dev/null
+++ b/etc/profile-m-z/ncdu2.profile
@@ -0,0 +1,12 @@
1# Firejail profile for ncdu2
2# Description: Ncurses disk usage viewer (zig rewrite)
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include ncdu2.local
7# Persistent global definitions
8# added by included profile
9#include globals.local
10
11# Redirect
12include ncdu.profile
diff --git a/etc/profile-m-z/neochat.profile b/etc/profile-m-z/neochat.profile
index 9f00448c8..0f55b674f 100644
--- a/etc/profile-m-z/neochat.profile
+++ b/etc/profile-m-z/neochat.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-shell.inc 21include disable-shell.inc
23include disable-xdg.inc 22include disable-xdg.inc
@@ -61,6 +60,6 @@ private-tmp
61dbus-user filter 60dbus-user filter
62dbus-user.own org.kde.neochat 61dbus-user.own org.kde.neochat
63dbus-user.talk org.freedesktop.Notifications 62dbus-user.talk org.freedesktop.Notifications
64dbus-user.talk org.kde.StatusNotifierWatcher 63?ALLOW_TRAY: dbus-user.talk org.kde.StatusNotifierWatcher
65dbus-user.talk org.kde.kwalletd5 64dbus-user.talk org.kde.kwalletd5
66dbus-system none 65dbus-system none
diff --git a/etc/profile-m-z/neomutt.profile b/etc/profile-m-z/neomutt.profile
index fafa129e4..f31cf9dcb 100644
--- a/etc/profile-m-z/neomutt.profile
+++ b/etc/profile-m-z/neomutt.profile
@@ -46,7 +46,6 @@ include disable-common.inc
46include disable-devel.inc 46include disable-devel.inc
47include disable-exec.inc 47include disable-exec.inc
48include disable-interpreters.inc 48include disable-interpreters.inc
49include disable-passwdmgr.inc
50include disable-programs.inc 49include disable-programs.inc
51include disable-xdg.inc 50include disable-xdg.inc
52 51
@@ -138,7 +137,7 @@ tracelog
138# disable-mnt 137# disable-mnt
139private-cache 138private-cache
140private-dev 139private-dev
141private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gcrypt,gnupg,hostname,hosts,hosts.conf,mail,mailname,Mutt,Muttrc,Muttrc.d,neomuttrc,neomuttrc.d,nntpserver,nsswitch.conf,passwd,pki,resolv.conf,ssl,xdg 140private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gcrypt,gnupg,hostname,hosts,hosts.conf,ld.so.cache,ld.so.preload,mail,mailname,Mutt,Muttrc,Muttrc.d,neomuttrc,neomuttrc.d,nntpserver,nsswitch.conf,passwd,pki,resolv.conf,ssl,xdg
142private-tmp 141private-tmp
143writable-run-user 142writable-run-user
144writable-var 143writable-var
diff --git a/etc/profile-m-z/netactview.profile b/etc/profile-m-z/netactview.profile
index 5d45dd7bc..d6ac8d5bc 100644
--- a/etc/profile-m-z/netactview.profile
+++ b/etc/profile-m-z/netactview.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -46,7 +45,7 @@ disable-mnt
46private-bin netactview,netactview_polkit 45private-bin netactview,netactview_polkit
47private-cache 46private-cache
48private-dev 47private-dev
49private-etc alternatives,fonts 48private-etc alternatives,fonts,ld.so.cache,ld.so.preload
50private-lib 49private-lib
51private-tmp 50private-tmp
52 51
diff --git a/etc/profile-m-z/nethack-vultures.profile b/etc/profile-m-z/nethack-vultures.profile
index c9a537370..4da43a2d0 100644
--- a/etc/profile-m-z/nethack-vultures.profile
+++ b/etc/profile-m-z/nethack-vultures.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18mkdir ${HOME}/.vultures 17mkdir ${HOME}/.vultures
diff --git a/etc/profile-m-z/nethack.profile b/etc/profile-m-z/nethack.profile
index b57abe260..5037133f2 100644
--- a/etc/profile-m-z/nethack.profile
+++ b/etc/profile-m-z/nethack.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18whitelist /var/games/nethack 17whitelist /var/games/nethack
diff --git a/etc/profile-m-z/neverball.profile b/etc/profile-m-z/neverball.profile
index ecfbb14e4..9b7826fd0 100644
--- a/etc/profile-m-z/neverball.profile
+++ b/etc/profile-m-z/neverball.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
diff --git a/etc/profile-m-z/newsboat.profile b/etc/profile-m-z/newsboat.profile
index 13bc3a615..cf72bf802 100644
--- a/etc/profile-m-z/newsboat.profile
+++ b/etc/profile-m-z/newsboat.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
@@ -54,7 +53,7 @@ disable-mnt
54private-bin gzip,lynx,newsboat,sh,w3m 53private-bin gzip,lynx,newsboat,sh,w3m
55private-cache 54private-cache
56private-dev 55private-dev
57private-etc alternatives,ca-certificates,crypto-policies,lynx.cfg,lynx.lss,pki,resolv.conf,ssl,terminfo 56private-etc alternatives,ca-certificates,crypto-policies,ld.so.cache,ld.so.preload,lynx.cfg,lynx.lss,pki,resolv.conf,ssl,terminfo
58private-tmp 57private-tmp
59 58
60dbus-user none 59dbus-user none
diff --git a/etc/profile-m-z/newsflash.profile b/etc/profile-m-z/newsflash.profile
index 18d8c6ed4..9966a0e1b 100644
--- a/etc/profile-m-z/newsflash.profile
+++ b/etc/profile-m-z/newsflash.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
@@ -52,7 +51,7 @@ disable-mnt
52private-bin com.gitlab.newsflash,newsflash 51private-bin com.gitlab.newsflash,newsflash
53private-cache 52private-cache
54private-dev 53private-dev
55private-etc ca-certificates,crypto-policies,dconf,fonts,gtk-3.0,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,nsswitch.conf,pango,pki,resolv.conf,ssl,X11 54private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gtk-3.0,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,nsswitch.conf,pango,pki,resolv.conf,ssl,X11
56private-tmp 55private-tmp
57 56
58dbus-user none 57dbus-user none
diff --git a/etc/profile-m-z/nextcloud.profile b/etc/profile-m-z/nextcloud.profile
index 9fd76fbe7..2e4a95125 100644
--- a/etc/profile-m-z/nextcloud.profile
+++ b/etc/profile-m-z/nextcloud.profile
@@ -19,7 +19,6 @@ include disable-common.inc
19include disable-devel.inc 19include disable-devel.inc
20include disable-exec.inc 20include disable-exec.inc
21include disable-interpreters.inc 21include disable-interpreters.inc
22include disable-passwdmgr.inc
23include disable-programs.inc 22include disable-programs.inc
24include disable-shell.inc 23include disable-shell.inc
25include disable-xdg.inc 24include disable-xdg.inc
@@ -30,6 +29,7 @@ mkdir ${HOME}/.local/share/Nextcloud
30whitelist ${HOME}/Nextcloud 29whitelist ${HOME}/Nextcloud
31whitelist ${HOME}/.config/Nextcloud 30whitelist ${HOME}/.config/Nextcloud
32whitelist ${HOME}/.local/share/Nextcloud 31whitelist ${HOME}/.local/share/Nextcloud
32whitelist /usr/share/nextcloud
33# Add the next lines to your nextcloud.local to allow sync in more directories. 33# Add the next lines to your nextcloud.local to allow sync in more directories.
34#whitelist ${DOCUMENTS} 34#whitelist ${DOCUMENTS}
35#whitelist ${MUSIC} 35#whitelist ${MUSIC}
@@ -44,7 +44,6 @@ apparmor
44caps.drop all 44caps.drop all
45machine-id 45machine-id
46netfilter 46netfilter
47no3d
48nodvd 47nodvd
49nogroups 48nogroups
50noinput 49noinput
@@ -63,10 +62,11 @@ tracelog
63disable-mnt 62disable-mnt
64private-bin nextcloud,nextcloud-desktop 63private-bin nextcloud,nextcloud-desktop
65private-cache 64private-cache
66private-etc alternatives,ca-certificates,crypto-policies,drirc,fonts,gcrypt,host.conf,hosts,ld.so.cache,machine-id,Nextcloud,nsswitch.conf,os-release,passwd,pki,pulse,resolv.conf,selinux,ssl,xdg 65private-etc alternatives,ca-certificates,crypto-policies,drirc,fonts,gcrypt,host.conf,hosts,ld.so.cache,ld.so.preload,machine-id,Nextcloud,nsswitch.conf,os-release,passwd,pki,pulse,resolv.conf,selinux,ssl,xdg
67private-dev 66private-dev
68private-tmp 67private-tmp
69 68
70dbus-user filter 69dbus-user filter
71dbus-user.talk org.freedesktop.secrets 70dbus-user.talk org.freedesktop.secrets
71?ALLOW_TRAY: dbus-user.talk org.kde.StatusNotifierWatcher
72dbus-system none 72dbus-system none
diff --git a/etc/profile-m-z/nheko.profile b/etc/profile-m-z/nheko.profile
index f8062891c..89a146a09 100644
--- a/etc/profile-m-z/nheko.profile
+++ b/etc/profile-m-z/nheko.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
@@ -52,11 +51,9 @@ private-dev
52private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,mime.types,nsswitch.conf,pki,pulse,resolv.conf,selinux,ssl,X11,xdg 51private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,mime.types,nsswitch.conf,pki,pulse,resolv.conf,selinux,ssl,X11,xdg
53private-tmp 52private-tmp
54 53
55 54dbus-user filter
56# Add the next lines to your nheko.local to enable notification support. 55dbus-user.talk org.freedesktop.secrets
57#ignore dbus-user none 56?ALLOW_TRAY: dbus-user.talk org.kde.StatusNotifierWatcher
58#dbus-user filter 57# Add the next line to your nheko.local to enable notification support.
59#dbus-user.talk org.freedesktop.Notifications 58#dbus-user.talk org.freedesktop.Notifications
60#dbus-user.talk org.kde.StatusNotifierWatcher
61dbus-user none
62dbus-system none 59dbus-system none
diff --git a/etc/profile-m-z/nicotine.profile b/etc/profile-m-z/nicotine.profile
index 1c7dbc009..0b55a0d3a 100644
--- a/etc/profile-m-z/nicotine.profile
+++ b/etc/profile-m-z/nicotine.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-shell.inc 19include disable-shell.inc
21include disable-xdg.inc 20include disable-xdg.inc
diff --git a/etc/profile-m-z/nitroshare.profile b/etc/profile-m-z/nitroshare.profile
index 8dba84f02..d6234cd04 100644
--- a/etc/profile-m-z/nitroshare.profile
+++ b/etc/profile-m-z/nitroshare.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22 21
23include whitelist-usr-share-common.inc 22include whitelist-usr-share-common.inc
@@ -43,7 +42,7 @@ disable-mnt
43private-bin awk,grep,nitroshare,nitroshare-cli,nitroshare-nmh,nitroshare-send,nitroshare-ui 42private-bin awk,grep,nitroshare,nitroshare-cli,nitroshare-nmh,nitroshare-send,nitroshare-ui
44private-cache 43private-cache
45private-dev 44private-dev
46private-etc alternatives,ca-certificates,dconf,fonts,hostname,hosts,ld.so.cache,machine-id,nsswitch.conf,ssl 45private-etc alternatives,ca-certificates,dconf,fonts,hostname,hosts,ld.so.cache,ld.so.preload,machine-id,nsswitch.conf,ssl
47# private-lib libnitroshare.so.*,libqhttpengine.so.*,libqmdnsengine.so.*,nitroshare 46# private-lib libnitroshare.so.*,libqhttpengine.so.*,libqmdnsengine.so.*,nitroshare
48private-tmp 47private-tmp
49 48
diff --git a/etc/profile-m-z/node.profile b/etc/profile-m-z/node.profile
new file mode 100644
index 000000000..cd48ed3c7
--- /dev/null
+++ b/etc/profile-m-z/node.profile
@@ -0,0 +1,11 @@
1# Firejail profile for node
2# Description: Evented I/O for V8 javascript
3quiet
4# This file is overwritten after every install/update
5# Persistent local customizations
6include node.local
7# Persistent global definitions
8include globals.local
9
10# Redirect
11include nodejs-common.profile
diff --git a/etc/profile-m-z/nodejs-common.profile b/etc/profile-m-z/nodejs-common.profile
index 4095337dd..ab69136f6 100644
--- a/etc/profile-m-z/nodejs-common.profile
+++ b/etc/profile-m-z/nodejs-common.profile
@@ -10,17 +10,56 @@ include nodejs-common.local
10blacklist /tmp/.X11-unix 10blacklist /tmp/.X11-unix
11blacklist ${RUNUSER} 11blacklist ${RUNUSER}
12 12
13ignore read-only ${HOME}/.npm-packages
14ignore read-only ${HOME}/.npmrc
15ignore read-only ${HOME}/.nvm
16ignore read-only ${HOME}/.yarnrc
17
18noblacklist ${HOME}/.node-gyp
19noblacklist ${HOME}/.npm
20noblacklist ${HOME}/.npmrc
21noblacklist ${HOME}/.nvm
22noblacklist ${HOME}/.yarn
23noblacklist ${HOME}/.yarn-config
24noblacklist ${HOME}/.yarncache
25noblacklist ${HOME}/.yarnrc
26
13ignore noexec ${HOME} 27ignore noexec ${HOME}
14 28
15include allow-bin-sh.inc 29include allow-bin-sh.inc
16 30
17include disable-common.inc 31include disable-common.inc
18include disable-exec.inc 32include disable-exec.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 33include disable-programs.inc
21include disable-shell.inc 34include disable-shell.inc
22include disable-xdg.inc 35include disable-xdg.inc
23 36
37# If you want whitelisting, change ${HOME}/Projects below to your node projects directory
38# and add the next lines to your nodejs-common.local.
39#mkdir ${HOME}/.node-gyp
40#mkdir ${HOME}/.npm
41#mkdir ${HOME}/.npm-packages
42#mkfile ${HOME}/.npmrc
43#mkdir ${HOME}/.nvm
44#mkdir ${HOME}/.yarn
45#mkdir ${HOME}/.yarn-config
46#mkdir ${HOME}/.yarncache
47#mkfile ${HOME}/.yarnrc
48#whitelist ${HOME}/.node-gyp
49#whitelist ${HOME}/.npm
50#whitelist ${HOME}/.npm-packages
51#whitelist ${HOME}/.npmrc
52#whitelist ${HOME}/.nvm
53#whitelist ${HOME}/.yarn
54#whitelist ${HOME}/.yarn-config
55#whitelist ${HOME}/.yarncache
56#whitelist ${HOME}/.yarnrc
57#whitelist ${HOME}/Projects
58#include whitelist-common.inc
59
60whitelist /usr/share/doc/node
61whitelist /usr/share/nvm
62whitelist /usr/share/systemtap/tapset/node.stp
24include whitelist-runuser-common.inc 63include whitelist-runuser-common.inc
25include whitelist-usr-share-common.inc 64include whitelist-usr-share-common.inc
26include whitelist-var-common.inc 65include whitelist-var-common.inc
@@ -46,10 +85,11 @@ shell none
46 85
47disable-mnt 86disable-mnt
48private-dev 87private-dev
49# May need to add `passwd` to `private-etc` below to enable debugging with some IDEs 88private-etc alternatives,ca-certificates,crypto-policies,group,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,localtime,login.defs,mime.types,nsswitch.conf,passwd,pki,protocols,resolv.conf,rpc,services,ssl,xdg
50private-etc alternatives,ca-certificates,crypto-policies,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,localtime,login.defs,mime.types,nsswitch.conf,pki,protocols,resolv.conf,rpc,services,ssl,xdg 89#private-tmp
51# May need to be commented out in order to enable debugging with some IDEs
52private-tmp
53 90
54dbus-user none 91dbus-user none
55dbus-system none 92dbus-system none
93
94# Add the next line to your nodejs-common.local if you prefer to disable gatsby telemetry.
95#env GATSBY_TELEMETRY_DISABLED=1
diff --git a/etc/profile-m-z/nomacs.profile b/etc/profile-m-z/nomacs.profile
index a36dee874..7ffb09e56 100644
--- a/etc/profile-m-z/nomacs.profile
+++ b/etc/profile-m-z/nomacs.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-xdg.inc 19include disable-xdg.inc
21 20
@@ -42,5 +41,5 @@ tracelog
42#private-bin nomacs 41#private-bin nomacs
43private-cache 42private-cache
44private-dev 43private-dev
45private-etc alternatives,ca-certificates,crypto-policies,dconf,drirc,fonts,gtk-3.0,hosts,login.defs,machine-id,pki,resolv.conf,ssl 44private-etc alternatives,ca-certificates,crypto-policies,dconf,drirc,fonts,gtk-3.0,hosts,ld.so.cache,ld.so.preload,login.defs,machine-id,pki,resolv.conf,ssl
46private-tmp 45private-tmp
diff --git a/etc/profile-m-z/noprofile.profile b/etc/profile-m-z/noprofile.profile
new file mode 100644
index 000000000..db4113f94
--- /dev/null
+++ b/etc/profile-m-z/noprofile.profile
@@ -0,0 +1,29 @@
1# This is the weakest possible firejail profile.
2# If a program still fail with this profile, it is incompatible with firejail.
3# (from https://gist.github.com/rusty-snake/bb234cb3e50e1e4e7429f29a7931cc72)
4#
5# Usage:
6# 1. download
7# 2. firejail --profile=noprofile.profile /path/to/program
8
9# Keep in mind that even with this profile some things are done
10# which can break the program.
11# - some env-vars are cleared
12# - /etc/firejail/firejail.config can contain options such as 'force-nonewprivs yes'
13# - a new private pid-namespace is created
14# - a minimal hardcoded blacklist is applied
15# - ...
16
17noblacklist /sys/fs
18noblacklist /sys/module
19
20allow-debuggers
21allusers
22keep-config-pulse
23keep-dev-shm
24keep-fd all
25keep-var-tmp
26writable-etc
27writable-run-user
28writable-var
29writable-var-log
diff --git a/etc/profile-m-z/notable.profile b/etc/profile-m-z/notable.profile
new file mode 100644
index 000000000..7c790539d
--- /dev/null
+++ b/etc/profile-m-z/notable.profile
@@ -0,0 +1,37 @@
1# Firejail profile for notable
2# Description: The Markdown-based note-taking app that doesn't suck
3# This file is overwritten after every install/update
4# Persistent local customizations
5include notable.local
6# Persistent global definitions
7include globals.local
8
9# Note: On debian-based distributions the binary might be located in
10# /opt/Notable/notable, and therefore not be in PATH.
11# If that's the case you can start Notable with firejail via
12# `firejail "/opt/Notable/notable"`.
13
14noblacklist ${HOME}/.config/Notable
15noblacklist ${HOME}/.notable
16
17net none
18nosound
19
20?HAS_APPIMAGE: ignore private-dev
21private-opt Notable
22
23dbus-user filter
24dbus-user.talk ca.desrt.dconf
25ignore dbus-user none
26
27# Notable keeps claiming it is started for the first time when whitelisting - see #4812.
28ignore whitelist ${DOWNLOADS}
29ignore whitelist ${HOME}/.config/Electron
30ignore whitelist ${HOME}/.config/electron-flag*.conf
31ignore include whitelist-common.inc
32ignore include whitelist-runuser-common.inc
33ignore include whitelist-usr-share-common.inc
34ignore include whitelist-var-common.inc
35
36# Redirect
37include electron.profile
diff --git a/etc/profile-m-z/notify-send.profile b/etc/profile-m-z/notify-send.profile
index 650118c98..9f23c099d 100644
--- a/etc/profile-m-z/notify-send.profile
+++ b/etc/profile-m-z/notify-send.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-write-mnt.inc 18include disable-write-mnt.inc
@@ -50,7 +49,7 @@ private
50private-bin notify-send 49private-bin notify-send
51private-cache 50private-cache
52private-dev 51private-dev
53private-etc none 52private-etc alternatives,ld.so.cache,ld.so.preload
54private-tmp 53private-tmp
55 54
56dbus-user filter 55dbus-user filter
diff --git a/etc/profile-m-z/npm.profile b/etc/profile-m-z/npm.profile
index f51d58782..4d8beea5a 100644
--- a/etc/profile-m-z/npm.profile
+++ b/etc/profile-m-z/npm.profile
@@ -7,23 +7,5 @@ include npm.local
7# Persistent global definitions 7# Persistent global definitions
8include globals.local 8include globals.local
9 9
10ignore read-only ${HOME}/.npm-packages
11ignore read-only ${HOME}/.npmrc
12
13noblacklist ${HOME}/.node-gyp
14noblacklist ${HOME}/.npm
15noblacklist ${HOME}/.npmrc
16
17# If you want whitelisting, change ${HOME}/Projects below to your npm projects directory
18# and add the next lines to your npm.local.
19#mkdir ${HOME}/.node-gyp
20#mkdir ${HOME}/.npm
21#mkfile ${HOME}/.npmrc
22#whitelist ${HOME}/.node-gyp
23#whitelist ${HOME}/.npm
24#whitelist ${HOME}/.npmrc
25#whitelist ${HOME}/Projects
26#include whitelist-common.inc
27
28# Redirect 10# Redirect
29include nodejs-common.profile 11include nodejs-common.profile
diff --git a/etc/profile-m-z/nslookup.profile b/etc/profile-m-z/nslookup.profile
index c7a131a2c..baa8ddfeb 100644
--- a/etc/profile-m-z/nslookup.profile
+++ b/etc/profile-m-z/nslookup.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-xdg.inc 20include disable-xdg.inc
22 21
diff --git a/etc/profile-m-z/nuclear.profile b/etc/profile-m-z/nuclear.profile
index 886403b9e..9f4a6ec46 100644
--- a/etc/profile-m-z/nuclear.profile
+++ b/etc/profile-m-z/nuclear.profile
@@ -18,7 +18,7 @@ whitelist ${HOME}/.config/nuclear
18no3d 18no3d
19 19
20# private-bin nuclear 20# private-bin nuclear
21private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,mime.types,nsswitch.conf,pki,pulse,resolv.conf,selinux,ssl,X11,xdg 21private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,mime.types,nsswitch.conf,pki,pulse,resolv.conf,selinux,ssl,X11,xdg
22private-opt nuclear 22private-opt nuclear
23 23
24# Redirect 24# Redirect
diff --git a/etc/profile-m-z/nvim.profile b/etc/profile-m-z/nvim.profile
new file mode 100644
index 000000000..27a0aec28
--- /dev/null
+++ b/etc/profile-m-z/nvim.profile
@@ -0,0 +1,52 @@
1# Firejail profile for neovim
2# Description: Nvim is open source and freely distributable
3# This file is overwritten after every install/update
4# Persistent local customizations
5include nvim.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.vim
10noblacklist ${HOME}/.vimrc
11noblacklist ${HOME}/.cache/nvim
12noblacklist ${HOME}/.config/nvim
13noblacklist ${HOME}/.local/share/nvim
14
15include disable-common.inc
16include disable-devel.inc
17include disable-programs.inc
18include disable-xdg.inc
19
20blacklist ${RUNUSER}
21
22include whitelist-runuser-common.inc
23
24ipc-namespace
25machine-id
26net none
27no3d
28nodvd
29nogroups
30noinput
31nonewprivs
32noroot
33notv
34nou2f
35novideo
36protocol unix,inet,inet6
37seccomp
38seccomp.block-secondary
39shell none
40tracelog
41x11 none
42
43private-dev
44
45dbus-user none
46dbus-system none
47
48read-only ${HOME}/.config
49read-write ${HOME}/.config/nvim
50read-write ${HOME}/.local/share/nvim
51read-write ${HOME}/.vim
52read-write ${HOME}/.vimrc
diff --git a/etc/profile-m-z/nvm.profile b/etc/profile-m-z/nvm.profile
new file mode 100644
index 000000000..80da22834
--- /dev/null
+++ b/etc/profile-m-z/nvm.profile
@@ -0,0 +1,13 @@
1# Firejail profile for nvm
2# Description: Node Version Manager - Simple bash script to manage multiple active node.js versions
3quiet
4# This file is overwritten after every install/update
5# Persistent local customizations
6include nvm.local
7# Persistent global definitions
8include globals.local
9
10ignore noroot
11
12# Redirect
13include nodejs-common.profile
diff --git a/etc/profile-m-z/nylas.profile b/etc/profile-m-z/nylas.profile
index fe0c2116b..3474a075f 100644
--- a/etc/profile-m-z/nylas.profile
+++ b/etc/profile-m-z/nylas.profile
@@ -11,7 +11,6 @@ noblacklist ${HOME}/.nylas-mail
11include disable-common.inc 11include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16 15
17mkdir ${HOME}/.config/Nylas Mail 16mkdir ${HOME}/.config/Nylas Mail
diff --git a/etc/profile-m-z/nyx.profile b/etc/profile-m-z/nyx.profile
index d040d42af..653591482 100644
--- a/etc/profile-m-z/nyx.profile
+++ b/etc/profile-m-z/nyx.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-shell.inc 20include disable-shell.inc
22include disable-xdg.inc 21include disable-xdg.inc
@@ -46,7 +45,7 @@ disable-mnt
46private-bin nyx,python* 45private-bin nyx,python*
47private-cache 46private-cache
48private-dev 47private-dev
49private-etc alternatives,fonts,passwd,tor 48private-etc alternatives,fonts,ld.so.cache,ld.so.preload,passwd,tor
50private-opt none 49private-opt none
51private-srv none 50private-srv none
52private-tmp 51private-tmp
diff --git a/etc/profile-m-z/obs.profile b/etc/profile-m-z/obs.profile
index 9345cee4f..1ff9ad48a 100644
--- a/etc/profile-m-z/obs.profile
+++ b/etc/profile-m-z/obs.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-xdg.inc 22include disable-xdg.inc
24 23
diff --git a/etc/profile-m-z/ocenaudio.profile b/etc/profile-m-z/ocenaudio.profile
index 7be68a201..0bfb35333 100644
--- a/etc/profile-m-z/ocenaudio.profile
+++ b/etc/profile-m-z/ocenaudio.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
@@ -46,7 +45,7 @@ tracelog
46private-bin ocenaudio 45private-bin ocenaudio
47private-cache 46private-cache
48private-dev 47private-dev
49private-etc alternatives,asound.conf,fonts,ld.so.cache,pulse 48private-etc alternatives,asound.conf,fonts,ld.so.cache,ld.so.preload,pulse
50private-tmp 49private-tmp
51 50
52# breaks preferences 51# breaks preferences
diff --git a/etc/profile-m-z/odt2txt.profile b/etc/profile-m-z/odt2txt.profile
index 6163d2e22..de62f4114 100644
--- a/etc/profile-m-z/odt2txt.profile
+++ b/etc/profile-m-z/odt2txt.profile
@@ -13,7 +13,6 @@ noblacklist ${DOCUMENTS}
13include disable-common.inc 13include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
@@ -39,7 +38,7 @@ x11 none
39private-bin odt2txt 38private-bin odt2txt
40private-cache 39private-cache
41private-dev 40private-dev
42private-etc alternatives 41private-etc alternatives,ld.so.cache,ld.so.preload
43private-tmp 42private-tmp
44 43
45dbus-user none 44dbus-user none
diff --git a/etc/profile-m-z/okular.profile b/etc/profile-m-z/okular.profile
index ab8ccf623..fb28ad89f 100644
--- a/etc/profile-m-z/okular.profile
+++ b/etc/profile-m-z/okular.profile
@@ -23,7 +23,6 @@ include disable-common.inc
23include disable-devel.inc 23include disable-devel.inc
24include disable-exec.inc 24include disable-exec.inc
25include disable-interpreters.inc 25include disable-interpreters.inc
26include disable-passwdmgr.inc
27include disable-programs.inc 26include disable-programs.inc
28include disable-shell.inc 27include disable-shell.inc
29include disable-xdg.inc 28include disable-xdg.inc
@@ -37,6 +36,7 @@ whitelist /usr/share/kconf_update/okular.upd
37whitelist /usr/share/kxmlgui5/okular 36whitelist /usr/share/kxmlgui5/okular
38whitelist /usr/share/okular 37whitelist /usr/share/okular
39whitelist /usr/share/poppler 38whitelist /usr/share/poppler
39include whitelist-run-common.inc
40include whitelist-runuser-common.inc 40include whitelist-runuser-common.inc
41include whitelist-usr-share-common.inc 41include whitelist-usr-share-common.inc
42include whitelist-var-common.inc 42include whitelist-var-common.inc
@@ -62,7 +62,7 @@ tracelog
62 62
63private-bin kbuildsycoca4,kdeinit4,lpr,okular,unar,unrar 63private-bin kbuildsycoca4,kdeinit4,lpr,okular,unar,unrar
64private-dev 64private-dev
65private-etc alternatives,cups,fonts,kde4rc,kde5rc,ld.so.cache,machine-id,passwd,xdg 65private-etc alternatives,cups,fonts,kde4rc,kde5rc,ld.so.cache,ld.so.preload,machine-id,passwd,xdg
66# private-tmp - on KDE we need access to the real /tmp for data exchange with email clients 66# private-tmp - on KDE we need access to the real /tmp for data exchange with email clients
67 67
68# dbus-user none 68# dbus-user none
diff --git a/etc/profile-m-z/onboard.profile b/etc/profile-m-z/onboard.profile
index 5b367b639..e05e58cad 100644
--- a/etc/profile-m-z/onboard.profile
+++ b/etc/profile-m-z/onboard.profile
@@ -17,7 +17,6 @@ include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-programs.inc 19include disable-programs.inc
20include disable-passwdmgr.inc
21include disable-shell.inc 20include disable-shell.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
@@ -51,7 +50,7 @@ disable-mnt
51private-cache 50private-cache
52private-bin onboard,python*,tput 51private-bin onboard,python*,tput
53private-dev 52private-dev
54private-etc alternatives,dbus-1,dconf,fonts,gtk-2.0,gtk-3.0,locale,locale.alias,locale.conf,mime.types,selinux,X11,xdg 53private-etc alternatives,dbus-1,dconf,fonts,gtk-2.0,gtk-3.0,ld.so.cache,ld.so.preload,locale,locale.alias,locale.conf,mime.types,selinux,X11,xdg
55private-tmp 54private-tmp
56 55
57dbus-system none 56dbus-system none
diff --git a/etc/profile-m-z/onionshare-cli.profile b/etc/profile-m-z/onionshare-cli.profile
new file mode 100644
index 000000000..2e2331351
--- /dev/null
+++ b/etc/profile-m-z/onionshare-cli.profile
@@ -0,0 +1,12 @@
1# Firejail profile for onionshare-cli
2# Description: Share a file over Tor Hidden Services anonymously and securely (CLI)
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include onionshare-cli.local
7# Persistent global definitions
8# added by included profile
9#include globals.local
10
11# Redirect
12include onionshare-gui.profile
diff --git a/etc/profile-m-z/onionshare-gui.profile b/etc/profile-m-z/onionshare-gui.profile
index 960df9034..cf4d7db30 100644
--- a/etc/profile-m-z/onionshare-gui.profile
+++ b/etc/profile-m-z/onionshare-gui.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19 18
20include whitelist-var-common.inc 19include whitelist-var-common.inc
diff --git a/etc/profile-m-z/onionshare.profile b/etc/profile-m-z/onionshare.profile
new file mode 100644
index 000000000..b0390d392
--- /dev/null
+++ b/etc/profile-m-z/onionshare.profile
@@ -0,0 +1,11 @@
1# Firejail profile for onionshare
2# Description: Share a file over Tor Hidden Services anonymously and securely (GUI)
3# This file is overwritten after every install/update
4# Persistent local customizations
5include onionshare.local
6# Persistent global definitions
7# added by included profile
8#include globals.local
9
10# Redirect
11include onionshare-gui.profile
diff --git a/etc/profile-m-z/open-invaders.profile b/etc/profile-m-z/open-invaders.profile
index 7a840d4a9..c2c22f42d 100644
--- a/etc/profile-m-z/open-invaders.profile
+++ b/etc/profile-m-z/open-invaders.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18 17
@@ -26,7 +25,6 @@ caps.drop all
26net none 25net none
27nodvd 26nodvd
28nogroups 27nogroups
29noinput
30nonewprivs 28nonewprivs
31noroot 29noroot
32notv 30notv
diff --git a/etc/profile-m-z/openarena.profile b/etc/profile-m-z/openarena.profile
index 36ce0316f..c3ac097a0 100644
--- a/etc/profile-m-z/openarena.profile
+++ b/etc/profile-m-z/openarena.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
@@ -44,7 +43,7 @@ disable-mnt
44private-bin bash,cut,glxinfo,grep,head,openarena,openarena_ded,quake3,zenity 43private-bin bash,cut,glxinfo,grep,head,openarena,openarena_ded,quake3,zenity
45private-cache 44private-cache
46private-dev 45private-dev
47private-etc drirc,machine-id,openal,passwd,selinux,udev,xdg 46private-etc alternatives,drirc,ld.so.cache,ld.so.preload,machine-id,openal,passwd,selinux,udev,xdg
48private-tmp 47private-tmp
49 48
50dbus-user none 49dbus-user none
diff --git a/etc/profile-m-z/opencity.profile b/etc/profile-m-z/opencity.profile
index a3d371e15..560bc6cbc 100644
--- a/etc/profile-m-z/opencity.profile
+++ b/etc/profile-m-z/opencity.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
diff --git a/etc/profile-m-z/openclonk.profile b/etc/profile-m-z/openclonk.profile
index 32b40df42..68362cbc8 100644
--- a/etc/profile-m-z/openclonk.profile
+++ b/etc/profile-m-z/openclonk.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -29,7 +28,6 @@ ipc-namespace
29netfilter 28netfilter
30nodvd 29nodvd
31nogroups 30nogroups
32noinput
33nonewprivs 31nonewprivs
34noroot 32noroot
35notv 33notv
diff --git a/etc/profile-m-z/openmw.profile b/etc/profile-m-z/openmw.profile
index d1fe67aed..ce3399ad6 100644
--- a/etc/profile-m-z/openmw.profile
+++ b/etc/profile-m-z/openmw.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-write-mnt.inc 18include disable-write-mnt.inc
diff --git a/etc/profile-m-z/openshot.profile b/etc/profile-m-z/openshot.profile
index 6118630c4..e2af2e714 100644
--- a/etc/profile-m-z/openshot.profile
+++ b/etc/profile-m-z/openshot.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22whitelist /usr/share/blender 21whitelist /usr/share/blender
diff --git a/etc/profile-m-z/openstego.profile b/etc/profile-m-z/openstego.profile
new file mode 100644
index 000000000..f6622b38d
--- /dev/null
+++ b/etc/profile-m-z/openstego.profile
@@ -0,0 +1,58 @@
1# Firejail profile for OpenStego
2# Description: Steganography application that provides data hiding and watermarking functionality
3# This file is overwritten after every install/update
4# Persistent local customizations
5include openstego.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/openstego.ini
10
11# Allow java (blacklisted by disable-devel.inc)
12include allow-java.inc
13
14include disable-common.inc
15include disable-devel.inc
16include disable-exec.inc
17include disable-interpreters.inc
18include disable-proc.inc
19include disable-programs.inc
20
21mkfile ${HOME}/openstego.ini
22whitelist ${HOME}/openstego.ini
23whitelist ${HOME}/.java
24whitelist ${PICTURES}
25whitelist ${DOCUMENTS}
26whitelist ${DESKTOP}
27whitelist /usr/share/java
28include whitelist-common.inc
29include whitelist-run-common.inc
30include whitelist-runuser-common.inc
31include whitelist-usr-share-common.inc
32include whitelist-var-common.inc
33
34caps.drop all
35machine-id
36net none
37no3d
38nogroups
39noinput
40nonewprivs
41noroot
42nosound
43notv
44nou2f
45novideo
46seccomp
47seccomp.block-secondary
48shell none
49tracelog
50
51disable-mnt
52private-bin bash,dirname,openstego,readlink,sh
53private-cache
54private-dev
55private-tmp
56
57dbus-user none
58dbus-system none
diff --git a/etc/profile-m-z/openttd.profile b/etc/profile-m-z/openttd.profile
index 546958bb7..6c31ebf65 100644
--- a/etc/profile-m-z/openttd.profile
+++ b/etc/profile-m-z/openttd.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
diff --git a/etc/profile-m-z/opera-beta.profile b/etc/profile-m-z/opera-beta.profile
index 551f1aba4..becd3f86c 100644
--- a/etc/profile-m-z/opera-beta.profile
+++ b/etc/profile-m-z/opera-beta.profile
@@ -5,18 +5,16 @@ include opera-beta.local
5# Persistent global definitions 5# Persistent global definitions
6include globals.local 6include globals.local
7 7
8# Disable for now, see https://www.tutorialspoint.com/difference-between-void-main-and-int-main-in-c-cplusplus 8noblacklist ${HOME}/.cache/opera-beta
9ignore whitelist /usr/share/chromium
10ignore include whitelist-runuser-common.inc
11ignore include whitelist-usr-share-common.inc
12
13noblacklist ${HOME}/.cache/opera
14noblacklist ${HOME}/.config/opera-beta 9noblacklist ${HOME}/.config/opera-beta
10noblacklist ${HOME}/.opera-beta
15 11
16mkdir ${HOME}/.cache/opera 12mkdir ${HOME}/.cache/opera-beta
17mkdir ${HOME}/.config/opera-beta 13mkdir ${HOME}/.config/opera-beta
18whitelist ${HOME}/.cache/opera 14mkdir ${HOME}/.opera-beta
15whitelist ${HOME}/.cache/opera-beta
19whitelist ${HOME}/.config/opera-beta 16whitelist ${HOME}/.config/opera-beta
17whitelist ${HOME}/.opera-beta
20 18
21# Redirect 19# Redirect
22include chromium-common.profile 20include chromium-common.profile
diff --git a/etc/profile-m-z/opera-developer.profile b/etc/profile-m-z/opera-developer.profile
new file mode 100644
index 000000000..52c850227
--- /dev/null
+++ b/etc/profile-m-z/opera-developer.profile
@@ -0,0 +1,20 @@
1# Firejail profile for opera-developer
2# This file is overwritten after every install/update
3# Persistent local customizations
4include opera-developer.local
5# Persistent global definitions
6include globals.local
7
8noblacklist ${HOME}/.cache/opera-developer
9noblacklist ${HOME}/.config/opera-developer
10noblacklist ${HOME}/.opera-developer
11
12mkdir ${HOME}/.cache/opera-developer
13mkdir ${HOME}/.config/opera-developer
14mkdir ${HOME}/.opera-developer
15whitelist ${HOME}/.cache/opera-developer
16whitelist ${HOME}/.config/opera-developer
17whitelist ${HOME}/.opera-developer
18
19# Redirect
20include chromium-common.profile
diff --git a/etc/profile-m-z/opera.profile b/etc/profile-m-z/opera.profile
index 2c7c5fc35..b342b3961 100644
--- a/etc/profile-m-z/opera.profile
+++ b/etc/profile-m-z/opera.profile
@@ -6,11 +6,6 @@ include opera.local
6# Persistent global definitions 6# Persistent global definitions
7include globals.local 7include globals.local
8 8
9# Disable for now, see https://www.tutorialspoint.com/difference-between-void-main-and-int-main-in-c-cplusplus
10ignore whitelist /usr/share/chromium
11ignore include whitelist-runuser-common.inc
12ignore include whitelist-usr-share-common.inc
13
14noblacklist ${HOME}/.cache/opera 9noblacklist ${HOME}/.cache/opera
15noblacklist ${HOME}/.config/opera 10noblacklist ${HOME}/.config/opera
16noblacklist ${HOME}/.opera 11noblacklist ${HOME}/.opera
diff --git a/etc/profile-m-z/orage.profile b/etc/profile-m-z/orage.profile
index 4e4d8bea5..a3ec6a386 100644
--- a/etc/profile-m-z/orage.profile
+++ b/etc/profile-m-z/orage.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-m-z/ostrichriders.profile b/etc/profile-m-z/ostrichriders.profile
index e0be078a7..de6a6d3f5 100644
--- a/etc/profile-m-z/ostrichriders.profile
+++ b/etc/profile-m-z/ostrichriders.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -29,6 +28,7 @@ ipc-namespace
29net none 28net none
30nodvd 29nodvd
31nogroups 30nogroups
31# Add 'ignore noinput' to your ostrichriders.local if you need controller support.
32noinput 32noinput
33nonewprivs 33nonewprivs
34noroot 34noroot
@@ -43,7 +43,6 @@ tracelog
43disable-mnt 43disable-mnt
44private-bin ostrichriders 44private-bin ostrichriders
45private-cache 45private-cache
46# comment the following line if you need controller support
47private-dev 46private-dev
48private-tmp 47private-tmp
49 48
diff --git a/etc/profile-m-z/otter-browser.profile b/etc/profile-m-z/otter-browser.profile
index aa26ddd4e..e2687bf6b 100644
--- a/etc/profile-m-z/otter-browser.profile
+++ b/etc/profile-m-z/otter-browser.profile
@@ -10,26 +10,25 @@ include globals.local
10 10
11noblacklist ${HOME}/.cache/Otter 11noblacklist ${HOME}/.cache/Otter
12noblacklist ${HOME}/.config/otter 12noblacklist ${HOME}/.config/otter
13noblacklist ${HOME}/.pki
14noblacklist ${HOME}/.local/share/pki 13noblacklist ${HOME}/.local/share/pki
14noblacklist ${HOME}/.pki
15 15
16include disable-common.inc 16include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
24mkdir ${HOME}/.cache/Otter 23mkdir ${HOME}/.cache/Otter
25mkdir ${HOME}/.config/otter 24mkdir ${HOME}/.config/otter
26mkdir ${HOME}/.pki
27mkdir ${HOME}/.local/share/pki 25mkdir ${HOME}/.local/share/pki
26mkdir ${HOME}/.pki
28whitelist ${DOWNLOADS} 27whitelist ${DOWNLOADS}
29whitelist ${HOME}/.cache/Otter 28whitelist ${HOME}/.cache/Otter
30whitelist ${HOME}/.config/otter 29whitelist ${HOME}/.config/otter
31whitelist ${HOME}/.pki
32whitelist ${HOME}/.local/share/pki 30whitelist ${HOME}/.local/share/pki
31whitelist ${HOME}/.pki
33whitelist /usr/share/otter-browser 32whitelist /usr/share/otter-browser
34include whitelist-common.inc 33include whitelist-common.inc
35include whitelist-runuser-common.inc 34include whitelist-runuser-common.inc
@@ -41,6 +40,7 @@ caps.drop all
41netfilter 40netfilter
42nodvd 41nodvd
43nogroups 42nogroups
43noinput
44nonewprivs 44nonewprivs
45noroot 45noroot
46notv 46notv
diff --git a/etc/profile-m-z/pandoc.profile b/etc/profile-m-z/pandoc.profile
index 513b4119e..c016b5103 100644
--- a/etc/profile-m-z/pandoc.profile
+++ b/etc/profile-m-z/pandoc.profile
@@ -11,15 +11,17 @@ blacklist ${RUNUSER}
11 11
12noblacklist ${DOCUMENTS} 12noblacklist ${DOCUMENTS}
13 13
14include allow-bin-sh.inc
15
14include disable-common.inc 16include disable-common.inc
15include disable-devel.inc 17include disable-devel.inc
16include disable-exec.inc 18include disable-exec.inc
17include disable-interpreters.inc 19include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 20include disable-programs.inc
20include disable-shell.inc 21include disable-shell.inc
21include disable-xdg.inc 22include disable-xdg.inc
22 23
24include whitelist-runuser-common.inc
23# breaks pdf output 25# breaks pdf output
24#include whitelist-var-common.inc 26#include whitelist-var-common.inc
25 27
@@ -40,15 +42,15 @@ nou2f
40novideo 42novideo
41protocol unix 43protocol unix
42seccomp 44seccomp
45seccomp.block-secondary
43shell none 46shell none
44tracelog 47tracelog
45x11 none 48x11 none
46 49
47disable-mnt 50disable-mnt
48private-bin context,latex,mktexfmt,pandoc,pdflatex,pdfroff,prince,weasyprint,wkhtmltopdf
49private-cache 51private-cache
50private-dev 52private-dev
51private-etc alternatives,texlive,texmf 53private-etc alternatives,ld.so.cache,ld.so.preload,texlive,texmf
52private-tmp 54private-tmp
53 55
54dbus-user none 56dbus-user none
diff --git a/etc/profile-m-z/parole.profile b/etc/profile-m-z/parole.profile
index 0a4422a73..3d380542f 100644
--- a/etc/profile-m-z/parole.profile
+++ b/etc/profile-m-z/parole.profile
@@ -12,7 +12,6 @@ noblacklist ${VIDEOS}
12include disable-common.inc 12include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -28,4 +27,4 @@ shell none
28 27
29private-bin dbus-launch,parole 28private-bin dbus-launch,parole
30private-cache 29private-cache
31private-etc alternatives,asound.conf,ca-certificates,crypto-policies,fonts,group,machine-id,passwd,pki,pulse,ssl 30private-etc alternatives,asound.conf,ca-certificates,crypto-policies,fonts,group,ld.so.cache,ld.so.preload,machine-id,passwd,pki,pulse,ssl
diff --git a/etc/profile-m-z/patch.profile b/etc/profile-m-z/patch.profile
index 0de968185..3973c1b4a 100644
--- a/etc/profile-m-z/patch.profile
+++ b/etc/profile-m-z/patch.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
21 20
diff --git a/etc/profile-m-z/pavucontrol.profile b/etc/profile-m-z/pavucontrol.profile
index b46fb3026..d64aab200 100644
--- a/etc/profile-m-z/pavucontrol.profile
+++ b/etc/profile-m-z/pavucontrol.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
@@ -46,7 +45,7 @@ disable-mnt
46private-bin pavucontrol 45private-bin pavucontrol
47private-cache 46private-cache
48private-dev 47private-dev
49private-etc alternatives,asound.conf,avahi,fonts,machine-id,pulse 48private-etc alternatives,asound.conf,avahi,fonts,ld.so.cache,ld.so.preload,machine-id,pulse
50private-lib 49private-lib
51private-tmp 50private-tmp
52 51
diff --git a/etc/profile-m-z/pcsxr.profile b/etc/profile-m-z/pcsxr.profile
index a6dab2a9a..e52a1c4a9 100644
--- a/etc/profile-m-z/pcsxr.profile
+++ b/etc/profile-m-z/pcsxr.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-write-mnt.inc 19include disable-write-mnt.inc
diff --git a/etc/profile-m-z/pdfchain.profile b/etc/profile-m-z/pdfchain.profile
index d72417914..41ec98a39 100644
--- a/etc/profile-m-z/pdfchain.profile
+++ b/etc/profile-m-z/pdfchain.profile
@@ -11,7 +11,6 @@ include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-xdg.inc 15include disable-xdg.inc
17 16
@@ -35,7 +34,7 @@ shell none
35 34
36private-bin pdfchain,pdftk,sh 35private-bin pdfchain,pdftk,sh
37private-dev 36private-dev
38private-etc alternatives,dconf,fonts,gtk-3.0,xdg 37private-etc alternatives,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload,xdg
39private-tmp 38private-tmp
40 39
41dbus-user none 40dbus-user none
diff --git a/etc/profile-m-z/pdfmod.profile b/etc/profile-m-z/pdfmod.profile
index a19826555..c8397a31e 100644
--- a/etc/profile-m-z/pdfmod.profile
+++ b/etc/profile-m-z/pdfmod.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
diff --git a/etc/profile-m-z/pdfsam.profile b/etc/profile-m-z/pdfsam.profile
index e2808d4d2..0c2ce0588 100644
--- a/etc/profile-m-z/pdfsam.profile
+++ b/etc/profile-m-z/pdfsam.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-xdg.inc 19include disable-xdg.inc
21 20
diff --git a/etc/profile-m-z/pdftotext.profile b/etc/profile-m-z/pdftotext.profile
index d3902a51c..291d533a6 100644
--- a/etc/profile-m-z/pdftotext.profile
+++ b/etc/profile-m-z/pdftotext.profile
@@ -1,6 +1,7 @@
1# Firejail profile for pdftotext 1# Firejail profile for pdftotext
2# Description: Portable Document Format (PDF) to text converter 2# Description: Portable Document Format (PDF) to text converter
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 pdftotext.local 6include pdftotext.local
6# Persistent global definitions 7# Persistent global definitions
@@ -14,7 +15,6 @@ include disable-common.inc
14include disable-devel.inc 15include disable-devel.inc
15include disable-exec.inc 16include disable-exec.inc
16include disable-interpreters.inc 17include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 18include disable-programs.inc
19include disable-shell.inc 19include disable-shell.inc
20include disable-xdg.inc 20include disable-xdg.inc
@@ -49,7 +49,7 @@ x11 none
49private-bin pdftotext 49private-bin pdftotext
50private-cache 50private-cache
51private-dev 51private-dev
52private-etc alternatives 52private-etc alternatives,ld.so.cache,ld.so.preload
53private-tmp 53private-tmp
54 54
55dbus-user none 55dbus-user none
diff --git a/etc/profile-m-z/peek.profile b/etc/profile-m-z/peek.profile
index c33953687..f5c295b5d 100644
--- a/etc/profile-m-z/peek.profile
+++ b/etc/profile-m-z/peek.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
@@ -49,7 +48,7 @@ tracelog
49disable-mnt 48disable-mnt
50private-bin bash,convert,ffmpeg,firejail,fish,peek,sh,which,zsh 49private-bin bash,convert,ffmpeg,firejail,fish,peek,sh,which,zsh
51private-dev 50private-dev
52private-etc dconf,firejail,fonts,gtk-3.0,login.defs,pango,passwd,X11 51private-etc alternatives,dconf,firejail,fonts,gtk-3.0,ld.so.cache,ld.so.preload,login.defs,pango,passwd,X11
53private-tmp 52private-tmp
54 53
55dbus-user filter 54dbus-user filter
diff --git a/etc/profile-m-z/penguin-command.profile b/etc/profile-m-z/penguin-command.profile
index f5ad0321d..13e89616e 100644
--- a/etc/profile-m-z/penguin-command.profile
+++ b/etc/profile-m-z/penguin-command.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18 17
diff --git a/etc/profile-m-z/photoflare.profile b/etc/profile-m-z/photoflare.profile
index 40068ff78..80efedec7 100644
--- a/etc/profile-m-z/photoflare.profile
+++ b/etc/profile-m-z/photoflare.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -44,7 +43,7 @@ disable-mnt
44private-bin photoflare 43private-bin photoflare
45private-cache 44private-cache
46private-dev 45private-dev
47private-etc alternatives,fonts,locale,locale.alias,locale.conf,mime.types,X11 46private-etc alternatives,fonts,ld.so.cache,ld.so.preload,locale,locale.alias,locale.conf,mime.types,X11
48private-tmp 47private-tmp
49 48
50dbus-user none 49dbus-user none
diff --git a/etc/profile-m-z/picard.profile b/etc/profile-m-z/picard.profile
index a5ea47088..dbbfc5275 100644
--- a/etc/profile-m-z/picard.profile
+++ b/etc/profile-m-z/picard.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-xdg.inc 22include disable-xdg.inc
24 23
diff --git a/etc/profile-m-z/pidgin.profile b/etc/profile-m-z/pidgin.profile
index 26872e9a1..904c17e09 100644
--- a/etc/profile-m-z/pidgin.profile
+++ b/etc/profile-m-z/pidgin.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-xdg.inc 19include disable-xdg.inc
21 20
diff --git a/etc/profile-m-z/pinball.profile b/etc/profile-m-z/pinball.profile
index ab433e729..3c76ad99c 100644
--- a/etc/profile-m-z/pinball.profile
+++ b/etc/profile-m-z/pinball.profile
@@ -12,14 +12,16 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
20mkdir ${HOME}/.config/emilia 19mkdir ${HOME}/.config/emilia
21whitelist ${HOME}/.config/emilia 20whitelist ${HOME}/.config/emilia
21
22whitelist /usr/share/pinball 22whitelist /usr/share/pinball
23# on debian games are stored under /usr/share/games
24whitelist /usr/share/games/pinball
23include whitelist-common.inc 25include whitelist-common.inc
24include whitelist-runuser-common.inc 26include whitelist-runuser-common.inc
25include whitelist-usr-share-common.inc 27include whitelist-usr-share-common.inc
diff --git a/etc/profile-m-z/ping.profile b/etc/profile-m-z/ping.profile
index e914007c0..b4923c38a 100644
--- a/etc/profile-m-z/ping.profile
+++ b/etc/profile-m-z/ping.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
diff --git a/etc/profile-m-z/pingus.profile b/etc/profile-m-z/pingus.profile
index 3889d87d2..69c78740d 100644
--- a/etc/profile-m-z/pingus.profile
+++ b/etc/profile-m-z/pingus.profile
@@ -11,11 +11,12 @@ noblacklist ${HOME}/.pingus
11# Allow /bin/sh (blacklisted by disable-shell.inc) 11# Allow /bin/sh (blacklisted by disable-shell.inc)
12include allow-bin-sh.inc 12include allow-bin-sh.inc
13 13
14blacklist /usr/libexec
15
14include disable-common.inc 16include disable-common.inc
15include disable-devel.inc 17include disable-devel.inc
16include disable-exec.inc 18include disable-exec.inc
17include disable-interpreters.inc 19include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 20include disable-programs.inc
20include disable-shell.inc 21include disable-shell.inc
21include disable-xdg.inc 22include disable-xdg.inc
@@ -49,7 +50,7 @@ disable-mnt
49private-bin pingus,pingus.bin,sh 50private-bin pingus,pingus.bin,sh
50private-cache 51private-cache
51private-dev 52private-dev
52private-etc machine-id 53private-etc alternatives,ld.so.cache,ld.so.preload,machine-id
53private-tmp 54private-tmp
54 55
55dbus-user none 56dbus-user none
diff --git a/etc/profile-m-z/pinta.profile b/etc/profile-m-z/pinta.profile
index 19406c399..f52803d50 100644
--- a/etc/profile-m-z/pinta.profile
+++ b/etc/profile-m-z/pinta.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
diff --git a/etc/profile-m-z/pioneer.profile b/etc/profile-m-z/pioneer.profile
index 721b3944a..7c9bb352b 100644
--- a/etc/profile-m-z/pioneer.profile
+++ b/etc/profile-m-z/pioneer.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
diff --git a/etc/profile-m-z/pip.profile b/etc/profile-m-z/pip.profile
new file mode 100644
index 000000000..a0926371f
--- /dev/null
+++ b/etc/profile-m-z/pip.profile
@@ -0,0 +1,18 @@
1# Firejail profile for pip
2# Description: package manager for Python packages
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include meson.local
7# Persistent global definitions
8include globals.local
9
10ignore read-only ${HOME}/.local/lib
11
12# Allow python3 (blacklisted by disable-interpreters.inc)
13include allow-python3.inc
14
15#whitelist ${HOME}/.local/lib/python*
16
17# Redirect
18include build-systems-common.profile
diff --git a/etc/profile-m-z/pipe-viewer.profile b/etc/profile-m-z/pipe-viewer.profile
new file mode 100644
index 000000000..3de064311
--- /dev/null
+++ b/etc/profile-m-z/pipe-viewer.profile
@@ -0,0 +1,21 @@
1# Firejail profile for pipe-viewer
2# Description: Fork of youtube-viewer, scrapes youtube directly and with invidious
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include pipe-viewer.local
7# Persistent global definitions
8include globals.local
9
10noblacklist ${HOME}/.cache/pipe-viewer
11noblacklist ${HOME}/.config/pipe-viewer
12
13mkdir ${HOME}/.config/pipe-viewer
14mkdir ${HOME}/.cache/pipe-viewer
15whitelist ${HOME}/.cache/pipe-viewer
16whitelist ${HOME}/.config/pipe-viewer
17
18private-bin gtk-pipe-viewer,pipe-viewer
19
20# Redirect
21include youtube-viewers-common.profile
diff --git a/etc/profile-m-z/pithos.profile b/etc/profile-m-z/pithos.profile
index 18990f0b2..91814d8bb 100644
--- a/etc/profile-m-z/pithos.profile
+++ b/etc/profile-m-z/pithos.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
diff --git a/etc/profile-m-z/pitivi.profile b/etc/profile-m-z/pitivi.profile
index a2dd809c4..245ffae22 100644
--- a/etc/profile-m-z/pitivi.profile
+++ b/etc/profile-m-z/pitivi.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22include whitelist-runuser-common.inc 21include whitelist-runuser-common.inc
diff --git a/etc/profile-m-z/pix.profile b/etc/profile-m-z/pix.profile
index 81d3e9370..6bd1ad02e 100644
--- a/etc/profile-m-z/pix.profile
+++ b/etc/profile-m-z/pix.profile
@@ -13,7 +13,6 @@ noblacklist ${HOME}/.steam
13include disable-common.inc 13include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19 18
diff --git a/etc/profile-m-z/pkglog.profile b/etc/profile-m-z/pkglog.profile
index 4eb41b3bd..69b954f53 100644
--- a/etc/profile-m-z/pkglog.profile
+++ b/etc/profile-m-z/pkglog.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
@@ -45,7 +44,7 @@ private
45private-bin pkglog,python* 44private-bin pkglog,python*
46private-cache 45private-cache
47private-dev 46private-dev
48private-etc alternatives 47private-etc alternatives,ld.so.cache,ld.so.preload
49private-opt none 48private-opt none
50private-tmp 49private-tmp
51writable-var-log 50writable-var-log
diff --git a/etc/profile-m-z/pluma.profile b/etc/profile-m-z/pluma.profile
index 10e12e5b1..567725be4 100644
--- a/etc/profile-m-z/pluma.profile
+++ b/etc/profile-m-z/pluma.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-shell.inc 20include disable-shell.inc
22 21
diff --git a/etc/profile-m-z/plv.profile b/etc/profile-m-z/plv.profile
index 5201fd853..38ccf72e8 100644
--- a/etc/profile-m-z/plv.profile
+++ b/etc/profile-m-z/plv.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
@@ -47,7 +46,7 @@ disable-mnt
47private-bin plv 46private-bin plv
48private-cache 47private-cache
49private-dev 48private-dev
50private-etc alternatives,fonts 49private-etc alternatives,fonts,ld.so.cache,ld.so.preload
51private-opt none 50private-opt none
52private-tmp 51private-tmp
53writable-var-log 52writable-var-log
diff --git a/etc/profile-m-z/pngquant.profile b/etc/profile-m-z/pngquant.profile
index 8a181d5a8..6b989202f 100644
--- a/etc/profile-m-z/pngquant.profile
+++ b/etc/profile-m-z/pngquant.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-shell.inc 19include disable-shell.inc
21include disable-xdg.inc 20include disable-xdg.inc
@@ -39,9 +38,8 @@ nosound
39notv 38notv
40nou2f 39nou2f
41novideo 40novideo
42# protocol can be empty, but this is not yet supported see #639 41# block the socket syscall to simulate an be empty protocol line, see #639
43protocol inet 42seccomp socket
44seccomp
45shell none 43shell none
46tracelog 44tracelog
47x11 none 45x11 none
@@ -49,7 +47,7 @@ x11 none
49private-bin pngquant 47private-bin pngquant
50private-cache 48private-cache
51private-dev 49private-dev
52private-etc alternatives 50private-etc alternatives,ld.so.cache,ld.so.preload
53private-tmp 51private-tmp
54 52
55dbus-user none 53dbus-user none
diff --git a/etc/profile-m-z/ppsspp.profile b/etc/profile-m-z/ppsspp.profile
index 1f73c1d89..3e06cf300 100644
--- a/etc/profile-m-z/ppsspp.profile
+++ b/etc/profile-m-z/ppsspp.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-write-mnt.inc 18include disable-write-mnt.inc
20include disable-xdg.inc 19include disable-xdg.inc
diff --git a/etc/profile-m-z/pragha.profile b/etc/profile-m-z/pragha.profile
index f138d785e..fd595c27a 100644
--- a/etc/profile-m-z/pragha.profile
+++ b/etc/profile-m-z/pragha.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
@@ -34,6 +33,6 @@ seccomp
34shell none 33shell none
35 34
36private-dev 35private-dev
37private-etc alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-3.0,host.conf,hostname,hosts,machine-id,pki,pulse,resolv.conf,ssl,xdg 36private-etc alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,machine-id,pki,pulse,resolv.conf,ssl,xdg
38private-tmp 37private-tmp
39 38
diff --git a/etc/profile-m-z/profanity.profile b/etc/profile-m-z/profanity.profile
index 743458725..25a248425 100644
--- a/etc/profile-m-z/profanity.profile
+++ b/etc/profile-m-z/profanity.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-shell.inc 22include disable-shell.inc
24include disable-xdg.inc 23include disable-xdg.inc
@@ -45,7 +44,7 @@ shell none
45private-bin profanity 44private-bin profanity
46private-cache 45private-cache
47private-dev 46private-dev
48private-etc alternatives,ca-certificates,crypto-policies,localtime,mime.types,nsswitch.conf,pki,resolv.conf,ssl 47private-etc alternatives,ca-certificates,crypto-policies,ld.so.cache,ld.so.preload,localtime,mime.types,nsswitch.conf,pki,resolv.conf,ssl
49private-tmp 48private-tmp
50 49
51dbus-user none 50dbus-user none
diff --git a/etc/profile-m-z/psi-plus.profile b/etc/profile-m-z/psi-plus.profile
index 5ac58b0ac..5f598cec5 100644
--- a/etc/profile-m-z/psi-plus.profile
+++ b/etc/profile-m-z/psi-plus.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19mkdir ${HOME}/.cache/psi+ 18mkdir ${HOME}/.cache/psi+
diff --git a/etc/profile-m-z/psi.profile b/etc/profile-m-z/psi.profile
index 7e0ef99fc..99a72adee 100644
--- a/etc/profile-m-z/psi.profile
+++ b/etc/profile-m-z/psi.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-shell.inc 22include disable-shell.inc
24include disable-xdg.inc 23include disable-xdg.inc
@@ -72,7 +71,7 @@ disable-mnt
72private-bin getopt,psi 71private-bin getopt,psi
73private-cache 72private-cache
74private-dev 73private-dev
75private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,drirc,fonts,gcrypt,group,hostname,hosts,ld.so.cache,ld.so.conf,machine-id,passwd,pki,pulse,resolv.conf,selinux,ssl,xdg 74private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,drirc,fonts,gcrypt,group,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.preload,machine-id,passwd,pki,pulse,resolv.conf,selinux,ssl,xdg
76private-tmp 75private-tmp
77 76
78dbus-user none 77dbus-user none
diff --git a/etc/profile-m-z/pybitmessage.profile b/etc/profile-m-z/pybitmessage.profile
index 60ae37930..8d8729d4a 100644
--- a/etc/profile-m-z/pybitmessage.profile
+++ b/etc/profile-m-z/pybitmessage.profile
@@ -16,7 +16,6 @@ include allow-python3.inc
16include disable-common.inc 16include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-interpreters.inc 20include disable-interpreters.inc
22 21
diff --git a/etc/profile-m-z/pycharm-community.profile b/etc/profile-m-z/pycharm-community.profile
index 00d7239ae..f3d40e7f3 100644
--- a/etc/profile-m-z/pycharm-community.profile
+++ b/etc/profile-m-z/pycharm-community.profile
@@ -15,7 +15,6 @@ include allow-common-devel.inc
15 15
16include disable-common.inc 16include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20 19
21caps.drop all 20caps.drop all
diff --git a/etc/profile-m-z/qbittorrent.profile b/etc/profile-m-z/qbittorrent.profile
index 506b738cc..ebe67c63b 100644
--- a/etc/profile-m-z/qbittorrent.profile
+++ b/etc/profile-m-z/qbittorrent.profile
@@ -10,6 +10,7 @@ noblacklist ${HOME}/.cache/qBittorrent
10noblacklist ${HOME}/.config/qBittorrent 10noblacklist ${HOME}/.config/qBittorrent
11noblacklist ${HOME}/.config/qBittorrentrc 11noblacklist ${HOME}/.config/qBittorrentrc
12noblacklist ${HOME}/.local/share/data/qBittorrent 12noblacklist ${HOME}/.local/share/data/qBittorrent
13noblacklist ${HOME}/.local/share/qBittorrent
13 14
14# Allow python (blacklisted by disable-interpreters.inc) 15# Allow python (blacklisted by disable-interpreters.inc)
15include allow-python2.inc 16include allow-python2.inc
@@ -19,7 +20,6 @@ include disable-common.inc
19include disable-devel.inc 20include disable-devel.inc
20include disable-exec.inc 21include disable-exec.inc
21include disable-interpreters.inc 22include disable-interpreters.inc
22include disable-passwdmgr.inc
23include disable-programs.inc 23include disable-programs.inc
24include disable-shell.inc 24include disable-shell.inc
25 25
@@ -27,11 +27,13 @@ mkdir ${HOME}/.cache/qBittorrent
27mkdir ${HOME}/.config/qBittorrent 27mkdir ${HOME}/.config/qBittorrent
28mkfile ${HOME}/.config/qBittorrentrc 28mkfile ${HOME}/.config/qBittorrentrc
29mkdir ${HOME}/.local/share/data/qBittorrent 29mkdir ${HOME}/.local/share/data/qBittorrent
30mkdir ${HOME}/.local/share/qBittorrent
30whitelist ${DOWNLOADS} 31whitelist ${DOWNLOADS}
31whitelist ${HOME}/.cache/qBittorrent 32whitelist ${HOME}/.cache/qBittorrent
32whitelist ${HOME}/.config/qBittorrent 33whitelist ${HOME}/.config/qBittorrent
33whitelist ${HOME}/.config/qBittorrentrc 34whitelist ${HOME}/.config/qBittorrentrc
34whitelist ${HOME}/.local/share/data/qBittorrent 35whitelist ${HOME}/.local/share/data/qBittorrent
36whitelist ${HOME}/.local/share/qBittorrent
35include whitelist-common.inc 37include whitelist-common.inc
36include whitelist-var-common.inc 38include whitelist-var-common.inc
37 39
diff --git a/etc/profile-m-z/qcomicbook.profile b/etc/profile-m-z/qcomicbook.profile
new file mode 100644
index 000000000..4d4d3694b
--- /dev/null
+++ b/etc/profile-m-z/qcomicbook.profile
@@ -0,0 +1,67 @@
1# Firejail profile for qcomicbook
2# Description: A comic book and manga viewer in QT
3# This file is overwritten after every install/update
4# Persistent local customizations
5include qcomicbook.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.cache/PawelStolowski
10noblacklist ${HOME}/.config/PawelStolowski
11noblacklist ${HOME}/.local/share/PawelStolowski
12noblacklist ${DOCUMENTS}
13
14# Allow /bin/sh (blacklisted by disable-shell.inc)
15include allow-bin-sh.inc
16
17include disable-common.inc
18include disable-devel.inc
19include disable-exec.inc
20include disable-interpreters.inc
21include disable-programs.inc
22include disable-shell.inc
23include disable-write-mnt.inc
24include disable-xdg.inc
25
26mkdir ${HOME}/.cache/PawelStolowski
27mkdir ${HOME}/.config/PawelStolowski
28mkdir ${HOME}/.local/share/PawelStolowski
29whitelist /usr/share/qcomicbook
30include whitelist-runuser-common.inc
31include whitelist-usr-share-common.inc
32include whitelist-var-common.inc
33
34apparmor
35caps.drop all
36machine-id
37net none
38nodvd
39nogroups
40noinput
41nonewprivs
42noroot
43nosound
44notv
45nou2f
46novideo
47protocol unix
48seccomp
49seccomp.block-secondary
50shell none
51tracelog
52
53private-bin 7z,7zr,qcomicbook,rar,sh,tar,unace,unrar,unzip
54private-cache
55private-dev
56private-etc alternatives,fonts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,localtime,machine-id,mime.types,pango,passwd,Trolltech.conf,X11,xdg
57private-tmp
58
59dbus-user none
60dbus-system none
61
62read-only ${HOME}
63read-write ${HOME}/.cache/PawelStolowski
64read-write ${HOME}/.config/PawelStolowski
65read-write ${HOME}/.local/share/PawelStolowski
66#to allow ${HOME}/.local/share/recently-used.xbel
67read-write ${HOME}/.local/share
diff --git a/etc/profile-m-z/qemu-launcher.profile b/etc/profile-m-z/qemu-launcher.profile
index ac60384fd..2aea715dc 100644
--- a/etc/profile-m-z/qemu-launcher.profile
+++ b/etc/profile-m-z/qemu-launcher.profile
@@ -8,7 +8,6 @@ include globals.local
8noblacklist ${HOME}/.qemu-launcher 8noblacklist ${HOME}/.qemu-launcher
9 9
10include disable-common.inc 10include disable-common.inc
11include disable-passwdmgr.inc
12include disable-programs.inc 11include disable-programs.inc
13 12
14caps.drop all 13caps.drop all
diff --git a/etc/profile-m-z/qemu-system-x86_64.profile b/etc/profile-m-z/qemu-system-x86_64.profile
index d7d7905dd..2333e07d9 100644
--- a/etc/profile-m-z/qemu-system-x86_64.profile
+++ b/etc/profile-m-z/qemu-system-x86_64.profile
@@ -7,7 +7,6 @@ include qemu-system-x86_64.local
7include globals.local 7include globals.local
8 8
9include disable-common.inc 9include disable-common.inc
10include disable-passwdmgr.inc
11include disable-programs.inc 10include disable-programs.inc
12 11
13caps.drop all 12caps.drop all
diff --git a/etc/profile-m-z/qgis.profile b/etc/profile-m-z/qgis.profile
index 2e97daea2..555e1e41b 100644
--- a/etc/profile-m-z/qgis.profile
+++ b/etc/profile-m-z/qgis.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-xdg.inc 22include disable-xdg.inc
24 23
@@ -53,7 +52,7 @@ tracelog
53disable-mnt 52disable-mnt
54private-cache 53private-cache
55private-dev 54private-dev
56private-etc alternatives,ca-certificates,crypto-policies,fonts,machine-id,pki,QGIS,QGIS.conf,resolv.conf,ssl,Trolltech.conf 55private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.preload,machine-id,pki,QGIS,QGIS.conf,resolv.conf,ssl,Trolltech.conf
57private-tmp 56private-tmp
58 57
59dbus-user none 58dbus-user none
diff --git a/etc/profile-m-z/qlipper.profile b/etc/profile-m-z/qlipper.profile
index 6e94d5845..7176d8a39 100644
--- a/etc/profile-m-z/qlipper.profile
+++ b/etc/profile-m-z/qlipper.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
diff --git a/etc/profile-m-z/qmmp.profile b/etc/profile-m-z/qmmp.profile
index c3d982c17..af85c95e7 100644
--- a/etc/profile-m-z/qmmp.profile
+++ b/etc/profile-m-z/qmmp.profile
@@ -12,7 +12,6 @@ noblacklist ${MUSIC}
12include disable-common.inc 12include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
diff --git a/etc/profile-m-z/qnapi.profile b/etc/profile-m-z/qnapi.profile
index ca11df5be..4a3ce366e 100644
--- a/etc/profile-m-z/qnapi.profile
+++ b/etc/profile-m-z/qnapi.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
@@ -48,7 +47,7 @@ tracelog
48private-bin 7z,qnapi 47private-bin 7z,qnapi
49private-cache 48private-cache
50private-dev 49private-dev
51private-etc alternatives,fonts 50private-etc alternatives,fonts,ld.so.cache,ld.so.preload
52private-opt none 51private-opt none
53private-tmp 52private-tmp
54 53
diff --git a/etc/profile-m-z/qpdfview.profile b/etc/profile-m-z/qpdfview.profile
index be690ffa4..3ad8a19c8 100644
--- a/etc/profile-m-z/qpdfview.profile
+++ b/etc/profile-m-z/qpdfview.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
diff --git a/etc/profile-m-z/qrencode.profile b/etc/profile-m-z/qrencode.profile
index 6cbf8519f..dd3f24875 100644
--- a/etc/profile-m-z/qrencode.profile
+++ b/etc/profile-m-z/qrencode.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-write-mnt.inc 18include disable-write-mnt.inc
@@ -48,7 +47,7 @@ disable-mnt
48private-bin qrencode 47private-bin qrencode
49private-cache 48private-cache
50private-dev 49private-dev
51private-etc none 50private-etc alternatives,ld.so.cache,ld.so.preload
52private-lib libpcre* 51private-lib libpcre*
53private-tmp 52private-tmp
54 53
diff --git a/etc/profile-m-z/qtox.profile b/etc/profile-m-z/qtox.profile
index 8ffe24d11..60e1539fa 100644
--- a/etc/profile-m-z/qtox.profile
+++ b/etc/profile-m-z/qtox.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
@@ -44,7 +43,7 @@ disable-mnt
44private-bin qtox 43private-bin qtox
45private-cache 44private-cache
46private-dev 45private-dev
47private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,localtime,machine-id,pki,pulse,resolv.conf,ssl 46private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.preload,localtime,machine-id,pki,pulse,resolv.conf,ssl
48private-tmp 47private-tmp
49 48
50dbus-user none 49dbus-user none
diff --git a/etc/profile-m-z/quaternion.profile b/etc/profile-m-z/quaternion.profile
index 1d146aa39..dfb46ddae 100644
--- a/etc/profile-m-z/quaternion.profile
+++ b/etc/profile-m-z/quaternion.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
diff --git a/etc/profile-m-z/quiterss.profile b/etc/profile-m-z/quiterss.profile
index 9490089b2..8f89931c7 100644
--- a/etc/profile-m-z/quiterss.profile
+++ b/etc/profile-m-z/quiterss.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-shell.inc 19include disable-shell.inc
21 20
diff --git a/etc/profile-m-z/quodlibet.profile b/etc/profile-m-z/quodlibet.profile
index 92b02b2bf..bc435653d 100644
--- a/etc/profile-m-z/quodlibet.profile
+++ b/etc/profile-m-z/quodlibet.profile
@@ -21,7 +21,6 @@ include disable-common.inc
21include disable-devel.inc 21include disable-devel.inc
22include disable-exec.inc 22include disable-exec.inc
23include disable-interpreters.inc 23include disable-interpreters.inc
24include disable-passwdmgr.inc
25include disable-programs.inc 24include disable-programs.inc
26include disable-shell.inc 25include disable-shell.inc
27include disable-xdg.inc 26include disable-xdg.inc
diff --git a/etc/profile-m-z/qupzilla.profile b/etc/profile-m-z/qupzilla.profile
index 7aa71c848..c29d87a73 100644
--- a/etc/profile-m-z/qupzilla.profile
+++ b/etc/profile-m-z/qupzilla.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19mkdir ${HOME}/.cache/qupzilla 18mkdir ${HOME}/.cache/qupzilla
diff --git a/etc/profile-m-z/raincat.profile b/etc/profile-m-z/raincat.profile
new file mode 100644
index 000000000..104577bdb
--- /dev/null
+++ b/etc/profile-m-z/raincat.profile
@@ -0,0 +1,49 @@
1# Firejail profile for raincat
2# This file is overwritten after every install/update
3# Persistent local customizations
4include raincat.local
5# Persistent global definitions
6include globals.local
7
8include disable-devel.inc
9include disable-exec.inc
10include disable-interpreters.inc
11include disable-programs.inc
12include disable-shell.inc
13include disable-xdg.inc
14
15whitelist /usr/share/games
16whitelist /usr/share/timidity
17include whitelist-usr-share-common.inc
18include whitelist-var-common.inc
19
20apparmor
21caps.drop all
22ipc-namespace
23netfilter
24nodvd
25nogroups
26noinput
27nonewprivs
28noroot
29notv
30nou2f
31novideo
32protocol unix
33net none
34seccomp
35shell none
36tracelog
37
38disable-mnt
39private
40private-bin raincat
41private-cache
42private-dev
43private-etc alternatives,drirc,ld.so.cache,ld.so.preload,machine-id,passwd,pulse,timidity,timidity.cfg
44#private-lib
45private-tmp
46
47dbus-user none
48dbus-system none
49
diff --git a/etc/profile-m-z/rambox.profile b/etc/profile-m-z/rambox.profile
index ffa2022ee..a14d7862b 100644
--- a/etc/profile-m-z/rambox.profile
+++ b/etc/profile-m-z/rambox.profile
@@ -7,8 +7,8 @@ include rambox.local
7include globals.local 7include globals.local
8 8
9noblacklist ${HOME}/.config/Rambox 9noblacklist ${HOME}/.config/Rambox
10noblacklist ${HOME}/.pki
11noblacklist ${HOME}/.local/share/pki 10noblacklist ${HOME}/.local/share/pki
11noblacklist ${HOME}/.pki
12 12
13include disable-common.inc 13include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
@@ -16,12 +16,12 @@ include disable-interpreters.inc
16include disable-programs.inc 16include disable-programs.inc
17 17
18mkdir ${HOME}/.config/Rambox 18mkdir ${HOME}/.config/Rambox
19mkdir ${HOME}/.pki
20mkdir ${HOME}/.local/share/pki 19mkdir ${HOME}/.local/share/pki
20mkdir ${HOME}/.pki
21whitelist ${DOWNLOADS} 21whitelist ${DOWNLOADS}
22whitelist ${HOME}/.config/Rambox 22whitelist ${HOME}/.config/Rambox
23whitelist ${HOME}/.pki
24whitelist ${HOME}/.local/share/pki 23whitelist ${HOME}/.local/share/pki
24whitelist ${HOME}/.pki
25include whitelist-common.inc 25include whitelist-common.inc
26 26
27caps.drop all 27caps.drop all
diff --git a/etc/profile-m-z/redeclipse.profile b/etc/profile-m-z/redeclipse.profile
index 9bc196a16..436b98f29 100644
--- a/etc/profile-m-z/redeclipse.profile
+++ b/etc/profile-m-z/redeclipse.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
diff --git a/etc/profile-m-z/rednotebook.profile b/etc/profile-m-z/rednotebook.profile
new file mode 100644
index 000000000..d1dd365ab
--- /dev/null
+++ b/etc/profile-m-z/rednotebook.profile
@@ -0,0 +1,66 @@
1# Firejail profile for rednotebook
2# Description: Daily journal with calendar, templates and keyword searching
3# This file is overwritten after every install/update
4# Persistent local customizations
5include rednotebook.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.cache/rednotebook
10noblacklist ${HOME}/.rednotebook
11
12# Allow python (blacklisted by disable-interpreters.inc)
13include allow-python3.inc
14
15include disable-common.inc
16include disable-devel.inc
17include disable-exec.inc
18include disable-interpreters.inc
19include disable-programs.inc
20include disable-shell.inc
21
22mkdir ${HOME}/.cache/rednotebook
23mkdir ${HOME}/.rednotebook
24whitelist ${HOME}/.cache/rednotebook
25whitelist ${HOME}/.rednotebook
26whitelist ${DESKTOP}
27whitelist ${DOCUMENTS}
28whitelist ${DOWNLOADS}
29whitelist ${MUSIC}
30whitelist ${PICTURES}
31whitelist ${VIDEOS}
32whitelist /usr/libexec/webkit2gtk-4.0
33include whitelist-common.inc
34include whitelist-runuser-common.inc
35include whitelist-usr-share-common.inc
36include whitelist-var-common.inc
37
38apparmor
39caps.drop all
40machine-id
41net none
42no3d
43nodvd
44nogroups
45noinput
46nonewprivs
47noroot
48nosound
49notv
50nou2f
51novideo
52protocol unix
53seccomp
54seccomp.block-secondary
55shell none
56tracelog
57
58disable-mnt
59private-bin python3*,rednotebook
60private-cache
61private-dev
62private-etc alternatives,fonts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,pango,X11
63private-tmp
64
65dbus-user none
66dbus-system none
diff --git a/etc/profile-m-z/redshift.profile b/etc/profile-m-z/redshift.profile
index f87c5f67c..06ae67ae1 100644
--- a/etc/profile-m-z/redshift.profile
+++ b/etc/profile-m-z/redshift.profile
@@ -13,7 +13,6 @@ noblacklist ${HOME}/.config/redshift.conf
13include disable-common.inc 13include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-passwdmgr.inc
17include disable-interpreters.inc 16include disable-interpreters.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
diff --git a/etc/profile-m-z/regextester.profile b/etc/profile-m-z/regextester.profile
index f5131c5d0..f1ce313e7 100644
--- a/etc/profile-m-z/regextester.profile
+++ b/etc/profile-m-z/regextester.profile
@@ -9,7 +9,6 @@ include globals.local
9include disable-common.inc 9include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-passwdmgr.inc
13include disable-interpreters.inc 12include disable-interpreters.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
@@ -44,7 +43,7 @@ disable-mnt
44private-bin regextester 43private-bin regextester
45private-cache 44private-cache
46private-dev 45private-dev
47private-etc alternatives,fonts 46private-etc alternatives,fonts,ld.so.cache,ld.so.preload
48private-lib libgranite.so.* 47private-lib libgranite.so.*
49private-tmp 48private-tmp
50 49
diff --git a/etc/profile-m-z/remmina.profile b/etc/profile-m-z/remmina.profile
index aca22f187..16da40daf 100644
--- a/etc/profile-m-z/remmina.profile
+++ b/etc/profile-m-z/remmina.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
diff --git a/etc/profile-m-z/retroarch.profile b/etc/profile-m-z/retroarch.profile
new file mode 100644
index 000000000..1887a9b72
--- /dev/null
+++ b/etc/profile-m-z/retroarch.profile
@@ -0,0 +1,54 @@
1# Firejail profile for retroarch
2# Description: retroarch is a frontend to libretro emulator cores.
3# This file is overwritten after every install/update
4# Persistent local customizations
5include retroarch.local
6# Persistent global definitions
7include globals.local
8
9blacklist /usr/libexec
10
11include disable-common.inc
12include disable-devel.inc
13include disable-exec.inc
14include disable-interpreters.inc
15include disable-programs.inc
16include disable-shell.inc
17include disable-xdg.inc
18
19mkdir ${HOME}/.config/retroarch
20whitelist ${HOME}/.config/retroarch
21whitelist /run/udev
22whitelist /usr/share/retroarch
23whitelist /usr/share/libretro
24include whitelist-common.inc
25include whitelist-run-common.inc
26include whitelist-runuser-common.inc
27include whitelist-usr-share-common.inc
28include whitelist-var-common.inc
29
30apparmor
31caps.drop all
32netfilter
33nodvd
34nogroups
35nonewprivs
36noroot
37notv
38nou2f
39# If you need access to cameras, add `ignore novideo` to retroarch.local
40novideo
41protocol unix,inet,inet6,netlink
42seccomp
43seccomp.block-secondary
44shell none
45tracelog
46
47disable-mnt
48private-bin retroarch
49private-cache
50private-dev
51private-tmp
52
53dbus-user none
54dbus-system none
diff --git a/etc/profile-m-z/rhythmbox.profile b/etc/profile-m-z/rhythmbox.profile
index 970e8ffba..26b62e456 100644
--- a/etc/profile-m-z/rhythmbox.profile
+++ b/etc/profile-m-z/rhythmbox.profile
@@ -21,7 +21,6 @@ include disable-common.inc
21include disable-devel.inc 21include disable-devel.inc
22include disable-exec.inc 22include disable-exec.inc
23include disable-interpreters.inc 23include disable-interpreters.inc
24include disable-passwdmgr.inc
25include disable-programs.inc 24include disable-programs.inc
26include disable-shell.inc 25include disable-shell.inc
27include disable-xdg.inc 26include disable-xdg.inc
diff --git a/etc/profile-m-z/ricochet.profile b/etc/profile-m-z/ricochet.profile
index b664a2be3..705ca0045 100644
--- a/etc/profile-m-z/ricochet.profile
+++ b/etc/profile-m-z/ricochet.profile
@@ -11,7 +11,6 @@ include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-shell.inc 15include disable-shell.inc
17 16
diff --git a/etc/profile-m-z/ripperx.profile b/etc/profile-m-z/ripperx.profile
index be815e714..81aef5a65 100644
--- a/etc/profile-m-z/ripperx.profile
+++ b/etc/profile-m-z/ripperx.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-m-z/ristretto.profile b/etc/profile-m-z/ristretto.profile
index 5572cab5a..79f090d95 100644
--- a/etc/profile-m-z/ristretto.profile
+++ b/etc/profile-m-z/ristretto.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19 18
20include whitelist-var-common.inc 19include whitelist-var-common.inc
diff --git a/etc/profile-m-z/rpcs3.profile b/etc/profile-m-z/rpcs3.profile
new file mode 100644
index 000000000..147afb236
--- /dev/null
+++ b/etc/profile-m-z/rpcs3.profile
@@ -0,0 +1,62 @@
1# Firejail profile for RPCS3 emulator
2# Description: RPCS3 emulator
3# This file is overwritten after every install/update
4# Persistent local customizations
5include rpcs3.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.config/rpcs3
10noblacklist ${HOME}/.cache/rpcs3
11# Don't block access to /sbin and /usr/sbin to allow using ldconfig. Otherwise
12# won't even start.
13noblacklist /sbin
14noblacklist /usr/sbin
15
16blacklist /usr/libexec
17
18include disable-common.inc
19include disable-devel.inc
20include disable-exec.inc
21include disable-interpreters.inc
22include disable-programs.inc # disable if PPU compilation crashes
23include disable-shell.inc
24include disable-xdg.inc
25
26mkdir ${HOME}/.cache/rpcs3
27mkdir ${HOME}/.config/rpcs3
28whitelist ${HOME}/.cache/rpcs3
29whitelist ${HOME}/.config/rpcs3
30whitelist ${DOWNLOADS}
31include whitelist-common.inc
32include whitelist-run-common.inc
33include whitelist-runuser-common.inc
34include whitelist-usr-share-common.inc
35include whitelist-var-common.inc
36
37apparmor
38caps.drop all
39net none
40netfilter
41nodvd
42nogroups
43#noinput
44nonewprivs
45noroot
46noprinters
47notv
48nou2f
49novideo
50protocol unix,netlink
51seccomp
52seccomp.block-secondary
53shell none
54tracelog
55
56disable-mnt
57#private-cache
58#private-etc ca-certificates,crypto-policies,machine-id,pki,resolv.conf,ssl # seems to need awk
59private-tmp
60
61dbus-user none
62dbus-system none
diff --git a/etc/profile-m-z/rsync-download_only.profile b/etc/profile-m-z/rsync-download_only.profile
index 690b44bb1..e44e55a12 100644
--- a/etc/profile-m-z/rsync-download_only.profile
+++ b/etc/profile-m-z/rsync-download_only.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-shell.inc 22include disable-shell.inc
24include disable-xdg.inc 23include disable-xdg.inc
@@ -50,7 +49,7 @@ disable-mnt
50private-bin rsync 49private-bin rsync
51private-cache 50private-cache
52private-dev 51private-dev
53private-etc alternatives,ca-certificates,crypto-policies,host.conf,hostname,hosts,nsswitch.conf,pki,protocols,resolv.conf,rpc,services,ssl 52private-etc alternatives,ca-certificates,crypto-policies,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,nsswitch.conf,pki,protocols,resolv.conf,rpc,services,ssl
54private-tmp 53private-tmp
55 54
56dbus-user none 55dbus-user none
diff --git a/etc/profile-m-z/rtin.profile b/etc/profile-m-z/rtin.profile
new file mode 100644
index 000000000..cd84ce05e
--- /dev/null
+++ b/etc/profile-m-z/rtin.profile
@@ -0,0 +1,8 @@
1# Firejail profile for rtin
2# Description: ncurses-based Usenet newsreader
3# symlink to tin, same as `tin -r`
4# This file is overwritten after every install/update
5# Persistent local customizations
6include rtin.local
7
8include tin.profile
diff --git a/etc/profile-m-z/rtorrent.profile b/etc/profile-m-z/rtorrent.profile
index 6ef51b7f1..757624938 100644
--- a/etc/profile-m-z/rtorrent.profile
+++ b/etc/profile-m-z/rtorrent.profile
@@ -10,7 +10,6 @@ include globals.local
10include disable-common.inc 10include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16 15
diff --git a/etc/profile-m-z/rtv-addons.profile b/etc/profile-m-z/rtv-addons.profile
index c9da0b628..cc6db5043 100644
--- a/etc/profile-m-z/rtv-addons.profile
+++ b/etc/profile-m-z/rtv-addons.profile
@@ -21,3 +21,8 @@ whitelist ${HOME}/.config/mpv
21whitelist ${HOME}/.mailcap 21whitelist ${HOME}/.mailcap
22whitelist ${HOME}/.netrc 22whitelist ${HOME}/.netrc
23whitelist ${HOME}/.w3m 23whitelist ${HOME}/.w3m
24
25#private-bin w3m,mpv,youtube-dl
26
27# tells rtv, which browser to use
28#env RTV_BROWSER=w3m
diff --git a/etc/profile-m-z/rtv.profile b/etc/profile-m-z/rtv.profile
index f0b8d31e9..03d812270 100644
--- a/etc/profile-m-z/rtv.profile
+++ b/etc/profile-m-z/rtv.profile
@@ -12,6 +12,9 @@ blacklist ${RUNUSER}/wayland-*
12noblacklist ${HOME}/.config/rtv 12noblacklist ${HOME}/.config/rtv
13noblacklist ${HOME}/.local/share/rtv 13noblacklist ${HOME}/.local/share/rtv
14 14
15# Allow /bin/sh (blacklisted by disable-shell.inc)
16include allow-bin-sh.inc
17
15# Allow python (blacklisted by disable-interpreters.inc) 18# Allow python (blacklisted by disable-interpreters.inc)
16include allow-python2.inc 19include allow-python2.inc
17include allow-python3.inc 20include allow-python3.inc
@@ -24,7 +27,6 @@ include disable-common.inc
24include disable-devel.inc 27include disable-devel.inc
25include disable-exec.inc 28include disable-exec.inc
26include disable-interpreters.inc 29include disable-interpreters.inc
27include disable-passwdmgr.inc
28include disable-programs.inc 30include disable-programs.inc
29include disable-xdg.inc 31include disable-xdg.inc
30 32
@@ -54,10 +56,10 @@ shell none
54tracelog 56tracelog
55 57
56disable-mnt 58disable-mnt
57private-bin python*,rtv,sh,xdg-settings 59private-bin less,python*,rtv,sh,xdg-settings
58private-cache 60private-cache
59private-dev 61private-dev
60private-etc alternatives,ca-certificates,crypto-policies,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,localtime,mime.types,nsswitch.conf,pki,protocols,resolv.conf,rpc,services,ssl,terminfo,xdg 62private-etc alternatives,ca-certificates,crypto-policies,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,localtime,mailcap,mime.types,nsswitch.conf,pki,protocols,resolv.conf,rpc,services,ssl,terminfo,xdg
61 63
62dbus-user none 64dbus-user none
63dbus-system none 65dbus-system none
diff --git a/etc/profile-m-z/sayonara.profile b/etc/profile-m-z/sayonara.profile
index de79913cc..d447be443 100644
--- a/etc/profile-m-z/sayonara.profile
+++ b/etc/profile-m-z/sayonara.profile
@@ -11,7 +11,6 @@ noblacklist ${MUSIC}
11include disable-common.inc 11include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-shell.inc 15include disable-shell.inc
17include disable-xdg.inc 16include disable-xdg.inc
diff --git a/etc/profile-m-z/scallion.profile b/etc/profile-m-z/scallion.profile
index eb8468c3b..1fa45a747 100644
--- a/etc/profile-m-z/scallion.profile
+++ b/etc/profile-m-z/scallion.profile
@@ -14,7 +14,6 @@ noblacklist ${DOCUMENTS}
14include disable-common.inc 14include disable-common.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
diff --git a/etc/profile-m-z/scorched3d.profile b/etc/profile-m-z/scorched3d.profile
index aac3e721f..77b3d8923 100644
--- a/etc/profile-m-z/scorched3d.profile
+++ b/etc/profile-m-z/scorched3d.profile
@@ -12,13 +12,13 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
19mkdir ${HOME}/.scorched3d 18mkdir ${HOME}/.scorched3d
20whitelist ${HOME}/.scorched3d 19whitelist ${HOME}/.scorched3d
21whitelist /usr/share/scorched3d 20whitelist /usr/share/scorched3d
21whitelist /usr/share/games/scorched3d
22include whitelist-common.inc 22include whitelist-common.inc
23include whitelist-runuser-common.inc 23include whitelist-runuser-common.inc
24include whitelist-usr-share-common.inc 24include whitelist-usr-share-common.inc
diff --git a/etc/profile-m-z/scorchwentbonkers.profile b/etc/profile-m-z/scorchwentbonkers.profile
index 2cb1df6b5..70b5d844a 100644
--- a/etc/profile-m-z/scorchwentbonkers.profile
+++ b/etc/profile-m-z/scorchwentbonkers.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -44,7 +43,7 @@ disable-mnt
44private-bin scorchwentbonkers 43private-bin scorchwentbonkers
45private-cache 44private-cache
46private-dev 45private-dev
47private-etc alsa,asound.conf,machine-id,pulse 46private-etc alsa,alternatives,asound.conf,ld.so.cache,ld.so.preload,machine-id,pulse
48private-tmp 47private-tmp
49 48
50dbus-user none 49dbus-user none
diff --git a/etc/profile-m-z/scribus.profile b/etc/profile-m-z/scribus.profile
index 1fdeaa145..5cf60baea 100644
--- a/etc/profile-m-z/scribus.profile
+++ b/etc/profile-m-z/scribus.profile
@@ -34,7 +34,6 @@ include disable-common.inc
34include disable-devel.inc 34include disable-devel.inc
35include disable-exec.inc 35include disable-exec.inc
36include disable-interpreters.inc 36include disable-interpreters.inc
37include disable-passwdmgr.inc
38include disable-programs.inc 37include disable-programs.inc
39include disable-xdg.inc 38include disable-xdg.inc
40 39
diff --git a/etc/profile-m-z/sdat2img.profile b/etc/profile-m-z/sdat2img.profile
index aa2fa9b1b..81a7dc929 100644
--- a/etc/profile-m-z/sdat2img.profile
+++ b/etc/profile-m-z/sdat2img.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
diff --git a/etc/profile-m-z/seafile-applet.profile b/etc/profile-m-z/seafile-applet.profile
new file mode 100644
index 000000000..79e072475
--- /dev/null
+++ b/etc/profile-m-z/seafile-applet.profile
@@ -0,0 +1,62 @@
1# Firejail profile for Seafile
2# Description: Seafile desktop client.
3# This file is overwritten after every install/update
4# Persistent local customizations
5include seafile-applet.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.config/Seafile
10noblacklist ${HOME}/Seafile/.seafile-data
11
12blacklist /usr/libexec
13
14include disable-common.inc
15include disable-devel.inc
16include disable-exec.inc
17include disable-interpreters.inc
18include disable-programs.inc
19include disable-xdg.inc
20
21mkdir ${HOME}/.ccnet
22mkdir ${HOME}/.config/Seafile
23mkdir ${HOME}/Seafile
24whitelist ${HOME}/.ccnet
25whitelist ${HOME}/.config/Seafile
26whitelist ${HOME}/Seafile
27
28include whitelist-common.inc
29include whitelist-run-common.inc
30include whitelist-runuser-common.inc
31include whitelist-usr-share-common.inc
32include whitelist-var-common.inc
33
34apparmor
35caps.drop all
36netfilter
37nodvd
38nogroups
39noinput
40nonewprivs
41noprinters
42noroot
43nosound
44notv
45nou2f
46novideo
47protocol unix,inet,inet6
48seccomp
49seccomp.block-secondary
50shell none
51tracelog
52
53disable-mnt
54private-bin seaf-cli,seaf-daemon,seafile-applet
55private-cache
56private-dev
57private-etc alternatives,ca-certificates,crypto-policies,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,nsswitch.conf,pki,protocols,resolv.conf,rpc,services,ssl
58#private-opt none
59private-tmp
60
61dbus-user none
62dbus-system none
diff --git a/etc/profile-m-z/seahorse-adventures.profile b/etc/profile-m-z/seahorse-adventures.profile
index 131dcbb68..72d6d5cf7 100644
--- a/etc/profile-m-z/seahorse-adventures.profile
+++ b/etc/profile-m-z/seahorse-adventures.profile
@@ -6,6 +6,9 @@ include seahorse-adventures.local
6# Persistent global definitions 6# Persistent global definitions
7include globals.local 7include globals.local
8 8
9# Allow /bin/sh (blacklisted by disable-shell.inc)
10include allow-bin-sh.inc
11
9# Allow python (blacklisted by disable-interpreters.inc) 12# Allow python (blacklisted by disable-interpreters.inc)
10include allow-python2.inc 13include allow-python2.inc
11include allow-python3.inc 14include allow-python3.inc
@@ -14,12 +17,12 @@ include disable-common.inc
14include disable-devel.inc 17include disable-devel.inc
15include disable-exec.inc 18include disable-exec.inc
16include disable-interpreters.inc 19include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 20include disable-programs.inc
19include disable-shell.inc 21include disable-shell.inc
20include disable-xdg.inc 22include disable-xdg.inc
21 23
22whitelist /usr/share/seahorse-adventures 24whitelist /usr/share/seahorse-adventures
25whitelist /usr/share/games/seahorse-adventures
23include whitelist-common.inc 26include whitelist-common.inc
24include whitelist-usr-share-common.inc 27include whitelist-usr-share-common.inc
25include whitelist-var-common.inc 28include whitelist-var-common.inc
@@ -42,10 +45,10 @@ tracelog
42 45
43disable-mnt 46disable-mnt
44private 47private
45private-bin python*,seahorse-adventures 48private-bin bash,dash,python*,seahorse-adventures,sh
46private-cache 49private-cache
47private-dev 50private-dev
48private-etc machine-id 51private-etc alternatives,ld.so.cache,ld.so.preload,machine-id
49private-tmp 52private-tmp
50 53
51dbus-user none 54dbus-user none
diff --git a/etc/profile-m-z/seahorse-tool.profile b/etc/profile-m-z/seahorse-tool.profile
index 96ff74edf..9ef174606 100644
--- a/etc/profile-m-z/seahorse-tool.profile
+++ b/etc/profile-m-z/seahorse-tool.profile
@@ -8,7 +8,7 @@ include seahorse-tool.local
8#include globals.local 8#include globals.local
9 9
10# private-etc workaround for: #2877 10# private-etc workaround for: #2877
11private-etc firejail,login.defs,passwd 11private-etc alternatives,firejail,ld.so.cache,ld.so.preload,login.defs,passwd
12private-tmp 12private-tmp
13 13
14# Redirect 14# Redirect
diff --git a/etc/profile-m-z/seahorse.profile b/etc/profile-m-z/seahorse.profile
index d3d8e453f..7382e4712 100644
--- a/etc/profile-m-z/seahorse.profile
+++ b/etc/profile-m-z/seahorse.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
@@ -61,7 +60,7 @@ tracelog
61disable-mnt 60disable-mnt
62private-cache 61private-cache
63private-dev 62private-dev
64private-etc ca-certificates,crypto-policies,dconf,fonts,gconf,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.preload,nsswitch.conf,pango,pki,protocols,resolv.conf,rpc,services,ssh,ssl,X11 63private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gconf,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,nsswitch.conf,pango,pki,protocols,resolv.conf,rpc,services,ssh,ssl,X11
65writable-run-user 64writable-run-user
66 65
67dbus-user filter 66dbus-user filter
diff --git a/etc/profile-m-z/seamonkey.profile b/etc/profile-m-z/seamonkey.profile
index 807effbeb..e67e51620 100644
--- a/etc/profile-m-z/seamonkey.profile
+++ b/etc/profile-m-z/seamonkey.profile
@@ -8,8 +8,8 @@ include globals.local
8 8
9noblacklist ${HOME}/.cache/mozilla 9noblacklist ${HOME}/.cache/mozilla
10noblacklist ${HOME}/.mozilla 10noblacklist ${HOME}/.mozilla
11noblacklist ${HOME}/.pki
12noblacklist ${HOME}/.local/share/pki 11noblacklist ${HOME}/.local/share/pki
12noblacklist ${HOME}/.pki
13 13
14include disable-common.inc 14include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
@@ -18,8 +18,8 @@ include disable-programs.inc
18 18
19mkdir ${HOME}/.cache/mozilla 19mkdir ${HOME}/.cache/mozilla
20mkdir ${HOME}/.mozilla 20mkdir ${HOME}/.mozilla
21mkdir ${HOME}/.pki
22mkdir ${HOME}/.local/share/pki 21mkdir ${HOME}/.local/share/pki
22mkdir ${HOME}/.pki
23whitelist ${DOWNLOADS} 23whitelist ${DOWNLOADS}
24whitelist ${HOME}/.cache/gnome-mplayer/plugin 24whitelist ${HOME}/.cache/gnome-mplayer/plugin
25whitelist ${HOME}/.cache/mozilla 25whitelist ${HOME}/.cache/mozilla
@@ -28,11 +28,11 @@ whitelist ${HOME}/.config/pipelight-silverlight5.1
28whitelist ${HOME}/.config/pipelight-widevine 28whitelist ${HOME}/.config/pipelight-widevine
29whitelist ${HOME}/.keysnail.js 29whitelist ${HOME}/.keysnail.js
30whitelist ${HOME}/.lastpass 30whitelist ${HOME}/.lastpass
31whitelist ${HOME}/.local/share/pki
31whitelist ${HOME}/.mozilla 32whitelist ${HOME}/.mozilla
32whitelist ${HOME}/.pentadactyl 33whitelist ${HOME}/.pentadactyl
33whitelist ${HOME}/.pentadactylrc 34whitelist ${HOME}/.pentadactylrc
34whitelist ${HOME}/.pki 35whitelist ${HOME}/.pki
35whitelist ${HOME}/.local/share/pki
36whitelist ${HOME}/.vimperator 36whitelist ${HOME}/.vimperator
37whitelist ${HOME}/.vimperatorrc 37whitelist ${HOME}/.vimperatorrc
38whitelist ${HOME}/.wine-pipelight 38whitelist ${HOME}/.wine-pipelight
diff --git a/etc/profile-m-z/server.profile b/etc/profile-m-z/server.profile
index 7d56684db..9e40796a6 100644
--- a/etc/profile-m-z/server.profile
+++ b/etc/profile-m-z/server.profile
@@ -7,7 +7,6 @@
7# [sudo] password for netblue: 7# [sudo] password for netblue:
8# Reading profile /etc/firejail/server.profile 8# Reading profile /etc/firejail/server.profile
9# Reading profile /etc/firejail/disable-common.inc 9# Reading profile /etc/firejail/disable-common.inc
10# Reading profile /etc/firejail/disable-passwdmgr.inc
11# Reading profile /etc/firejail/disable-programs.inc 10# Reading profile /etc/firejail/disable-programs.inc
12# 11#
13# ** Note: you can use --noprofile to disable server.profile ** 12# ** Note: you can use --noprofile to disable server.profile **
@@ -43,7 +42,6 @@ include disable-common.inc
43# include disable-devel.inc 42# include disable-devel.inc
44# include disable-exec.inc 43# include disable-exec.inc
45# include disable-interpreters.inc 44# include disable-interpreters.inc
46include disable-passwdmgr.inc
47include disable-programs.inc 45include disable-programs.inc
48include disable-write-mnt.inc 46include disable-write-mnt.inc
49include disable-xdg.inc 47include disable-xdg.inc
@@ -85,6 +83,7 @@ private-tmp
85dbus-user none 83dbus-user none
86# dbus-system none 84# dbus-system none
87 85
86# deterministic-shutdown
88# memory-deny-write-execute 87# memory-deny-write-execute
89# read-only ${HOME} 88# read-only ${HOME}
90# writable-run-user 89# writable-run-user
diff --git a/etc/profile-m-z/servo.profile b/etc/profile-m-z/servo.profile
index df8fbc3e3..7788974ce 100644
--- a/etc/profile-m-z/servo.profile
+++ b/etc/profile-m-z/servo.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-m-z/shellcheck.profile b/etc/profile-m-z/shellcheck.profile
index b7f398f45..61fe534d6 100644
--- a/etc/profile-m-z/shellcheck.profile
+++ b/etc/profile-m-z/shellcheck.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-xdg.inc 19include disable-xdg.inc
21 20
@@ -51,5 +50,3 @@ private-tmp
51 50
52dbus-user none 51dbus-user none
53dbus-system none 52dbus-system none
54
55memory-deny-write-execute
diff --git a/etc/profile-m-z/shortwave.profile b/etc/profile-m-z/shortwave.profile
index d629240ec..0bcf5f693 100644
--- a/etc/profile-m-z/shortwave.profile
+++ b/etc/profile-m-z/shortwave.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-m-z/shotcut.profile b/etc/profile-m-z/shotcut.profile
index 63af4d367..e5dbf5c5f 100644
--- a/etc/profile-m-z/shotcut.profile
+++ b/etc/profile-m-z/shotcut.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19 18
20caps.drop all 19caps.drop all
diff --git a/etc/profile-m-z/shotwell.profile b/etc/profile-m-z/shotwell.profile
index ddc8a7743..3b569eeaf 100644
--- a/etc/profile-m-z/shotwell.profile
+++ b/etc/profile-m-z/shotwell.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
@@ -50,7 +49,7 @@ tracelog
50private-bin shotwell 49private-bin shotwell
51private-cache 50private-cache
52private-dev 51private-dev
53private-etc alternatives,fonts,machine-id 52private-etc alternatives,fonts,ld.so.cache,ld.so.preload,machine-id
54private-opt none 53private-opt none
55private-tmp 54private-tmp
56 55
diff --git a/etc/profile-m-z/signal-cli.profile b/etc/profile-m-z/signal-cli.profile
index 478377344..24f1464f9 100644
--- a/etc/profile-m-z/signal-cli.profile
+++ b/etc/profile-m-z/signal-cli.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
diff --git a/etc/profile-m-z/signal-desktop.profile b/etc/profile-m-z/signal-desktop.profile
index 77a7f5b38..1166f378b 100644
--- a/etc/profile-m-z/signal-desktop.profile
+++ b/etc/profile-m-z/signal-desktop.profile
@@ -21,9 +21,15 @@ whitelist ${HOME}/.config/Signal
21 21
22private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,localtime,machine-id,nsswitch.conf,pki,resolv.conf,ssl 22private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,localtime,machine-id,nsswitch.conf,pki,resolv.conf,ssl
23 23
24# allow D-Bus notifications
25dbus-user filter 24dbus-user filter
25
26# allow D-Bus notifications
26dbus-user.talk org.freedesktop.Notifications 27dbus-user.talk org.freedesktop.Notifications
28
29# allow D-Bus communication with firefox for opening links
30dbus-user.talk org.mozilla.Firefox.*
31dbus-user.talk org.mozilla.firefox.*
32
27ignore dbus-user none 33ignore dbus-user none
28 34
29# Redirect 35# Redirect
diff --git a/etc/profile-m-z/silentarmy.profile b/etc/profile-m-z/silentarmy.profile
index 3f3e2a75d..4351a4d43 100644
--- a/etc/profile-m-z/silentarmy.profile
+++ b/etc/profile-m-z/silentarmy.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10# include disable-devel.inc 10# include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16include disable-xdg.inc 15include disable-xdg.inc
diff --git a/etc/profile-m-z/simple-scan.profile b/etc/profile-m-z/simple-scan.profile
index 17920677b..b0ab0d039 100644
--- a/etc/profile-m-z/simple-scan.profile
+++ b/etc/profile-m-z/simple-scan.profile
@@ -12,7 +12,6 @@ noblacklist ${DOCUMENTS}
12include disable-common.inc 12include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
diff --git a/etc/profile-m-z/simplescreenrecorder.profile b/etc/profile-m-z/simplescreenrecorder.profile
index d664f8bf5..03a350327 100644
--- a/etc/profile-m-z/simplescreenrecorder.profile
+++ b/etc/profile-m-z/simplescreenrecorder.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-m-z/simutrans.profile b/etc/profile-m-z/simutrans.profile
index afaa0f6d8..55e472dbe 100644
--- a/etc/profile-m-z/simutrans.profile
+++ b/etc/profile-m-z/simutrans.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18mkdir ${HOME}/.simutrans 17mkdir ${HOME}/.simutrans
diff --git a/etc/profile-m-z/skanlite.profile b/etc/profile-m-z/skanlite.profile
index 093a61398..4965d3882 100644
--- a/etc/profile-m-z/skanlite.profile
+++ b/etc/profile-m-z/skanlite.profile
@@ -11,7 +11,6 @@ noblacklist ${DOCUMENTS}
11include disable-common.inc 11include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-xdg.inc 15include disable-xdg.inc
17 16
diff --git a/etc/profile-m-z/skypeforlinux.profile b/etc/profile-m-z/skypeforlinux.profile
index ed04eda8e..3734f8f4a 100644
--- a/etc/profile-m-z/skypeforlinux.profile
+++ b/etc/profile-m-z/skypeforlinux.profile
@@ -6,24 +6,28 @@ include skypeforlinux.local
6include globals.local 6include globals.local
7 7
8# Disabled until someone reported positive feedback 8# Disabled until someone reported positive feedback
9ignore whitelist ${DOWNLOADS}
10ignore include whitelist-common.inc
11ignore include whitelist-runuser-common.inc 9ignore include whitelist-runuser-common.inc
12ignore include whitelist-usr-share-common.inc 10ignore include whitelist-usr-share-common.inc
13ignore include whitelist-var-common.inc 11ignore include whitelist-var-common.inc
14ignore nou2f 12ignore nou2f
15ignore novideo
16ignore private-dev
17ignore dbus-user none
18ignore dbus-system none
19 13
20# breaks Skype 14# breaks Skype
21ignore apparmor 15ignore apparmor
16ignore dbus-user none
22ignore noexec /tmp 17ignore noexec /tmp
18ignore novideo
19ignore private-dev # needs /dev/disk
23 20
24noblacklist ${HOME}/.config/skypeforlinux 21noblacklist ${HOME}/.config/skypeforlinux
25 22
26# private-dev - needs /dev/disk 23mkdir ${HOME}/.config/skypeforlinux
24whitelist ${HOME}/.config/skypeforlinux
25
26dbus-user filter
27dbus-user.talk org.freedesktop.Notifications
28dbus-user.talk org.freedesktop.secrets
29# Note: Skype will log out the current session on start-up without this:
30dbus-user.talk org.kde.StatusNotifierWatcher
27 31
28# Redirect 32# Redirect
29include electron.profile 33include electron.profile
diff --git a/etc/profile-m-z/slack.profile b/etc/profile-m-z/slack.profile
index 9ad772cd5..a511ebb1c 100644
--- a/etc/profile-m-z/slack.profile
+++ b/etc/profile-m-z/slack.profile
@@ -18,13 +18,15 @@ ignore dbus-system none
18 18
19noblacklist ${HOME}/.config/Slack 19noblacklist ${HOME}/.config/Slack
20 20
21include allow-bin-sh.inc
22
21include disable-shell.inc 23include disable-shell.inc
22 24
23mkdir ${HOME}/.config/Slack 25mkdir ${HOME}/.config/Slack
24whitelist ${HOME}/.config/Slack 26whitelist ${HOME}/.config/Slack
25 27
26private-bin locale,slack 28private-bin electron,electron[0-9],electron[0-9][0-9],locale,sh,slack
27private-etc alternatives,asound.conf,ca-certificates,crypto-policies,debian_version,fedora-release,fonts,group,ld.so.cache,ld.so.conf,localtime,machine-id,os-release,passwd,pki,pulse,redhat-release,resolv.conf,ssl,system-release,system-release-cpe 29private-etc alternatives,asound.conf,ca-certificates,crypto-policies,debian_version,fedora-release,fonts,group,ld.so.cache,ld.so.conf,ld.so.preload,localtime,machine-id,os-release,passwd,pki,pulse,redhat-release,resolv.conf,ssl,system-release,system-release-cpe
28 30
29# Redirect 31# Redirect
30include electron.profile 32include electron.profile
diff --git a/etc/profile-m-z/slashem.profile b/etc/profile-m-z/slashem.profile
index c5a31c237..bebf77ccc 100644
--- a/etc/profile-m-z/slashem.profile
+++ b/etc/profile-m-z/slashem.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18whitelist /var/games/slashem 17whitelist /var/games/slashem
diff --git a/etc/profile-m-z/smplayer.profile b/etc/profile-m-z/smplayer.profile
index 01547e5c1..7c1e18ac3 100644
--- a/etc/profile-m-z/smplayer.profile
+++ b/etc/profile-m-z/smplayer.profile
@@ -24,7 +24,6 @@ include disable-common.inc
24include disable-devel.inc 24include disable-devel.inc
25include disable-exec.inc 25include disable-exec.inc
26include disable-interpreters.inc 26include disable-interpreters.inc
27include disable-passwdmgr.inc
28include disable-programs.inc 27include disable-programs.inc
29include disable-shell.inc 28include disable-shell.inc
30include disable-xdg.inc 29include disable-xdg.inc
diff --git a/etc/profile-m-z/smtube.profile b/etc/profile-m-z/smtube.profile
index 196950eaf..65e6d38e4 100644
--- a/etc/profile-m-z/smtube.profile
+++ b/etc/profile-m-z/smtube.profile
@@ -19,7 +19,6 @@ include disable-common.inc
19include disable-devel.inc 19include disable-devel.inc
20include disable-exec.inc 20include disable-exec.inc
21include disable-interpreters.inc 21include disable-interpreters.inc
22include disable-passwdmgr.inc
23include disable-programs.inc 22include disable-programs.inc
24include disable-xdg.inc 23include disable-xdg.inc
25 24
diff --git a/etc/profile-m-z/smuxi-frontend-gnome.profile b/etc/profile-m-z/smuxi-frontend-gnome.profile
index c3a9bb858..0cdb5537e 100644
--- a/etc/profile-m-z/smuxi-frontend-gnome.profile
+++ b/etc/profile-m-z/smuxi-frontend-gnome.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
@@ -49,7 +48,7 @@ disable-mnt
49private-bin bash,mono,mono-sgen,sh,smuxi-frontend-gnome 48private-bin bash,mono,mono-sgen,sh,smuxi-frontend-gnome
50private-cache 49private-cache
51private-dev 50private-dev
52private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,hostname,hosts,ld.so.cache,ld.so.conf,machine-id,mono,passwd,pki,pulse,resolv.conf,selinux,ssl,xdg 51private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.preload,machine-id,mono,passwd,pki,pulse,resolv.conf,selinux,ssl,xdg
53private-tmp 52private-tmp
54 53
55dbus-user none 54dbus-user none
diff --git a/etc/profile-m-z/snox.profile b/etc/profile-m-z/snox.profile
index 83493652c..9d3ed8c1a 100644
--- a/etc/profile-m-z/snox.profile
+++ b/etc/profile-m-z/snox.profile
@@ -5,8 +5,7 @@ include snox.local
5# Persistent global definitions 5# Persistent global definitions
6include globals.local 6include globals.local
7 7
8# Disable for now, see https://www.tutorialspoint.com/difference-between-void-main-and-int-main-in-c-cplusplus 8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565
9ignore whitelist /usr/share/chromium
10ignore include whitelist-runuser-common.inc 9ignore include whitelist-runuser-common.inc
11ignore include whitelist-usr-share-common.inc 10ignore include whitelist-usr-share-common.inc
12 11
diff --git a/etc/profile-m-z/softmaker-common.profile b/etc/profile-m-z/softmaker-common.profile
index 83315231f..099e6a2ad 100644
--- a/etc/profile-m-z/softmaker-common.profile
+++ b/etc/profile-m-z/softmaker-common.profile
@@ -6,9 +6,9 @@ include softmaker-common.local
6# added by caller profile 6# added by caller profile
7#include globals.local 7#include globals.local
8 8
9# The offical packages install the desktop file under /usr/local/share/applications 9# The official packages install the desktop file under /usr/local/share/applications
10# with an absolute Exec line. These files are NOT handelt by firecfg, 10# with an absolute Exec line. These files are NOT handled by firecfg,
11# therefore you must manualy copy them in you home and remove '/usr/bin/'. 11# therefore you must manually copy them in you home and remove '/usr/bin/'.
12 12
13noblacklist ${HOME}/SoftMaker 13noblacklist ${HOME}/SoftMaker
14 14
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22whitelist /usr/share/office2018 21whitelist /usr/share/office2018
@@ -44,7 +43,7 @@ tracelog
44private-bin freeoffice-planmaker,freeoffice-presentations,freeoffice-textmaker,planmaker18,planmaker18free,presentations18,presentations18free,sh,textmaker18,textmaker18free 43private-bin freeoffice-planmaker,freeoffice-presentations,freeoffice-textmaker,planmaker18,planmaker18free,presentations18,presentations18free,sh,textmaker18,textmaker18free
45private-cache 44private-cache
46private-dev 45private-dev
47private-etc ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,machine-id,nsswitch.conf,pki,SoftMaker,ssl 46private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,machine-id,nsswitch.conf,pki,SoftMaker,ssl
48private-tmp 47private-tmp
49 48
50dbus-user none 49dbus-user none
diff --git a/etc/profile-m-z/sol.profile b/etc/profile-m-z/sol.profile
index 6b8a17813..0af88e048 100644
--- a/etc/profile-m-z/sol.profile
+++ b/etc/profile-m-z/sol.profile
@@ -9,7 +9,6 @@ include disable-common.inc
9include disable-devel.inc 9include disable-devel.inc
10include disable-exec.inc 10include disable-exec.inc
11include disable-interpreters.inc 11include disable-interpreters.inc
12include disable-passwdmgr.inc
13include disable-programs.inc 12include disable-programs.inc
14include disable-shell.inc 13include disable-shell.inc
15include disable-xdg.inc 14include disable-xdg.inc
diff --git a/etc/profile-m-z/sound-juicer.profile b/etc/profile-m-z/sound-juicer.profile
index ef00fdfff..4c37ece8a 100644
--- a/etc/profile-m-z/sound-juicer.profile
+++ b/etc/profile-m-z/sound-juicer.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-m-z/soundconverter.profile b/etc/profile-m-z/soundconverter.profile
index 4dbf34100..e5ff26327 100644
--- a/etc/profile-m-z/soundconverter.profile
+++ b/etc/profile-m-z/soundconverter.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-xdg.inc 20include disable-xdg.inc
22 21
diff --git a/etc/profile-m-z/spectacle.profile b/etc/profile-m-z/spectacle.profile
index 4468f21e7..fc4ae2b04 100644
--- a/etc/profile-m-z/spectacle.profile
+++ b/etc/profile-m-z/spectacle.profile
@@ -19,11 +19,10 @@ include disable-common.inc
19include disable-devel.inc 19include disable-devel.inc
20include disable-exec.inc 20include disable-exec.inc
21include disable-interpreters.inc 21include disable-interpreters.inc
22include disable-passwdmgr.inc
23include disable-programs.inc 22include disable-programs.inc
24include disable-xdg.inc 23include disable-xdg.inc
25 24
26mkfile ${HOME}/.config/spectaclerc 25mkfile ${HOME}/.config/spectaclerc
27whitelist ${HOME}/.config/spectaclerc 26whitelist ${HOME}/.config/spectaclerc
28whitelist ${PICTURES} 27whitelist ${PICTURES}
29whitelist /usr/share/kconf_update/spectacle_newConfig.upd 28whitelist /usr/share/kconf_update/spectacle_newConfig.upd
@@ -57,7 +56,7 @@ disable-mnt
57private-bin spectacle 56private-bin spectacle
58private-cache 57private-cache
59private-dev 58private-dev
60private-etc alternatives,fonts,ld.so.cache,ld.so.conf,ld.so.conf.d 59private-etc alternatives,fonts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload
61private-tmp 60private-tmp
62 61
63dbus-user filter 62dbus-user filter
diff --git a/etc/profile-m-z/spectral.profile b/etc/profile-m-z/spectral.profile
index 283674517..3f7f68009 100644
--- a/etc/profile-m-z/spectral.profile
+++ b/etc/profile-m-z/spectral.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
@@ -50,10 +49,8 @@ private-dev
50private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,mime.types,nsswitch.conf,pki,pulse,resolv.conf,selinux,ssl,X11,xdg 49private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,mime.types,nsswitch.conf,pki,pulse,resolv.conf,selinux,ssl,X11,xdg
51private-tmp 50private-tmp
52 51
53dbus-user none 52dbus-user filter
54# Add the next lines to your spectral.local to enable notification support. 53?ALLOW_TRAY: dbus-user.talk org.kde.StatusNotifierWatcher
55#ignore dbus-user none 54# Add the next line to your spectral.local to enable notification support.
56#dbus-user filter
57#dbus-user.talk org.freedesktop.Notifications 55#dbus-user.talk org.freedesktop.Notifications
58#dbus-user.talk org.kde.StatusNotifierWatcher
59dbus-system none 56dbus-system none
diff --git a/etc/profile-m-z/spectre-meltdown-checker.profile b/etc/profile-m-z/spectre-meltdown-checker.profile
index 984461f90..19d7f8ae3 100644
--- a/etc/profile-m-z/spectre-meltdown-checker.profile
+++ b/etc/profile-m-z/spectre-meltdown-checker.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-xdg.inc 22include disable-xdg.inc
24 23
diff --git a/etc/profile-m-z/spotify.profile b/etc/profile-m-z/spotify.profile
index f679be9e7..0ce918161 100644
--- a/etc/profile-m-z/spotify.profile
+++ b/etc/profile-m-z/spotify.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20 19
21mkdir ${HOME}/.cache/spotify 20mkdir ${HOME}/.cache/spotify
@@ -44,8 +43,8 @@ tracelog
44disable-mnt 43disable-mnt
45private-bin bash,cat,dirname,find,grep,head,rm,sh,spotify,tclsh,touch,zenity 44private-bin bash,cat,dirname,find,grep,head,rm,sh,spotify,tclsh,touch,zenity
46private-dev 45private-dev
47# Comment the next line or put 'ignore private-etc' in your spotify.local if want to see the albums covers or if you want to use the radio 46# If you want to see album covers or want to use the radio, add 'ignore private-etc' to your spotify.local.
48private-etc alternatives,ca-certificates,crypto-policies,fonts,group,host.conf,hosts,ld.so.cache,machine-id,nsswitch.conf,pki,pulse,resolv.conf,ssl 47private-etc alternatives,ca-certificates,crypto-policies,fonts,group,host.conf,hosts,ld.so.cache,ld.so.preload,machine-id,nsswitch.conf,pki,pulse,resolv.conf,ssl
49private-opt spotify 48private-opt spotify
50private-srv none 49private-srv none
51private-tmp 50private-tmp
diff --git a/etc/profile-m-z/sqlitebrowser.profile b/etc/profile-m-z/sqlitebrowser.profile
index 4dd2c7262..deaf37f52 100644
--- a/etc/profile-m-z/sqlitebrowser.profile
+++ b/etc/profile-m-z/sqlitebrowser.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
@@ -43,7 +42,7 @@ shell none
43private-bin sqlitebrowser 42private-bin sqlitebrowser
44private-cache 43private-cache
45private-dev 44private-dev
46private-etc alternatives,ca-certificates,crypto-policies,fonts,group,machine-id,passwd,pki,ssl 45private-etc alternatives,ca-certificates,crypto-policies,fonts,group,ld.so.cache,ld.so.preload,machine-id,passwd,pki,ssl
47private-tmp 46private-tmp
48 47
49# breaks proxy creation 48# breaks proxy creation
diff --git a/etc/profile-m-z/ssh-agent.profile b/etc/profile-m-z/ssh-agent.profile
index 5802299a3..11723664f 100644
--- a/etc/profile-m-z/ssh-agent.profile
+++ b/etc/profile-m-z/ssh-agent.profile
@@ -13,7 +13,6 @@ blacklist /tmp/.X11-unix
13blacklist ${RUNUSER}/wayland-* 13blacklist ${RUNUSER}/wayland-*
14 14
15include disable-common.inc 15include disable-common.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19include whitelist-usr-share-common.inc 18include whitelist-usr-share-common.inc
diff --git a/etc/profile-m-z/ssh.profile b/etc/profile-m-z/ssh.profile
index a58642192..4da0db517 100644
--- a/etc/profile-m-z/ssh.profile
+++ b/etc/profile-m-z/ssh.profile
@@ -16,7 +16,6 @@ include allow-ssh.inc
16 16
17include disable-common.inc 17include disable-common.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22whitelist ${RUNUSER}/gnupg/S.gpg-agent.ssh 21whitelist ${RUNUSER}/gnupg/S.gpg-agent.ssh
@@ -51,4 +50,5 @@ writable-run-user
51dbus-user none 50dbus-user none
52dbus-system none 51dbus-system none
53 52
53deterministic-shutdown
54memory-deny-write-execute 54memory-deny-write-execute
diff --git a/etc/profile-m-z/standardnotes-desktop.profile b/etc/profile-m-z/standardnotes-desktop.profile
index 48a532876..7a59274bf 100644
--- a/etc/profile-m-z/standardnotes-desktop.profile
+++ b/etc/profile-m-z/standardnotes-desktop.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18mkdir ${HOME}/Standard Notes Backups 17mkdir ${HOME}/Standard Notes Backups
@@ -39,7 +38,7 @@ seccomp !chroot
39disable-mnt 38disable-mnt
40private-dev 39private-dev
41private-tmp 40private-tmp
42private-etc alternatives,ca-certificates,crypto-policies,fonts,host.conf,hostname,hosts,ld.so.cache,pki,resolv.conf,ssl,xdg 41private-etc alternatives,ca-certificates,crypto-policies,fonts,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,pki,resolv.conf,ssl,xdg
43 42
44dbus-user none 43dbus-user none
45dbus-system none 44dbus-system none
diff --git a/etc/profile-m-z/steam.profile b/etc/profile-m-z/steam.profile
index 369255324..b0be8a517 100644
--- a/etc/profile-m-z/steam.profile
+++ b/etc/profile-m-z/steam.profile
@@ -8,6 +8,7 @@ include globals.local
8 8
9noblacklist ${HOME}/.config/Epic 9noblacklist ${HOME}/.config/Epic
10noblacklist ${HOME}/.config/Loop_Hero 10noblacklist ${HOME}/.config/Loop_Hero
11noblacklist ${HOME}/.config/MangoHud
11noblacklist ${HOME}/.config/ModTheSpire 12noblacklist ${HOME}/.config/ModTheSpire
12noblacklist ${HOME}/.config/RogueLegacy 13noblacklist ${HOME}/.config/RogueLegacy
13noblacklist ${HOME}/.config/RogueLegacyStorageContainer 14noblacklist ${HOME}/.config/RogueLegacyStorageContainer
@@ -51,11 +52,11 @@ include allow-python3.inc
51include disable-common.inc 52include disable-common.inc
52include disable-devel.inc 53include disable-devel.inc
53include disable-interpreters.inc 54include disable-interpreters.inc
54include disable-passwdmgr.inc
55include disable-programs.inc 55include disable-programs.inc
56 56
57mkdir ${HOME}/.config/Epic 57mkdir ${HOME}/.config/Epic
58mkdir ${HOME}/.config/Loop_Hero 58mkdir ${HOME}/.config/Loop_Hero
59mkdir ${HOME}/.config/MangoHud
59mkdir ${HOME}/.config/ModTheSpire 60mkdir ${HOME}/.config/ModTheSpire
60mkdir ${HOME}/.config/RogueLegacy 61mkdir ${HOME}/.config/RogueLegacy
61mkdir ${HOME}/.config/unity3d 62mkdir ${HOME}/.config/unity3d
@@ -86,6 +87,7 @@ mkfile ${HOME}/.steampath
86mkfile ${HOME}/.steampid 87mkfile ${HOME}/.steampid
87whitelist ${HOME}/.config/Epic 88whitelist ${HOME}/.config/Epic
88whitelist ${HOME}/.config/Loop_Hero 89whitelist ${HOME}/.config/Loop_Hero
90whitelist ${HOME}/.config/MangoHud
89whitelist ${HOME}/.config/ModTheSpire 91whitelist ${HOME}/.config/ModTheSpire
90whitelist ${HOME}/.config/RogueLegacy 92whitelist ${HOME}/.config/RogueLegacy
91whitelist ${HOME}/.config/RogueLegacyStorageContainer 93whitelist ${HOME}/.config/RogueLegacyStorageContainer
@@ -119,7 +121,7 @@ whitelist ${HOME}/.steampid
119include whitelist-common.inc 121include whitelist-common.inc
120include whitelist-var-common.inc 122include whitelist-var-common.inc
121 123
122# Note: The following were intentionally left out as they are alternative 124# NOTE: The following were intentionally left out as they are alternative
123# (i.e.: unnecessary and/or legacy) paths whose existence may potentially 125# (i.e.: unnecessary and/or legacy) paths whose existence may potentially
124# clobber other paths (see #4225). If you use any, either add the entry to 126# clobber other paths (see #4225). If you use any, either add the entry to
125# steam.local or move the contents to a path listed above (or open an issue if 127# steam.local or move the contents to a path listed above (or open an issue if
@@ -131,34 +133,37 @@ caps.drop all
131#ipc-namespace 133#ipc-namespace
132netfilter 134netfilter
133nodvd 135nodvd
134# nVidia users may need to comment / ignore nogroups and noroot
135nogroups 136nogroups
136nonewprivs 137nonewprivs
137noroot 138noroot
138notv 139notv
139nou2f 140nou2f
140# novideo should be commented for VR 141# For VR support add 'ignore novideo' to your steam.local.
141novideo 142novideo
142protocol unix,inet,inet6,netlink 143protocol unix,inet,inet6,netlink
143# seccomp sometimes causes issues (see #2951, #3267), 144# seccomp sometimes causes issues (see #2951, #3267).
144# comment it or add 'ignore seccomp' to steam.local if so. 145# Add 'ignore seccomp' to your steam.local if you experience this.
145seccomp !ptrace 146seccomp !ptrace
146shell none 147shell none
147# tracelog breaks integrated browser 148# tracelog breaks integrated browser
148#tracelog 149#tracelog
149 150
150# private-bin is disabled while in testing, but has been tested working with multiple games 151# private-bin is disabled while in testing, but is known to work with multiple games.
151#private-bin awk,basename,bash,bsdtar,bzip2,cat,chmod,cksum,cmp,comm,compress,cp,curl,cut,date,dbus-launch,dbus-send,desktop-file-edit,desktop-file-install,desktop-file-validate,dirname,echo,env,expr,file,find,getopt,grep,gtar,gzip,head,hostname,id,lbzip2,ldconfig,ldd,ln,ls,lsb_release,lsof,lspci,lz4,lzip,lzma,lzop,md5sum,mkdir,mktemp,mv,netstat,ps,pulseaudio,python*,readlink,realpath,rm,sed,sh,sha1sum,sha256sum,sha512sum,sleep,sort,steam,steamdeps,steam-native,steam-runtime,sum,tail,tar,tclsh,test,touch,tr,umask,uname,update-desktop-database,wc,wget,which,whoami,xterm,xz,zenity 152# Add the next line to your steam.local to enable private-bin.
152# extra programs are available which might be needed for select games 153#private-bin awk,basename,bash,bsdtar,bzip2,cat,chmod,cksum,cmp,comm,compress,cp,curl,cut,date,dbus-launch,dbus-send,desktop-file-edit,desktop-file-install,desktop-file-validate,dirname,echo,env,expr,file,find,getopt,grep,gtar,gzip,head,hostname,id,lbzip2,ldconfig,ldd,ln,ls,lsb_release,lsof,lspci,lz4,lzip,lzma,lzop,md5sum,mkdir,mktemp,mv,netstat,ps,pulseaudio,python*,readlink,realpath,rm,sed,sh,sha1sum,sha256sum,sha512sum,sleep,sort,steam,steamdeps,steam-native,steam-runtime,sum,tail,tar,tclsh,test,touch,tr,umask,uname,update-desktop-database,wc,wget,wget2,which,whoami,xterm,xz,zenity
154# Extra programs are available which might be needed for select games.
155# Add the next line to your steam.local to enable support for these programs.
153#private-bin java,java-config,mono 156#private-bin java,java-config,mono
154# picture viewers are needed for viewing screenshots 157# To view screenshots add the next line to your steam.local.
155#private-bin eog,eom,gthumb,pix,viewnior,xviewer 158#private-bin eog,eom,gthumb,pix,viewnior,xviewer
156 159
157private-dev 160private-dev
158# private-etc breaks a small selection of games on some systems, comment to support those 161# private-etc breaks a small selection of games on some systems. Add 'ignore private-etc'
159private-etc alsa,alternatives,asound.conf,bumblebee,ca-certificates,crypto-policies,dbus-1,drirc,fonts,group,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,localtime,lsb-release,machine-id,mime.types,nvidia,os-release,passwd,pki,pulse,resolv.conf,services,ssl 162# to your steam.local to support those.
163private-etc alsa,alternatives,asound.conf,bumblebee,ca-certificates,crypto-policies,dbus-1,drirc,fonts,group,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,localtime,lsb-release,machine-id,mime.types,nvidia,os-release,passwd,pki,pulse,resolv.conf,services,ssl,vulkan
160private-tmp 164private-tmp
161 165
162# breaks appindicator support
163# dbus-user none 166# dbus-user none
164# dbus-system none 167# dbus-system none
168
169read-only ${HOME}/.config/MangoHud
diff --git a/etc/profile-m-z/stellarium.profile b/etc/profile-m-z/stellarium.profile
index a752ab53c..d2ebce45f 100644
--- a/etc/profile-m-z/stellarium.profile
+++ b/etc/profile-m-z/stellarium.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19 18
diff --git a/etc/profile-m-z/straw-viewer.profile b/etc/profile-m-z/straw-viewer.profile
index f8108c9d6..513abc21b 100644
--- a/etc/profile-m-z/straw-viewer.profile
+++ b/etc/profile-m-z/straw-viewer.profile
@@ -1,7 +1,7 @@
1# Firejail profile for straw-viewer 1# Firejail profile for straw-viewer
2# Description: Fork of youtube-viewer acts like an invidious frontend 2# Description: Fork of youtube-viewer acts like an invidious frontend
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 straw-viewer.local 6include straw-viewer.local
7# Persistent global definitions 7# Persistent global definitions
@@ -10,55 +10,12 @@ include globals.local
10noblacklist ${HOME}/.cache/straw-viewer 10noblacklist ${HOME}/.cache/straw-viewer
11noblacklist ${HOME}/.config/straw-viewer 11noblacklist ${HOME}/.config/straw-viewer
12 12
13# Allow lua (blacklisted by disable-interpreters.inc)
14include allow-lua.inc
15
16# Allow perl (blacklisted by disable-interpreters.inc)
17include allow-perl.inc
18
19# Allow python (blacklisted by disable-interpreters.inc)
20include allow-python2.inc
21include allow-python3.inc
22
23include disable-common.inc
24include disable-devel.inc
25include disable-exec.inc
26include disable-interpreters.inc
27include disable-passwdmgr.inc
28include disable-programs.inc
29include disable-xdg.inc
30
31mkdir ${HOME}/.config/straw-viewer 13mkdir ${HOME}/.config/straw-viewer
32mkdir ${HOME}/.cache/straw-viewer 14mkdir ${HOME}/.cache/straw-viewer
33whitelist ${HOME}/.cache/straw-viewer 15whitelist ${HOME}/.cache/straw-viewer
34whitelist ${HOME}/.config/straw-viewer 16whitelist ${HOME}/.config/straw-viewer
35whitelist ${DOWNLOADS}
36include whitelist-common.inc
37include whitelist-usr-share-common.inc
38include whitelist-var-common.inc
39
40apparmor
41caps.drop all
42netfilter
43nodvd
44nogroups
45noinput
46nonewprivs
47noroot
48notv
49nou2f
50novideo
51protocol unix,inet,inet6
52seccomp
53shell none
54tracelog
55 17
56disable-mnt 18private-bin gtk-straw-viewer,straw-viewer
57private-bin bash,ffmpeg,ffprobe,gtk-straw-viewer,mpv,perl,python*,sh,smplayer,straw-viewer,stty,vlc,wget,which,youtube-dl
58private-cache
59private-dev
60private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,machine-id,mime.types,nsswitch.conf,passwd,pki,pulse,resolv.conf,ssl,X11,xdg
61private-tmp
62 19
63dbus-user none 20# Redirect
64dbus-system none 21include youtube-viewers-common.profile
diff --git a/etc/profile-m-z/strawberry.profile b/etc/profile-m-z/strawberry.profile
index b87906f55..32e43f079 100644
--- a/etc/profile-m-z/strawberry.profile
+++ b/etc/profile-m-z/strawberry.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-xdg.inc 19include disable-xdg.inc
21 20
@@ -44,7 +43,7 @@ disable-mnt
44private-bin strawberry,strawberry-tagreader 43private-bin strawberry,strawberry-tagreader
45private-cache 44private-cache
46private-dev 45private-dev
47private-etc ca-certificates,crypto-policies,fonts,host.conf,hostname,hosts,nsswitch.conf,pki,resolv.conf,ssl 46private-etc alternatives,ca-certificates,crypto-policies,fonts,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,nsswitch.conf,pki,resolv.conf,ssl
48private-tmp 47private-tmp
49 48
50dbus-system none 49dbus-system none
diff --git a/etc/profile-m-z/strings.profile b/etc/profile-m-z/strings.profile
index 1ebcded7f..9298e6614 100644
--- a/etc/profile-m-z/strings.profile
+++ b/etc/profile-m-z/strings.profile
@@ -13,7 +13,6 @@ blacklist ${RUNUSER}
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17#include disable-programs.inc 16#include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19#include disable-xdg.inc 18#include disable-xdg.inc
diff --git a/etc/profile-m-z/subdownloader.profile b/etc/profile-m-z/subdownloader.profile
index bbe92fd38..a9f22085b 100644
--- a/etc/profile-m-z/subdownloader.profile
+++ b/etc/profile-m-z/subdownloader.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
@@ -45,7 +44,7 @@ tracelog
45 44
46private-cache 45private-cache
47private-dev 46private-dev
48private-etc alternatives,fonts 47private-etc alternatives,fonts,ld.so.cache,ld.so.preload
49private-tmp 48private-tmp
50 49
51dbus-user none 50dbus-user none
diff --git a/etc/profile-m-z/supertux2.profile b/etc/profile-m-z/supertux2.profile
index dd456f085..464fa1b08 100644
--- a/etc/profile-m-z/supertux2.profile
+++ b/etc/profile-m-z/supertux2.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -20,6 +19,7 @@ include disable-xdg.inc
20mkdir ${HOME}/.local/share/supertux2 19mkdir ${HOME}/.local/share/supertux2
21whitelist ${HOME}/.local/share/supertux2 20whitelist ${HOME}/.local/share/supertux2
22whitelist /usr/share/supertux2 21whitelist /usr/share/supertux2
22whitelist /usr/share/games/supertux2 # Debian version
23include whitelist-common.inc 23include whitelist-common.inc
24include whitelist-runuser-common.inc 24include whitelist-runuser-common.inc
25include whitelist-usr-share-common.inc 25include whitelist-usr-share-common.inc
@@ -30,7 +30,6 @@ caps.drop all
30net none 30net none
31nodvd 31nodvd
32nogroups 32nogroups
33noinput
34nonewprivs 33nonewprivs
35noroot 34noroot
36notv 35notv
@@ -45,7 +44,7 @@ tracelog
45disable-mnt 44disable-mnt
46# private-bin supertux2 45# private-bin supertux2
47private-cache 46private-cache
48private-etc machine-id 47private-etc alternatives,ld.so.cache,ld.so.preload,machine-id
49private-dev 48private-dev
50private-tmp 49private-tmp
51 50
diff --git a/etc/profile-m-z/supertuxkart.profile b/etc/profile-m-z/supertuxkart.profile
index 6a0ed46e0..23c8a6c58 100644
--- a/etc/profile-m-z/supertuxkart.profile
+++ b/etc/profile-m-z/supertuxkart.profile
@@ -10,11 +10,12 @@ noblacklist ${HOME}/.config/supertuxkart
10noblacklist ${HOME}/.cache/supertuxkart 10noblacklist ${HOME}/.cache/supertuxkart
11noblacklist ${HOME}/.local/share/supertuxkart 11noblacklist ${HOME}/.local/share/supertuxkart
12 12
13blacklist /usr/libexec
14
13include disable-common.inc 15include disable-common.inc
14include disable-devel.inc 16include disable-devel.inc
15include disable-exec.inc 17include disable-exec.inc
16include disable-interpreters.inc 18include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 19include disable-programs.inc
19include disable-shell.inc 20include disable-shell.inc
20include disable-xdg.inc 21include disable-xdg.inc
@@ -26,6 +27,7 @@ whitelist ${HOME}/.config/supertuxkart
26whitelist ${HOME}/.cache/supertuxkart 27whitelist ${HOME}/.cache/supertuxkart
27whitelist ${HOME}/.local/share/supertuxkart 28whitelist ${HOME}/.local/share/supertuxkart
28whitelist /usr/share/supertuxkart 29whitelist /usr/share/supertuxkart
30whitelist /usr/share/games/supertuxkart # Debian version
29include whitelist-common.inc 31include whitelist-common.inc
30include whitelist-runuser-common.inc 32include whitelist-runuser-common.inc
31include whitelist-usr-share-common.inc 33include whitelist-usr-share-common.inc
@@ -41,7 +43,7 @@ noroot
41notv 43notv
42nou2f 44nou2f
43novideo 45novideo
44protocol unix,inet,inet6,bluetooth 46protocol unix,inet,inet6,netlink,bluetooth
45seccomp 47seccomp
46seccomp.block-secondary 48seccomp.block-secondary
47shell none 49shell none
@@ -52,7 +54,7 @@ private-bin supertuxkart
52private-cache 54private-cache
53# Add the next line to your supertuxkart.local if you do not need controller support. 55# Add the next line to your supertuxkart.local if you do not need controller support.
54#private-dev 56#private-dev
55private-etc alternatives,ca-certificates,crypto-policies,drirc,hosts,machine-id,openal,pki,resolv.conf,ssl 57private-etc alternatives,ca-certificates,crypto-policies,drirc,hosts,ld.so.cache,ld.so.preload,machine-id,openal,pki,resolv.conf,ssl
56private-tmp 58private-tmp
57private-opt none 59private-opt none
58private-srv none 60private-srv none
diff --git a/etc/profile-m-z/surf.profile b/etc/profile-m-z/surf.profile
index 8db7d2433..c04f00cab 100644
--- a/etc/profile-m-z/surf.profile
+++ b/etc/profile-m-z/surf.profile
@@ -11,7 +11,6 @@ noblacklist ${HOME}/.surf
11include disable-common.inc 11include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16 15
17mkdir ${HOME}/.surf 16mkdir ${HOME}/.surf
@@ -35,6 +34,6 @@ tracelog
35disable-mnt 34disable-mnt
36private-bin bash,curl,dmenu,ls,printf,sed,sh,sleep,st,stterm,surf,xargs,xprop 35private-bin bash,curl,dmenu,ls,printf,sed,sh,sleep,st,stterm,surf,xargs,xprop
37private-dev 36private-dev
38private-etc alternatives,ca-certificates,crypto-policies,fonts,group,hosts,machine-id,passwd,pki,resolv.conf,ssl 37private-etc alternatives,ca-certificates,crypto-policies,fonts,group,hosts,ld.so.cache,ld.so.preload,machine-id,passwd,pki,resolv.conf,ssl
39private-tmp 38private-tmp
40 39
diff --git a/etc/profile-m-z/sushi.profile b/etc/profile-m-z/sushi.profile
index 2a15a5d09..621622043 100644
--- a/etc/profile-m-z/sushi.profile
+++ b/etc/profile-m-z/sushi.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17# include disable-programs.inc 16# include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19 18
diff --git a/etc/profile-a-l/sway.profile b/etc/profile-m-z/sway.profile
index 4637419bf..046d1b4be 100644
--- a/etc/profile-a-l/sway.profile
+++ b/etc/profile-m-z/sway.profile
@@ -1,5 +1,5 @@
1# Firejail profile for Sway 1# Firejail profile for Sway
2# Description: i3-compatible Wayland compositor 2# Description: i3-compatible Wayland compositor
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4# Persistent local customizations 4# Persistent local customizations
5include sway.local 5include sway.local
diff --git a/etc/profile-m-z/synfigstudio.profile b/etc/profile-m-z/synfigstudio.profile
index c60186c42..7f23992a8 100644
--- a/etc/profile-m-z/synfigstudio.profile
+++ b/etc/profile-m-z/synfigstudio.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19caps.drop all 18caps.drop all
diff --git a/etc/profile-m-z/sysprof.profile b/etc/profile-m-z/sysprof.profile
index 2473988e4..c7119ae0f 100644
--- a/etc/profile-m-z/sysprof.profile
+++ b/etc/profile-m-z/sysprof.profile
@@ -11,12 +11,18 @@ include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-xdg.inc 15include disable-xdg.inc
17 16
18# help menu functionality (yelp) - comment or add this block prepended with 'ignore' 17# Add the next lines to your sysprof.local if you don't need (yelp) help menu functionality.
19# to your sysprof.local if you don't need the help functionality 18#ignore noblacklist ${HOME}/.config/yelp
19#ignore mkdir ${HOME}/.config/yelp
20#nowhitelist ${HOME}/.config/yelp
21#nowhitelist /usr/share/help/C/sysprof
22#nowhitelist /usr/share/yelp
23#nowhitelist /usr/share/yelp-tools
24#nowhitelist /usr/share/yelp-xsl
25
20noblacklist ${HOME}/.config/yelp 26noblacklist ${HOME}/.config/yelp
21mkdir ${HOME}/.config/yelp 27mkdir ${HOME}/.config/yelp
22whitelist ${HOME}/.config/yelp 28whitelist ${HOME}/.config/yelp
@@ -41,7 +47,8 @@ nodvd
41nogroups 47nogroups
42noinput 48noinput
43nonewprivs 49nonewprivs
44# Ubuntu 16.04 version needs root privileges - comment or put 'ignore noroot' in sysprof.local if you run Xenial 50# Some older Debian/Ubuntu sysprof versions need root privileges.
51# Add 'ignore noroot' to your sysprof.local if you run one of these.
45noroot 52noroot
46nosound 53nosound
47notv 54notv
@@ -56,8 +63,8 @@ disable-mnt
56#private-bin sysprof - breaks help menu 63#private-bin sysprof - breaks help menu
57private-cache 64private-cache
58private-dev 65private-dev
59private-etc alternatives,fonts,ld.so.cache,machine-id,ssl 66private-etc alternatives,fonts,ld.so.cache,ld.so.preload,machine-id,ssl
60# private-lib breaks help menu 67# private-lib - breaks help menu
61#private-lib gdk-pixbuf-2.*,gio,gtk3,gvfs/libgvfscommon.so,libgconf-2.so.*,librsvg-2.so.*,libsysprof-2.so,libsysprof-ui-2.so 68#private-lib gdk-pixbuf-2.*,gio,gtk3,gvfs/libgvfscommon.so,libgconf-2.so.*,librsvg-2.so.*,libsysprof-2.so,libsysprof-ui-2.so
62private-tmp 69private-tmp
63 70
diff --git a/etc/profile-m-z/tar.profile b/etc/profile-m-z/tar.profile
index 0d3a900e9..0817adda8 100644
--- a/etc/profile-m-z/tar.profile
+++ b/etc/profile-m-z/tar.profile
@@ -14,7 +14,7 @@ ignore include disable-shell.inc
14# all capabilities this is automatically read-only. 14# all capabilities this is automatically read-only.
15noblacklist /var/lib/pacman 15noblacklist /var/lib/pacman
16 16
17private-etc alternatives,group,localtime,login.defs,passwd 17private-etc alternatives,group,ld.so.cache,ld.so.preload,localtime,login.defs,passwd
18#private-lib libfakeroot,liblzma.so.*,libreadline.so.* 18#private-lib libfakeroot,liblzma.so.*,libreadline.so.*
19# Debian based distributions need this for 'dpkg --unpack' (incl. synaptic) 19# Debian based distributions need this for 'dpkg --unpack' (incl. synaptic)
20writable-var 20writable-var
diff --git a/etc/profile-m-z/tcpdump.profile b/etc/profile-m-z/tcpdump.profile
index e2ba5893c..57301a54d 100644
--- a/etc/profile-m-z/tcpdump.profile
+++ b/etc/profile-m-z/tcpdump.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
diff --git a/etc/profile-m-z/teams-for-linux.profile b/etc/profile-m-z/teams-for-linux.profile
index eee083332..5711c1b36 100644
--- a/etc/profile-m-z/teams-for-linux.profile
+++ b/etc/profile-m-z/teams-for-linux.profile
@@ -11,6 +11,8 @@ ignore include disable-xdg.inc
11ignore include whitelist-runuser-common.inc 11ignore include whitelist-runuser-common.inc
12ignore include whitelist-usr-share-common.inc 12ignore include whitelist-usr-share-common.inc
13 13
14ignore noinput
15
14ignore dbus-user none 16ignore dbus-user none
15ignore dbus-system none 17ignore dbus-system none
16 18
@@ -19,8 +21,8 @@ noblacklist ${HOME}/.config/teams-for-linux
19mkdir ${HOME}/.config/teams-for-linux 21mkdir ${HOME}/.config/teams-for-linux
20whitelist ${HOME}/.config/teams-for-linux 22whitelist ${HOME}/.config/teams-for-linux
21 23
22private-bin bash,cut,echo,egrep,grep,head,sed,sh,teams-for-linux,tr,xdg-mime,xdg-open,zsh 24private-bin bash,cut,echo,egrep,electron,electron[0-9],electron[0-9][0-9],grep,head,sed,sh,teams-for-linux,tr,xdg-mime,xdg-open,zsh
23private-etc ca-certificates,crypto-policies,fonts,ld.so.cache,localtime,machine-id,pki,resolv.conf,ssl 25private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.preload,localtime,machine-id,pki,resolv.conf,ssl
24 26
25# Redirect 27# Redirect
26include electron.profile 28include electron.profile
diff --git a/etc/profile-m-z/teams.profile b/etc/profile-m-z/teams.profile
index c8d98cbaa..ad52ca45f 100644
--- a/etc/profile-m-z/teams.profile
+++ b/etc/profile-m-z/teams.profile
@@ -13,6 +13,8 @@ ignore include whitelist-usr-share-common.inc
13ignore novideo 13ignore novideo
14ignore private-tmp 14ignore private-tmp
15 15
16ignore novideo
17
16# see #3404 18# see #3404
17ignore apparmor 19ignore apparmor
18ignore dbus-user none 20ignore dbus-user none
diff --git a/etc/profile-m-z/teamspeak3.profile b/etc/profile-m-z/teamspeak3.profile
index 02a2c8ae4..c149473f6 100644
--- a/etc/profile-m-z/teamspeak3.profile
+++ b/etc/profile-m-z/teamspeak3.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19mkdir ${HOME}/.ts3client 18mkdir ${HOME}/.ts3client
diff --git a/etc/profile-m-z/teeworlds.profile b/etc/profile-m-z/teeworlds.profile
index be01aee12..d0fb0d43e 100644
--- a/etc/profile-m-z/teeworlds.profile
+++ b/etc/profile-m-z/teeworlds.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -27,7 +26,6 @@ ipc-namespace
27netfilter 26netfilter
28nodvd 27nodvd
29nogroups 28nogroups
30noinput
31nonewprivs 29nonewprivs
32noroot 30noroot
33notv 31notv
diff --git a/etc/profile-m-z/telegram-desktop.profile b/etc/profile-m-z/telegram-desktop.profile
index e0c5aee9e..7463b761f 100644
--- a/etc/profile-m-z/telegram-desktop.profile
+++ b/etc/profile-m-z/telegram-desktop.profile
@@ -2,7 +2,7 @@
2# Description: Official Telegram Desktop client 2# Description: Official Telegram Desktop client
3# This file is overwritten after every install/update 3# This file is overwritten after every install/update
4# Persistent local customizations 4# Persistent local customizations
5include tekegram-desktop.local 5include telegram-desktop.local
6# Persistent global definitions 6# Persistent global definitions
7# added by included profile 7# added by included profile
8#include globals.local 8#include globals.local
diff --git a/etc/profile-m-z/telegram.profile b/etc/profile-m-z/telegram.profile
index 05c621fb2..ce0119078 100644
--- a/etc/profile-m-z/telegram.profile
+++ b/etc/profile-m-z/telegram.profile
@@ -8,11 +8,13 @@ include globals.local
8noblacklist ${HOME}/.TelegramDesktop 8noblacklist ${HOME}/.TelegramDesktop
9noblacklist ${HOME}/.local/share/TelegramDesktop 9noblacklist ${HOME}/.local/share/TelegramDesktop
10 10
11# Allow opening hyperlinks
12include allow-bin-sh.inc
13
11include disable-common.inc 14include disable-common.inc
12include disable-devel.inc 15include disable-devel.inc
13include disable-exec.inc 16include disable-exec.inc
14include disable-interpreters.inc 17include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 18include disable-programs.inc
17include disable-shell.inc 19include disable-shell.inc
18include disable-xdg.inc 20include disable-xdg.inc
@@ -22,6 +24,7 @@ mkdir ${HOME}/.local/share/TelegramDesktop
22whitelist ${HOME}/.TelegramDesktop 24whitelist ${HOME}/.TelegramDesktop
23whitelist ${HOME}/.local/share/TelegramDesktop 25whitelist ${HOME}/.local/share/TelegramDesktop
24whitelist ${DOWNLOADS} 26whitelist ${DOWNLOADS}
27whitelist /usr/share/TelegramDesktop
25include whitelist-common.inc 28include whitelist-common.inc
26include whitelist-runuser-common.inc 29include whitelist-runuser-common.inc
27include whitelist-usr-share-common.inc 30include whitelist-usr-share-common.inc
@@ -39,18 +42,18 @@ protocol unix,inet,inet6,netlink
39seccomp 42seccomp
40seccomp.block-secondary 43seccomp.block-secondary
41shell none 44shell none
42tracelog
43 45
44disable-mnt 46disable-mnt
45#private-bin telegram,Telegram,telegram-desktop 47private-bin bash,sh,telegram,Telegram,telegram-desktop,xdg-open
46private-cache 48private-cache
47private-dev 49private-dev
48private-etc alsa,alternatives,ca-certificates,crypto-policies,fonts,group,ld.so.cache,localtime,machine-id,os-release,passwd,pki,pulse,resolv.conf,ssl,xdg 50private-etc alsa,alternatives,ca-certificates,crypto-policies,fonts,group,ld.so.cache,ld.so.preload,localtime,machine-id,os-release,passwd,pki,pulse,resolv.conf,ssl,xdg
49private-tmp 51private-tmp
50 52
51dbus-user filter 53dbus-user filter
54dbus-user.own org.telegram.desktop.*
52dbus-user.talk org.freedesktop.Notifications 55dbus-user.talk org.freedesktop.Notifications
53dbus-user.talk org.kde.StatusNotifierWatcher 56?ALLOW_TRAY: dbus-user.talk org.kde.StatusNotifierWatcher
54dbus-user.talk org.gnome.Mutter.IdleMonitor 57dbus-user.talk org.gnome.Mutter.IdleMonitor
55dbus-user.talk org.freedesktop.ScreenSaver 58dbus-user.talk org.freedesktop.ScreenSaver
56dbus-system none 59dbus-system none
diff --git a/etc/profile-m-z/telnet.profile b/etc/profile-m-z/telnet.profile
new file mode 100644
index 000000000..ea91364ab
--- /dev/null
+++ b/etc/profile-m-z/telnet.profile
@@ -0,0 +1,54 @@
1# Firejail profile for telnet
2# Description: standard telnet client
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include telnet.local
7# Persistent global definitions
8include globals.local
9
10noblacklist ${PATH}/telnet
11
12include disable-common.inc
13include disable-devel.inc
14include disable-exec.inc
15include disable-interpreters.inc
16include disable-proc.inc
17include disable-programs.inc
18#include disable-shell.inc
19include disable-write-mnt.inc
20include disable-X11.inc
21include disable-xdg.inc
22
23apparmor
24caps.drop all
25ipc-namespace
26machine-id
27netfilter
28no3d
29nodvd
30nogroups
31noinput
32nonewprivs
33noroot
34nosound
35notv
36nou2f
37novideo
38protocol inet,inet6
39seccomp
40shell none
41tracelog
42
43#disable-mnt
44#private-bin PROGRAMS
45private-cache
46private-dev
47#private-etc FILES
48private-tmp
49
50dbus-user none
51dbus-system none
52
53memory-deny-write-execute
54noexec ${HOME}
diff --git a/etc/profile-m-z/terasology.profile b/etc/profile-m-z/terasology.profile
index ce2ca1d17..0f6691b49 100644
--- a/etc/profile-m-z/terasology.profile
+++ b/etc/profile-m-z/terasology.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22mkdir ${HOME}/.java 21mkdir ${HOME}/.java
diff --git a/etc/profile-m-z/thunderbird.profile b/etc/profile-m-z/thunderbird.profile
index b478fbe1e..1ac80bc9a 100644
--- a/etc/profile-m-z/thunderbird.profile
+++ b/etc/profile-m-z/thunderbird.profile
@@ -31,7 +31,6 @@ noblacklist ${HOME}/.gnupg
31# noblacklist ${HOME}/.icedove 31# noblacklist ${HOME}/.icedove
32noblacklist ${HOME}/.thunderbird 32noblacklist ${HOME}/.thunderbird
33 33
34include disable-passwdmgr.inc
35include disable-xdg.inc 34include disable-xdg.inc
36 35
37# If you have setup Thunderbird to archive emails to a local folder, 36# If you have setup Thunderbird to archive emails to a local folder,
@@ -48,6 +47,7 @@ whitelist ${HOME}/.gnupg
48whitelist ${HOME}/.thunderbird 47whitelist ${HOME}/.thunderbird
49 48
50whitelist /usr/share/gnupg 49whitelist /usr/share/gnupg
50whitelist /usr/share/gnupg2
51whitelist /usr/share/mozilla 51whitelist /usr/share/mozilla
52whitelist /usr/share/thunderbird 52whitelist /usr/share/thunderbird
53whitelist /usr/share/webext 53whitelist /usr/share/webext
diff --git a/etc/profile-m-z/tilp.profile b/etc/profile-m-z/tilp.profile
index dd4a372c4..d2db44b1c 100644
--- a/etc/profile-m-z/tilp.profile
+++ b/etc/profile-m-z/tilp.profile
@@ -11,7 +11,6 @@ include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-shell.inc 15include disable-shell.inc
17 16
@@ -31,6 +30,6 @@ tracelog
31disable-mnt 30disable-mnt
32private-bin tilp 31private-bin tilp
33private-cache 32private-cache
34private-etc alternatives,fonts 33private-etc alternatives,fonts,ld.so.cache,ld.so.preload
35private-tmp 34private-tmp
36 35
diff --git a/etc/profile-m-z/tin.profile b/etc/profile-m-z/tin.profile
new file mode 100644
index 000000000..1d4ee9370
--- /dev/null
+++ b/etc/profile-m-z/tin.profile
@@ -0,0 +1,68 @@
1# Firejail profile for tin
2# Description: ncurses-based Usenet newsreader
3# This file is overwritten after every install/update
4# Persistent local customizations
5include tin.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.newsrc
10noblacklist ${HOME}/.tin
11
12blacklist /tmp/.X11-unix
13blacklist ${RUNUSER}
14blacklist /usr/libexec
15
16include disable-common.inc
17include disable-devel.inc
18include disable-exec.inc
19include disable-interpreters.inc
20include disable-programs.inc
21include disable-shell.inc
22include disable-xdg.inc
23
24mkdir ${HOME}/.tin
25mkfile ${HOME}/.newsrc
26# Note: files/directories directly in ${HOME} can't be whitelisted, as
27# tin saves .newsrc by renaming a temporary file, which is not possible for
28# bind-mounted files.
29#whitelist ${HOME}/.newsrc
30#whitelist ${HOME}/.tin
31#include whitelist-common.inc
32include whitelist-runuser-common.inc
33include whitelist-usr-share-common.inc
34include whitelist-var-common.inc
35
36apparmor
37caps.drop all
38ipc-namespace
39machine-id
40netfilter
41no3d
42nodvd
43nogroups
44noinput
45nonewprivs
46noroot
47nosound
48notv
49nou2f
50novideo
51protocol inet,inet6
52seccomp
53seccomp.block-secondary
54shell none
55tracelog
56
57disable-mnt
58private-bin rtin,tin
59private-cache
60private-dev
61private-etc alternatives,ld.so.cache,ld.so.preload,passwd,resolv.conf,terminfo,tin
62private-lib terminfo
63private-tmp
64
65dbus-user none
66dbus-system none
67
68memory-deny-write-execute
diff --git a/etc/profile-m-z/tmux.profile b/etc/profile-m-z/tmux.profile
index 0139d7515..1e783d2b9 100644
--- a/etc/profile-m-z/tmux.profile
+++ b/etc/profile-m-z/tmux.profile
@@ -15,7 +15,6 @@ noblacklist /tmp/tmux-*
15# include disable-common.inc 15# include disable-common.inc
16# include disable-devel.inc 16# include disable-devel.inc
17# include disable-exec.inc 17# include disable-exec.inc
18include disable-passwdmgr.inc
19# include disable-programs.inc 18# include disable-programs.inc
20 19
21caps.drop all 20caps.drop all
diff --git a/etc/profile-m-z/tor-browser.profile b/etc/profile-m-z/tor-browser.profile
index 76a0e1fa5..13f422b0a 100644
--- a/etc/profile-m-z/tor-browser.profile
+++ b/etc/profile-m-z/tor-browser.profile
@@ -7,9 +7,12 @@ include tor-browser.local
7#include globals.local 7#include globals.local
8 8
9noblacklist ${HOME}/.tor-browser 9noblacklist ${HOME}/.tor-browser
10noblacklist ${HOME}/.local/opt/tor-browser
10 11
11mkdir ${HOME}/.tor-browser 12mkdir ${HOME}/.tor-browser
12whitelist ${HOME}/.tor-browser 13whitelist ${HOME}/.tor-browser
14mkdir ${HOME}/.local/opt/tor-browser
15whitelist ${HOME}/.local/opt/tor-browser
13 16
14# Redirect 17# Redirect
15include torbrowser-launcher.profile 18include torbrowser-launcher.profile
diff --git a/etc/profile-m-z/tor.profile b/etc/profile-m-z/tor.profile
index 73ef290f4..d8cd8eb44 100644
--- a/etc/profile-m-z/tor.profile
+++ b/etc/profile-m-z/tor.profile
@@ -21,7 +21,6 @@ include disable-common.inc
21include disable-devel.inc 21include disable-devel.inc
22include disable-exec.inc 22include disable-exec.inc
23include disable-interpreters.inc 23include disable-interpreters.inc
24include disable-passwdmgr.inc
25include disable-programs.inc 24include disable-programs.inc
26include disable-xdg.inc 25include disable-xdg.inc
27 26
@@ -47,6 +46,6 @@ private
47private-bin bash,tor 46private-bin bash,tor
48private-cache 47private-cache
49private-dev 48private-dev
50private-etc alternatives,ca-certificates,crypto-policies,passwd,pki,ssl,tor 49private-etc alternatives,ca-certificates,crypto-policies,ld.so.cache,ld.so.preload,passwd,pki,ssl,tor
51private-tmp 50private-tmp
52writable-var 51writable-var
diff --git a/etc/profile-m-z/torbrowser-launcher.profile b/etc/profile-m-z/torbrowser-launcher.profile
index 7659ed1e9..469e99d02 100644
--- a/etc/profile-m-z/torbrowser-launcher.profile
+++ b/etc/profile-m-z/torbrowser-launcher.profile
@@ -15,14 +15,12 @@ noblacklist ${HOME}/.local/share/torbrowser
15include allow-python2.inc 15include allow-python2.inc
16include allow-python3.inc 16include allow-python3.inc
17 17
18blacklist /opt
19blacklist /srv 18blacklist /srv
20 19
21include disable-common.inc 20include disable-common.inc
22include disable-devel.inc 21include disable-devel.inc
23include disable-exec.inc 22include disable-exec.inc
24include disable-interpreters.inc 23include disable-interpreters.inc
25include disable-passwdmgr.inc
26include disable-programs.inc 24include disable-programs.inc
27include disable-xdg.inc 25include disable-xdg.inc
28 26
@@ -31,6 +29,7 @@ mkdir ${HOME}/.local/share/torbrowser
31whitelist ${DOWNLOADS} 29whitelist ${DOWNLOADS}
32whitelist ${HOME}/.config/torbrowser 30whitelist ${HOME}/.config/torbrowser
33whitelist ${HOME}/.local/share/torbrowser 31whitelist ${HOME}/.local/share/torbrowser
32whitelist /opt/tor-browser
34whitelist /usr/share/torbrowser-launcher 33whitelist /usr/share/torbrowser-launcher
35include whitelist-common.inc 34include whitelist-common.inc
36include whitelist-var-common.inc 35include whitelist-var-common.inc
diff --git a/etc/profile-m-z/torbrowser.profile b/etc/profile-m-z/torbrowser.profile
new file mode 100644
index 000000000..fc579b973
--- /dev/null
+++ b/etc/profile-m-z/torbrowser.profile
@@ -0,0 +1,26 @@
1# Firejail profile for torbrowser
2# Description: This profile was tested with www-client/torbrowser::torbrowser
3# on Gentoo Linux.
4# This file is overwritten after every install/update
5# Persistent local customizations
6include torbrowser.local
7# Persistent global definitions
8include globals.local
9
10ignore dbus-user none
11
12noblacklist ${HOME}/.cache/mozilla
13noblacklist ${HOME}/.mozilla
14
15blacklist /usr/libexec
16
17mkdir ${HOME}/.cache/mozilla/torbrowser
18mkdir ${HOME}/.mozilla
19whitelist ${HOME}/.cache/mozilla/torbrowser
20whitelist ${HOME}/.mozilla
21include whitelist-usr-share-common.inc
22
23dbus-user filter
24dbus-user.own org.mozilla.torbrowser.*
25
26include firefox-common.profile
diff --git a/etc/profile-m-z/torcs.profile b/etc/profile-m-z/torcs.profile
index 0f98a8f64..19e586db4 100644
--- a/etc/profile-m-z/torcs.profile
+++ b/etc/profile-m-z/torcs.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
@@ -29,7 +28,6 @@ ipc-namespace
29net none 28net none
30nodvd 29nodvd
31nogroups 30nogroups
32noinput
33nonewprivs 31nonewprivs
34noroot 32noroot
35notv 33notv
diff --git a/etc/profile-m-z/totem.profile b/etc/profile-m-z/totem.profile
index 70d9e0aee..dac753fd1 100644
--- a/etc/profile-m-z/totem.profile
+++ b/etc/profile-m-z/totem.profile
@@ -20,7 +20,6 @@ include disable-common.inc
20include disable-devel.inc 20include disable-devel.inc
21include disable-exec.inc 21include disable-exec.inc
22include disable-interpreters.inc 22include disable-interpreters.inc
23include disable-passwdmgr.inc
24include disable-programs.inc 23include disable-programs.inc
25include disable-shell.inc 24include disable-shell.inc
26 25
diff --git a/etc/profile-m-z/tracker.profile b/etc/profile-m-z/tracker.profile
index 87c5de076..ba44224f9 100644
--- a/etc/profile-m-z/tracker.profile
+++ b/etc/profile-m-z/tracker.profile
@@ -14,7 +14,6 @@ blacklist ${RUNUSER}/wayland-*
14include disable-common.inc 14include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20 19
diff --git a/etc/profile-m-z/transgui.profile b/etc/profile-m-z/transgui.profile
index ea118a9f0..4acb8e7e8 100644
--- a/etc/profile-m-z/transgui.profile
+++ b/etc/profile-m-z/transgui.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -46,7 +45,7 @@ tracelog
46private-bin geoiplookup,geoiplookup6,transgui 45private-bin geoiplookup,geoiplookup6,transgui
47private-cache 46private-cache
48private-dev 47private-dev
49private-etc alternatives,fonts 48private-etc alternatives,fonts,ld.so.cache,ld.so.preload
50private-lib libgdk_pixbuf-2.0.so.*,libGeoIP.so*,libgthread-2.0.so.*,libgtk-x11-2.0.so.*,libX11.so.* 49private-lib libgdk_pixbuf-2.0.so.*,libGeoIP.so*,libgthread-2.0.so.*,libgtk-x11-2.0.so.*,libX11.so.*
51private-tmp 50private-tmp
52 51
diff --git a/etc/profile-m-z/transmission-cli.profile b/etc/profile-m-z/transmission-cli.profile
index 486be5fe6..8a1711e97 100644
--- a/etc/profile-m-z/transmission-cli.profile
+++ b/etc/profile-m-z/transmission-cli.profile
@@ -8,7 +8,7 @@ include transmission-cli.local
8include globals.local 8include globals.local
9 9
10private-bin transmission-cli 10private-bin transmission-cli
11private-etc alternatives,ca-certificates,crypto-policies,nsswitch.conf,pki,resolv.conf,ssl 11private-etc alternatives,ca-certificates,crypto-policies,ld.so.cache,ld.so.preload,nsswitch.conf,pki,resolv.conf,ssl
12 12
13# Redirect 13# Redirect
14include transmission-common.profile 14include transmission-common.profile
diff --git a/etc/profile-m-z/transmission-common.profile b/etc/profile-m-z/transmission-common.profile
index 82671b709..9d9b8cc2c 100644
--- a/etc/profile-m-z/transmission-common.profile
+++ b/etc/profile-m-z/transmission-common.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19 18
20mkdir ${HOME}/.cache/transmission 19mkdir ${HOME}/.cache/transmission
diff --git a/etc/profile-m-z/transmission-daemon.profile b/etc/profile-m-z/transmission-daemon.profile
index 348d3cb80..5d28f2f10 100644
--- a/etc/profile-m-z/transmission-daemon.profile
+++ b/etc/profile-m-z/transmission-daemon.profile
@@ -17,7 +17,7 @@ caps.keep ipc_lock,net_bind_service,setgid,setuid,sys_chroot
17protocol packet 17protocol packet
18 18
19private-bin transmission-daemon 19private-bin transmission-daemon
20private-etc alternatives,ca-certificates,crypto-policies,nsswitch.conf,pki,resolv.conf,ssl 20private-etc alternatives,ca-certificates,crypto-policies,ld.so.cache,ld.so.preload,nsswitch.conf,pki,resolv.conf,ssl
21 21
22read-write /var/lib/transmission 22read-write /var/lib/transmission
23writable-var-log 23writable-var-log
diff --git a/etc/profile-m-z/transmission-remote-gtk.profile b/etc/profile-m-z/transmission-remote-gtk.profile
index a6400e2c0..6a0f1bde3 100644
--- a/etc/profile-m-z/transmission-remote-gtk.profile
+++ b/etc/profile-m-z/transmission-remote-gtk.profile
@@ -12,7 +12,7 @@ noblacklist ${HOME}/.config/transmission-remote-gtk
12mkdir ${HOME}/.config/transmission-remote-gtk 12mkdir ${HOME}/.config/transmission-remote-gtk
13whitelist ${HOME}/.config/transmission-remote-gtk 13whitelist ${HOME}/.config/transmission-remote-gtk
14 14
15private-etc fonts,hostname,hosts,resolv.conf 15private-etc alternatives,fonts,hostname,hosts,ld.so.cache,ld.so.preload,resolv.conf
16# Problems with private-lib (see issue #2889) 16# Problems with private-lib (see issue #2889)
17ignore private-lib 17ignore private-lib
18 18
diff --git a/etc/profile-m-z/transmission-remote.profile b/etc/profile-m-z/transmission-remote.profile
index fee4999e6..565433d99 100644
--- a/etc/profile-m-z/transmission-remote.profile
+++ b/etc/profile-m-z/transmission-remote.profile
@@ -8,7 +8,7 @@ include transmission-remote.local
8include globals.local 8include globals.local
9 9
10private-bin transmission-remote 10private-bin transmission-remote
11private-etc alternatives,hosts,nsswitch.conf 11private-etc alternatives,hosts,ld.so.cache,ld.so.preload,nsswitch.conf
12 12
13# Redirect 13# Redirect
14include transmission-common.profile 14include transmission-common.profile
diff --git a/etc/profile-m-z/transmission-show.profile b/etc/profile-m-z/transmission-show.profile
index 5a3c83f58..0a5826ec4 100644
--- a/etc/profile-m-z/transmission-show.profile
+++ b/etc/profile-m-z/transmission-show.profile
@@ -8,7 +8,7 @@ include transmission-show.local
8include globals.local 8include globals.local
9 9
10private-bin transmission-show 10private-bin transmission-show
11private-etc alternatives,hosts,nsswitch.conf 11private-etc alternatives,hosts,ld.so.cache,ld.so.preload,nsswitch.conf
12 12
13# Redirect 13# Redirect
14include transmission-common.profile 14include transmission-common.profile
diff --git a/etc/profile-m-z/tremulous.profile b/etc/profile-m-z/tremulous.profile
index aba563fac..96541ae25 100644
--- a/etc/profile-m-z/tremulous.profile
+++ b/etc/profile-m-z/tremulous.profile
@@ -8,11 +8,13 @@ include globals.local
8 8
9noblacklist ${HOME}/.tremulous 9noblacklist ${HOME}/.tremulous
10 10
11# Allow /bin/sh (blacklisted by disable-shell.inc)
12include allow-bin-sh.inc
13
11include disable-common.inc 14include disable-common.inc
12include disable-devel.inc 15include disable-devel.inc
13include disable-exec.inc 16include disable-exec.inc
14include disable-interpreters.inc 17include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 18include disable-programs.inc
17include disable-shell.inc 19include disable-shell.inc
18include disable-xdg.inc 20include disable-xdg.inc
@@ -42,7 +44,7 @@ shell none
42tracelog 44tracelog
43 45
44disable-mnt 46disable-mnt
45private-bin tremded,tremulous,tremulous-wrapper 47private-bin env,sh,tremded,tremulous,tremulous-wrapper
46private-cache 48private-cache
47private-dev 49private-dev
48private-tmp 50private-tmp
diff --git a/etc/profile-m-z/trojita.profile b/etc/profile-m-z/trojita.profile
index 2d95081f6..60a192ac1 100644
--- a/etc/profile-m-z/trojita.profile
+++ b/etc/profile-m-z/trojita.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-shell.inc 19include disable-shell.inc
21include disable-xdg.inc 20include disable-xdg.inc
@@ -55,7 +54,7 @@ tracelog
55private-bin trojita 54private-bin trojita
56private-cache 55private-cache
57private-dev 56private-dev
58private-etc alternatives,ca-certificates,crypto-policies,fonts,hostname,hosts,pki,resolv.conf,selinux,ssl,xdg 57private-etc alternatives,ca-certificates,crypto-policies,fonts,hostname,hosts,ld.so.cache,ld.so.preload,pki,resolv.conf,selinux,ssl,xdg
59private-tmp 58private-tmp
60 59
61dbus-user filter 60dbus-user filter
diff --git a/etc/profile-m-z/truecraft.profile b/etc/profile-m-z/truecraft.profile
index 749626475..503e1ae64 100644
--- a/etc/profile-m-z/truecraft.profile
+++ b/etc/profile-m-z/truecraft.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18mkdir ${HOME}/.config/mono 17mkdir ${HOME}/.config/mono
diff --git a/etc/profile-m-z/tuxguitar.profile b/etc/profile-m-z/tuxguitar.profile
index d0bcbe79f..807d43281 100644
--- a/etc/profile-m-z/tuxguitar.profile
+++ b/etc/profile-m-z/tuxguitar.profile
@@ -6,6 +6,9 @@ include tuxguitar.local
6# Persistent global definitions 6# Persistent global definitions
7include globals.local 7include globals.local
8 8
9# tuxguitar fails to launch
10ignore noexec ${HOME}
11
9noblacklist ${HOME}/.tuxguitar* 12noblacklist ${HOME}/.tuxguitar*
10noblacklist ${DOCUMENTS} 13noblacklist ${DOCUMENTS}
11noblacklist ${MUSIC} 14noblacklist ${MUSIC}
@@ -17,7 +20,6 @@ include disable-common.inc
17include disable-devel.inc 20include disable-devel.inc
18include disable-exec.inc 21include disable-exec.inc
19include disable-interpreters.inc 22include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 23include disable-programs.inc
22include disable-xdg.inc 24include disable-xdg.inc
23 25
@@ -41,6 +43,3 @@ tracelog
41 43
42private-dev 44private-dev
43private-tmp 45private-tmp
44
45# noexec ${HOME} - tuxguitar may fail to launch
46noexec /tmp
diff --git a/etc/profile-m-z/tvbrowser.profile b/etc/profile-m-z/tvbrowser.profile
index dae7d86da..8a18519ac 100644
--- a/etc/profile-m-z/tvbrowser.profile
+++ b/etc/profile-m-z/tvbrowser.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-xdg.inc 20include disable-xdg.inc
22 21
diff --git a/etc/profile-m-z/twitch.profile b/etc/profile-m-z/twitch.profile
index 2f573c872..987a2b719 100644
--- a/etc/profile-m-z/twitch.profile
+++ b/etc/profile-m-z/twitch.profile
@@ -17,8 +17,8 @@ include disable-shell.inc
17mkdir ${HOME}/.config/Twitch 17mkdir ${HOME}/.config/Twitch
18whitelist ${HOME}/.config/Twitch 18whitelist ${HOME}/.config/Twitch
19 19
20private-bin twitch 20private-bin electron,electron[0-9],electron[0-9][0-9],twitch
21private-etc alsa,alternatives,asound.conf,ati,bumblebee,ca-certificates,crypto-policies,drirc,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,mime.types,nsswitch.conf,nvidia,pki,pulse,resolv.conf,selinux,ssl,X11,xdg 21private-etc alsa,alternatives,asound.conf,ati,bumblebee,ca-certificates,crypto-policies,drirc,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,mime.types,nsswitch.conf,nvidia,pki,pulse,resolv.conf,selinux,ssl,X11,xdg
22private-opt Twitch 22private-opt Twitch
23 23
24# Redirect 24# Redirect
diff --git a/etc/profile-m-z/udiskie.profile b/etc/profile-m-z/udiskie.profile
index 601b818c2..02f05af16 100644
--- a/etc/profile-m-z/udiskie.profile
+++ b/etc/profile-m-z/udiskie.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-m-z/uefitool.profile b/etc/profile-m-z/uefitool.profile
index 3e4fdbb03..2e5630f3d 100644
--- a/etc/profile-m-z/uefitool.profile
+++ b/etc/profile-m-z/uefitool.profile
@@ -11,7 +11,6 @@ include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-xdg.inc 15include disable-xdg.inc
17 16
diff --git a/etc/profile-m-z/unbound.profile b/etc/profile-m-z/unbound.profile
index 0c077babf..e8424cd7d 100644
--- a/etc/profile-m-z/unbound.profile
+++ b/etc/profile-m-z/unbound.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-xdg.inc 20include disable-xdg.inc
22 21
diff --git a/etc/profile-m-z/unf.profile b/etc/profile-m-z/unf.profile
index 6db7ba362..1b82ad881 100644
--- a/etc/profile-m-z/unf.profile
+++ b/etc/profile-m-z/unf.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
@@ -50,7 +49,7 @@ private-bin unf
50private-cache 49private-cache
51?HAS_APPIMAGE: ignore private-dev 50?HAS_APPIMAGE: ignore private-dev
52private-dev 51private-dev
53private-etc alternatives 52private-etc alternatives,ld.so.cache,ld.so.preload
54private-lib gcc/*/*/libgcc_s.so.* 53private-lib gcc/*/*/libgcc_s.so.*
55private-tmp 54private-tmp
56 55
diff --git a/etc/profile-m-z/unknown-horizons.profile b/etc/profile-m-z/unknown-horizons.profile
index 956492f52..b8f4dc431 100644
--- a/etc/profile-m-z/unknown-horizons.profile
+++ b/etc/profile-m-z/unknown-horizons.profile
@@ -10,7 +10,6 @@ noblacklist ${HOME}/.unknown-horizons
10 10
11include disable-common.inc 11include disable-common.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15 14
16mkdir ${HOME}/.unknown-horizons 15mkdir ${HOME}/.unknown-horizons
diff --git a/etc/profile-m-z/unrar.profile b/etc/profile-m-z/unrar.profile
index 9d3d9b40e..443d1f415 100644
--- a/etc/profile-m-z/unrar.profile
+++ b/etc/profile-m-z/unrar.profile
@@ -8,7 +8,7 @@ include unrar.local
8include globals.local 8include globals.local
9 9
10private-bin unrar 10private-bin unrar
11private-etc alternatives,group,localtime,passwd 11private-etc alternatives,group,ld.so.cache,ld.so.preload,localtime,passwd
12private-tmp 12private-tmp
13 13
14# Redirect 14# Redirect
diff --git a/etc/profile-m-z/unzip.profile b/etc/profile-m-z/unzip.profile
index 0231e3dba..97df693ba 100644
--- a/etc/profile-m-z/unzip.profile
+++ b/etc/profile-m-z/unzip.profile
@@ -10,7 +10,7 @@ include globals.local
10# GNOME Shell integration (chrome-gnome-shell) 10# GNOME Shell integration (chrome-gnome-shell)
11noblacklist ${HOME}/.local/share/gnome-shell 11noblacklist ${HOME}/.local/share/gnome-shell
12 12
13private-etc alternatives,group,localtime,passwd 13private-etc alternatives,group,ld.so.cache,ld.so.preload,localtime,passwd
14 14
15# Redirect 15# Redirect
16include archiver-common.profile 16include archiver-common.profile
diff --git a/etc/profile-m-z/utox.profile b/etc/profile-m-z/utox.profile
index dd881f091..5a867a683 100644
--- a/etc/profile-m-z/utox.profile
+++ b/etc/profile-m-z/utox.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
@@ -44,7 +43,7 @@ disable-mnt
44private-bin utox 43private-bin utox
45private-cache 44private-cache
46private-dev 45private-dev
47private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,localtime,machine-id,openal,pki,pulse,resolv.conf,ssl 46private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.preload,localtime,machine-id,openal,pki,pulse,resolv.conf,ssl
48private-tmp 47private-tmp
49 48
50memory-deny-write-execute 49memory-deny-write-execute
diff --git a/etc/profile-m-z/uudeview.profile b/etc/profile-m-z/uudeview.profile
index 2adc044e5..426766e17 100644
--- a/etc/profile-m-z/uudeview.profile
+++ b/etc/profile-m-z/uudeview.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19 18
@@ -42,7 +41,7 @@ x11 none
42private-bin uudeview 41private-bin uudeview
43private-cache 42private-cache
44private-dev 43private-dev
45private-etc alternatives,ld.so.preload 44private-etc alternatives,ld.so.cache,ld.so.preload
46 45
47dbus-user none 46dbus-user none
48dbus-system none 47dbus-system none
diff --git a/etc/profile-m-z/uzbl-browser.profile b/etc/profile-m-z/uzbl-browser.profile
index 41487a8f2..dcdae279f 100644
--- a/etc/profile-m-z/uzbl-browser.profile
+++ b/etc/profile-m-z/uzbl-browser.profile
@@ -8,6 +8,7 @@ include globals.local
8noblacklist ${HOME}/.config/uzbl 8noblacklist ${HOME}/.config/uzbl
9noblacklist ${HOME}/.gnupg 9noblacklist ${HOME}/.gnupg
10noblacklist ${HOME}/.local/share/uzbl 10noblacklist ${HOME}/.local/share/uzbl
11noblacklist ${HOME}/.password-store
11 12
12# Allow python (blacklisted by disable-interpreters.inc) 13# Allow python (blacklisted by disable-interpreters.inc)
13include allow-python2.inc 14include allow-python2.inc
diff --git a/etc/profile-m-z/viewnior.profile b/etc/profile-m-z/viewnior.profile
index a9ba344dd..585a8eddb 100644
--- a/etc/profile-m-z/viewnior.profile
+++ b/etc/profile-m-z/viewnior.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21include disable-shell.inc 20include disable-shell.inc
22 21
@@ -44,7 +43,7 @@ tracelog
44private-bin viewnior 43private-bin viewnior
45private-cache 44private-cache
46private-dev 45private-dev
47private-etc alternatives,fonts,machine-id 46private-etc alternatives,fonts,ld.so.cache,ld.so.preload,machine-id
48private-tmp 47private-tmp
49 48
50dbus-user none 49dbus-user none
diff --git a/etc/profile-m-z/viking.profile b/etc/profile-m-z/viking.profile
index 8f8ef5939..fd15228cf 100644
--- a/etc/profile-m-z/viking.profile
+++ b/etc/profile-m-z/viking.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
diff --git a/etc/profile-m-z/vim.profile b/etc/profile-m-z/vim.profile
index c3cfe5980..a6e05a32a 100644
--- a/etc/profile-m-z/vim.profile
+++ b/etc/profile-m-z/vim.profile
@@ -14,7 +14,6 @@ noblacklist ${HOME}/.vimrc
14include allow-common-devel.inc 14include allow-common-devel.inc
15 15
16include disable-common.inc 16include disable-common.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19 18
20include whitelist-runuser-common.inc 19include whitelist-runuser-common.inc
diff --git a/etc/profile-m-z/virtualbox.profile b/etc/profile-m-z/virtualbox.profile
index c22fb0ff9..227ad83cc 100644
--- a/etc/profile-m-z/virtualbox.profile
+++ b/etc/profile-m-z/virtualbox.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
@@ -46,7 +45,7 @@ tracelog
46#disable-mnt 45#disable-mnt
47#private-bin awk,basename,bash,env,gawk,grep,ps,readlink,sh,virtualbox,VirtualBox,VBox*,vbox*,whoami 46#private-bin awk,basename,bash,env,gawk,grep,ps,readlink,sh,virtualbox,VirtualBox,VBox*,vbox*,whoami
48private-cache 47private-cache
49private-etc alsa,asound.conf,ca-certificates,conf.d,crypto-policies,dconf,fonts,hostname,hosts,ld.so.cache,localtime,machine-id,pki,pulse,resolv.conf,ssl 48private-etc alsa,alternatives,asound.conf,ca-certificates,conf.d,crypto-policies,dconf,fonts,hostname,hosts,ld.so.cache,ld.so.preload,localtime,machine-id,pki,pulse,resolv.conf,ssl
50private-tmp 49private-tmp
51 50
52dbus-user none 51dbus-user none
diff --git a/etc/profile-m-z/vlc.profile b/etc/profile-m-z/vlc.profile
index cd7dccd8a..68db032aa 100644
--- a/etc/profile-m-z/vlc.profile
+++ b/etc/profile-m-z/vlc.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20 19
21read-only ${DESKTOP} 20read-only ${DESKTOP}
diff --git a/etc/profile-m-z/vmware-view.profile b/etc/profile-m-z/vmware-view.profile
index f07c31b68..278a66149 100644
--- a/etc/profile-m-z/vmware-view.profile
+++ b/etc/profile-m-z/vmware-view.profile
@@ -7,6 +7,7 @@ include vmware-view.local
7include globals.local 7include globals.local
8 8
9noblacklist ${HOME}/.vmware 9noblacklist ${HOME}/.vmware
10noblacklist /usr/lib/vmware
10 11
11noblacklist /sbin 12noblacklist /sbin
12noblacklist /usr/sbin 13noblacklist /usr/sbin
@@ -17,7 +18,6 @@ include disable-common.inc
17include disable-devel.inc 18include disable-devel.inc
18include disable-exec.inc 19include disable-exec.inc
19include disable-interpreters.inc 20include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 21include disable-programs.inc
22include disable-shell.inc 22include disable-shell.inc
23include disable-xdg.inc 23include disable-xdg.inc
diff --git a/etc/profile-m-z/vmware.profile b/etc/profile-m-z/vmware.profile
index 5241e27b3..57fbbae96 100644
--- a/etc/profile-m-z/vmware.profile
+++ b/etc/profile-m-z/vmware.profile
@@ -8,12 +8,12 @@ include globals.local
8 8
9noblacklist ${HOME}/.cache/vmware 9noblacklist ${HOME}/.cache/vmware
10noblacklist ${HOME}/.vmware 10noblacklist ${HOME}/.vmware
11noblacklist /usr/lib/vmware
11 12
12include disable-common.inc 13include disable-common.inc
13include disable-devel.inc 14include disable-devel.inc
14include disable-exec.inc 15include disable-exec.inc
15include disable-interpreters.inc 16include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 17include disable-programs.inc
18include disable-xdg.inc 18include disable-xdg.inc
19 19
@@ -39,6 +39,6 @@ tracelog
39#disable-mnt 39#disable-mnt
40# Add the next line to your vmware.local to enable private-bin. 40# Add the next line to your vmware.local to enable private-bin.
41#private-bin env,bash,sh,ovftool,vmafossexec,vmaf_*,vmnet-*,vmplayer,vmrest,vmrun,vmss2core,vmstat,vmware,vmware-* 41#private-bin env,bash,sh,ovftool,vmafossexec,vmaf_*,vmnet-*,vmplayer,vmrest,vmrun,vmss2core,vmstat,vmware,vmware-*
42private-etc alsa,asound.conf,ca-certificates,conf.d,crypto-policies,dconf,fonts,gtk-2.0,gtk-3.0,hostname,hosts,ld.so.cache,localtime,machine-id,passwd,pki,pulse,resolv.conf,ssl,vmware,vmware-installer,vmware-vix 42private-etc alsa,alternatives,asound.conf,ca-certificates,conf.d,crypto-policies,dconf,fonts,gtk-2.0,gtk-3.0,hostname,hosts,ld.so.cache,ld.so.preload,localtime,machine-id,passwd,pki,pulse,resolv.conf,ssl,vmware,vmware-installer,vmware-vix
43dbus-user none 43dbus-user none
44dbus-system none 44dbus-system none
diff --git a/etc/profile-m-z/vscodium.profile b/etc/profile-m-z/vscodium.profile
index a4a4fb7d8..9c0a887b2 100644
--- a/etc/profile-m-z/vscodium.profile
+++ b/etc/profile-m-z/vscodium.profile
@@ -1,4 +1,4 @@
1# Firejail profile alias for Visual Studio Code 1# Firejail profile alias for VSCodium
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
4include vscodium.local 4include vscodium.local
@@ -7,6 +7,8 @@ include vscodium.local
7#include globals.local 7#include globals.local
8 8
9noblacklist ${HOME}/.VSCodium 9noblacklist ${HOME}/.VSCodium
10noblacklist ${HOME}/.config/VSCodium
11noblacklist ${HOME}/.vscode-oss
10 12
11# Redirect 13# Redirect
12include code.profile 14include code.profile
diff --git a/etc/profile-m-z/vym.profile b/etc/profile-m-z/vym.profile
index 5421c4e4b..6632ccb6b 100644
--- a/etc/profile-m-z/vym.profile
+++ b/etc/profile-m-z/vym.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18caps.drop all 17caps.drop all
diff --git a/etc/profile-m-z/w3m.profile b/etc/profile-m-z/w3m.profile
index 131213ed2..c9e209142 100644
--- a/etc/profile-m-z/w3m.profile
+++ b/etc/profile-m-z/w3m.profile
@@ -17,18 +17,31 @@ noblacklist ${HOME}/.w3m
17blacklist /tmp/.X11-unix 17blacklist /tmp/.X11-unix
18blacklist ${RUNUSER}/wayland-* 18blacklist ${RUNUSER}/wayland-*
19 19
20# Allow /bin/sh (blacklisted by disable-shell.inc)
21include allow-bin-sh.inc
22
23# Allow perl (blacklisted by disable-interpreters.inc)
20include allow-perl.inc 24include allow-perl.inc
21 25
22include disable-common.inc 26include disable-common.inc
23include disable-devel.inc 27include disable-devel.inc
28include disable-exec.inc
24include disable-interpreters.inc 29include disable-interpreters.inc
25include disable-passwdmgr.inc
26include disable-programs.inc 30include disable-programs.inc
31include disable-shell.inc
27include disable-xdg.inc 32include disable-xdg.inc
28 33
34mkdir ${HOME}/.w3m
35whitelist /usr/share/w3m
36whitelist ${DOWNLOADS}
37whitelist ${HOME}/.w3m
29include whitelist-runuser-common.inc 38include whitelist-runuser-common.inc
39include whitelist-usr-share-common.inc
40include whitelist-var-common.inc
30 41
31caps.drop all 42caps.drop all
43ipc-namespace
44machine-id
32netfilter 45netfilter
33no3d 46no3d
34nodvd 47nodvd
@@ -45,8 +58,14 @@ seccomp
45shell none 58shell none
46tracelog 59tracelog
47 60
48# private-bin w3m 61disable-mnt
62private-bin perl,sh,w3m
49private-cache 63private-cache
50private-dev 64private-dev
51private-etc alternatives,ca-certificates,crypto-policies,pki,resolv.conf,ssl 65private-etc alternatives,ca-certificates,crypto-policies,ld.so.cache,ld.so.preload,mailcap,nsswitch.conf,pki,resolv.conf,ssl
52private-tmp 66private-tmp
67
68dbus-user none
69dbus-system none
70
71memory-deny-write-execute
diff --git a/etc/profile-m-z/warmux.profile b/etc/profile-m-z/warmux.profile
index 1227a202c..0a6f19b1e 100644
--- a/etc/profile-m-z/warmux.profile
+++ b/etc/profile-m-z/warmux.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
@@ -50,7 +49,7 @@ disable-mnt
50private-bin warmux 49private-bin warmux
51private-cache 50private-cache
52private-dev 51private-dev
53private-etc ca-certificates,crypto-policies,host.conf,hostname,hosts,machine-id,nsswitch.conf,pki,protocols,resolv.conf,rpc,services,ssl 52private-etc alternatives,ca-certificates,crypto-policies,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,machine-id,nsswitch.conf,pki,protocols,resolv.conf,rpc,services,ssl
54private-tmp 53private-tmp
55 54
56dbus-user none 55dbus-user none
diff --git a/etc/profile-m-z/warsow.profile b/etc/profile-m-z/warsow.profile
index e0cd3daad..2f818b733 100644
--- a/etc/profile-m-z/warsow.profile
+++ b/etc/profile-m-z/warsow.profile
@@ -11,11 +11,13 @@ ignore noexec ${HOME}
11noblacklist ${HOME}/.cache/warsow-2.1 11noblacklist ${HOME}/.cache/warsow-2.1
12noblacklist ${HOME}/.local/share/warsow-2.1 12noblacklist ${HOME}/.local/share/warsow-2.1
13 13
14# Allow /bin/sh (blacklisted by disable-shell.inc)
15include allow-bin-sh.inc
16
14include disable-common.inc 17include disable-common.inc
15include disable-devel.inc 18include disable-devel.inc
16include disable-exec.inc 19include disable-exec.inc
17include disable-interpreters.inc 20include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 21include disable-programs.inc
20include disable-shell.inc 22include disable-shell.inc
21include disable-xdg.inc 23include disable-xdg.inc
@@ -35,19 +37,18 @@ ipc-namespace
35netfilter 37netfilter
36nodvd 38nodvd
37nogroups 39nogroups
38noinput
39nonewprivs 40nonewprivs
40noroot 41noroot
41notv 42notv
42nou2f 43nou2f
43novideo 44novideo
44protocol unix,inet,inet6 45protocol unix,inet,inet6,netlink
45seccomp 46seccomp
46shell none 47shell none
47tracelog 48tracelog
48 49
49disable-mnt 50disable-mnt
50private-bin warsow 51private-bin basename,bash,dirname,sed,sh,uname,warsow
51private-cache 52private-cache
52private-dev 53private-dev
53private-tmp 54private-tmp
diff --git a/etc/profile-m-z/warzone2100.profile b/etc/profile-m-z/warzone2100.profile
index 420e8927e..5519c3c1e 100644
--- a/etc/profile-m-z/warzone2100.profile
+++ b/etc/profile-m-z/warzone2100.profile
@@ -7,20 +7,22 @@ include warzone2100.local
7include globals.local 7include globals.local
8 8
9noblacklist ${HOME}/.warzone2100-3.* 9noblacklist ${HOME}/.warzone2100-3.*
10noblacklist ${HOME}/.local/share/warzone2100-3.*
10 11
11include disable-common.inc 12include disable-common.inc
12include disable-devel.inc 13include disable-devel.inc
13include disable-exec.inc 14include disable-exec.inc
14include disable-interpreters.inc 15include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 16include disable-programs.inc
17include disable-shell.inc 17#include disable-shell.inc - problems on Debian 11
18 18
19mkdir ${HOME}/.warzone2100-3.1 19mkdir ${HOME}/.warzone2100-3.1
20mkdir ${HOME}/.warzone2100-3.2 20mkdir ${HOME}/.warzone2100-3.2
21whitelist ${HOME}/.local/share/warzone2100-3.3.0 # config dir moved under .local/share
21whitelist ${HOME}/.warzone2100-3.1 22whitelist ${HOME}/.warzone2100-3.1
22whitelist ${HOME}/.warzone2100-3.2 23whitelist ${HOME}/.warzone2100-3.2
23whitelist /usr/share/games 24whitelist /usr/share/games
25whitelist /usr/share/gdm
24include whitelist-common.inc 26include whitelist-common.inc
25include whitelist-runuser-common.inc 27include whitelist-runuser-common.inc
26include whitelist-usr-share-common.inc 28include whitelist-usr-share-common.inc
@@ -43,6 +45,6 @@ shell none
43tracelog 45tracelog
44 46
45disable-mnt 47disable-mnt
46private-bin warzone2100 48private-bin bash,dash,sh,warzone2100,which
47private-dev 49private-dev
48private-tmp 50private-tmp
diff --git a/etc/profile-m-z/webstorm.profile b/etc/profile-m-z/webstorm.profile
index 69e96d0cd..4d849c582 100644
--- a/etc/profile-m-z/webstorm.profile
+++ b/etc/profile-m-z/webstorm.profile
@@ -24,7 +24,6 @@ noblacklist ${HOME}/.nvm
24include disable-common.inc 24include disable-common.inc
25include disable-devel.inc 25include disable-devel.inc
26include disable-interpreters.inc 26include disable-interpreters.inc
27include disable-passwdmgr.inc
28include disable-programs.inc 27include disable-programs.inc
29 28
30caps.drop all 29caps.drop all
diff --git a/etc/profile-m-z/webui-aria2.profile b/etc/profile-m-z/webui-aria2.profile
index d5a998f35..2fe727b9c 100644
--- a/etc/profile-m-z/webui-aria2.profile
+++ b/etc/profile-m-z/webui-aria2.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-xdg.inc 16include disable-xdg.inc
18 17
diff --git a/etc/profile-m-z/weechat-curses.profile b/etc/profile-m-z/weechat-curses.profile
index 92c968fb6..3e84375a7 100644
--- a/etc/profile-m-z/weechat-curses.profile
+++ b/etc/profile-m-z/weechat-curses.profile
@@ -1,5 +1,6 @@
1# Firejail profile alias for weechat 1# Firejail profile alias for weechat
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 weechat-curses.local 5include weechat-curses.local
5# Persistent global definitions 6# Persistent global definitions
diff --git a/etc/profile-m-z/weechat.profile b/etc/profile-m-z/weechat.profile
index 3a93d2ec7..07babd502 100644
--- a/etc/profile-m-z/weechat.profile
+++ b/etc/profile-m-z/weechat.profile
@@ -1,6 +1,7 @@
1# Firejail profile for weechat 1# Firejail profile for weechat
2# Description: Fast, light and extensible chat client 2# Description: Fast, light and extensible chat client
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 weechat.local 6include weechat.local
6# Persistent global definitions 7# Persistent global definitions
@@ -11,6 +12,7 @@ noblacklist ${HOME}/.weechat
11include disable-common.inc 12include disable-common.inc
12include disable-programs.inc 13include disable-programs.inc
13 14
15whitelist /usr/share/weechat
14include whitelist-usr-share-common.inc 16include whitelist-usr-share-common.inc
15include whitelist-var-common.inc 17include whitelist-var-common.inc
16 18
diff --git a/etc/profile-m-z/wesnoth.profile b/etc/profile-m-z/wesnoth.profile
index 199b3c6f0..345b26a2c 100644
--- a/etc/profile-m-z/wesnoth.profile
+++ b/etc/profile-m-z/wesnoth.profile
@@ -13,7 +13,6 @@ noblacklist ${HOME}/.local/share/wesnoth
13include disable-common.inc 13include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18 17
19mkdir ${HOME}/.cache/wesnoth 18mkdir ${HOME}/.cache/wesnoth
diff --git a/etc/profile-m-z/wget.profile b/etc/profile-m-z/wget.profile
index 53c4711bd..4c21d6965 100644
--- a/etc/profile-m-z/wget.profile
+++ b/etc/profile-m-z/wget.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-shell.inc 22include disable-shell.inc
24# Depending on workflow you can add the next line to your wget.local. 23# Depending on workflow you can add the next line to your wget.local.
diff --git a/etc/profile-m-z/wget2.profile b/etc/profile-m-z/wget2.profile
new file mode 100644
index 000000000..18918c6af
--- /dev/null
+++ b/etc/profile-m-z/wget2.profile
@@ -0,0 +1,19 @@
1# Firejail profile for wget2
2# Description: Updated version of the popular wget URL retrieval tool
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include wget2.local
7# Persistent global definitions
8# added by included profile
9#include globals.local
10
11noblacklist ${HOME}/.config/wget
12ignore noblacklist ${HOME}/.wgetrc
13
14private-bin wget2
15# Depending on workflow you can add the next line to your wget2.local.
16#private-etc wget2rc
17
18# Redirect
19include wget.profile
diff --git a/etc/profile-m-z/whalebird.profile b/etc/profile-m-z/whalebird.profile
index 22a84274d..92ebebdae 100644
--- a/etc/profile-m-z/whalebird.profile
+++ b/etc/profile-m-z/whalebird.profile
@@ -20,8 +20,8 @@ whitelist ${HOME}/.config/Whalebird
20 20
21no3d 21no3d
22 22
23private-bin whalebird 23private-bin electron,electron[0-9],electron[0-9][0-9],whalebird
24private-etc fonts,machine-id 24private-etc alternatives,fonts,ld.so.cache,ld.so.preload,machine-id
25 25
26# Redirect 26# Redirect
27include electron.profile 27include electron.profile
diff --git a/etc/profile-m-z/whois.profile b/etc/profile-m-z/whois.profile
index 93871a5a4..afff6f587 100644
--- a/etc/profile-m-z/whois.profile
+++ b/etc/profile-m-z/whois.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
@@ -48,7 +47,7 @@ private
48private-bin bash,sh,whois 47private-bin bash,sh,whois
49private-cache 48private-cache
50private-dev 49private-dev
51private-etc alternatives,hosts,jwhois.conf,resolv.conf,services,whois.conf 50private-etc alternatives,hosts,jwhois.conf,ld.so.cache,ld.so.preload,resolv.conf,services,whois.conf
52private-lib gconv 51private-lib gconv
53private-tmp 52private-tmp
54 53
diff --git a/etc/profile-m-z/widelands.profile b/etc/profile-m-z/widelands.profile
index 0dc26b11d..6561be784 100644
--- a/etc/profile-m-z/widelands.profile
+++ b/etc/profile-m-z/widelands.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
diff --git a/etc/profile-m-z/wine.profile b/etc/profile-m-z/wine.profile
index 0ea24aafd..f30fc971f 100644
--- a/etc/profile-m-z/wine.profile
+++ b/etc/profile-m-z/wine.profile
@@ -6,6 +6,7 @@ include wine.local
6# Persistent global definitions 6# Persistent global definitions
7include globals.local 7include globals.local
8 8
9noblacklist ${HOME}/.cache/wine
9noblacklist ${HOME}/.cache/winetricks 10noblacklist ${HOME}/.cache/winetricks
10noblacklist ${HOME}/.Steam 11noblacklist ${HOME}/.Steam
11noblacklist ${HOME}/.local/share/Steam 12noblacklist ${HOME}/.local/share/Steam
@@ -17,7 +18,6 @@ noblacklist /tmp/.wine-*
17include disable-common.inc 18include disable-common.inc
18include disable-devel.inc 19include disable-devel.inc
19include disable-interpreters.inc 20include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 21include disable-programs.inc
22 22
23# whitelist /usr/share/wine 23# whitelist /usr/share/wine
diff --git a/etc/profile-m-z/wire-desktop.profile b/etc/profile-m-z/wire-desktop.profile
index 151cd2adb..d8742cd71 100644
--- a/etc/profile-m-z/wire-desktop.profile
+++ b/etc/profile-m-z/wire-desktop.profile
@@ -26,7 +26,7 @@ mkdir ${HOME}/.config/Wire
26whitelist ${HOME}/.config/Wire 26whitelist ${HOME}/.config/Wire
27 27
28private-bin bash,electron,electron[0-9],electron[0-9][0-9],env,sh,wire-desktop 28private-bin bash,electron,electron[0-9],electron[0-9][0-9],env,sh,wire-desktop
29private-etc alternatives,ca-certificates,crypto-policies,fonts,machine-id,pki,resolv.conf,ssl 29private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.preload,machine-id,pki,resolv.conf,ssl
30 30
31# Redirect 31# Redirect
32include electron.profile 32include electron.profile
diff --git a/etc/profile-m-z/wireshark.profile b/etc/profile-m-z/wireshark.profile
index 1824026a8..c336efb86 100644
--- a/etc/profile-m-z/wireshark.profile
+++ b/etc/profile-m-z/wireshark.profile
@@ -17,7 +17,6 @@ include disable-common.inc
17include disable-devel.inc 17include disable-devel.inc
18include disable-exec.inc 18include disable-exec.inc
19include disable-interpreters.inc 19include disable-interpreters.inc
20include disable-passwdmgr.inc
21include disable-programs.inc 20include disable-programs.inc
22include disable-xdg.inc 21include disable-xdg.inc
23 22
@@ -27,7 +26,7 @@ include whitelist-var-common.inc
27 26
28apparmor 27apparmor
29# caps.drop all 28# caps.drop all
30caps.keep dac_override,net_admin,net_raw 29caps.keep dac_override,dac_read_search,net_admin,net_raw
31netfilter 30netfilter
32no3d 31no3d
33# nogroups - breaks network traffic capture for unprivileged users 32# nogroups - breaks network traffic capture for unprivileged users
@@ -46,7 +45,9 @@ tracelog
46 45
47# private-bin wireshark 46# private-bin wireshark
48private-cache 47private-cache
49private-dev 48# private-dev prevents (some) interfaces from being shown.
49# Add the below line to your wirehsark.local if you only want to inspect pcap files.
50#private-dev
50# private-etc alternatives,ca-certificates,crypto-policies,fonts,group,hosts,machine-id,passwd,pki,ssl 51# private-etc alternatives,ca-certificates,crypto-policies,fonts,group,hosts,machine-id,passwd,pki,ssl
51private-tmp 52private-tmp
52 53
diff --git a/etc/profile-m-z/wordwarvi.profile b/etc/profile-m-z/wordwarvi.profile
index 9c724a5d2..3147c2ac3 100644
--- a/etc/profile-m-z/wordwarvi.profile
+++ b/etc/profile-m-z/wordwarvi.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -46,7 +45,7 @@ private
46private-bin wordwarvi 45private-bin wordwarvi
47private-cache 46private-cache
48private-dev 47private-dev
49private-etc alsa,asound.conf,machine-id,pulse 48private-etc alsa,alternatives,asound.conf,ld.so.cache,ld.so.preload,machine-id,pulse
50private-tmp 49private-tmp
51 50
52dbus-user none 51dbus-user none
diff --git a/etc/profile-m-z/wps.profile b/etc/profile-m-z/wps.profile
index a44b6490e..cb0301378 100644
--- a/etc/profile-m-z/wps.profile
+++ b/etc/profile-m-z/wps.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19 18
20include whitelist-usr-share-common.inc 19include whitelist-usr-share-common.inc
diff --git a/etc/profile-m-z/x2goclient.profile b/etc/profile-m-z/x2goclient.profile
index 557f07cd9..3fcac351d 100644
--- a/etc/profile-m-z/x2goclient.profile
+++ b/etc/profile-m-z/x2goclient.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22apparmor 21apparmor
diff --git a/etc/profile-m-z/xbill.profile b/etc/profile-m-z/xbill.profile
index 384f76acc..bb119996c 100644
--- a/etc/profile-m-z/xbill.profile
+++ b/etc/profile-m-z/xbill.profile
@@ -10,7 +10,6 @@ include disable-common.inc
10include disable-devel.inc 10include disable-devel.inc
11include disable-exec.inc 11include disable-exec.inc
12include disable-interpreters.inc 12include disable-interpreters.inc
13include disable-passwdmgr.inc
14include disable-programs.inc 13include disable-programs.inc
15include disable-shell.inc 14include disable-shell.inc
16include disable-xdg.inc 15include disable-xdg.inc
@@ -45,7 +44,7 @@ private
45private-bin xbill 44private-bin xbill
46private-cache 45private-cache
47private-dev 46private-dev
48private-etc none 47private-etc alternatives,ld.so.cache,ld.so.preload
49private-tmp 48private-tmp
50 49
51dbus-user none 50dbus-user none
diff --git a/etc/profile-m-z/xcalc.profile b/etc/profile-m-z/xcalc.profile
index 7fb483289..3f8aa2d34 100644
--- a/etc/profile-m-z/xcalc.profile
+++ b/etc/profile-m-z/xcalc.profile
@@ -9,7 +9,6 @@ include disable-common.inc
9include disable-devel.inc 9include disable-devel.inc
10include disable-exec.inc 10include disable-exec.inc
11include disable-interpreters.inc 11include disable-interpreters.inc
12include disable-passwdmgr.inc
13include disable-programs.inc 12include disable-programs.inc
14include disable-shell.inc 13include disable-shell.inc
15include disable-xdg.inc 14include disable-xdg.inc
diff --git a/etc/profile-m-z/xed.profile b/etc/profile-m-z/xed.profile
index 4a3022e83..26383bda3 100644
--- a/etc/profile-m-z/xed.profile
+++ b/etc/profile-m-z/xed.profile
@@ -18,7 +18,6 @@ include disable-common.inc
18include disable-devel.inc 18include disable-devel.inc
19include disable-exec.inc 19include disable-exec.inc
20include disable-interpreters.inc 20include disable-interpreters.inc
21include disable-passwdmgr.inc
22include disable-programs.inc 21include disable-programs.inc
23include disable-shell.inc 22include disable-shell.inc
24 23
diff --git a/etc/profile-m-z/xfburn.profile b/etc/profile-m-z/xfburn.profile
index cd9561e74..91e25048d 100644
--- a/etc/profile-m-z/xfburn.profile
+++ b/etc/profile-m-z/xfburn.profile
@@ -11,7 +11,6 @@ noblacklist ${HOME}/.config/xfburn
11include disable-common.inc 11include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16 15
17caps.drop all 16caps.drop all
diff --git a/etc/profile-m-z/xfce4-dict.profile b/etc/profile-m-z/xfce4-dict.profile
index ecd321c7e..fcfec10d0 100644
--- a/etc/profile-m-z/xfce4-dict.profile
+++ b/etc/profile-m-z/xfce4-dict.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17 16
18include whitelist-var-common.inc 17include whitelist-var-common.inc
diff --git a/etc/profile-m-z/xfce4-mixer.profile b/etc/profile-m-z/xfce4-mixer.profile
index bb38dbebd..386ef2bd6 100644
--- a/etc/profile-m-z/xfce4-mixer.profile
+++ b/etc/profile-m-z/xfce4-mixer.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -47,7 +46,7 @@ disable-mnt
47private-bin xfce4-mixer,xfconf-query 46private-bin xfce4-mixer,xfconf-query
48private-cache 47private-cache
49private-dev 48private-dev
50private-etc alternatives,asound.conf,fonts,machine-id,pulse 49private-etc alternatives,asound.conf,fonts,ld.so.cache,ld.so.preload,machine-id,pulse
51private-tmp 50private-tmp
52 51
53dbus-user filter 52dbus-user filter
diff --git a/etc/profile-m-z/xfce4-notes.profile b/etc/profile-m-z/xfce4-notes.profile
index ebfb4333c..5004b8fb6 100644
--- a/etc/profile-m-z/xfce4-notes.profile
+++ b/etc/profile-m-z/xfce4-notes.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19 18
20include whitelist-var-common.inc 19include whitelist-var-common.inc
diff --git a/etc/profile-m-z/xfce4-screenshooter.profile b/etc/profile-m-z/xfce4-screenshooter.profile
index b1e5bafbf..d74ed5754 100644
--- a/etc/profile-m-z/xfce4-screenshooter.profile
+++ b/etc/profile-m-z/xfce4-screenshooter.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -43,7 +42,7 @@ tracelog
43disable-mnt 42disable-mnt
44private-bin xfce4-screenshooter,xfconf-query 43private-bin xfce4-screenshooter,xfconf-query
45private-dev 44private-dev
46private-etc ca-certificates,crypto-policies,dconf,fonts,gtk-3.0,pki,resolv.conf,ssl 45private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gtk-3.0,ld.so.cache,ld.so.preload,pki,resolv.conf,ssl
47private-tmp 46private-tmp
48 47
49dbus-user none 48dbus-user none
diff --git a/etc/profile-m-z/xiphos.profile b/etc/profile-m-z/xiphos.profile
index 81d98db7a..c7fd0799b 100644
--- a/etc/profile-m-z/xiphos.profile
+++ b/etc/profile-m-z/xiphos.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-shell.inc 19include disable-shell.inc
21 20
@@ -48,5 +47,5 @@ disable-mnt
48private-bin xiphos 47private-bin xiphos
49private-cache 48private-cache
50private-dev 49private-dev
51private-etc alternatives,ca-certificates,crypto-policies,fonts,pki,resolv.conf,ssli,sword,sword.conf 50private-etc alternatives,ca-certificates,crypto-policies,fonts,ld.so.cache,ld.so.preload,pki,resolv.conf,ssli,sword,sword.conf
52private-tmp 51private-tmp
diff --git a/etc/profile-m-z/xlinks.profile b/etc/profile-m-z/xlinks.profile
index 7987af280..404baf607 100644
--- a/etc/profile-m-z/xlinks.profile
+++ b/etc/profile-m-z/xlinks.profile
@@ -8,14 +8,13 @@ include xlinks.local
8#include globals.local 8#include globals.local
9 9
10noblacklist /tmp/.X11-unix 10noblacklist /tmp/.X11-unix
11noblacklist ${HOME}/.links
12 11
13include whitelist-common.inc 12include whitelist-common.inc
14 13
15# if you want to use user-configured programs add 'private-bin PROGRAM1,PROGRAM2' 14# if you want to use user-configured programs add 'private-bin PROGRAM1,PROGRAM2'
16# to your xlinks.local or append 'PROGRAM1,PROGRAM2' to this private-bin line 15# to your xlinks.local or append 'PROGRAM1,PROGRAM2' to this private-bin line
17private-bin xlinks 16private-bin xlinks
18private-etc fonts 17private-etc alternatives,fonts,ld.so.cache,ld.so.preload
19 18
20# Redirect 19# Redirect
21include links.profile 20include links.profile
diff --git a/etc/profile-m-z/xlinks2 b/etc/profile-m-z/xlinks2
new file mode 100644
index 000000000..d7edd3543
--- /dev/null
+++ b/etc/profile-m-z/xlinks2
@@ -0,0 +1,20 @@
1# Firejail profile for xlinks2
2# Description: Text WWW browser (X11)
3# This file is overwritten after every install/update
4# Persistent local customizations
5include xlinks2.local
6# Persistent global definitions
7# added by included profile
8#include globals.local
9
10noblacklist /tmp/.X11-unix
11
12include whitelist-common.inc
13
14# if you want to use user-configured programs add 'private-bin PROGRAM1,PROGRAM2'
15# to your xlinks.local or append 'PROGRAM1,PROGRAM2' to this private-bin line
16private-bin xlinks2
17private-etc alternatives,fonts,ld.so.cache,ld.so.preload
18
19# Redirect
20include links2.profile
diff --git a/etc/profile-m-z/xmms.profile b/etc/profile-m-z/xmms.profile
index 25261d925..4003f69a2 100644
--- a/etc/profile-m-z/xmms.profile
+++ b/etc/profile-m-z/xmms.profile
@@ -11,7 +11,6 @@ noblacklist ${MUSIC}
11include disable-common.inc 11include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-shell.inc 15include disable-shell.inc
17include disable-xdg.inc 16include disable-xdg.inc
diff --git a/etc/profile-m-z/xmr-stak.profile b/etc/profile-m-z/xmr-stak.profile
index e7020f36b..e541436a4 100644
--- a/etc/profile-m-z/xmr-stak.profile
+++ b/etc/profile-m-z/xmr-stak.profile
@@ -11,7 +11,6 @@ include disable-common.inc
11include disable-devel.inc 11include disable-devel.inc
12include disable-exec.inc 12include disable-exec.inc
13include disable-interpreters.inc 13include disable-interpreters.inc
14include disable-passwdmgr.inc
15include disable-programs.inc 14include disable-programs.inc
16include disable-shell.inc 15include disable-shell.inc
17include disable-xdg.inc 16include disable-xdg.inc
@@ -39,7 +38,7 @@ disable-mnt
39private ${HOME}/.xmr-stak 38private ${HOME}/.xmr-stak
40private-bin xmr-stak 39private-bin xmr-stak
41private-dev 40private-dev
42private-etc alternatives,ca-certificates,crypto-policies,nsswitch.conf,pki,resolv.conf,ssl 41private-etc alternatives,ca-certificates,crypto-policies,ld.so.cache,ld.so.preload,nsswitch.conf,pki,resolv.conf,ssl
43#private-lib libxmrstak_opencl_backend,libxmrstak_cuda_backend 42#private-lib libxmrstak_opencl_backend,libxmrstak_cuda_backend
44private-opt cuda 43private-opt cuda
45private-tmp 44private-tmp
diff --git a/etc/profile-m-z/xonotic.profile b/etc/profile-m-z/xonotic.profile
index 53c9a0a08..7c2b38d1d 100644
--- a/etc/profile-m-z/xonotic.profile
+++ b/etc/profile-m-z/xonotic.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20include disable-shell.inc 19include disable-shell.inc
21include disable-xdg.inc 20include disable-xdg.inc
@@ -33,7 +32,6 @@ caps.drop all
33netfilter 32netfilter
34nodvd 33nodvd
35nogroups 34nogroups
36noinput
37nonewprivs 35nonewprivs
38noroot 36noroot
39notv 37notv
diff --git a/etc/profile-m-z/xournal.profile b/etc/profile-m-z/xournal.profile
index c4f092d50..a0e77b4e7 100644
--- a/etc/profile-m-z/xournal.profile
+++ b/etc/profile-m-z/xournal.profile
@@ -12,7 +12,6 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
@@ -44,7 +43,7 @@ tracelog
44private-bin xournal 43private-bin xournal
45private-cache 44private-cache
46private-dev 45private-dev
47private-etc alternatives,fonts,group,machine-id,passwd 46private-etc alternatives,fonts,group,ld.so.cache,ld.so.preload,machine-id,passwd
48# TODO should use private-lib 47# TODO should use private-lib
49private-tmp 48private-tmp
50 49
diff --git a/etc/profile-m-z/xournalpp.profile b/etc/profile-m-z/xournalpp.profile
index 988b878b9..a23ad68df 100644
--- a/etc/profile-m-z/xournalpp.profile
+++ b/etc/profile-m-z/xournalpp.profile
@@ -7,6 +7,8 @@ include xournalpp.local
7# added by included profile 7# added by included profile
8#include globals.local 8#include globals.local
9 9
10noblacklist ${HOME}/.cache/xournalpp
11noblacklist ${HOME}/.config/xournalpp
10noblacklist ${HOME}/.xournalpp 12noblacklist ${HOME}/.xournalpp
11 13
12include allow-lua.inc 14include allow-lua.inc
@@ -16,14 +18,17 @@ whitelist /usr/share/xournalpp
16whitelist /var/lib/texmf 18whitelist /var/lib/texmf
17include whitelist-runuser-common.inc 19include whitelist-runuser-common.inc
18 20
19#mkdir ${HOME}/.xournalpp 21#mkdir ${HOME}/.cache/xournalpp
22#mkdir ${HOME}/.config/xournalpp
23#whitelist ${HOME}/.cache/xournalpp
24#whitelist ${HOME}/.config/xournalpp
20#whitelist ${HOME}/.xournalpp 25#whitelist ${HOME}/.xournalpp
21#whitelist ${HOME}/.texlive20* 26#whitelist ${HOME}/.texlive20*
22#whitelist ${DOCUMENTS} 27#whitelist ${DOCUMENTS}
23#include whitelist-common.inc 28#include whitelist-common.inc
24 29
25private-bin kpsewhich,pdflatex,xournalpp 30private-bin kpsewhich,pdflatex,xournalpp
26private-etc latexmk.conf,texlive 31private-etc alternatives,latexmk.conf,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,texlive
27 32
28# Redirect 33# Redirect
29include xournal.profile 34include xournal.profile
diff --git a/etc/profile-m-z/xpdf.profile b/etc/profile-m-z/xpdf.profile
index 1447ec9a7..0149d36a3 100644
--- a/etc/profile-m-z/xpdf.profile
+++ b/etc/profile-m-z/xpdf.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
diff --git a/etc/profile-m-z/xplayer.profile b/etc/profile-m-z/xplayer.profile
index c3bb3292c..d1ea2c9d5 100644
--- a/etc/profile-m-z/xplayer.profile
+++ b/etc/profile-m-z/xplayer.profile
@@ -16,7 +16,6 @@ include disable-common.inc
16include disable-devel.inc 16include disable-devel.inc
17include disable-exec.inc 17include disable-exec.inc
18include disable-interpreters.inc 18include disable-interpreters.inc
19include disable-passwdmgr.inc
20include disable-programs.inc 19include disable-programs.inc
21 20
22read-only ${DESKTOP} 21read-only ${DESKTOP}
diff --git a/etc/profile-m-z/xpra.profile b/etc/profile-m-z/xpra.profile
index 6e409e1aa..aed6c102f 100644
--- a/etc/profile-m-z/xpra.profile
+++ b/etc/profile-m-z/xpra.profile
@@ -22,7 +22,6 @@ include allow-python3.inc
22include disable-common.inc 22include disable-common.inc
23include disable-devel.inc 23include disable-devel.inc
24include disable-interpreters.inc 24include disable-interpreters.inc
25include disable-passwdmgr.inc
26include disable-programs.inc 25include disable-programs.inc
27 26
28whitelist /var/lib/xkb 27whitelist /var/lib/xkb
diff --git a/etc/profile-m-z/xreader.profile b/etc/profile-m-z/xreader.profile
index 3ab35edfc..8b880426f 100644
--- a/etc/profile-m-z/xreader.profile
+++ b/etc/profile-m-z/xreader.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-xdg.inc 18include disable-xdg.inc
20 19
@@ -40,7 +39,7 @@ tracelog
40 39
41private-bin xreader,xreader-previewer,xreader-thumbnailer 40private-bin xreader,xreader-previewer,xreader-thumbnailer
42private-dev 41private-dev
43private-etc alternatives,fonts,ld.so.cache 42private-etc alternatives,fonts,ld.so.cache,ld.so.preload
44private-tmp 43private-tmp
45 44
46memory-deny-write-execute 45memory-deny-write-execute
diff --git a/etc/profile-m-z/xviewer.profile b/etc/profile-m-z/xviewer.profile
index 4d454f81c..5c8d6a47e 100644
--- a/etc/profile-m-z/xviewer.profile
+++ b/etc/profile-m-z/xviewer.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20 19
diff --git a/etc/profile-m-z/yandex-browser.profile b/etc/profile-m-z/yandex-browser.profile
index 81cd021f7..3ae6b1cf0 100644
--- a/etc/profile-m-z/yandex-browser.profile
+++ b/etc/profile-m-z/yandex-browser.profile
@@ -5,8 +5,7 @@ include yandex-browser.local
5# Persistent global definitions 5# Persistent global definitions
6include globals.local 6include globals.local
7 7
8# Disable for now, see https://www.tutorialspoint.com/difference-between-void-main-and-int-main-in-c-cplusplus 8# Disable for now, see https://github.com/netblue30/firejail/pull/3688#issuecomment-718711565
9ignore whitelist /usr/share/chromium
10ignore include whitelist-runuser-common.inc 9ignore include whitelist-runuser-common.inc
11ignore include whitelist-usr-share-common.inc 10ignore include whitelist-usr-share-common.inc
12 11
diff --git a/etc/profile-m-z/yarn.profile b/etc/profile-m-z/yarn.profile
index 360bd8442..05b55d071 100644
--- a/etc/profile-m-z/yarn.profile
+++ b/etc/profile-m-z/yarn.profile
@@ -6,25 +6,5 @@ include yarn.local
6# Persistent global definitions 6# Persistent global definitions
7include globals.local 7include globals.local
8 8
9ignore read-only ${HOME}/.yarnrc
10
11noblacklist ${HOME}/.yarn
12noblacklist ${HOME}/.yarn-config
13noblacklist ${HOME}/.yarncache
14noblacklist ${HOME}/.yarnrc
15
16# If you want whitelisting, change ${HOME}/Projects below to your yarn projects directory and
17# add the next lines to you yarn.local.
18#mkdir ${HOME}/.yarn
19#mkdir ${HOME}/.yarn-config
20#mkdir ${HOME}/.yarncache
21#mkfile ${HOME}/.yarnrc
22#whitelist ${HOME}/.yarn
23#whitelist ${HOME}/.yarn-config
24#whitelist ${HOME}/.yarncache
25#whitelist ${HOME}/.yarnrc
26#whitelist ${HOME}/Projects
27#include whitelist-common.inc
28
29# Redirect 9# Redirect
30include nodejs-common.profile 10include nodejs-common.profile
diff --git a/etc/profile-m-z/yelp.profile b/etc/profile-m-z/yelp.profile
index 93054bfed..31a51b2c4 100644
--- a/etc/profile-m-z/yelp.profile
+++ b/etc/profile-m-z/yelp.profile
@@ -12,13 +12,13 @@ include disable-common.inc
12include disable-devel.inc 12include disable-devel.inc
13include disable-exec.inc 13include disable-exec.inc
14include disable-interpreters.inc 14include disable-interpreters.inc
15include disable-passwdmgr.inc
16include disable-programs.inc 15include disable-programs.inc
17include disable-shell.inc 16include disable-shell.inc
18include disable-xdg.inc 17include disable-xdg.inc
19 18
20mkdir ${HOME}/.config/yelp 19mkdir ${HOME}/.config/yelp
21whitelist ${HOME}/.config/yelp 20whitelist ${HOME}/.config/yelp
21whitelist /usr/libexec/webkit2gtk-4.0
22whitelist /usr/share/doc 22whitelist /usr/share/doc
23whitelist /usr/share/groff 23whitelist /usr/share/groff
24whitelist /usr/share/help 24whitelist /usr/share/help
@@ -56,7 +56,7 @@ disable-mnt
56private-bin groff,man,tbl,troff,yelp 56private-bin groff,man,tbl,troff,yelp
57private-cache 57private-cache
58private-dev 58private-dev
59private-etc alsa,alternatives,asound.conf,crypto-policies,cups,dconf,drirc,fonts,gcrypt,groff,gtk-3.0,machine-id,man_db.conf,openal,os-release,pulse,sgml,xml 59private-etc alsa,alternatives,asound.conf,crypto-policies,cups,dconf,drirc,fonts,gcrypt,groff,gtk-3.0,ld.so.cache,ld.so.preload,machine-id,man_db.conf,openal,os-release,pulse,sgml,xml
60private-tmp 60private-tmp
61 61
62dbus-user filter 62dbus-user filter
diff --git a/etc/profile-m-z/youtube-dl-gui.profile b/etc/profile-m-z/youtube-dl-gui.profile
index b52271a2c..94f37a92b 100644
--- a/etc/profile-m-z/youtube-dl-gui.profile
+++ b/etc/profile-m-z/youtube-dl-gui.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
@@ -50,7 +49,7 @@ disable-mnt
50private-bin atomicparsley,ffmpeg,ffprobe,python*,youtube-dl-gui 49private-bin atomicparsley,ffmpeg,ffprobe,python*,youtube-dl-gui
51private-cache 50private-cache
52private-dev 51private-dev
53private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gtk-2.0,gtk-3.0,hostname,hosts,ld.so.cache,locale,locale.conf,passwd,pki,resolv.conf,ssl 52private-etc alternatives,ca-certificates,crypto-policies,dconf,fonts,gtk-2.0,gtk-3.0,hostname,hosts,ld.so.cache,ld.so.preload,locale,locale.conf,passwd,pki,resolv.conf,ssl
54private-tmp 53private-tmp
55 54
56dbus-user none 55dbus-user none
diff --git a/etc/profile-m-z/youtube-dl.profile b/etc/profile-m-z/youtube-dl.profile
index 24c4d6db3..71e50ab11 100644
--- a/etc/profile-m-z/youtube-dl.profile
+++ b/etc/profile-m-z/youtube-dl.profile
@@ -27,7 +27,6 @@ include disable-common.inc
27include disable-devel.inc 27include disable-devel.inc
28include disable-exec.inc 28include disable-exec.inc
29include disable-interpreters.inc 29include disable-interpreters.inc
30include disable-passwdmgr.inc
31include disable-programs.inc 30include disable-programs.inc
32include disable-shell.inc 31include disable-shell.inc
33include disable-xdg.inc 32include disable-xdg.inc
@@ -59,7 +58,7 @@ tracelog
59private-bin env,ffmpeg,python*,youtube-dl 58private-bin env,ffmpeg,python*,youtube-dl
60private-cache 59private-cache
61private-dev 60private-dev
62private-etc alternatives,ca-certificates,crypto-policies,hostname,hosts,ld.so.cache,mime.types,pki,resolv.conf,ssl,youtube-dl.conf 61private-etc alternatives,ca-certificates,crypto-policies,hostname,hosts,ld.so.cache,ld.so.preload,mime.types,pki,resolv.conf,ssl,youtube-dl.conf
63private-tmp 62private-tmp
64 63
65dbus-user none 64dbus-user none
diff --git a/etc/profile-m-z/youtube-viewer.profile b/etc/profile-m-z/youtube-viewer.profile
index 7d6e9b0eb..825599fcc 100644
--- a/etc/profile-m-z/youtube-viewer.profile
+++ b/etc/profile-m-z/youtube-viewer.profile
@@ -10,51 +10,12 @@ include globals.local
10noblacklist ${HOME}/.cache/youtube-viewer 10noblacklist ${HOME}/.cache/youtube-viewer
11noblacklist ${HOME}/.config/youtube-viewer 11noblacklist ${HOME}/.config/youtube-viewer
12 12
13# Allow perl (blacklisted by disable-interpreters.inc)
14include allow-perl.inc
15
16# Allow python (blacklisted by disable-interpreters.inc)
17include allow-python2.inc
18include allow-python3.inc
19
20include disable-common.inc
21include disable-devel.inc
22include disable-exec.inc
23include disable-interpreters.inc
24include disable-passwdmgr.inc
25include disable-programs.inc
26include disable-xdg.inc
27
28mkdir ${HOME}/.cache/youtube-viewer 13mkdir ${HOME}/.cache/youtube-viewer
29mkdir ${HOME}/.config/youtube-viewer 14mkdir ${HOME}/.config/youtube-viewer
30whitelist ${HOME}/.cache/youtube-viewer 15whitelist ${HOME}/.cache/youtube-viewer
31whitelist ${HOME}/.config/youtube-viewer 16whitelist ${HOME}/.config/youtube-viewer
32include whitelist-common.inc
33include whitelist-usr-share-common.inc
34include whitelist-var-common.inc
35
36apparmor
37caps.drop all
38netfilter
39nodvd
40nogroups
41noinput
42nonewprivs
43noroot
44notv
45nou2f
46novideo
47protocol unix,inet,inet6
48seccomp
49shell none
50tracelog
51 17
52disable-mnt 18private-bin gtk-youtube-viewer,gtk2-youtube-viewer,gtk3-youtube-viewer,youtube-viewer
53private-bin ffmpeg,ffprobe,firefox,gtk-youtube-viewer,gtk2-youtube-viewer,gtk3-youtube-viewer,mpv,python*,sh,smplayer,stty,vlc,which,youtube-dl,youtube-viewer
54private-cache
55private-dev
56private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,machine-id,mime.types,nsswitch.conf,passwd,pki,pulse,resolv.conf,ssl,X11,xdg
57private-tmp
58 19
59dbus-user none 20# Redirect
60dbus-system none 21include youtube-viewers-common.profile
diff --git a/etc/profile-m-z/youtube-viewers-common.profile b/etc/profile-m-z/youtube-viewers-common.profile
new file mode 100644
index 000000000..f212a6721
--- /dev/null
+++ b/etc/profile-m-z/youtube-viewers-common.profile
@@ -0,0 +1,60 @@
1# Firejail profile for youtube-viewer clones
2# Description: common profile for Trizen's Youtube viewers
3# This file is overwritten after every install/update
4# Persistent local customizations
5include youtube-viewers-common.local
6# Persistent global definitions
7# added by caller profile
8#include globals.local
9
10noblacklist ${HOME}/.cache/youtube-dl
11
12# Allow lua (blacklisted by disable-interpreters.inc)
13include allow-lua.inc
14
15# Allow perl (blacklisted by disable-interpreters.inc)
16include allow-perl.inc
17
18# Allow python (blacklisted by disable-interpreters.inc)
19include allow-python2.inc
20include allow-python3.inc
21
22include disable-common.inc
23include disable-devel.inc
24include disable-exec.inc
25include disable-interpreters.inc
26include disable-programs.inc
27include disable-xdg.inc
28
29whitelist ${DOWNLOADS}
30whitelist ${HOME}/.cache/youtube-dl/youtube-sigfuncs
31include whitelist-common.inc
32include whitelist-runuser-common.inc
33include whitelist-usr-share-common.inc
34include whitelist-var-common.inc
35
36apparmor
37caps.drop all
38netfilter
39nodvd
40nogroups
41noinput
42nonewprivs
43noroot
44notv
45nou2f
46novideo
47protocol unix,inet,inet6
48seccomp
49shell none
50tracelog
51
52disable-mnt
53private-bin bash,ffmpeg,ffprobe,firefox,mpv,perl,python*,sh,smplayer,stty,wget,wget2,which,xterm,youtube-dl,yt-dlp
54private-cache
55private-dev
56private-etc alsa,alternatives,asound.conf,ca-certificates,crypto-policies,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,machine-id,mime.types,nsswitch.conf,passwd,pki,pulse,resolv.conf,ssl,X11,xdg
57private-tmp
58
59dbus-user none
60dbus-system none
diff --git a/etc/profile-m-z/youtube.profile b/etc/profile-m-z/youtube.profile
index ad7ceaee4..5c4d697da 100644
--- a/etc/profile-m-z/youtube.profile
+++ b/etc/profile-m-z/youtube.profile
@@ -16,8 +16,8 @@ include disable-shell.inc
16mkdir ${HOME}/.config/Youtube 16mkdir ${HOME}/.config/Youtube
17whitelist ${HOME}/.config/Youtube 17whitelist ${HOME}/.config/Youtube
18 18
19private-bin youtube 19private-bin electron,electron[0-9],electron[0-9][0-9],youtube
20private-etc alsa,alternatives,asound.conf,ati,bumblebee,ca-certificates,crypto-policies,drirc,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,mime.types,nsswitch.conf,nvidia,pki,pulse,resolv.conf,selinux,ssl,X11,xdg 20private-etc alsa,alternatives,asound.conf,ati,bumblebee,ca-certificates,crypto-policies,drirc,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,mime.types,nsswitch.conf,nvidia,pki,pulse,resolv.conf,selinux,ssl,X11,xdg
21private-opt Youtube 21private-opt Youtube
22 22
23# Redirect 23# Redirect
diff --git a/etc/profile-m-z/youtubemusic-nativefier.profile b/etc/profile-m-z/youtubemusic-nativefier.profile
index 74b0e38b9..2b5ffeaaf 100644
--- a/etc/profile-m-z/youtubemusic-nativefier.profile
+++ b/etc/profile-m-z/youtubemusic-nativefier.profile
@@ -13,8 +13,8 @@ include disable-shell.inc
13mkdir ${HOME}/.config/youtubemusic-nativefier-040164 13mkdir ${HOME}/.config/youtubemusic-nativefier-040164
14whitelist ${HOME}/.config/youtubemusic-nativefier-040164 14whitelist ${HOME}/.config/youtubemusic-nativefier-040164
15 15
16private-bin youtubemusic-nativefier 16private-bin electron,electron[0-9],electron[0-9][0-9],youtubemusic-nativefier
17private-etc alsa,alternatives,asound.conf,ati,bumblebee,ca-certificates,crypto-policies,drirc,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,mime.types,nsswitch.conf,nvidia,pki,pulse,resolv.conf,selinux,ssl,X11,xdg 17private-etc alsa,alternatives,asound.conf,ati,bumblebee,ca-certificates,crypto-policies,drirc,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,mime.types,nsswitch.conf,nvidia,pki,pulse,resolv.conf,selinux,ssl,X11,xdg
18private-opt youtubemusic-nativefier 18private-opt youtubemusic-nativefier
19 19
20# Redirect 20# Redirect
diff --git a/etc/profile-m-z/yt-dlp.profile b/etc/profile-m-z/yt-dlp.profile
new file mode 100644
index 000000000..6e835b03f
--- /dev/null
+++ b/etc/profile-m-z/yt-dlp.profile
@@ -0,0 +1,21 @@
1# Firejail profile for yt-dlp
2# Description: Downloader of videos of various sites
3# This file is overwritten after every install/update
4quiet
5# Persistent local customizations
6include yt-dlp.local
7# Persistent global definitions
8# added by included profile
9#include globals.local
10
11noblacklist ${HOME}/.cache/yt-dlp
12noblacklist ${HOME}/.config/yt-dlp
13noblacklist ${HOME}/.config/yt-dlp.conf
14noblacklist ${HOME}/yt-dlp.conf
15noblacklist ${HOME}/yt-dlp.conf.txt
16
17private-bin ffprobe,yt-dlp
18private-etc alternatives,ld.so.cache,ld.so.preload,yt-dlp.conf
19
20# Redirect
21include youtube-dl.profile
diff --git a/etc/profile-m-z/ytmdesktop.profile b/etc/profile-m-z/ytmdesktop.profile
index ab46fccc2..59b6e2543 100644
--- a/etc/profile-m-z/ytmdesktop.profile
+++ b/etc/profile-m-z/ytmdesktop.profile
@@ -14,7 +14,7 @@ mkdir ${HOME}/.config/youtube-music-desktop-app
14whitelist ${HOME}/.config/youtube-music-desktop-app 14whitelist ${HOME}/.config/youtube-music-desktop-app
15 15
16# private-bin env,ytmdesktop 16# private-bin env,ytmdesktop
17private-etc alsa,alternatives,asound.conf,ati,bumblebee,ca-certificates,crypto-policies,drirc,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,mime.types,nsswitch.conf,nvidia,pki,pulse,resolv.conf,selinux,ssl,X11,xdg 17private-etc alsa,alternatives,asound.conf,ati,bumblebee,ca-certificates,crypto-policies,drirc,fonts,gtk-2.0,gtk-3.0,host.conf,hostname,hosts,ld.so.cache,ld.so.preload,mime.types,nsswitch.conf,nvidia,pki,pulse,resolv.conf,selinux,ssl,X11,xdg
18# private-opt 18# private-opt
19 19
20# Redirect 20# Redirect
diff --git a/etc/profile-m-z/zaproxy.profile b/etc/profile-m-z/zaproxy.profile
index 5a168feb6..1f11f133f 100644
--- a/etc/profile-m-z/zaproxy.profile
+++ b/etc/profile-m-z/zaproxy.profile
@@ -15,7 +15,6 @@ include disable-common.inc
15include disable-devel.inc 15include disable-devel.inc
16include disable-exec.inc 16include disable-exec.inc
17include disable-interpreters.inc 17include disable-interpreters.inc
18include disable-passwdmgr.inc
19include disable-programs.inc 18include disable-programs.inc
20 19
21mkdir ${HOME}/.java 20mkdir ${HOME}/.java
diff --git a/etc/profile-m-z/zart.profile b/etc/profile-m-z/zart.profile
index 10f83aa30..f534aee8f 100644
--- a/etc/profile-m-z/zart.profile
+++ b/etc/profile-m-z/zart.profile
@@ -13,7 +13,6 @@ include disable-common.inc
13include disable-devel.inc 13include disable-devel.inc
14include disable-exec.inc 14include disable-exec.inc
15include disable-interpreters.inc 15include disable-interpreters.inc
16include disable-passwdmgr.inc
17include disable-programs.inc 16include disable-programs.inc
18include disable-shell.inc 17include disable-shell.inc
19include disable-xdg.inc 18include disable-xdg.inc
diff --git a/etc/profile-m-z/zathura.profile b/etc/profile-m-z/zathura.profile
index a39729685..68c9b0a93 100644
--- a/etc/profile-m-z/zathura.profile
+++ b/etc/profile-m-z/zathura.profile
@@ -14,15 +14,16 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
19include disable-write-mnt.inc
20include disable-xdg.inc 20include disable-xdg.inc
21 21
22mkdir ${HOME}/.config/zathura 22mkdir ${HOME}/.config/zathura
23mkdir ${HOME}/.local/share/zathura 23mkdir ${HOME}/.local/share/zathura
24whitelist /usr/share/doc 24whitelist /usr/share/doc
25whitelist /usr/share/zathura 25whitelist /usr/share/zathura
26include whitelist-runuser-common.inc
26include whitelist-usr-share-common.inc 27include whitelist-usr-share-common.inc
27include whitelist-var-common.inc 28include whitelist-var-common.inc
28 29
@@ -41,6 +42,7 @@ nou2f
41novideo 42novideo
42protocol unix 43protocol unix
43seccomp 44seccomp
45seccomp.block-secondary
44shell none 46shell none
45tracelog 47tracelog
46 48
diff --git a/etc/profile-m-z/zeal.profile b/etc/profile-m-z/zeal.profile
index 2c6f6910f..eaf06b66a 100644
--- a/etc/profile-m-z/zeal.profile
+++ b/etc/profile-m-z/zeal.profile
@@ -6,27 +6,35 @@ include zeal.local
6# Persistent global definitions 6# Persistent global definitions
7include globals.local 7include globals.local
8 8
9noblacklist ${HOME}/.config/Zeal
10noblacklist ${HOME}/.cache/Zeal 9noblacklist ${HOME}/.cache/Zeal
10noblacklist ${HOME}/.config/Zeal
11noblacklist ${HOME}/.local/share/Zeal 11noblacklist ${HOME}/.local/share/Zeal
12 12
13include disable-common.inc 13include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc 17include disable-proc.inc
18include disable-programs.inc 18include disable-programs.inc
19include disable-shell.inc 19include disable-shell.inc
20include disable-xdg.inc 20include disable-xdg.inc
21 21
22# Allow zeal to open links in Firefox.
23# This also requires dbus-user filtering (see below).
24noblacklist ${HOME}/.mozilla
25whitelist ${HOME}/.mozilla/firefox/profiles.ini
26read-only ${HOME}/.mozilla/firefox/profiles.ini
27
22mkdir ${HOME}/.cache/Zeal 28mkdir ${HOME}/.cache/Zeal
23mkdir ${HOME}/.config/qt5ct
24mkdir ${HOME}/.config/Zeal 29mkdir ${HOME}/.config/Zeal
25mkdir ${HOME}/.local/share/Zeal 30mkdir ${HOME}/.local/share/Zeal
26whitelist ${HOME}/.cache/Zeal 31whitelist ${HOME}/.cache/Zeal
27whitelist ${HOME}/.config/Zeal 32whitelist ${HOME}/.config/Zeal
28whitelist ${HOME}/.local/share/Zeal 33whitelist ${HOME}/.local/share/Zeal
29include whitelist-common.inc 34include whitelist-common.inc
35include whitelist-run-common.inc
36include whitelist-runuser-common.inc
37include whitelist-usr-share-common.inc
30include whitelist-var-common.inc 38include whitelist-var-common.inc
31 39
32apparmor 40apparmor
@@ -45,6 +53,7 @@ nou2f
45novideo 53novideo
46protocol unix,inet,inet6,netlink 54protocol unix,inet,inet6,netlink
47seccomp 55seccomp
56seccomp.block-secondary
48shell none 57shell none
49tracelog 58tracelog
50 59
@@ -55,7 +64,10 @@ private-dev
55private-etc alternatives,ca-certificates,crypto-policies,fonts,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,localtime,mime.types,nsswitch.conf,pango,pki,protocols,resolv.conf,rpc,services,ssl,Trolltech.conf,X11,xdg 64private-etc alternatives,ca-certificates,crypto-policies,fonts,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,localtime,mime.types,nsswitch.conf,pango,pki,protocols,resolv.conf,rpc,services,ssl,Trolltech.conf,X11,xdg
56private-tmp 65private-tmp
57 66
58dbus-user none 67dbus-user filter
68dbus-user.talk org.mozilla.Firefox.*
69dbus-user.talk org.mozilla.firefox.*
70?ALLOW_TRAY: dbus-user.talk org.kde.StatusNotifierWatcher
59dbus-system none 71dbus-system none
60 72
61# memory-deny-write-execute - breaks on Arch 73# memory-deny-write-execute - breaks on Arch
diff --git a/etc/profile-m-z/zim.profile b/etc/profile-m-z/zim.profile
new file mode 100644
index 000000000..fa67b76c7
--- /dev/null
+++ b/etc/profile-m-z/zim.profile
@@ -0,0 +1,71 @@
1# Firejail profile for Zim
2# Description: Desktop wiki & notekeeper
3# This file is overwritten after every install/update
4# Persistent local customizations
5include zim.local
6# Persistent global definitions
7include globals.local
8
9noblacklist ${HOME}/.cache/zim
10noblacklist ${HOME}/.config/zim
11
12# Allow python (blacklisted by disable-interpreters.inc)
13include allow-python2.inc
14include allow-python3.inc
15
16blacklist /usr/libexec
17
18include disable-common.inc
19include disable-devel.inc
20include disable-exec.inc
21include disable-interpreters.inc
22include disable-programs.inc
23include disable-shell.inc
24
25mkdir ${HOME}/.cache/zim
26mkdir ${HOME}/.config/zim
27mkdir ${HOME}/Notebooks
28whitelist ${HOME}/.cache/zim
29whitelist ${HOME}/.config/zim
30whitelist ${HOME}/Notebooks
31whitelist ${DESKTOP}
32whitelist ${DOCUMENTS}
33whitelist ${DOWNLOADS}
34whitelist ${MUSIC}
35whitelist ${PICTURES}
36whitelist ${VIDEOS}
37whitelist /usr/share/zim
38include whitelist-common.inc
39include whitelist-runuser-common.inc
40include whitelist-usr-share-common.inc
41include whitelist-var-common.inc
42
43apparmor
44caps.drop all
45machine-id
46net none
47no3d
48nodvd
49nogroups
50noinput
51nonewprivs
52noroot
53nosound
54notv
55nou2f
56novideo
57protocol unix
58seccomp
59seccomp.block-secondary
60shell none
61tracelog
62
63disable-mnt
64private-bin python*,zim
65private-cache
66private-dev
67private-etc alternatives,dconf,fonts,gconf,gtk-2.0,gtk-3.0,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,pango,X11
68private-tmp
69
70dbus-user none
71dbus-system none
diff --git a/etc/profile-m-z/zulip.profile b/etc/profile-m-z/zulip.profile
index 093da5212..8acfdd651 100644
--- a/etc/profile-m-z/zulip.profile
+++ b/etc/profile-m-z/zulip.profile
@@ -14,7 +14,6 @@ include disable-common.inc
14include disable-devel.inc 14include disable-devel.inc
15include disable-exec.inc 15include disable-exec.inc
16include disable-interpreters.inc 16include disable-interpreters.inc
17include disable-passwdmgr.inc
18include disable-programs.inc 17include disable-programs.inc
19include disable-shell.inc 18include disable-shell.inc
20include disable-xdg.inc 19include disable-xdg.inc
@@ -45,5 +44,5 @@ disable-mnt
45private-bin locale,zulip 44private-bin locale,zulip
46private-cache 45private-cache
47private-dev 46private-dev
48private-etc asound.conf,fonts,machine-id 47private-etc alternatives,asound.conf,fonts,ld.so.cache,ld.so.preload,machine-id
49private-tmp 48private-tmp
diff --git a/etc/templates/profile.template b/etc/templates/profile.template
index a7144a29f..aefb75c2c 100644
--- a/etc/templates/profile.template
+++ b/etc/templates/profile.template
@@ -59,14 +59,6 @@ include globals.local
59##ignore noexec ${HOME} 59##ignore noexec ${HOME}
60##ignore noexec /tmp 60##ignore noexec /tmp
61 61
62##blacklist PATH
63# Disable X11 (CLI only), see also 'x11 none' below
64#blacklist /tmp/.X11-unix
65# Disable Wayland
66#blacklist ${RUNUSER}/wayland-*
67# Disable RUNUSER (cli only)
68#blacklist ${RUNUSER}
69
70# It is common practice to add files/dirs containing program-specific configuration 62# It is common practice to add files/dirs containing program-specific configuration
71# (often ${HOME}/PROGRAMNAME or ${HOME}/.config/PROGRAMNAME) into disable-programs.inc 63# (often ${HOME}/PROGRAMNAME or ${HOME}/.config/PROGRAMNAME) into disable-programs.inc
72# (keep list sorted) and then disable blacklisting below. 64# (keep list sorted) and then disable blacklisting below.
@@ -109,14 +101,26 @@ include globals.local
109# Allow ssh (blacklisted by disable-common.inc) 101# Allow ssh (blacklisted by disable-common.inc)
110#include allow-ssh.inc 102#include allow-ssh.inc
111 103
104##blacklist PATH
105# Disable Wayland
106#blacklist ${RUNUSER}/wayland-*
107# Disable RUNUSER (cli only; supersedes Disable Wayland)
108#blacklist ${RUNUSER}
109# Remove the next blacklist if you system has no /usr/libexec dir,
110# otherwise try to add it.
111#blacklist /usr/libexec
112
113# disable-*.inc includes
114# remove disable-write-mnt.inc if you set disable-mnt
112#include disable-common.inc 115#include disable-common.inc
113#include disable-devel.inc 116#include disable-devel.inc
114#include disable-exec.inc 117#include disable-exec.inc
115#include disable-interpreters.inc 118#include disable-interpreters.inc
116#include disable-passwdmgr.inc 119#include disable-proc.inc
117#include disable-programs.inc 120#include disable-programs.inc
118#include disable-shell.inc 121#include disable-shell.inc
119#include disable-write-mnt.inc 122#include disable-write-mnt.inc
123#include disable-X11.inc
120#include disable-xdg.inc 124#include disable-xdg.inc
121 125
122# This section often mirrors noblacklist section above. The idea is 126# This section often mirrors noblacklist section above. The idea is
@@ -128,6 +132,7 @@ include globals.local
128##mkfile PATH 132##mkfile PATH
129#whitelist PATH 133#whitelist PATH
130#include whitelist-common.inc 134#include whitelist-common.inc
135#include whitelist-run-common.inc
131#include whitelist-runuser-common.inc 136#include whitelist-runuser-common.inc
132#include whitelist-usr-share-common.inc 137#include whitelist-usr-share-common.inc
133#include whitelist-var-common.inc 138#include whitelist-var-common.inc
@@ -150,6 +155,7 @@ include globals.local
150#nogroups 155#nogroups
151#noinput 156#noinput
152#nonewprivs 157#nonewprivs
158#noprinters
153#noroot 159#noroot
154#nosound 160#nosound
155#notv 161#notv
@@ -168,7 +174,7 @@ include globals.local
168##seccomp-error-action log (only for debugging seccomp issues) 174##seccomp-error-action log (only for debugging seccomp issues)
169#shell none 175#shell none
170#tracelog 176#tracelog
171# Prefer 'x11 none' instead of 'blacklist /tmp/.X11-unix' if 'net none' is set 177# Prefer 'x11 none' instead of 'disable-X11.inc' if 'net none' is set
172##x11 none 178##x11 none
173 179
174#disable-mnt 180#disable-mnt
@@ -187,7 +193,7 @@ include globals.local
187# GUI: fonts,pango,X11 193# GUI: fonts,pango,X11
188# GTK: dconf,gconf,gtk-2.0,gtk-3.0 194# GTK: dconf,gconf,gtk-2.0,gtk-3.0
189# KDE: kde4rc,kde5rc 195# KDE: kde4rc,kde5rc
190# Networking: ca-certificates,crypto-policies,host.conf,hostname,hosts,nsswitch.conf,pki,protocols,resolv.conf,services,rpc,ssl 196# Networking: ca-certificates,crypto-policies,host.conf,hostname,hosts,nsswitch.conf,pki,protocols,resolv.conf,rpc,services,ssl
191# Extra: gai.conf,proxychains.conf 197# Extra: gai.conf,proxychains.conf
192# Qt: Trolltech.conf 198# Qt: Trolltech.conf
193##private-lib LIBS 199##private-lib LIBS
@@ -200,7 +206,7 @@ include globals.local
200 206
201# Since 0.9.63 also a more granular control of dbus is supported. 207# Since 0.9.63 also a more granular control of dbus is supported.
202# To get the dbus-addresses an application needs access to you can 208# To get the dbus-addresses an application needs access to you can
203# check with flatpak (when the application is distriputed that way): 209# check with flatpak (when the application is distributed that way):
204# flatpak remote-info --show-metadata flathub <APP-ID> 210# flatpak remote-info --show-metadata flathub <APP-ID>
205# Notes: 211# Notes:
206# - flatpak implicitly allows an app to own <APP-ID> on the session bus 212# - flatpak implicitly allows an app to own <APP-ID> on the session bus
@@ -215,8 +221,10 @@ include globals.local
215#dbus-user.talk org.freedesktop.Notifications 221#dbus-user.talk org.freedesktop.Notifications
216#dbus-system none 222#dbus-system none
217 223
224##deterministic-shutdown
218##env VAR=VALUE 225##env VAR=VALUE
219##join-or-start NAME 226##join-or-start NAME
220#memory-deny-write-execute 227#memory-deny-write-execute
221##noexec PATH 228##noexec PATH
222##read-only ${HOME} 229##read-only ${HOME}
230##read-write ${HOME}
diff --git a/etc/templates/syscalls.txt b/etc/templates/syscalls.txt
index 0775f60ff..827b075e5 100644
--- a/etc/templates/syscalls.txt
+++ b/etc/templates/syscalls.txt
@@ -33,7 +33,7 @@ Definition of groups
33@clock=adjtimex,clock_adjtime,clock_settime,settimeofday,stime 33@clock=adjtimex,clock_adjtime,clock_settime,settimeofday,stime
34@cpu-emulation=modify_ldt,subpage_prot,switch_endian,vm86,vm86old 34@cpu-emulation=modify_ldt,subpage_prot,switch_endian,vm86,vm86old
35@debug=lookup_dcookie,perf_event_open,process_vm_writev,rtas,s390_runtime_instr,sys_debug_setcontext 35@debug=lookup_dcookie,perf_event_open,process_vm_writev,rtas,s390_runtime_instr,sys_debug_setcontext
36@default=@clock,@cpu-emulation,@debug,@module,@mount,@obsolete,@raw-io,@reboot,@swap,open_by_handle_at,name_to_handle_at,ioprio_set,ni_syscall,syslog,fanotify_init,kcmp,add_key,request_key,mbind,migrate_pages,move_pages,keyctl,io_setup,io_destroy,io_getevents,io_submit,io_cancel,remap_file_pages,set_mempolicyvmsplice,userfaultfd,acct,bpf,nfsservctl,setdomainname,sethostname,vhangup 36@default=@clock,@cpu-emulation,@debug,@module,@mount,@obsolete,@raw-io,@reboot,@swap,open_by_handle_at,name_to_handle_at,ioprio_set,ni_syscall,syslog,fanotify_init,add_key,request_key,mbind,migrate_pages,move_pages,keyctl,io_setup,io_destroy,io_getevents,io_submit,io_cancel,remap_file_pages,set_mempolicyvmsplice,userfaultfd,acct,bpf,nfsservctl,setdomainname,sethostname,vhangup
37@default-nodebuggers=@default,ptrace,personality,process_vm_readv 37@default-nodebuggers=@default,ptrace,personality,process_vm_readv
38@default-keep=execveat,execve,prctl 38@default-keep=execveat,execve,prctl
39@file-system=access,chdir,chmod,close,creat,faccessat,faccessat2,fallocate,fchdir,fchmod,fchmodat,fcntl,fcntl64,fgetxattr,flistxattr,fremovexattr,fsetxattr,fstat,fstat64,fstatat64,fstatfs,fstatfs64,ftruncate,ftruncate64,futimesat,getcwd,getdents,getdents64,getxattr,inotify_add_watch,inotify_init,inotify_init1,inotify_rm_watch,lgetxattr,link,linkat,listxattr,llistxattr,lremovexattr,lsetxattr,lstat,lstat64,mkdir,mkdirat,mknod,mknodat,mmap,mmap2,munmap,newfstatat,oldfstat,oldlstat,oldstat,open,openat,readlink,readlinkat,removexattr,rename,renameat,renameat2,rmdir,setxattr,stat,stat64,statfs,statfs64,statx,symlink,symlinkat,truncate,truncate64,unlink,unlinkat,utime,utimensat,utimes 39@file-system=access,chdir,chmod,close,creat,faccessat,faccessat2,fallocate,fchdir,fchmod,fchmodat,fcntl,fcntl64,fgetxattr,flistxattr,fremovexattr,fsetxattr,fstat,fstat64,fstatat64,fstatfs,fstatfs64,ftruncate,ftruncate64,futimesat,getcwd,getdents,getdents64,getxattr,inotify_add_watch,inotify_init,inotify_init1,inotify_rm_watch,lgetxattr,link,linkat,listxattr,llistxattr,lremovexattr,lsetxattr,lstat,lstat64,mkdir,mkdirat,mknod,mknodat,mmap,mmap2,munmap,newfstatat,oldfstat,oldlstat,oldstat,open,openat,readlink,readlinkat,removexattr,rename,renameat,renameat2,rmdir,setxattr,stat,stat64,statfs,statfs64,statx,symlink,symlinkat,truncate,truncate64,unlink,unlinkat,utime,utimensat,utimes
@@ -89,18 +89,24 @@ Inheritance of groups
89What to do if seccomp breaks a program 89What to do if seccomp breaks a program
90-------------------------------------- 90--------------------------------------
91 91
92Start `journalctl --grep=SECCOMP --follow` in a terminal and run
93`firejail --seccomp-error-action=log /path/to/program` in a second terminal.
94Now switch back to the first terminal (where `journalctl` is running) and look
95for the numbers of the blocked syscall(s) (`syscall=<NUMBER>`). As soon as you
96have found them, you can stop `journalctl` (^C) and execute
97`firejail --debug-syscalls | grep NUMBER` to get the name of the syscall.
98In the particular case that it is a 32bit syscall on a 64bit system, use `firejail --debug-syscalls32 | grep NUMBER`.
99Now you can add a seccomp exception using `seccomp !NAME`.
100
101If the blocked syscall is ptrace, consider to add allow-debuggers to the profile.
102
92``` 103```
93$ journalctl --grep=syscall --follow 104term1$ journalctl --grep=SECCOMP --follow
94<...> audit[…]: SECCOMP <...> syscall=161 <...> 105term2$ firejail --seccomp-error-action=log /usr/bin/signal-desktop
95$ firejail --debug-syscalls | grep 161 106term1$ (journalctl --grep=SECCOMP --follow)
96161 - chroot 107audit[1234]: SECCOMP ... comm="signal-desktop" exe="/usr/bin/signal-desktop" sig=31 arch=c000003e syscall=161 ...
108^C
109term1$ firejail --debug-syscalls | grep "^161[[:space:]]"
110161 - chroot
97``` 111```
98Profile: `seccomp -> seccomp !chroot` 112Profile: `seccomp -> seccomp !chroot`
99
100Start `journalctl --grep=syscall --follow` in a terminal, then start the broken
101program. Now you see one or more long lines containing `syscall=NUMBER` somewhere.
102Stop journalctl (^C) and execute `firejail --debug-syscalls | grep NUMBER`. You
103will see something like `NUMBER - NAME`, because you now know the name of the
104syscall, you can add an exception to seccomp by putting `!NAME` to seccomp.
105
106If the blocked syscall is ptrace, consider to add allow-debuggers to the profile.
diff --git a/gcov.sh b/gcov.sh
index 65f06a4d4..79736d3d8 100755
--- a/gcov.sh
+++ b/gcov.sh
@@ -1,10 +1,10 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6gcov_init() { 6gcov_init() {
7 USER=`whoami` 7 USER="$(whoami)"
8 firejail --help > /dev/null 8 firejail --help > /dev/null
9 firemon --help > /dev/null 9 firemon --help > /dev/null
10 /usr/lib/firejail/fnet --help > /dev/null 10 /usr/lib/firejail/fnet --help > /dev/null
@@ -20,22 +20,22 @@ gcov_init() {
20 /usr/lib/firejail/faudit --help > /dev/null 20 /usr/lib/firejail/faudit --help > /dev/null
21 /usr/lib/firejail/fbuilder --help > /dev/null 21 /usr/lib/firejail/fbuilder --help > /dev/null
22 22
23 sudo chown $USER:$USER `find .` 23 find . -exec sudo chown "$USER:$USER" '{}' +
24} 24}
25 25
26generate() { 26generate() {
27 lcov -q --capture -d src/firejail -d src/firemon -d src/faudit -d src/fbuilder -d src/fcopy -d src/fnetfilter -d src/fsec-print -d src/fsec-optimize -d src/fseccomp -d src/fnet -d src/ftee -d src/lib -d src/firecfg -d src/fldd --output-file gcov-file-new 27 lcov -q --capture -d src/firejail -d src/firemon -d src/faudit -d src/fbuilder -d src/fcopy -d src/fnetfilter -d src/fsec-print -d src/fsec-optimize -d src/fseccomp -d src/fnet -d src/ftee -d src/lib -d src/firecfg -d src/fldd --output-file gcov-file-new
28 lcov --add-tracefile gcov-file-old --add-tracefile gcov-file-new --output-file gcov-file 28 lcov --add-tracefile gcov-file-old --add-tracefile gcov-file-new --output-file gcov-file
29 rm -fr gcov-dir 29 rm -fr gcov-dir
30 genhtml -q gcov-file --output-directory gcov-dir 30 genhtml -q gcov-file --output-directory gcov-dir
31 sudo rm `find . -name *.gcda` 31 find . -name '*.gcda' -exec sudo rm '{}' +
32 cp gcov-file gcov-file-old 32 cp gcov-file gcov-file-old
33 gcov_init 33 gcov_init
34} 34}
35 35
36 36
37gcov_init 37gcov_init
38lcov -q --capture -d src/firejail -d src/firemon -d src/faudit -d src/fbuilder -d src/fcopy -d src/fnetfilter -d src/fsec-print -d src/fsec-optimize -d src/fseccomp -d src/fnet -d src/ftee -d src/lib -d src/firecfg -d src/fldd --output-file gcov-file-old 38lcov -q --capture -d src/firejail -d src/firemon -d src/faudit -d src/fbuilder -d src/fcopy -d src/fnetfilter -d src/fsec-print -d src/fsec-optimize -d src/fseccomp -d src/fnet -d src/ftee -d src/lib -d src/firecfg -d src/fldd --output-file gcov-file-old
39 39
40#make test-utils 40#make test-utils
41#generate 41#generate
diff --git a/install.sh b/install.sh
index e26cea7b0..2d5f29d41 100755
--- a/install.sh
+++ b/install.sh
@@ -1,6 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6echo "installing..." 6echo "installing..."
diff --git a/linecnt.sh b/linecnt.sh
index ccce2da82..06d136d8c 100755
--- a/linecnt.sh
+++ b/linecnt.sh
@@ -1,10 +1,10 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6gcov_init() { 6gcov_init() {
7 USER=`whoami` 7 USER="$(whoami)"
8 firejail --help > /dev/null 8 firejail --help > /dev/null
9 firemon --help > /dev/null 9 firemon --help > /dev/null
10 /usr/lib/firejail/fnet --help > /dev/null 10 /usr/lib/firejail/fnet --help > /dev/null
@@ -20,12 +20,12 @@ gcov_init() {
20 /usr/lib/firejail/faudit --help > /dev/null 20 /usr/lib/firejail/faudit --help > /dev/null
21 /usr/lib/firejail/fbuilder --help > /dev/null 21 /usr/lib/firejail/fbuilder --help > /dev/null
22 22
23 sudo chown $USER:$USER `find .` 23 find . -exec sudo chown "$USER:$USER" '{}' +
24} 24}
25 25
26rm -fr gcov-dir 26rm -fr gcov-dir
27gcov_init 27gcov_init
28lcov -q --capture -d src/firejail -d src/firemon -d src/faudit -d src/fbuilder \ 28lcov -q --capture -d src/firejail -d src/firemon -d src/faudit -d src/fbuilder \
29 -d src/fcopy -d src/fnetfilter -d src/fsec-print -d src/fsec-optimize -d src/fseccomp \ 29 -d src/fcopy -d src/fnetfilter -d src/fsec-print -d src/fsec-optimize -d src/fseccomp \
30 -d src/fnet -d src/ftee -d src/lib -d src/firecfg -d src/fldd --output-file gcov-file 30 -d src/fnet -d src/ftee -d src/lib -d src/firecfg -d src/fldd --output-file gcov-file
31genhtml -q gcov-file --output-directory gcov-dir 31genhtml -q gcov-file --output-directory gcov-dir
diff --git a/mkasc.sh b/mkasc.sh
index 31c3f4ffd..6de64c6f2 100755
--- a/mkasc.sh
+++ b/mkasc.sh
@@ -1,13 +1,13 @@
1#!/bin/sh 1#!/bin/sh
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6echo "Calculating SHA256 for all files in /transfer - firejail version $1" 6echo "Calculating SHA256 for all files in /transfer - firejail version $1"
7 7
8cd /transfer 8cd /transfer || exit 1
9sha256sum * > firejail-$1-unsigned 9sha256sum ./* > "firejail-$1-unsigned"
10gpg --clearsign --digest-algo SHA256 < firejail-$1-unsigned > firejail-$1.asc 10gpg --clearsign --digest-algo SHA256 < "firejail-$1-unsigned" > "firejail-$1.asc"
11gpg --verify firejail-$1.asc 11gpg --verify "firejail-$1.asc"
12gpg --detach-sign --armor firejail-$1.tar.xz 12gpg --detach-sign --armor "firejail-$1.tar.xz"
13rm firejail-$1-unsigned 13rm "firejail-$1-unsigned"
diff --git a/mkdeb.sh.in b/mkdeb.sh.in
index e45acf8eb..6d6981417 100755
--- a/mkdeb.sh.in
+++ b/mkdeb.sh.in
@@ -1,6 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6# based on http://tldp.org/HOWTO/html_single/Debian-Binary-Package-Building-HOWTO/ 6# based on http://tldp.org/HOWTO/html_single/Debian-Binary-Package-Building-HOWTO/
@@ -22,7 +22,7 @@ if [ -n "$HAVE_SELINUX" ]; then
22 CONFIG_ARGS="$CONFIG_ARGS --enable-selinux" 22 CONFIG_ARGS="$CONFIG_ARGS --enable-selinux"
23fi 23fi
24 24
25TOP=`pwd` 25TOP="$PWD"
26CODE_ARCHIVE="$NAME-$VERSION.tar.xz" 26CODE_ARCHIVE="$NAME-$VERSION.tar.xz"
27CODE_DIR="$NAME-$VERSION" 27CODE_DIR="$NAME-$VERSION"
28INSTALL_DIR="${INSTALL_DIR}${CODE_DIR}/debian" 28INSTALL_DIR="${INSTALL_DIR}${CODE_DIR}/debian"
@@ -35,9 +35,9 @@ echo "install directory: $INSTALL_DIR"
35echo "debian control directory: $DEBIAN_CTRL_DIR" 35echo "debian control directory: $DEBIAN_CTRL_DIR"
36echo "*****************************************" 36echo "*****************************************"
37 37
38tar -xJvf $CODE_ARCHIVE 38tar -xJvf "$CODE_ARCHIVE"
39#mkdir -p $INSTALL_DIR 39#mkdir -p "$INSTALL_DIR"
40cd $CODE_DIR 40cd "$CODE_DIR"
41./configure $CONFIG_ARGS 41./configure $CONFIG_ARGS
42make -j2 42make -j2
43mkdir debian 43mkdir debian
@@ -45,26 +45,26 @@ DESTDIR=debian make install-strip
45 45
46cd .. 46cd ..
47echo "*****************************************" 47echo "*****************************************"
48SIZE=`du -s $INSTALL_DIR` 48SIZE="$(du -s "$INSTALL_DIR")"
49echo "install size $SIZE" 49echo "install size $SIZE"
50echo "*****************************************" 50echo "*****************************************"
51 51
52mv $INSTALL_DIR/usr/share/doc/firejail/RELNOTES $INSTALL_DIR/usr/share/doc/firejail/changelog.Debian 52mv "$INSTALL_DIR/usr/share/doc/firejail/RELNOTES" "$INSTALL_DIR/usr/share/doc/firejail/changelog.Debian"
53gzip -9 -n $INSTALL_DIR/usr/share/doc/firejail/changelog.Debian 53gzip -9 -n "$INSTALL_DIR/usr/share/doc/firejail/changelog.Debian"
54rm $INSTALL_DIR/usr/share/doc/firejail/COPYING 54rm "$INSTALL_DIR/usr/share/doc/firejail/COPYING"
55install -m644 $CODE_DIR/platform/debian/copyright $INSTALL_DIR/usr/share/doc/firejail/. 55install -m644 "$CODE_DIR/platform/debian/copyright" "$INSTALL_DIR/usr/share/doc/firejail/."
56mkdir -p $DEBIAN_CTRL_DIR 56mkdir -p "$DEBIAN_CTRL_DIR"
57sed "s/FIREJAILVER/$VERSION/g" $CODE_DIR/platform/debian/control.$(dpkg-architecture -qDEB_HOST_ARCH) > $DEBIAN_CTRL_DIR/control 57sed "s/FIREJAILVER/$VERSION/g" "$CODE_DIR/platform/debian/control.$(dpkg-architecture -qDEB_HOST_ARCH)" > "$DEBIAN_CTRL_DIR/control"
58 58
59mkdir -p $INSTALL_DIR/usr/share/lintian/overrides/ 59mkdir -p "$INSTALL_DIR/usr/share/lintian/overrides/"
60install -m644 $CODE_DIR/platform/debian/firejail.lintian-overrides $INSTALL_DIR/usr/share/lintian/overrides/firejail 60install -m644 "$CODE_DIR/platform/debian/firejail.lintian-overrides" "$INSTALL_DIR/usr/share/lintian/overrides/firejail"
61 61
62find $INSTALL_DIR/etc -type f | sed "s,^$INSTALL_DIR,," | LC_ALL=C sort > $DEBIAN_CTRL_DIR/conffiles 62find "$INSTALL_DIR/etc" -type f | sed "s,^$INSTALL_DIR,," | LC_ALL=C sort > "$DEBIAN_CTRL_DIR/conffiles"
63chmod 644 $DEBIAN_CTRL_DIR/conffiles 63chmod 644 "$DEBIAN_CTRL_DIR/conffiles"
64find $INSTALL_DIR -type d | xargs chmod 755 64find "$INSTALL_DIR" -type d -exec chmod 755 '{}' +
65cd $CODE_DIR 65cd "$CODE_DIR"
66fakeroot dpkg-deb --build debian 66fakeroot dpkg-deb --build debian
67lintian --no-tag-display-limit debian.deb 67lintian --no-tag-display-limit debian.deb
68mv debian.deb ../firejail_${VERSION}${EXTRA_VERSION}_1_$(dpkg-architecture -qDEB_HOST_ARCH).deb 68mv debian.deb "../firejail_${VERSION}${EXTRA_VERSION}_1_$(dpkg-architecture -qDEB_HOST_ARCH).deb"
69cd .. 69cd ..
70rm -fr $CODE_DIR 70rm -fr "$CODE_DIR"
diff --git a/mketc.sh b/mketc.sh
index 0aa313b17..0e681fa28 100755
--- a/mketc.sh
+++ b/mketc.sh
@@ -1,6 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6sed -i -e ' 6sed -i -e '
diff --git a/mkman.sh b/mkman.sh
index 8767972d1..79ad16252 100755
--- a/mkman.sh
+++ b/mkman.sh
@@ -1,12 +1,12 @@
1#!/bin/sh 1#!/bin/sh
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set -e 6set -e
7 7
8sed "s/VERSION/$1/g" $2 > $3 8sed "s/VERSION/$1/g" "$2" > "$3"
9MONTH=`LC_ALL=C date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%b` 9MONTH="$(LC_ALL=C date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%b)"
10sed -i "s/MONTH/$MONTH/g" $3 10sed -i "s/MONTH/$MONTH/g" "$3"
11YEAR=`LC_ALL=C date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y` 11YEAR="$(LC_ALL=C date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y)"
12sed -i "s/YEAR/$YEAR/g" $3 12sed -i "s/YEAR/$YEAR/g" "$3"
diff --git a/mkuid.sh b/mkuid.sh
index 0264628cc..7db6c9ac5 100755
--- a/mkuid.sh
+++ b/mkuid.sh
@@ -1,6 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6echo "extracting UID_MIN and GID_MIN" 6echo "extracting UID_MIN and GID_MIN"
@@ -9,8 +9,8 @@ echo "#define FIREJAIL_UIDS_H" >> uids.h
9 9
10if [ -r /etc/login.defs ] 10if [ -r /etc/login.defs ]
11then 11then
12 UID_MIN=`awk '/^\s*UID_MIN\s*([0-9]*).*?$/ {print $2}' /etc/login.defs` 12 UID_MIN="$(awk '/^\s*UID_MIN\s*([0-9]*).*?$/ {print $2}' /etc/login.defs)"
13 GID_MIN=`awk '/^\s*GID_MIN\s*([0-9]*).*?$/ {print $2}' /etc/login.defs` 13 GID_MIN="$(awk '/^\s*GID_MIN\s*([0-9]*).*?$/ {print $2}' /etc/login.defs)"
14fi 14fi
15 15
16# use default values if not found 16# use default values if not found
diff --git a/platform/debian/copyright b/platform/debian/copyright
index d4bdb1283..aef85743e 100644
--- a/platform/debian/copyright
+++ b/platform/debian/copyright
@@ -7,7 +7,7 @@ This is the Debian/Ubuntu prepackaged version of firejail.
7 and networking stack isolation, and it runs on any recent Linux system. It 7 and networking stack isolation, and it runs on any recent Linux system. It
8 includes a sandbox profile for Mozilla Firefox. 8 includes a sandbox profile for Mozilla Firefox.
9 9
10 Copyright (C) 2014-2021 Firejail Authors (see README file for more details) 10 Copyright (C) 2014-2022 Firejail Authors (see README file for more details)
11 11
12 This program is free software; you can redistribute it and/or modify 12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by 13 it under the terms of the GNU General Public License as published by
diff --git a/platform/rpm/firejail.spec b/platform/rpm/firejail.spec
index 85df1b4eb..86cd6006e 100644
--- a/platform/rpm/firejail.spec
+++ b/platform/rpm/firejail.spec
@@ -35,7 +35,7 @@ rm -rf %{buildroot}
35%attr(4755, -, -) %{_bindir}/__NAME__ 35%attr(4755, -, -) %{_bindir}/__NAME__
36%{_bindir}/firecfg 36%{_bindir}/firecfg
37%{_bindir}/firemon 37%{_bindir}/firemon
38%{_bindir}/jailtest 38%{_bindir}/jailcheck
39%{_libdir}/__NAME__ 39%{_libdir}/__NAME__
40%{_datarootdir}/bash-completion/completions/__NAME__ 40%{_datarootdir}/bash-completion/completions/__NAME__
41%{_datarootdir}/bash-completion/completions/firecfg 41%{_datarootdir}/bash-completion/completions/firecfg
@@ -45,8 +45,8 @@ rm -rf %{buildroot}
45%{_mandir}/man1/__NAME__.1.gz 45%{_mandir}/man1/__NAME__.1.gz
46%{_mandir}/man1/firecfg.1.gz 46%{_mandir}/man1/firecfg.1.gz
47%{_mandir}/man1/firemon.1.gz 47%{_mandir}/man1/firemon.1.gz
48%{_mandir}/man1/jailcheck.1.gz
48%{_mandir}/man5/__NAME__-login.5.gz 49%{_mandir}/man5/__NAME__-login.5.gz
49%{_mandir}/man5/__NAME__-profile.5.gz 50%{_mandir}/man5/__NAME__-profile.5.gz
50%{_mandir}/man5/__NAME__-users.5.gz 51%{_mandir}/man5/__NAME__-users.5.gz
51%{_mandir}/man5/jailtest.5.gz
52%config(noreplace) %{_sysconfdir}/__NAME__ 52%config(noreplace) %{_sysconfdir}/__NAME__
diff --git a/platform/rpm/mkrpm.sh b/platform/rpm/mkrpm.sh
index b8470dd71..d597d32fd 100755
--- a/platform/rpm/mkrpm.sh
+++ b/platform/rpm/mkrpm.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# Usage: ./platform/rpm/mkrpm.sh firejail <version> "<config options>" 6# Usage: ./platform/rpm/mkrpm.sh firejail <version> "<config options>"
diff --git a/src/bash_completion/firejail.bash_completion.in b/src/bash_completion/firejail.bash_completion.in
index f68edf380..ff411c807 100644
--- a/src/bash_completion/firejail.bash_completion.in
+++ b/src/bash_completion/firejail.bash_completion.in
@@ -5,7 +5,7 @@
5# http://bash-completion.alioth.debian.org 5# http://bash-completion.alioth.debian.org
6#******************************************************************* 6#*******************************************************************
7 7
8__interfaces(){ 8__interfaces() {
9 cut -f 1 -d ':' /proc/net/dev | tail -n +3 | grep -v lo | xargs 9 cut -f 1 -d ':' /proc/net/dev | tail -n +3 | grep -v lo | xargs
10} 10}
11 11
@@ -90,11 +90,11 @@ _firejail()
90 _filedir 90 _filedir
91 return 0 91 return 0
92 ;; 92 ;;
93 --net) 93 --net)
94 comps=$(__interfaces) 94 comps=$(__interfaces)
95 COMPREPLY=( $(compgen -W '$comps' -- "$cur") ) 95 COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
96 return 0 96 return 0
97 ;; 97 ;;
98 esac 98 esac
99 99
100 $split && return 0 100 $split && return 0
diff --git a/src/common.mk.in b/src/common.mk.in
index b379aef7f..38c05bc69 100644
--- a/src/common.mk.in
+++ b/src/common.mk.in
@@ -15,7 +15,6 @@ HAVE_NETWORK=@HAVE_NETWORK@
15HAVE_USERNS=@HAVE_USERNS@ 15HAVE_USERNS=@HAVE_USERNS@
16HAVE_X11=@HAVE_X11@ 16HAVE_X11=@HAVE_X11@
17HAVE_FILE_TRANSFER=@HAVE_FILE_TRANSFER@ 17HAVE_FILE_TRANSFER=@HAVE_FILE_TRANSFER@
18HAVE_WHITELIST=@HAVE_WHITELIST@
19HAVE_GLOBALCFG=@HAVE_GLOBALCFG@ 18HAVE_GLOBALCFG=@HAVE_GLOBALCFG@
20HAVE_APPARMOR=@HAVE_APPARMOR@ 19HAVE_APPARMOR=@HAVE_APPARMOR@
21HAVE_OVERLAYFS=@HAVE_OVERLAYFS@ 20HAVE_OVERLAYFS=@HAVE_OVERLAYFS@
@@ -23,11 +22,13 @@ HAVE_FIRETUNNEL=@HAVE_FIRETUNNEL@
23HAVE_PRIVATE_HOME=@HAVE_PRIVATE_HOME@ 22HAVE_PRIVATE_HOME=@HAVE_PRIVATE_HOME@
24HAVE_GCOV=@HAVE_GCOV@ 23HAVE_GCOV=@HAVE_GCOV@
25HAVE_SELINUX=@HAVE_SELINUX@ 24HAVE_SELINUX=@HAVE_SELINUX@
25HAVE_SUID=@HAVE_SUID@
26HAVE_DBUSPROXY=@HAVE_DBUSPROXY@ 26HAVE_DBUSPROXY=@HAVE_DBUSPROXY@
27HAVE_USERTMPFS=@HAVE_USERTMPFS@ 27HAVE_USERTMPFS=@HAVE_USERTMPFS@
28HAVE_OUTPUT=@HAVE_OUTPUT@ 28HAVE_OUTPUT=@HAVE_OUTPUT@
29HAVE_LTS=@HAVE_LTS@ 29HAVE_LTS=@HAVE_LTS@
30HAVE_FORCE_NONEWPRIVS=@HAVE_FORCE_NONEWPRIVS@ 30HAVE_FORCE_NONEWPRIVS=@HAVE_FORCE_NONEWPRIVS@
31HAVE_ONLY_SYSCFG_PROFILES=@HAVE_ONLY_SYSCFG_PROFILES@
31 32
32H_FILE_LIST = $(sort $(wildcard *.h)) 33H_FILE_LIST = $(sort $(wildcard *.h))
33C_FILE_LIST = $(sort $(wildcard *.c)) 34C_FILE_LIST = $(sort $(wildcard *.c))
@@ -36,11 +37,11 @@ BINOBJS = $(foreach file, $(OBJS), $file)
36 37
37CFLAGS = @CFLAGS@ 38CFLAGS = @CFLAGS@
38CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' $(HAVE_GCOV) 39CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' $(HAVE_GCOV)
39CFLAGS += -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)/firejail"' -DLIBDIR='"$(libdir)"' -DBINDIR='"$(bindir)"' 40CFLAGS += -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)/firejail"' -DLIBDIR='"$(libdir)"' -DBINDIR='"$(bindir)"' -DVARDIR='"/var/lib/firejail"'
40MANFLAGS = $(HAVE_LTS) $(HAVE_OUTPUT) $(HAVE_X11) $(HAVE_PRIVATE_HOME) $(HAVE_APPARMOR) $(HAVE_OVERLAYFS) $(HAVE_USERTMPFS) $(HAVE_DBUSPROXY) $(HAVE_FIRETUNNEL) $(HAVE_GLOBALCFG) $(HAVE_CHROOT) $(HAVE_NETWORK) $(HAVE_USERNS) $(HAVE_FILE_TRANSFER) $(HAVE_WHITELIST) $(HAVE_SELINUX) $(HAVE_FORCE_NONEWPRIVS) 41MANFLAGS = $(HAVE_LTS) $(HAVE_OUTPUT) $(HAVE_X11) $(HAVE_PRIVATE_HOME) $(HAVE_APPARMOR) $(HAVE_OVERLAYFS) $(HAVE_USERTMPFS) $(HAVE_DBUSPROXY) $(HAVE_FIRETUNNEL) $(HAVE_GLOBALCFG) $(HAVE_CHROOT) $(HAVE_NETWORK) $(HAVE_USERNS) $(HAVE_FILE_TRANSFER) $(HAVE_SELINUX) $(HAVE_SUID) $(HAVE_FORCE_NONEWPRIVS) $(HAVE_ONLY_SYSCFG_PROFILES)
41CFLAGS += $(MANFLAGS) 42CFLAGS += $(MANFLAGS)
42CFLAGS += -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIE -Wformat -Wformat-security 43CFLAGS += -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIE -Wformat -Wformat-security
43LDFLAGS += -pie -fPIE -Wl,-z,relro -Wl,-z,now -lpthread 44LDFLAGS += -pie -fPIE -Wl,-z,relro -Wl,-z,now
44EXTRA_LDFLAGS +=@EXTRA_LDFLAGS@ 45EXTRA_LDFLAGS +=@EXTRA_LDFLAGS@
45 46
46ifdef NO_EXTRA_CFLAGS 47ifdef NO_EXTRA_CFLAGS
diff --git a/src/fbuilder/build_bin.c b/src/fbuilder/build_bin.c
index 9577042c4..041c52629 100644
--- a/src/fbuilder/build_bin.c
+++ b/src/fbuilder/build_bin.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fbuilder/build_fs.c b/src/fbuilder/build_fs.c
index 8700e0ba1..4766337ff 100644
--- a/src/fbuilder/build_fs.c
+++ b/src/fbuilder/build_fs.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -236,9 +236,6 @@ void build_share(const char *fname, FILE *fp) {
236//******************************************* 236//*******************************************
237static FileDB *tmp_out = NULL; 237static FileDB *tmp_out = NULL;
238static void tmp_callback(char *ptr) { 238static void tmp_callback(char *ptr) {
239 // skip strace file
240 if (strncmp(ptr, "/tmp/firejail-strace", 20) == 0)
241 return;
242 if (strncmp(ptr, "/tmp/runtime-", 13) == 0) 239 if (strncmp(ptr, "/tmp/runtime-", 13) == 0)
243 return; 240 return;
244 if (strcmp(ptr, "/tmp") == 0) 241 if (strcmp(ptr, "/tmp") == 0)
diff --git a/src/fbuilder/build_home.c b/src/fbuilder/build_home.c
index b3ec6cffd..d6d421259 100644
--- a/src/fbuilder/build_home.c
+++ b/src/fbuilder/build_home.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -68,6 +68,8 @@ void process_home(const char *fname, char *home, int home_len) {
68 ptr += 7; 68 ptr += 7;
69 else if (strncmp(ptr, "open /home", 10) == 0) 69 else if (strncmp(ptr, "open /home", 10) == 0)
70 ptr += 5; 70 ptr += 5;
71 else if (strncmp(ptr, "opendir /home", 13) == 0)
72 ptr += 8;
71 else 73 else
72 continue; 74 continue;
73 75
diff --git a/src/fbuilder/build_profile.c b/src/fbuilder/build_profile.c
index fb53f70a6..941f43562 100644
--- a/src/fbuilder/build_profile.c
+++ b/src/fbuilder/build_profile.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -22,22 +22,6 @@
22#include <sys/wait.h> 22#include <sys/wait.h>
23 23
24#define TRACE_OUTPUT "/tmp/firejail-trace.XXXXXX" 24#define TRACE_OUTPUT "/tmp/firejail-trace.XXXXXX"
25#define STRACE_OUTPUT "/tmp/firejail-strace.XXXXXX"
26
27/* static char *cmdlist[] = { */
28/* "/usr/bin/firejail", */
29/* "--quiet", */
30/* "--output=" TRACE_OUTPUT, */
31/* "--noprofile", */
32/* "--caps.drop=all", */
33/* "--nonewprivs", */
34/* "--trace", */
35/* "--shell=none", */
36/* "/usr/bin/strace", // also used as a marker in build_profile() */
37/* "-c", */
38/* "-f", */
39/* "-o" STRACE_OUTPUT, */
40/* }; */
41 25
42void build_profile(int argc, char **argv, int index, FILE *fp) { 26void build_profile(int argc, char **argv, int index, FILE *fp) {
43 // next index is the application name 27 // next index is the application name
@@ -47,78 +31,42 @@ void build_profile(int argc, char **argv, int index, FILE *fp) {
47 } 31 }
48 32
49 char trace_output[] = "/tmp/firejail-trace.XXXXXX"; 33 char trace_output[] = "/tmp/firejail-trace.XXXXXX";
50 char strace_output[] = "/tmp/firejail-strace.XXXXXX";
51
52 int tfile = mkstemp(trace_output); 34 int tfile = mkstemp(trace_output);
53 int stfile = mkstemp(strace_output); 35 if(tfile == -1)
54 if(tfile == -1 || stfile == -1)
55 errExit("mkstemp"); 36 errExit("mkstemp");
56
57 // close the files, firejail/strace will overwrite them!
58 close(tfile); 37 close(tfile);
59 close(stfile);
60
61 38
62 char *output; 39 char *output;
63 char *stroutput;
64 if(asprintf(&output,"--trace=%s",trace_output) == -1) 40 if(asprintf(&output,"--trace=%s",trace_output) == -1)
65 errExit("asprintf"); 41 errExit("asprintf");
66 if(asprintf(&stroutput,"-o%s",strace_output) == -1)
67 errExit("asprintf");
68
69 char *cmdlist[] = {
70 BINDIR "/firejail",
71 "--quiet",
72 "--noprofile",
73 "--caps.drop=all",
74 "--nonewprivs",
75 output,
76 "--shell=none",
77 "/usr/bin/strace", // also used as a marker in build_profile()
78 "-c",
79 "-f",
80 stroutput,
81 };
82
83 // detect strace and check if Yama LSM allows us to use it
84 int have_strace = 0;
85 int have_yama_permission = 1;
86 if (access("/usr/bin/strace", X_OK) == 0) {
87 have_strace = 1;
88 FILE *ps = fopen("/proc/sys/kernel/yama/ptrace_scope", "r");
89 if (ps) {
90 unsigned val;
91 if (fscanf(ps, "%u", &val) == 1)
92 have_yama_permission = (val < 2);
93 fclose(ps);
94 }
95 }
96 42
97 // calculate command length 43 // calculate command length
98 unsigned len = (int) sizeof(cmdlist) / sizeof(char*) + argc - index + 1; 44 unsigned len = 64; // plenty of space for firejail command line
99 if (arg_debug) 45 len += argc - index; // program command line
100 printf("command len %d + %d + 1\n", (int) (sizeof(cmdlist) / sizeof(char*)), argc - index); 46 len += 1; // NULL
101 char *cmd[len];
102 cmd[0] = cmdlist[0]; // explicit assignment to clean scan-build error
103 47
104 // build command 48 // build command
105 // skip strace if not installed, or no permission to use it 49 char *cmd[len];
106 int skip_strace = !(have_strace && have_yama_permission); 50 unsigned curr_len = 0;
107 unsigned i = 0; 51 cmd[curr_len++] = BINDIR "/firejail";
108 for (i = 0; i < (int) sizeof(cmdlist) / sizeof(char*); i++) { 52 cmd[curr_len++] = "--quiet";
109 if (skip_strace && strcmp(cmdlist[i], "/usr/bin/strace") == 0) 53 cmd[curr_len++] = "--noprofile";
110 break; 54 cmd[curr_len++] = "--caps.drop=all";
111 cmd[i] = cmdlist[i]; 55 cmd[curr_len++] = "--seccomp=!chroot";
112 } 56 cmd[curr_len++] = "--shell=none";
113 57 cmd[curr_len++] = output;
114 int i2 = index; 58 if (arg_appimage)
115 for (; i < (len - 1); i++, i2++) 59 cmd[curr_len++] = "--appimage";
116 cmd[i] = argv[i2]; 60
117 assert(i < len); 61 int i;
118 cmd[i] = NULL; 62 for (i = index; i < argc; i++)
63 cmd[curr_len++] = argv[i];
64
65 assert(curr_len < len);
66 cmd[curr_len] = NULL;
119 67
120 if (arg_debug) { 68 if (arg_debug) {
121 for (i = 0; i < len; i++) 69 for (i = 0; cmd[i]; i++)
122 printf("%s%s\n", (i)?"\t":"", cmd[i]); 70 printf("%s%s\n", (i)?"\t":"", cmd[i]);
123 } 71 }
124 72
@@ -140,14 +88,14 @@ void build_profile(int argc, char **argv, int index, FILE *fp) {
140 88
141 if (WIFEXITED(status) && WEXITSTATUS(status) == 0) { 89 if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
142 if (fp == stdout) 90 if (fp == stdout)
143 printf("--- Built profile beings after this line ---\n"); 91 printf("--- Built profile begins after this line ---\n");
144 fprintf(fp, "# Save this file as \"application.profile\" (change \"application\" with the\n"); 92 fprintf(fp, "# Save this file as \"application.profile\" (change \"application\" with the\n");
145 fprintf(fp, "# program name) in ~/.config/firejail directory. Firejail will find it\n"); 93 fprintf(fp, "# program name) in ~/.config/firejail directory. Firejail will find it\n");
146 fprintf(fp, "# automatically every time you sandbox your application.\n#\n"); 94 fprintf(fp, "# automatically every time you sandbox your application.\n#\n");
147 fprintf(fp, "# Run \"firejail application\" to test it. In the file there are\n"); 95 fprintf(fp, "# Run \"firejail application\" to test it. In the file there are\n");
148 fprintf(fp, "# some other commands you can try. Enable them by removing the \"#\".\n"); 96 fprintf(fp, "# some other commands you can try. Enable them by removing the \"#\".\n\n");
149 97
150 fprintf(fp, "\n# Firejail profile for %s\n", argv[index]); 98 fprintf(fp, "# Firejail profile for %s\n", argv[index]);
151 fprintf(fp, "# Persistent local customizations\n"); 99 fprintf(fp, "# Persistent local customizations\n");
152 fprintf(fp, "#include %s.local\n", argv[index]); 100 fprintf(fp, "#include %s.local\n", argv[index]);
153 fprintf(fp, "# Persistent global definitions\n"); 101 fprintf(fp, "# Persistent global definitions\n");
@@ -158,58 +106,62 @@ void build_profile(int argc, char **argv, int index, FILE *fp) {
158 fprintf(fp, "### Enable as many of them as you can! A very important one is\n"); 106 fprintf(fp, "### Enable as many of them as you can! A very important one is\n");
159 fprintf(fp, "### \"disable-exec.inc\". This will make among other things your home\n"); 107 fprintf(fp, "### \"disable-exec.inc\". This will make among other things your home\n");
160 fprintf(fp, "### and /tmp directories non-executable.\n"); 108 fprintf(fp, "### and /tmp directories non-executable.\n");
161 fprintf(fp, "include disable-common.inc\n"); 109 fprintf(fp, "include disable-common.inc\t# dangerous directories like ~/.ssh and ~/.gnupg\n");
162 fprintf(fp, "#include disable-devel.inc\n"); 110 fprintf(fp, "#include disable-devel.inc\t# development tools such as gcc and gdb\n");
163 fprintf(fp, "#include disable-exec.inc\n"); 111 fprintf(fp, "#include disable-exec.inc\t# non-executable directories such as /var, /tmp, and /home\n");
164 fprintf(fp, "#include disable-interpreters.inc\n"); 112 fprintf(fp, "#include disable-interpreters.inc\t# perl, python, lua etc.\n");
165 fprintf(fp, "include disable-passwdmgr.inc\n"); 113 fprintf(fp, "include disable-programs.inc\t# user configuration for programs such as firefox, vlc etc.\n");
166 fprintf(fp, "include disable-programs.inc\n"); 114 fprintf(fp, "#include disable-shell.inc\t# sh, bash, zsh etc.\n");
167 fprintf(fp, "#include disable-xdg.inc\n"); 115 fprintf(fp, "#include disable-xdg.inc\t# standard user directories: Documents, Pictures, Videos, Music\n");
168 fprintf(fp, "\n"); 116 fprintf(fp, "\n");
169 117
170 fprintf(fp, "### Home Directory Whitelisting ###\n"); 118 fprintf(fp, "### Home Directory Whitelisting ###\n");
171 fprintf(fp, "### If something goes wrong, this section is the first one to comment out.\n"); 119 fprintf(fp, "### If something goes wrong, this section is the first one to comment out.\n");
172 fprintf(fp, "### Instead, you'll have to relay on the basic blacklisting above.\n"); 120 fprintf(fp, "### Instead, you'll have to relay on the basic blacklisting above.\n");
173 build_home(trace_output, fp); 121 build_home(trace_output, fp);
122 fprintf(fp, "\n");
174 123
175 fprintf(fp, "\n### The Rest of the Filesystem ###\n"); 124 fprintf(fp, "### Filesystem Whitelisting ###\n");
176 build_share(trace_output, fp); 125 build_share(trace_output, fp);
126 //todo: include whitelist-runuser-common.inc
177 build_var(trace_output, fp); 127 build_var(trace_output, fp);
178 build_bin(trace_output, fp); 128 fprintf(fp, "\n");
179 build_dev(trace_output, fp);
180 fprintf(fp, "#nodvd\n");
181 fprintf(fp, "#noinput\n");
182 fprintf(fp, "#notv\n");
183 fprintf(fp, "#nou2f\n");
184 fprintf(fp, "#novideo\n");
185 build_etc(trace_output, fp);
186 build_tmp(trace_output, fp);
187 129
188 fprintf(fp, "\n### Security Filters ###\n"); 130 fprintf(fp, "#apparmor\t# if you have AppArmor running, try this one!\n");
189 fprintf(fp, "#apparmor\n");
190 fprintf(fp, "caps.drop all\n"); 131 fprintf(fp, "caps.drop all\n");
132 fprintf(fp, "ipc-namespace\n");
191 fprintf(fp, "netfilter\n"); 133 fprintf(fp, "netfilter\n");
192 fprintf(fp, "#nogroups\n"); 134 fprintf(fp, "#no3d\t# disable 3D acceleration\n");
193 fprintf(fp, "#noroot\n"); 135 fprintf(fp, "#nodvd\t# disable DVD and CD devices\n");
136 fprintf(fp, "#nogroups\t# disable supplementary user groups\n");
137 fprintf(fp, "#noinput\t# disable input devices\n");
194 fprintf(fp, "nonewprivs\n"); 138 fprintf(fp, "nonewprivs\n");
139 fprintf(fp, "noroot\n");
140 fprintf(fp, "#notv\t# disable DVB TV devices\n");
141 fprintf(fp, "#nou2f\t# disable U2F devices\n");
142 fprintf(fp, "#novideo\t# disable video capture devices\n");
195 build_protocol(trace_output, fp); 143 build_protocol(trace_output, fp);
144 fprintf(fp, "seccomp !chroot\t# allowing chroot, just in case this is an Electron app\n");
145 fprintf(fp, "shell none\n");
146 fprintf(fp, "tracelog\n");
147 fprintf(fp, "\n");
148
149 fprintf(fp, "#disable-mnt\t# no access to /mnt, /media, /run/mount and /run/media\n");
150 build_bin(trace_output, fp);
151 fprintf(fp, "#private-cache\t# run with an empty ~/.cache directory\n");
152 build_dev(trace_output, fp);
153 build_etc(trace_output, fp);
154 fprintf(fp, "#private-lib\n");
155 build_tmp(trace_output, fp);
156 fprintf(fp, "\n");
157
158 fprintf(fp, "#dbus-user none\n");
159 fprintf(fp, "#dbus-system none\n");
160 fprintf(fp, "\n");
161 fprintf(fp, "#memory-deny-write-execute\n");
196 162
197 fprintf(fp, "seccomp\n"); 163 if (!arg_debug)
198 if (!have_strace) {
199 fprintf(fp, "### If you install strace on your system, Firejail will also create a\n");
200 fprintf(fp, "### whitelisted seccomp filter.\n");
201 }
202 else if (!have_yama_permission)
203 fprintf(fp, "### Yama security module prevents creation of a whitelisted seccomp filter\n");
204 else
205 build_seccomp(strace_output, fp);
206 fprintf(fp, "#shell none\n");
207 fprintf(fp, "#tracelog\n");
208
209 if (!arg_debug) {
210 unlink(trace_output); 164 unlink(trace_output);
211 unlink(strace_output);
212 }
213 } 165 }
214 else { 166 else {
215 fprintf(stderr, "Error: cannot run the sandbox\n"); 167 fprintf(stderr, "Error: cannot run the sandbox\n");
diff --git a/src/fbuilder/build_seccomp.c b/src/fbuilder/build_seccomp.c
index dc3cce456..7b4727e1a 100644
--- a/src/fbuilder/build_seccomp.c
+++ b/src/fbuilder/build_seccomp.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -20,6 +20,7 @@
20 20
21#include "fbuilder.h" 21#include "fbuilder.h"
22 22
23#if 0
23void build_seccomp(const char *fname, FILE *fp) { 24void build_seccomp(const char *fname, FILE *fp) {
24 assert(fname); 25 assert(fname);
25 assert(fp); 26 assert(fp);
@@ -78,15 +79,17 @@ void build_seccomp(const char *fname, FILE *fp) {
78 79
79 fclose(fp2); 80 fclose(fp2);
80} 81}
82#endif
81 83
82//*************************************** 84//***************************************
83// protocol 85// protocol
84//*************************************** 86//***************************************
85int unix_s = 0; 87static int unix_s = 0;
86int inet = 0; 88static int inet = 0;
87int inet6 = 0; 89static int inet6 = 0;
88int netlink = 0; 90static int netlink = 0;
89int packet = 0; 91static int packet = 0;
92static int bluetooth = 0;
90static void process_protocol(const char *fname) { 93static void process_protocol(const char *fname) {
91 assert(fname); 94 assert(fname);
92 95
@@ -135,6 +138,8 @@ static void process_protocol(const char *fname) {
135 netlink = 1; 138 netlink = 1;
136 else if (strncmp(ptr, "AF_PACKET ", 10) == 0) 139 else if (strncmp(ptr, "AF_PACKET ", 10) == 0)
137 packet = 1; 140 packet = 1;
141 else if (strncmp(ptr, "AF_BLUETOOTH ", 13) == 0)
142 bluetooth = 1;
138 } 143 }
139 144
140 fclose(fp); 145 fclose(fp);
@@ -161,22 +166,22 @@ void build_protocol(const char *fname, FILE *fp) {
161 } 166 }
162 167
163 int net = 0; 168 int net = 0;
164 if (unix_s || inet || inet6 || netlink || packet) { 169 if (unix_s || inet || inet6 || netlink || packet || bluetooth) {
165 fprintf(fp, "protocol "); 170 fprintf(fp, "protocol ");
166 if (unix_s) 171 if (unix_s)
167 fprintf(fp, "unix,"); 172 fprintf(fp, "unix,");
168 if (inet) { 173 if (inet || inet6) {
169 fprintf(fp, "inet,"); 174 fprintf(fp, "inet,inet6,");
170 net = 1;
171 }
172 if (inet6) {
173 fprintf(fp, "inet6,");
174 net = 1; 175 net = 1;
175 } 176 }
176 if (netlink) 177 if (netlink)
177 fprintf(fp, "netlink,"); 178 fprintf(fp, "netlink,");
178 if (packet) { 179 if (packet) {
179 fprintf(fp, "packet"); 180 fprintf(fp, "packet,");
181 net = 1;
182 }
183 if (bluetooth) {
184 fprintf(fp, "bluetooth");
180 net = 1; 185 net = 1;
181 } 186 }
182 fprintf(fp, "\n"); 187 fprintf(fp, "\n");
diff --git a/src/fbuilder/fbuilder.h b/src/fbuilder/fbuilder.h
index 08dd35e10..3e23d7854 100644
--- a/src/fbuilder/fbuilder.h
+++ b/src/fbuilder/fbuilder.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -31,6 +31,7 @@
31#define MAX_BUF 4096 31#define MAX_BUF 4096
32// main.c 32// main.c
33extern int arg_debug; 33extern int arg_debug;
34extern int arg_appimage;
34 35
35// build_profile.c 36// build_profile.c
36void build_profile(int argc, char **argv, int index, FILE *fp); 37void build_profile(int argc, char **argv, int index, FILE *fp);
diff --git a/src/fbuilder/filedb.c b/src/fbuilder/filedb.c
index 94a226cb7..454b9f40b 100644
--- a/src/fbuilder/filedb.c
+++ b/src/fbuilder/filedb.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fbuilder/main.c b/src/fbuilder/main.c
index f4917aefc..aa49b2489 100644
--- a/src/fbuilder/main.c
+++ b/src/fbuilder/main.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -19,6 +19,7 @@
19*/ 19*/
20#include "fbuilder.h" 20#include "fbuilder.h"
21int arg_debug = 0; 21int arg_debug = 0;
22int arg_appimage = 0;
22 23
23static void usage(void) { 24static void usage(void) {
24 printf("Firejail profile builder\n"); 25 printf("Firejail profile builder\n");
@@ -39,7 +40,7 @@ printf("\n");
39 int i; 40 int i;
40 int prog_index = 0; 41 int prog_index = 0;
41 FILE *fp = stdout; 42 FILE *fp = stdout;
42 int prof_file = 0; 43 char *prof_file = NULL;
43 44
44 // parse arguments and extract program index 45 // parse arguments and extract program index
45 for (i = 1; i < argc; i++) { 46 for (i = 1; i < argc; i++) {
@@ -49,6 +50,8 @@ printf("\n");
49 } 50 }
50 else if (strcmp(argv[i], "--debug") == 0) 51 else if (strcmp(argv[i], "--debug") == 0)
51 arg_debug = 1; 52 arg_debug = 1;
53 else if (strcmp(argv[i], "--appimage") == 0)
54 arg_appimage = 1;
52 else if (strcmp(argv[i], "--build") == 0) 55 else if (strcmp(argv[i], "--build") == 0)
53 ; // do nothing, this is passed down from firejail 56 ; // do nothing, this is passed down from firejail
54 else if (strncmp(argv[i], "--build=", 8) == 0) { 57 else if (strncmp(argv[i], "--build=", 8) == 0) {
@@ -58,18 +61,23 @@ printf("\n");
58 exit(1); 61 exit(1);
59 } 62 }
60 63
64 // don't run if the file exists
65 if (access(argv[i] + 8, F_OK) == 0) {
66 fprintf(stderr, "Error: the profile file already exists. Please use a different file name.\n");
67 exit(1);
68 }
69
61 // check file access 70 // check file access
62 fp = fopen(argv[i] + 8, "w"); 71 fp = fopen(argv[i] + 8, "w");
63 if (!fp) { 72 if (!fp) {
64 fprintf(stderr, "Error fbuild: cannot open profile file.\n"); 73 fprintf(stderr, "Error: cannot open profile file.\n");
65 exit(1); 74 exit(1);
66 } 75 }
67 prof_file = 1; 76 prof_file = argv[i] + 8;
68 // do nothing, this is passed down from firejail
69 } 77 }
70 else { 78 else {
71 if (*argv[i] == '-') { 79 if (*argv[i] == '-') {
72 fprintf(stderr, "Error fbuilder: invalid program\n"); 80 fprintf(stderr, "Error: invalid program\n");
73 usage(); 81 usage();
74 exit(1); 82 exit(1);
75 } 83 }
@@ -79,10 +87,13 @@ printf("\n");
79 } 87 }
80 88
81 if (prog_index == 0) { 89 if (prog_index == 0) {
82 fprintf(stderr, "Error fbuilder: program and arguments required\n"); 90 fprintf(stderr, "Error : program and arguments required\n");
83 usage(); 91 usage();
84 if (prof_file) 92 if (prof_file) {
85 fclose(fp); 93 fclose(fp);
94 int rv = unlink(prof_file);
95 (void) rv;
96 }
86 exit(1); 97 exit(1);
87 } 98 }
88 99
diff --git a/src/fbuilder/utils.c b/src/fbuilder/utils.c
index 52493f470..f89e69679 100644
--- a/src/fbuilder/utils.c
+++ b/src/fbuilder/utils.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fcopy/main.c b/src/fcopy/main.c
index 572e9f601..e56d853c8 100644
--- a/src/fcopy/main.c
+++ b/src/fcopy/main.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -19,11 +19,15 @@
19 */ 19 */
20 20
21#include "../include/common.h" 21#include "../include/common.h"
22#include <fcntl.h>
23#include <ftw.h> 22#include <ftw.h>
24#include <errno.h> 23#include <errno.h>
25#include <pwd.h> 24#include <pwd.h>
26 25
26#include <fcntl.h>
27#ifndef O_PATH
28#define O_PATH 010000000
29#endif
30
27#if HAVE_SELINUX 31#if HAVE_SELINUX
28#include <sys/stat.h> 32#include <sys/stat.h>
29#include <sys/types.h> 33#include <sys/types.h>
@@ -55,7 +59,7 @@ static void selinux_relabel_path(const char *path, const char *inside_path) {
55 assert(path); 59 assert(path);
56 assert(inside_path); 60 assert(inside_path);
57#if HAVE_SELINUX 61#if HAVE_SELINUX
58 char procfs_path[64]; 62 char procfs_path[64];
59 char *fcon = NULL; 63 char *fcon = NULL;
60 int fd; 64 int fd;
61 struct stat st; 65 struct stat st;
@@ -69,20 +73,24 @@ static void selinux_relabel_path(const char *path, const char *inside_path) {
69 if (!label_hnd) 73 if (!label_hnd)
70 label_hnd = selabel_open(SELABEL_CTX_FILE, NULL, 0); 74 label_hnd = selabel_open(SELABEL_CTX_FILE, NULL, 0);
71 75
76 if (!label_hnd)
77 errExit("selabel_open");
78
72 /* Open the file as O_PATH, to pin it while we determine and adjust the label */ 79 /* Open the file as O_PATH, to pin it while we determine and adjust the label */
73 fd = open(path, O_NOFOLLOW|O_CLOEXEC|O_PATH); 80 fd = open(path, O_NOFOLLOW|O_CLOEXEC|O_PATH);
74 if (fd < 0) 81 if (fd < 0)
75 return; 82 return;
76 if (fstat(fd, &st) < 0) 83 if (fstat(fd, &st) < 0)
77 goto close; 84 goto close;
78 85
79 if (selabel_lookup_raw(label_hnd, &fcon, inside_path, st.st_mode) == 0) { 86 if (selabel_lookup_raw(label_hnd, &fcon, inside_path, st.st_mode) == 0) {
80 sprintf(procfs_path, "/proc/self/fd/%i", fd); 87 sprintf(procfs_path, "/proc/self/fd/%i", fd);
81 if (arg_debug) 88 if (arg_debug)
82 printf("Relabeling %s as %s (%s)\n", path, inside_path, fcon); 89 printf("Relabeling %s as %s (%s)\n", path, inside_path, fcon);
83 90
84 setfilecon_raw(procfs_path, fcon); 91 if (setfilecon_raw(procfs_path, fcon) != 0 && arg_debug)
85 } 92 printf("Cannot relabel %s: %s\n", path, strerror(errno));
93 }
86 freecon(fcon); 94 freecon(fcon);
87 close: 95 close:
88 close(fd); 96 close(fd);
@@ -192,7 +200,8 @@ static char *proc_pid_to_self(const char *target) {
192 200
193 // check where /proc/self points to 201 // check where /proc/self points to
194 static const char proc_self[] = "/proc/self"; 202 static const char proc_self[] = "/proc/self";
195 if (!(proc_pid = realpath(proc_self, NULL))) 203 proc_pid = realpath(proc_self, NULL);
204 if (proc_pid == NULL)
196 goto done; 205 goto done;
197 206
198 // redirect /proc/PID/xxx -> /proc/self/XXX 207 // redirect /proc/PID/xxx -> /proc/self/XXX
@@ -340,7 +349,7 @@ static char *check(const char *src) {
340 349
341errexit: 350errexit:
342 free(rsrc); 351 free(rsrc);
343 fprintf(stderr, "Error fcopy: invalid file %s\n", src); 352 fprintf(stderr, "Error fcopy: invalid ownership for file %s\n", src);
344 exit(1); 353 exit(1);
345} 354}
346 355
@@ -463,18 +472,12 @@ int main(int argc, char **argv) {
463 size_t len = strlen(src); 472 size_t len = strlen(src);
464 while (len > 1 && src[len - 1] == '/') 473 while (len > 1 && src[len - 1] == '/')
465 src[--len] = '\0'; 474 src[--len] = '\0';
466 if (strcspn(src, "\\*&!?\"'<>%^(){}[];,") != len) { 475 reject_meta_chars(src, 0);
467 fprintf(stderr, "Error fcopy: invalid source file name %s\n", src);
468 exit(1);
469 }
470 476
471 len = strlen(dest); 477 len = strlen(dest);
472 while (len > 1 && dest[len - 1] == '/') 478 while (len > 1 && dest[len - 1] == '/')
473 dest[--len] = '\0'; 479 dest[--len] = '\0';
474 if (strcspn(dest, "\\*&!?\"'<>%^(){}[];,~") != len) { 480 reject_meta_chars(dest, 0);
475 fprintf(stderr, "Error fcopy: invalid dest file name %s\n", dest);
476 exit(1);
477 }
478 481
479 // the destination should be a directory; 482 // the destination should be a directory;
480 struct stat s; 483 struct stat s;
diff --git a/src/fids/Makefile.in b/src/fids/Makefile.in
new file mode 100644
index 000000000..5530bcee2
--- /dev/null
+++ b/src/fids/Makefile.in
@@ -0,0 +1,18 @@
1.PHONY: all
2all: fids
3
4include ../common.mk
5
6%.o : %.c $(H_FILE_LIST) ../include/common.h
7 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@
8
9#fseccomp: $(OBJS) ../lib/common.o ../lib/errno.o ../lib/syscall.o
10fids: $(OBJS)
11 $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS)
12
13.PHONY: clean
14clean:; rm -fr *.o fids *.gcov *.gcda *.gcno *.plist
15
16.PHONY: distclean
17distclean: clean
18 rm -fr Makefile
diff --git a/src/fids/blake2b.c b/src/fids/blake2b.c
new file mode 100644
index 000000000..ec7cf8602
--- /dev/null
+++ b/src/fids/blake2b.c
@@ -0,0 +1,176 @@
1/*
2 * Copyright (C) 2014-2022 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21/* A simple unkeyed BLAKE2b Implementation based on the official reference
22 * from https://github.com/BLAKE2/BLAKE2.
23 *
24 * The original code was released under CC0 1.0 Universal license (Creative Commons),
25 * a public domain license.
26 */
27
28#include "fids.h"
29
30// little-endian vs big-endian is irrelevant since the checksum is calculated and checked on the same computer.
31static inline uint64_t load64( const void *src ) {
32 uint64_t w;
33 memcpy( &w, src, sizeof( w ) );
34 return w;
35}
36
37// mixing function
38#define ROTR64(x, y) (((x) >> (y)) ^ ((x) << (64 - (y))))
39#define G(a, b, c, d, x, y) { \
40 v[a] = v[a] + v[b] + x; \
41 v[d] = ROTR64(v[d] ^ v[a], 32); \
42 v[c] = v[c] + v[d]; \
43 v[b] = ROTR64(v[b] ^ v[c], 24); \
44 v[a] = v[a] + v[b] + y; \
45 v[d] = ROTR64(v[d] ^ v[a], 16); \
46 v[c] = v[c] + v[d]; \
47 v[b] = ROTR64(v[b] ^ v[c], 63); }
48
49// init vector
50static const uint64_t iv[8] = {
51 0x6A09E667F3BCC908, 0xBB67AE8584CAA73B,
52 0x3C6EF372FE94F82B, 0xA54FF53A5F1D36F1,
53 0x510E527FADE682D1, 0x9B05688C2B3E6C1F,
54 0x1F83D9ABFB41BD6B, 0x5BE0CD19137E2179
55};
56
57
58const uint8_t sigma[12][16] = {
59 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
60 { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 },
61 { 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 },
62 { 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 },
63 { 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 },
64 { 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 },
65 { 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11 },
66 { 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10 },
67 { 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5 },
68 { 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0 },
69 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
70 { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 }
71};
72
73// blake2b context
74typedef struct {
75 uint8_t b[128]; // input buffer
76 uint64_t h[8]; // chained state
77 uint64_t t[2]; // total number of bytes
78 size_t c; // pointer for b[]
79 size_t outlen; // digest size
80} CTX;
81
82// compress function
83static void compress(CTX *ctx, int last) {
84 uint64_t m[16];
85 uint64_t v[16];
86 size_t i;
87
88 for (i = 0; i < 16; i++)
89 m[i] = load64(&ctx->b[8 * i]);
90
91 for (i = 0; i < 8; i++) {
92 v[i] = ctx->h[i];
93 v[i + 8] = iv[i];
94 }
95
96 v[12] ^= ctx->t[0];
97 v[13] ^= ctx->t[1];
98 if (last)
99 v[14] = ~v[14];
100
101 for (i = 0; i < 12; i++) {
102 G( 0, 4, 8, 12, m[sigma[i][ 0]], m[sigma[i][ 1]]);
103 G( 1, 5, 9, 13, m[sigma[i][ 2]], m[sigma[i][ 3]]);
104 G( 2, 6, 10, 14, m[sigma[i][ 4]], m[sigma[i][ 5]]);
105 G( 3, 7, 11, 15, m[sigma[i][ 6]], m[sigma[i][ 7]]);
106 G( 0, 5, 10, 15, m[sigma[i][ 8]], m[sigma[i][ 9]]);
107 G( 1, 6, 11, 12, m[sigma[i][10]], m[sigma[i][11]]);
108 G( 2, 7, 8, 13, m[sigma[i][12]], m[sigma[i][13]]);
109 G( 3, 4, 9, 14, m[sigma[i][14]], m[sigma[i][15]]);
110 }
111
112 for( i = 0; i < 8; ++i )
113 ctx->h[i] ^= v[i] ^ v[i + 8];
114}
115
116static int init(CTX *ctx, size_t outlen) { // (keylen=0: no key)
117 size_t i;
118
119 if (outlen == 0 || outlen > 64)
120 return -1;
121
122 for (i = 0; i < 8; i++)
123 ctx->h[i] = iv[i];
124 ctx->h[0] ^= 0x01010000 ^ outlen;
125
126 ctx->t[0] = 0;
127 ctx->t[1] = 0;
128 ctx->c = 0;
129 ctx->outlen = outlen;
130
131 return 0;
132}
133
134static void update(CTX *ctx, const void *in, size_t inlen) {
135 size_t i;
136
137 for (i = 0; i < inlen; i++) {
138 if (ctx->c == 128) {
139 ctx->t[0] += ctx->c;
140 if (ctx->t[0] < ctx->c)
141 ctx->t[1]++;
142 compress(ctx, 0);
143 ctx->c = 0;
144 }
145 ctx->b[ctx->c++] = ((const uint8_t *) in)[i];
146 }
147}
148
149static void final(CTX *ctx, void *out) {
150 size_t i;
151
152 ctx->t[0] += ctx->c;
153 if (ctx->t[0] < ctx->c)
154 ctx->t[1]++;
155
156 while (ctx->c < 128)
157 ctx->b[ctx->c++] = 0;
158 compress(ctx, 1);
159
160 for (i = 0; i < ctx->outlen; i++) {
161 ((uint8_t *) out)[i] =
162 (ctx->h[i >> 3] >> (8 * (i & 7))) & 0xFF;
163 }
164}
165
166// public function
167int blake2b(void *out, size_t outlen, const void *in, size_t inlen) {
168 CTX ctx;
169
170 if (init(&ctx, outlen))
171 return -1;
172 update(&ctx, in, inlen);
173 final(&ctx, out);
174
175 return 0;
176}
diff --git a/src/fids/config b/src/fids/config
new file mode 100644
index 000000000..c18c97260
--- /dev/null
+++ b/src/fids/config
@@ -0,0 +1,16 @@
1/bin
2/sbin
3/usr/bin
4/usr/sbin
5/usr/games
6/opt
7/usr/share/ca-certificates
8
9
10/home/netblue/.bashrc
11/home/netblue/.config/firejail
12/home/netblue/.config/autostart
13/home/netblue/Desktop/*.desktop
14/home/netblue/.ssh
15/home/netblue/.gnupg
16
diff --git a/src/fids/db.c b/src/fids/db.c
new file mode 100644
index 000000000..e8dfab1ac
--- /dev/null
+++ b/src/fids/db.c
@@ -0,0 +1,158 @@
1/*
2 * Copyright (C) 2014-2022 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20#include"fids.h"
21
22typedef struct db_t {
23 struct db_t *next;
24 char *fname;
25 char *checksum;
26 char *mode;
27 int checked;
28} DB;
29
30#define MAXBUF 4096
31static DB *database[HASH_MAX] = {NULL};
32
33// djb2 hash function by Dan Bernstein
34static unsigned hash(const char *str) {
35 unsigned long hash = 5381;
36 int c;
37
38 while ((c = *str++) != '\0')
39 hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
40
41 return hash & (HASH_MAX - 1);
42}
43
44#if 0
45// for testing the hash table
46static void db_print(void) {
47 int i;
48 for (i = 0; i < HASH_MAX; i++) {
49 int cnt = 0;
50 DB *ptr = database[i];
51 while (ptr) {
52 cnt++;
53 ptr = ptr->next;
54 }
55 printf("%d ", cnt);
56 fflush(0);
57 }
58 printf("\n");
59}
60#endif
61
62static void db_add(const char *fname, const char *checksum, const char *mode) {
63 DB *ptr = malloc(sizeof(DB));
64 if (!ptr)
65 errExit("malloc");
66 ptr->fname = strdup(fname);
67 ptr->checksum = strdup(checksum);
68 ptr->mode = strdup(mode);
69 ptr->checked = 0;
70 if (!ptr->fname || !ptr->checksum || !ptr->mode)
71 errExit("strdup");
72
73 unsigned h = hash(fname);
74 ptr->next = database[h];
75 database[h] = ptr;
76}
77
78void db_check(const char *fname, const char *checksum, const char *mode) {
79 assert(fname);
80 assert(checksum);
81 assert(mode);
82
83 unsigned h =hash(fname);
84 DB *ptr = database[h];
85 while (ptr) {
86 if (strcmp(fname, ptr->fname) == 0) {
87 ptr->checked = 1;
88 break;
89 }
90 ptr = ptr->next;
91 }
92
93 if (ptr ) {
94 if (strcmp(checksum, ptr->checksum)) {
95 f_modified++;
96 fprintf(stderr, "\nWarning: modified %s\n", fname);
97 }
98 if (strcmp(mode, ptr->mode)) {
99 f_permissions++;
100 fprintf(stderr, "\nWarning: permissions %s: old %s, new %s\n",
101 fname, ptr->mode, mode);
102 }
103 }
104 else {
105 f_new++;
106 fprintf(stderr, "\nWarning: new file %s\n", fname);
107 }
108}
109
110void db_missing(void) {
111 int i;
112 for (i = 0; i < HASH_MAX; i++) {
113 DB *ptr = database[i];
114 while (ptr) {
115 if (!ptr->checked) {
116 f_removed++;
117 fprintf(stderr, "Warning: removed %s\n", ptr->fname);
118 }
119 ptr = ptr->next;
120 }
121 }
122}
123
124// return 0 if ok, 1 if error
125int db_init(void) {
126 char buf[MAXBUF];
127 while(fgets(buf, MAXBUF, stdin)) {
128 // split - tab separated
129
130 char *mode = buf;
131 char *ptr = strchr(buf, '\t');
132 if (!ptr)
133 goto errexit;
134 *ptr = '\0';
135
136 char *checksum = ptr + 1;
137 ptr = strchr(checksum, '\t');
138 if (!ptr)
139 goto errexit;
140 *ptr = '\0';
141
142 char *fname = ptr + 1;
143 ptr = strchr(fname, '\n');
144 if (!ptr)
145 goto errexit;
146 *ptr = '\0';
147
148 db_add(fname, checksum, mode);
149 }
150// db_print();
151
152 return 0;
153
154errexit:
155 fprintf(stderr, "Error fids: database corrupted\n");
156 exit(1);
157}
158
diff --git a/src/fids/db_exclude.c b/src/fids/db_exclude.c
new file mode 100644
index 000000000..cfb37219c
--- /dev/null
+++ b/src/fids/db_exclude.c
@@ -0,0 +1,56 @@
1/*
2 * Copyright (C) 2014-2022 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20#include"fids.h"
21
22typedef struct db_exclude_t {
23 struct db_exclude_t *next;
24 char *fname;
25 int len;
26} DB_EXCLUDE;
27static DB_EXCLUDE *database = NULL;
28
29void db_exclude_add(const char *fname) {
30 assert(fname);
31
32 DB_EXCLUDE *ptr = malloc(sizeof(DB_EXCLUDE));
33 if (!ptr)
34 errExit("malloc");
35
36 ptr->fname = strdup(fname);
37 if (!ptr->fname)
38 errExit("strdup");
39 ptr->len = strlen(fname);
40 ptr->next = database;
41 database = ptr;
42}
43
44int db_exclude_check(const char *fname) {
45 assert(fname);
46
47 DB_EXCLUDE *ptr = database;
48 while (ptr != NULL) {
49 if (strncmp(fname, ptr->fname, ptr->len) == 0)
50 return 1;
51 ptr = ptr->next;
52 }
53
54 return 0;
55}
56
diff --git a/src/fids/fids.h b/src/fids/fids.h
new file mode 100644
index 000000000..93ae106a1
--- /dev/null
+++ b/src/fids/fids.h
@@ -0,0 +1,51 @@
1/*
2 * Copyright (C) 2014-2022 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20#ifndef FIDS_H
21#define FIDS_H
22
23#include "../include/common.h"
24
25// main.c
26#define MAX_DIR_LEVEL 20 // max directory tree depth
27#define MAX_INCLUDE_LEVEL 10 // max include level for config files
28extern int f_scanned;
29extern int f_modified;
30extern int f_new;
31extern int f_removed;
32extern int f_permissions;
33
34// db.c
35#define HASH_MAX 2048 // power of 2
36int db_init(void);
37void db_check(const char *fname, const char *checksum, const char *mode);
38void db_missing(void);
39
40// db_exclude.c
41void db_exclude_add(const char *fname);
42int db_exclude_check(const char *fname);
43
44
45// blake2b.c
46//#define KEY_SIZE 128 // key size in bytes
47#define KEY_SIZE 256
48//#define KEY_SIZE 512
49int blake2b(void *out, size_t outlen, const void *in, size_t inlen);
50
51#endif
diff --git a/src/fids/main.c b/src/fids/main.c
new file mode 100644
index 000000000..e6be365d1
--- /dev/null
+++ b/src/fids/main.c
@@ -0,0 +1,378 @@
1/*
2 * Copyright (C) 2014-2022 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20#include "fids.h"
21#include <sys/types.h>
22#include <sys/stat.h>
23#include <unistd.h>
24#include <fcntl.h>
25#include <sys/mman.h>
26#include <dirent.h>
27#include <glob.h>
28
29#define MAXBUF 4096
30
31static int dir_level = 1;
32static int include_level = 0;
33int arg_init = 0;
34int arg_check = 0;
35char *arg_homedir = NULL;
36char *arg_dbfile = NULL;
37
38int f_scanned = 0;
39int f_modified = 0;
40int f_new = 0;
41int f_removed = 0;
42int f_permissions = 0;
43
44
45
46static inline int is_dir(const char *fname) {
47 assert(fname);
48
49 struct stat s;
50 if (stat(fname, &s) == 0) {
51 if (S_ISDIR(s.st_mode))
52 return 1;
53 }
54 return 0;
55}
56
57static inline int is_link(const char *fname) {
58 assert(fname);
59
60 char c;
61 ssize_t rv = readlink(fname, &c, 1);
62 return (rv != -1);
63}
64
65// mode is an array of 10 chars or more
66static inline void file_mode(const char *fname, char *mode) {
67 assert(fname);
68 assert(mode);
69
70 struct stat s;
71 if (stat(fname, &s)) {
72 *mode = '\0';
73 return;
74 }
75
76 sprintf(mode, (s.st_mode & S_IRUSR) ? "r" : "-");
77 sprintf(mode + 1, (s.st_mode & S_IWUSR) ? "w" : "-");
78 sprintf(mode + 2, (s.st_mode & S_IXUSR) ? "x" : "-");
79 sprintf(mode + 3, (s.st_mode & S_IRGRP) ? "r" : "-");
80 sprintf(mode + 4, (s.st_mode & S_IWGRP) ? "w" : "-");
81 sprintf(mode + 5, (s.st_mode & S_IXGRP) ? "x" : "-");
82 sprintf(mode + 6, (s.st_mode & S_IROTH) ? "r" : "-");
83 sprintf(mode + 7, (s.st_mode & S_IWOTH) ? "w" : "-");
84 sprintf(mode + 8, (s.st_mode & S_IXOTH) ? "x" : "-");
85}
86
87
88static void file_checksum(const char *fname) {
89 assert(fname);
90
91 int fd = open(fname, O_RDONLY);
92 if (fd == -1)
93 return;
94
95 off_t size = lseek(fd, 0, SEEK_END);
96 if (size < 0) {
97 close(fd);
98 return;
99 }
100
101 char *content = "empty";
102 int mmapped = 0;
103 if (size == 0) {
104 // empty files don't mmap - use "empty" string as the file content
105 size = 6; // strlen("empty") + 1
106 }
107 else {
108 content = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
109 close(fd);
110 mmapped = 1;
111 }
112
113 unsigned char checksum[KEY_SIZE / 8];
114 blake2b(checksum, sizeof(checksum), content, size);
115 if (mmapped)
116 munmap(content, size);
117
118 // calculate blake2 checksum
119 char str_checksum[(KEY_SIZE / 8) * 2 + 1];
120 int long unsigned i;
121 char *ptr = str_checksum;
122 for (i = 0; i < sizeof(checksum); i++, ptr += 2)
123 sprintf(ptr, "%02x", (unsigned char ) checksum[i]);
124
125 // build permissions string
126 char mode[10];
127 file_mode(fname, mode);
128
129 if (arg_init)
130 printf("%s\t%s\t%s\n", mode, str_checksum, fname);
131 else if (arg_check)
132 db_check(fname, str_checksum, mode);
133 else
134 assert(0);
135
136 f_scanned++;
137 if (f_scanned % 500 == 0)
138 fprintf(stderr, "%d ", f_scanned);
139 fflush(0);
140}
141
142void list_directory(const char *fname) {
143 assert(fname);
144 if (dir_level > MAX_DIR_LEVEL) {
145 fprintf(stderr, "Warning fids: maximum depth level exceeded for %s\n", fname);
146 return;
147 }
148
149 if (db_exclude_check(fname))
150 return;
151
152 if (is_link(fname))
153 return;
154
155 if (!is_dir(fname)) {
156 file_checksum(fname);
157 return;
158 }
159
160 DIR *dir;
161 struct dirent *entry;
162
163 if (!(dir = opendir(fname)))
164 return;
165
166 dir_level++;
167 while ((entry = readdir(dir)) != NULL) {
168 if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0)
169 continue;
170 char *path;
171 if (asprintf(&path, "%s/%s", fname, entry->d_name) == -1)
172 errExit("asprintf");
173 list_directory(path);
174 free(path);
175 }
176 closedir(dir);
177 dir_level--;
178}
179
180void globbing(const char *fname) {
181 assert(fname);
182
183 // filter top directory
184 if (strcmp(fname, "/") == 0)
185 return;
186
187 glob_t globbuf;
188 int globerr = glob(fname, GLOB_NOCHECK | GLOB_NOSORT | GLOB_PERIOD, NULL, &globbuf);
189 if (globerr) {
190 fprintf(stderr, "Error fids: failed to glob pattern %s\n", fname);
191 exit(1);
192 }
193
194 long unsigned i;
195 for (i = 0; i < globbuf.gl_pathc; i++) {
196 char *path = globbuf.gl_pathv[i];
197 assert(path);
198
199 list_directory(path);
200 }
201
202 globfree(&globbuf);
203}
204
205static void process_config(const char *fname) {
206 assert(fname);
207
208 if (++include_level >= MAX_INCLUDE_LEVEL) {
209 fprintf(stderr, "Error ids: maximum include level for config files exceeded\n");
210 exit(1);
211 }
212
213 fprintf(stderr, "Opening config file %s\n", fname);
214 int fd = open(fname, O_RDONLY|O_CLOEXEC);
215 if (fd < 0) {
216 if (include_level == 1) {
217 fprintf(stderr, "Error ids: cannot open config file %s\n", fname);
218 exit(1);
219 }
220 return;
221 }
222
223 // make sure the file is owned by root
224 struct stat s;
225 if (fstat(fd, &s)) {
226 fprintf(stderr, "Error ids: cannot stat config file %s\n", fname);
227 exit(1);
228 }
229 if (s.st_uid || s.st_gid) {
230 fprintf(stderr, "Error ids: config file not owned by root\n");
231 exit(1);
232 }
233
234 fprintf(stderr, "Loading config file %s\n", fname);
235 FILE *fp = fdopen(fd, "r");
236 if (!fp) {
237 fprintf(stderr, "Error fids: cannot open config file %s\n", fname);
238 exit(1);
239 }
240
241 char buf[MAXBUF];
242 int line = 0;
243 while (fgets(buf, MAXBUF, fp)) {
244 line++;
245
246 // trim \n
247 char *ptr = strchr(buf, '\n');
248 if (ptr)
249 *ptr = '\0';
250
251 // comments
252 ptr = strchr(buf, '#');
253 if (ptr)
254 *ptr = '\0';
255
256 // empty space
257 ptr = buf;
258 while (*ptr == ' ' || *ptr == '\t')
259 ptr++;
260 char *start = ptr;
261
262 // empty line
263 if (*start == '\0')
264 continue;
265
266 // trailing spaces
267 ptr = start + strlen(start);
268 ptr--;
269 while (*ptr == ' ' || *ptr == '\t')
270 *ptr-- = '\0';
271
272 // replace ${HOME}
273 if (strncmp(start, "include", 7) == 0) {
274 ptr = start + 7;
275 if ((*ptr != ' ' && *ptr != '\t') || *ptr == '\0') {
276 fprintf(stderr, "Error fids: invalid line %d in %s\n", line, fname);
277 exit(1);
278 }
279 while (*ptr == ' ' || *ptr == '\t')
280 ptr++;
281
282 if (*ptr == '/')
283 process_config(ptr);
284 else {
285 // assume the file is in /etc/firejail
286 char *tmp;
287 if (asprintf(&tmp, "/etc/firejail/%s", ptr) == -1)
288 errExit("asprintf");
289 process_config(tmp);
290 free(tmp);
291 }
292 }
293 else if (*start == '!') {
294 // exclude file or dir
295 start++;
296 if (strncmp(start, "${HOME}", 7))
297 db_exclude_add(start);
298 else {
299 char *fname;
300 if (asprintf(&fname, "%s%s", arg_homedir, start + 7) == -1)
301 errExit("asprintf");
302 db_exclude_add(fname);
303 free(fname);
304 }
305 }
306 else if (strncmp(start, "${HOME}", 7))
307 globbing(start);
308 else {
309 char *fname;
310 if (asprintf(&fname, "%s%s", arg_homedir, start + 7) == -1)
311 errExit("asprintf");
312 globbing(fname);
313 free(fname);
314 }
315 }
316
317 fclose(fp);
318 include_level--;
319}
320
321
322
323void usage(void) {
324 printf("Usage: fids [--help|-h|-?] --init|--check homedir\n");
325}
326
327int main(int argc, char **argv) {
328 int i;
329 for (i = 1; i < argc; i++) {
330 if (strcmp(argv[i], "-h") == 0 ||
331 strcmp(argv[i], "-?") == 0 ||
332 strcmp(argv[i], "--help") == 0) {
333 usage();
334 return 0;
335 }
336 else if (strcmp(argv[i], "--init") == 0)
337 arg_init = 1;
338 else if (strcmp(argv[i], "--check") == 0)
339 arg_check = 1;
340 else if (strncmp(argv[i], "--", 2) == 0) {
341 fprintf(stderr, "Error fids: invalid argument %s\n", argv[i]);
342 exit(1);
343 }
344 }
345
346 if (argc != 3) {
347 fprintf(stderr, "Error fids: invalid number of arguments\n");
348 exit(1);
349 }
350 arg_homedir = argv[2];
351
352 int op = arg_check + arg_init;
353 if (op == 0 || op == 2) {
354 fprintf(stderr, "Error fids: use either --init or --check\n");
355 exit(1);
356 }
357
358 if (arg_init) {
359 process_config(SYSCONFDIR"/ids.config");
360 fprintf(stderr, "\n%d files scanned\n", f_scanned);
361 fprintf(stderr, "IDS database initialized\n");
362 }
363 else if (arg_check) {
364 if (db_init()) {
365 fprintf(stderr, "Error: IDS database not initialized, please run \"firejail --ids-init\"\n");
366 exit(1);
367 }
368
369 process_config(SYSCONFDIR"/ids.config");
370 fprintf(stderr, "\n%d files scanned: modified %d, permissions %d, new %d, removed %d\n",
371 f_scanned, f_modified, f_permissions, f_new, f_removed);
372 db_missing();
373 }
374 else
375 assert(0);
376
377 return 0;
378}
diff --git a/src/firecfg/desktop_files.c b/src/firecfg/desktop_files.c
index 06b0a117f..408662907 100644
--- a/src/firecfg/desktop_files.c
+++ b/src/firecfg/desktop_files.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -24,11 +24,16 @@
24static int check_profile(const char *name, const char *homedir) { 24static int check_profile(const char *name, const char *homedir) {
25 // build profile name 25 // build profile name
26 char *profname1; 26 char *profname1;
27#ifndef HAVE_ONLY_SYSCFG_PROFILES
27 char *profname2; 28 char *profname2;
29#endif
28 if (asprintf(&profname1, "%s/%s.profile", SYSCONFDIR, name) == -1) 30 if (asprintf(&profname1, "%s/%s.profile", SYSCONFDIR, name) == -1)
29 errExit("asprintf"); 31 errExit("asprintf");
32
33#ifndef HAVE_ONLY_SYSCFG_PROFILES
30 if (asprintf(&profname2, "%s/.config/firejail/%s.profile", homedir, name) == -1) 34 if (asprintf(&profname2, "%s/.config/firejail/%s.profile", homedir, name) == -1)
31 errExit("asprintf"); 35 errExit("asprintf");
36#endif
32 37
33 int rv = 0; 38 int rv = 0;
34 if (access(profname1, R_OK) == 0) { 39 if (access(profname1, R_OK) == 0) {
@@ -36,14 +41,18 @@ static int check_profile(const char *name, const char *homedir) {
36 printf("found %s\n", profname1); 41 printf("found %s\n", profname1);
37 rv = 1; 42 rv = 1;
38 } 43 }
44#ifndef HAVE_ONLY_SYSCFG_PROFILES
39 else if (access(profname2, R_OK) == 0) { 45 else if (access(profname2, R_OK) == 0) {
40 if (arg_debug) 46 if (arg_debug)
41 printf("found %s\n", profname2); 47 printf("found %s\n", profname2);
42 rv = 1; 48 rv = 1;
43 } 49 }
50#endif
44 51
45 free(profname1); 52 free(profname1);
53#ifndef HAVE_ONLY_SYSCFG_PROFILES
46 free(profname2); 54 free(profname2);
55#endif
47 return rv; 56 return rv;
48} 57}
49 58
@@ -168,9 +177,9 @@ void fix_desktop_files(char *homedir) {
168 177
169 char *filename = entry->d_name; 178 char *filename = entry->d_name;
170 179
171 // skip links 180 // skip links - Discord on Arch #4235 seems to be a symlink to /opt directory
172 if (is_link(filename)) 181// if (is_link(filename))
173 continue; 182// continue;
174 183
175 // no profile in /etc/firejail, no desktop file fixing 184 // no profile in /etc/firejail, no desktop file fixing
176 if (!have_profile(filename, homedir)) 185 if (!have_profile(filename, homedir))
diff --git a/src/firecfg/firecfg.config b/src/firecfg/firecfg.config
index 474904ebf..618093193 100644
--- a/src/firecfg/firecfg.config
+++ b/src/firecfg/firecfg.config
@@ -1,8 +1,8 @@
1# /usr/lib/firejail/firecfg.config - firecfg utility configuration file 1# /etc/firejail/firecfg.config - firecfg utility configuration file
2# This is the list of programs in alphabetical order handled by firecfg utility 2# This is the list of programs in alphabetical order handled by firecfg utility
3# 3#
4#qemu-system-x86_64
50ad 40ad
51password
62048-qt 62048-qt
7Books 7Books
8Builder 8Builder
@@ -38,13 +38,15 @@ abrowser
38akonadi_control 38akonadi_control
39akregator 39akregator
40alacarte 40alacarte
41alpine
42alpinef
41amarok 43amarok
42amule 44amule
43amuled 45amuled
44android-studio 46android-studio
45anydesk 47anydesk
46apostrophe
47apktool 48apktool
49apostrophe
48# ar - disable until we fix CLI archivers for makepkg on Arch (see discussion in #3095) 50# ar - disable until we fix CLI archivers for makepkg on Arch (see discussion in #3095)
49arch-audit 51arch-audit
50archaudit-report 52archaudit-report
@@ -92,6 +94,7 @@ bleachbit
92blender 94blender
93blender-2.8 95blender-2.8
94bless 96bless
97blobby
95blobwars 98blobwars
96bluefish 99bluefish
97bnox 100bnox
@@ -107,6 +110,7 @@ brave-browser-stable
107# bzcat - disable until we fix CLI archivers for makepkg on Arch (see discussion in #3095) 110# bzcat - disable until we fix CLI archivers for makepkg on Arch (see discussion in #3095)
108bzflag 111bzflag
109# bzip2 - disable until we fix CLI archivers for makepkg on Arch (see discussion in #3095) 112# bzip2 - disable until we fix CLI archivers for makepkg on Arch (see discussion in #3095)
113cachy-browser
110calibre 114calibre
111calligra 115calligra
112calligraauthor 116calligraauthor
@@ -136,23 +140,27 @@ clamdscan
136clamdtop 140clamdtop
137clamscan 141clamscan
138clamtk 142clamtk
139claws-mail
140clawsker 143clawsker
144claws-mail
141clementine 145clementine
142clion 146clion
143clipit 147clion-eap
144clipgrab 148clipgrab
149clipit
145cliqz 150cliqz
146clocks 151clocks
147cmus 152cmus
148code 153code
149code-oss 154code-oss
155codium
156cointop
150cola 157cola
151colorful 158colorful
152com.github.bleakgrey.tootle 159com.github.bleakgrey.tootle
153com.github.dahenson.agenda 160com.github.dahenson.agenda
154com.github.johnfactotum.Foliate 161com.github.johnfactotum.Foliate
155com.github.phase1geo.minder 162com.github.phase1geo.minder
163com.github.tchx84.Flatseal
156com.gitlab.newsflash 164com.gitlab.newsflash
157conkeror 165conkeror
158conky 166conky
@@ -167,12 +175,14 @@ cvlc
167cyberfox 175cyberfox
168darktable 176darktable
169dconf-editor 177dconf-editor
178ddgr
170ddgtk 179ddgtk
171deadbeef 180deadbeef
172deluge 181deluge
173desktopeditors 182desktopeditors
174devhelp 183devhelp
175dex2jar 184dex2jar
185d-feet
176dia 186dia
177dig 187dig
178digikam 188digikam
@@ -186,7 +196,6 @@ display-im6.q16
186dnox 196dnox
187dnscrypt-proxy 197dnscrypt-proxy
188dnsmasq 198dnsmasq
189dolphin
190dolphin-emu 199dolphin-emu
191dooble 200dooble
192dooble-qt4 201dooble-qt4
@@ -195,13 +204,12 @@ dragon
195drawio 204drawio
196drill 205drill
197dropbox 206dropbox
198d-feet
199easystroke 207easystroke
200ebook-viewer
201ebook-convert 208ebook-convert
202ebook-edit 209ebook-edit
203ebook-meta 210ebook-meta
204ebook-polish 211ebook-polish
212ebook-viewer
205electron-mail 213electron-mail
206electrum 214electrum
207element-desktop 215element-desktop
@@ -251,8 +259,8 @@ flacsplt
251flameshot 259flameshot
252flashpeak-slimjet 260flashpeak-slimjet
253flowblade 261flowblade
254font-manager
255fontforge 262fontforge
263font-manager
256fossamail 264fossamail
257four-in-a-row 265four-in-a-row
258fractal 266fractal
@@ -271,9 +279,12 @@ freetube
271freshclam 279freshclam
272frogatto 280frogatto
273frozen-bubble 281frozen-bubble
282ftp
283funnyboat
274gajim 284gajim
275gajim-history-manager 285gajim-history-manager
276galculator 286galculator
287gallery-dl
277gapplication 288gapplication
278gcalccmd 289gcalccmd
279gcloud 290gcloud
@@ -291,8 +302,8 @@ gimp-2.10
291gimp-2.8 302gimp-2.8
292gist 303gist
293gist-paste 304gist-paste
294gitg
295git-cola 305git-cola
306gitg
296github-desktop 307github-desktop
297gitter 308gitter
298# gjs -- https://github.com/netblue30/firejail/issues/3333#issuecomment-612601102 309# gjs -- https://github.com/netblue30/firejail/issues/3333#issuecomment-612601102
@@ -342,6 +353,7 @@ gnome-weather
342gnote 353gnote
343gnubik 354gnubik
344godot 355godot
356goldendict
345goobox 357goobox
346google-chrome 358google-chrome
347google-chrome-beta 359google-chrome-beta
@@ -350,6 +362,7 @@ google-chrome-unstable
350google-earth 362google-earth
351google-earth-pro 363google-earth-pro
352google-play-music-desktop-player 364google-play-music-desktop-player
365googler
353gpa 366gpa
354gpicview 367gpicview
355gpredict 368gpredict
@@ -357,10 +370,11 @@ gradio
357gramps 370gramps
358gravity-beams-and-evaporating-stars 371gravity-beams-and-evaporating-stars
359gthumb 372gthumb
360gtk-straw-viewer
361gtk-youtube-viewer
362gtk2-youtube-viewer 373gtk2-youtube-viewer
363gtk3-youtube-viewer 374gtk3-youtube-viewer
375gtk-pipe-viewer
376gtk-straw-viewer
377gtk-youtube-viewer
364guayadeque 378guayadeque
365gucharmap 379gucharmap
366gummi 380gummi
@@ -386,9 +400,11 @@ idea.sh
386imagej 400imagej
387img2txt 401img2txt
388impressive 402impressive
403imv
389inkscape 404inkscape
390inkview 405inkview
391inox 406inox
407io.github.lainsce.Notejot
392ipcalc 408ipcalc
393ipcalc-ng 409ipcalc-ng
394iridium 410iridium
@@ -443,13 +459,16 @@ kube
443kwrite 459kwrite
444leafpad 460leafpad
445# less - breaks man 461# less - breaks man
462librecad
446libreoffice 463libreoffice
447librewolf 464librewolf
448librewolf-nightly 465librewolf-nightly
466lifeograph
449liferea 467liferea
450lightsoff 468lightsoff
451lincity-ng 469lincity-ng
452links 470links
471links2
453linphone 472linphone
454lmms 473lmms
455lobase 474lobase
@@ -489,6 +508,7 @@ mathematica
489matrix-mirage 508matrix-mirage
490mattermost-desktop 509mattermost-desktop
491mcabber 510mcabber
511mcomix
492mediainfo 512mediainfo
493mediathekview 513mediathekview
494megaglest 514megaglest
@@ -499,6 +519,7 @@ mendeleydesktop
499menulibre 519menulibre
500meteo-qt 520meteo-qt
501microsoft-edge 521microsoft-edge
522microsoft-edge-beta
502microsoft-edge-dev 523microsoft-edge-dev
503midori 524midori
504min 525min
@@ -515,8 +536,8 @@ mp3splt-gtk
515mp3wrap 536mp3wrap
516mpDris2 537mpDris2
517mpg123 538mpg123
518mpg123.bin
519mpg123-alsa 539mpg123-alsa
540mpg123.bin
520mpg123-id3dump 541mpg123-id3dump
521mpg123-jack 542mpg123-jack
522mpg123-nas 543mpg123-nas
@@ -555,6 +576,7 @@ mypaint
555mypaint-ora-thumbnailer 576mypaint-ora-thumbnailer
556natron 577natron
557ncdu 578ncdu
579ncdu2
558neochat 580neochat
559neomutt 581neomutt
560netactview 582netactview
@@ -575,6 +597,7 @@ nitroshare-nmh
575nitroshare-send 597nitroshare-send
576nitroshare-ui 598nitroshare-ui
577nomacs 599nomacs
600notable
578nslookup 601nslookup
579nuclear 602nuclear
580nylas 603nylas
@@ -585,22 +608,26 @@ odt2txt
585oggsplt 608oggsplt
586okular 609okular
587onboard 610onboard
611onionshare
612onionshare-cli
588onionshare-gui 613onionshare-gui
589ooffice 614ooffice
590ooviewdoc 615ooviewdoc
591open-invaders
592openarena 616openarena
593openarena_ded 617openarena_ded
594opencity 618opencity
595openclonk 619openclonk
620open-invaders
596openmw 621openmw
597openmw-launcher 622openmw-launcher
598openoffice.org 623openoffice.org
599openshot 624openshot
600openshot-qt 625openshot-qt
626openstego
601openttd 627openttd
602opera 628opera
603opera-beta 629opera-beta
630opera-developer
604orage 631orage
605ostrichriders 632ostrichriders
606otter-browser 633otter-browser
@@ -626,6 +653,7 @@ pinball
626pingus 653pingus
627pinta 654pinta
628pioneer 655pioneer
656pipe-viewer
629pithos 657pithos
630pitivi 658pitivi
631pix 659pix
@@ -648,7 +676,9 @@ pybitmessage
648# pycharm-professional 676# pycharm-professional
649# pzstd - disable until we fix CLI archivers for makepkg on Arch (see discussion in #3095) 677# pzstd - disable until we fix CLI archivers for makepkg on Arch (see discussion in #3095)
650qbittorrent 678qbittorrent
679qcomicbook
651qemu-launcher 680qemu-launcher
681#qemu-system-x86_64
652qgis 682qgis
653qlipper 683qlipper
654qmmp 684qmmp
@@ -662,11 +692,14 @@ quaternion
662quiterss 692quiterss
663qupzilla 693qupzilla
664qutebrowser 694qutebrowser
695raincat
665rambox 696rambox
666redeclipse 697redeclipse
698rednotebook
667redshift 699redshift
668regextester 700regextester
669remmina 701remmina
702retroarch
670rhythmbox 703rhythmbox
671rhythmbox-client 704rhythmbox-client
672ricochet 705ricochet
@@ -675,6 +708,7 @@ riot-web
675ripperx 708ripperx
676ristretto 709ristretto
677rocketchat 710rocketchat
711rpcs3
678rtorrent 712rtorrent
679runenpass.sh 713runenpass.sh
680sayonara 714sayonara
@@ -683,6 +717,7 @@ scorched3d
683scorchwentbonkers 717scorchwentbonkers
684scribus 718scribus
685sdat2img 719sdat2img
720seafile-applet
686seahorse 721seahorse
687seahorse-adventures 722seahorse-adventures
688seahorse-daemon 723seahorse-daemon
@@ -710,8 +745,8 @@ smuxi-frontend-gnome
710snox 745snox
711soffice 746soffice
712sol 747sol
713sound-juicer
714soundconverter 748soundconverter
749sound-juicer
715spectacle 750spectacle
716spectral 751spectral
717spotify 752spotify
@@ -745,6 +780,7 @@ teamspeak3
745teeworlds 780teeworlds
746telegram 781telegram
747telegram-desktop 782telegram-desktop
783telnet
748terasology 784terasology
749textmaker18 785textmaker18
750textmaker18free 786textmaker18free
@@ -753,6 +789,7 @@ thunderbird-beta
753thunderbird-wayland 789thunderbird-wayland
754tilp 790tilp
755tor-browser 791tor-browser
792torbrowser
756tor-browser-ar 793tor-browser-ar
757tor-browser-ca 794tor-browser-ca
758tor-browser-cs 795tor-browser-cs
@@ -774,6 +811,7 @@ tor-browser-it
774tor-browser-ja 811tor-browser-ja
775tor-browser-ka 812tor-browser-ka
776tor-browser-ko 813tor-browser-ko
814torbrowser-launcher
777tor-browser-nb 815tor-browser-nb
778tor-browser-nl 816tor-browser-nl
779tor-browser-pl 817tor-browser-pl
@@ -784,7 +822,6 @@ tor-browser-tr
784tor-browser-vi 822tor-browser-vi
785tor-browser-zh-cn 823tor-browser-zh-cn
786tor-browser-zh-tw 824tor-browser-zh-tw
787torbrowser-launcher
788torcs 825torcs
789totem 826totem
790tracker 827tracker
@@ -844,6 +881,7 @@ weechat
844weechat-curses 881weechat-curses
845wesnoth 882wesnoth
846wget 883wget
884wget2
847whalebird 885whalebird
848whois 886whois
849widelands 887widelands
@@ -852,10 +890,10 @@ wire-desktop
852wireshark 890wireshark
853wireshark-gtk 891wireshark-gtk
854wireshark-qt 892wireshark-qt
893wordwarvi
855wpp 894wpp
856wps 895wps
857wpspdf 896wpspdf
858wordwarvi
859x2goclient 897x2goclient
860xbill 898xbill
861xcalc 899xcalc
@@ -868,6 +906,7 @@ xfce4-notes
868xfce4-screenshooter 906xfce4-screenshooter
869xiphos 907xiphos
870xlinks 908xlinks
909xlinks2
871xmms 910xmms
872xmr-stak 911xmr-stak
873xonotic 912xonotic
@@ -889,13 +928,15 @@ yelp
889youtube 928youtube
890youtube-dl 929youtube-dl
891youtube-dl-gui 930youtube-dl-gui
892youtube-viewer
893youtubemusic-nativefier 931youtubemusic-nativefier
932youtube-viewer
933yt-dlp
894ytmdesktop 934ytmdesktop
895zaproxy 935zaproxy
896zart 936zart
897zathura 937zathura
898zeal 938zeal
939zim
899zoom 940zoom
900# zpaq - disable until we fix CLI archivers for makepkg on Arch (see discussion in #3095) 941# zpaq - disable until we fix CLI archivers for makepkg on Arch (see discussion in #3095)
901# zstd - disable until we fix CLI archivers for makepkg on Arch (see discussion in #3095) 942# zstd - disable until we fix CLI archivers for makepkg on Arch (see discussion in #3095)
diff --git a/src/firecfg/firecfg.h b/src/firecfg/firecfg.h
index 15826cf37..f54bfd5b5 100644
--- a/src/firecfg/firecfg.h
+++ b/src/firecfg/firecfg.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/firecfg/main.c b/src/firecfg/main.c
index 363000e15..2f346fecd 100644
--- a/src/firecfg/main.c
+++ b/src/firecfg/main.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -171,17 +171,17 @@ static void set_file(const char *name, const char *firejail_exec) {
171 free(fname); 171 free(fname);
172} 172}
173 173
174// parse /usr/lib/firejail/firecfg.cfg file 174// parse /etc/firejail/firecfg.config file
175static void set_links_firecfg(void) { 175static void set_links_firecfg(void) {
176 char *cfgfile; 176 char *cfgfile;
177 if (asprintf(&cfgfile, "%s/firejail/firecfg.config", LIBDIR) == -1) 177 if (asprintf(&cfgfile, "%s/firecfg.config", SYSCONFDIR) == -1)
178 errExit("asprintf"); 178 errExit("asprintf");
179 179
180 char *firejail_exec; 180 char *firejail_exec;
181 if (asprintf(&firejail_exec, "%s/bin/firejail", PREFIX) == -1) 181 if (asprintf(&firejail_exec, "%s/bin/firejail", PREFIX) == -1)
182 errExit("asprintf"); 182 errExit("asprintf");
183 183
184 // parse /usr/lib/firejail/firecfg.cfg file 184 // parse /etc/firejail/firecfg.config file
185 FILE *fp = fopen(cfgfile, "r"); 185 FILE *fp = fopen(cfgfile, "r");
186 if (!fp) { 186 if (!fp) {
187 perror("fopen"); 187 perror("fopen");
@@ -440,7 +440,7 @@ int main(int argc, char **argv) {
440 // clear all symlinks 440 // clear all symlinks
441 clean(); 441 clean();
442 442
443 // set new symlinks based on /usr/lib/firejail/firecfg.cfg 443 // set new symlinks based on /etc/firejail/firecfg.config
444 set_links_firecfg(); 444 set_links_firecfg();
445 445
446 if (getuid() == 0) { 446 if (getuid() == 0) {
diff --git a/src/firecfg/sound.c b/src/firecfg/sound.c
index e3fcdbd83..9d04c951b 100644
--- a/src/firecfg/sound.c
+++ b/src/firecfg/sound.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/firecfg/util.c b/src/firecfg/util.c
index 14d90b549..4697e7dd9 100644
--- a/src/firecfg/util.c
+++ b/src/firecfg/util.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/firejail/appimage.c b/src/firejail/appimage.c
index 59758bf2d..479473572 100644
--- a/src/firejail/appimage.c
+++ b/src/firejail/appimage.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -21,6 +21,7 @@
21// sudo mount -o loop krita-3.0-x86_64.appimage mnt 21// sudo mount -o loop krita-3.0-x86_64.appimage mnt
22 22
23#include "firejail.h" 23#include "firejail.h"
24#include "../include/gcov_wrapper.h"
24#include <sys/types.h> 25#include <sys/types.h>
25#include <sys/stat.h> 26#include <sys/stat.h>
26#include <sys/mount.h> 27#include <sys/mount.h>
@@ -30,6 +31,7 @@
30 31
31static char *devloop = NULL; // device file 32static char *devloop = NULL; // device file
32static long unsigned size = 0; // offset into appimage file 33static long unsigned size = 0; // offset into appimage file
34#define MAXBUF 4096
33 35
34#ifdef LOOP_CTL_GET_FREE // test for older kernels; this definition is found in /usr/include/linux/loop.h 36#ifdef LOOP_CTL_GET_FREE // test for older kernels; this definition is found in /usr/include/linux/loop.h
35static void err_loop(void) { 37static void err_loop(void) {
@@ -38,6 +40,36 @@ static void err_loop(void) {
38} 40}
39#endif 41#endif
40 42
43// return 1 if found
44int appimage_find_profile(const char *archive) {
45 assert(archive);
46 assert(strlen(archive));
47
48 // try to match the name of the archive with the list of programs in /etc/firejail/firecfg.config
49 FILE *fp = fopen(SYSCONFDIR "/firecfg.config", "r");
50 if (!fp) {
51 fprintf(stderr, "Error: cannot find %s, firejail is not correctly installed\n", SYSCONFDIR "/firecfg.config");
52 exit(1);
53 }
54 char buf[MAXBUF];
55 while (fgets(buf, MAXBUF, fp)) {
56 if (*buf == '#')
57 continue;
58 char *ptr = strchr(buf, '\n');
59 if (ptr)
60 *ptr = '\0';
61 if (strcasestr(archive, buf)) {
62 fclose(fp);
63 return profile_find_firejail(buf, 1);
64 }
65 }
66
67 fclose(fp);
68 return 0;
69
70}
71
72
41void appimage_set(const char *appimage) { 73void appimage_set(const char *appimage) {
42 assert(appimage); 74 assert(appimage);
43 assert(devloop == NULL); // don't call this twice! 75 assert(devloop == NULL); // don't call this twice!
@@ -67,7 +99,7 @@ void appimage_set(const char *appimage) {
67 99
68 // find or allocate a free loop device to use 100 // find or allocate a free loop device to use
69 EUID_ROOT(); 101 EUID_ROOT();
70 int cfd = open("/dev/loop-control", O_RDWR); 102 int cfd = open("/dev/loop-control", O_RDWR|O_CLOEXEC);
71 if (cfd == -1) 103 if (cfd == -1)
72 err_loop(); 104 err_loop();
73 int devnr = ioctl(cfd, LOOP_CTL_GET_FREE); 105 int devnr = ioctl(cfd, LOOP_CTL_GET_FREE);
@@ -78,7 +110,7 @@ void appimage_set(const char *appimage) {
78 errExit("asprintf"); 110 errExit("asprintf");
79 111
80 // associate loop device with appimage 112 // associate loop device with appimage
81 int lfd = open(devloop, O_RDONLY); 113 int lfd = open(devloop, O_RDONLY|O_CLOEXEC);
82 if (lfd == -1) 114 if (lfd == -1)
83 err_loop(); 115 err_loop();
84 if (ioctl(lfd, LOOP_SET_FD, ffd) == -1) 116 if (ioctl(lfd, LOOP_SET_FD, ffd) == -1)
@@ -109,9 +141,8 @@ void appimage_set(const char *appimage) {
109 141
110 if (cfg.cwd) 142 if (cfg.cwd)
111 env_store_name_val("OWD", cfg.cwd, SETENV); 143 env_store_name_val("OWD", cfg.cwd, SETENV);
112#ifdef HAVE_GCOV 144
113 __gcov_flush(); 145 __gcov_flush();
114#endif
115#else 146#else
116 fprintf(stderr, "Error: /dev/loop-control interface is not supported by your kernel\n"); 147 fprintf(stderr, "Error: /dev/loop-control interface is not supported by your kernel\n");
117 exit(1); 148 exit(1);
@@ -146,7 +177,7 @@ void appimage_mount(void) {
146void appimage_clear(void) { 177void appimage_clear(void) {
147 EUID_ROOT(); 178 EUID_ROOT();
148 if (devloop) { 179 if (devloop) {
149 int lfd = open(devloop, O_RDONLY); 180 int lfd = open(devloop, O_RDONLY|O_CLOEXEC);
150 if (lfd != -1) { 181 if (lfd != -1) {
151 if (ioctl(lfd, LOOP_CLR_FD, 0) != -1) 182 if (ioctl(lfd, LOOP_CLR_FD, 0) != -1)
152 fmessage("AppImage detached\n"); 183 fmessage("AppImage detached\n");
diff --git a/src/firejail/appimage_size.c b/src/firejail/appimage_size.c
index 43ca501da..4f8c7a7aa 100644
--- a/src/firejail/appimage_size.c
+++ b/src/firejail/appimage_size.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/firejail/arp.c b/src/firejail/arp.c
index 1e9641097..cbd80dee0 100644
--- a/src/firejail/arp.c
+++ b/src/firejail/arp.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -20,6 +20,7 @@
20#include "firejail.h" 20#include "firejail.h"
21#include <sys/socket.h> 21#include <sys/socket.h>
22#include <sys/ioctl.h> 22#include <sys/ioctl.h>
23#include <sys/time.h>
23#include <linux/if_ether.h> //TCP/IP Protocol Suite for Linux 24#include <linux/if_ether.h> //TCP/IP Protocol Suite for Linux
24#include <net/if.h> 25#include <net/if.h>
25#include <netinet/in.h> 26#include <netinet/in.h>
@@ -188,9 +189,14 @@ int arp_check(const char *dev, uint32_t destaddr) {
188 FD_SET(sock, &fds); 189 FD_SET(sock, &fds);
189 int maxfd = sock; 190 int maxfd = sock;
190 struct timeval ts; 191 struct timeval ts;
191 ts.tv_sec = 0; // 0.5 seconds wait time 192 gettimeofday(&ts, NULL);
192 ts.tv_usec = 500000; 193 double timerend = ts.tv_sec + ts.tv_usec / 1000000.0 + 0.5;
193 while (1) { 194 while (1) {
195 gettimeofday(&ts, NULL);
196 double now = ts.tv_sec + ts.tv_usec / 1000000.0;
197 double timeout = timerend - now;
198 ts.tv_sec = timeout;
199 ts.tv_usec = (timeout - ts.tv_sec) * 1000000;
194 int nready = select(maxfd + 1, &fds, (fd_set *) 0, (fd_set *) 0, &ts); 200 int nready = select(maxfd + 1, &fds, (fd_set *) 0, (fd_set *) 0, &ts);
195 if (nready < 0) 201 if (nready < 0)
196 errExit("select"); 202 errExit("select");
@@ -201,8 +207,8 @@ int arp_check(const char *dev, uint32_t destaddr) {
201 } 207 }
202 if (sendto (sock, frame, 14 + sizeof(ArpHdr), 0, (struct sockaddr *) &addr, sizeof (addr)) <= 0) 208 if (sendto (sock, frame, 14 + sizeof(ArpHdr), 0, (struct sockaddr *) &addr, sizeof (addr)) <= 0)
203 errExit("send"); 209 errExit("send");
204 ts.tv_sec = 0; // 0.5 seconds wait time 210 gettimeofday(&ts, NULL);
205 ts.tv_usec = 500000; 211 timerend = ts.tv_sec + ts.tv_usec / 1000000.0 + 0.5;
206 fflush(0); 212 fflush(0);
207 } 213 }
208 else { 214 else {
@@ -277,7 +283,7 @@ static uint32_t arp_random(const char *dev, Bridge *br) {
277 int i = 0; 283 int i = 0;
278 for (i = 0; i < 10; i++) { 284 for (i = 0; i < 10; i++) {
279 dest = start + ((uint32_t) rand()) % range; 285 dest = start + ((uint32_t) rand()) % range;
280 if (dest == ifip) // do not allow the interface address 286 if (dest == ifip || dest == cfg.defaultgw) // do not allow the interface address or the default gateway
281 continue; // try again 287 continue; // try again
282 288
283 // if we've made it up to here, we have a valid address 289 // if we've made it up to here, we have a valid address
@@ -325,7 +331,7 @@ static uint32_t arp_sequential(const char *dev, Bridge *br) {
325 331
326 // loop through addresses and stop as soon as you find an unused one 332 // loop through addresses and stop as soon as you find an unused one
327 while (dest <= last) { 333 while (dest <= last) {
328 if (dest == ifip) { 334 if (dest == ifip || dest == cfg.defaultgw) {
329 dest++; 335 dest++;
330 continue; 336 continue;
331 } 337 }
diff --git a/src/firejail/bandwidth.c b/src/firejail/bandwidth.c
index 1c952c0bc..fa9d3a940 100644
--- a/src/firejail/bandwidth.c
+++ b/src/firejail/bandwidth.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -22,6 +22,7 @@
22#include <sys/types.h> 22#include <sys/types.h>
23#include <sys/stat.h> 23#include <sys/stat.h>
24#include <unistd.h> 24#include <unistd.h>
25#include <errno.h>
25#include <net/if.h> 26#include <net/if.h>
26#include "firejail.h" 27#include "firejail.h"
27 28
@@ -119,26 +120,19 @@ static void bandwidth_create_run_file(pid_t pid) {
119 if (asprintf(&fname, "%s/%d-bandwidth", RUN_FIREJAIL_BANDWIDTH_DIR, (int) pid) == -1) 120 if (asprintf(&fname, "%s/%d-bandwidth", RUN_FIREJAIL_BANDWIDTH_DIR, (int) pid) == -1)
120 errExit("asprintf"); 121 errExit("asprintf");
121 122
122 // if the file already exists, do nothing
123 struct stat s;
124 if (stat(fname, &s) == 0) {
125 free(fname);
126 return;
127 }
128
129 // create an empty file and set mod and ownership 123 // create an empty file and set mod and ownership
130 /* coverity[toctou] */ 124 // if the file already exists, do nothing
131 FILE *fp = fopen(fname, "w"); 125 FILE *fp = fopen(fname, "wxe");
132 if (fp) { 126 free(fname);
133 SET_PERMS_STREAM(fp, 0, 0, 0644); 127 if (!fp) {
134 fclose(fp); 128 if (errno == EEXIST)
135 } 129 return;
136 else {
137 fprintf(stderr, "Error: cannot create bandwidth file\n"); 130 fprintf(stderr, "Error: cannot create bandwidth file\n");
138 exit(1); 131 exit(1);
139 } 132 }
140 133
141 free(fname); 134 SET_PERMS_STREAM(fp, 0, 0, 0644);
135 fclose(fp);
142} 136}
143 137
144 138
@@ -148,7 +142,7 @@ void network_set_run_file(pid_t pid) {
148 errExit("asprintf"); 142 errExit("asprintf");
149 143
150 // create an empty file and set mod and ownership 144 // create an empty file and set mod and ownership
151 FILE *fp = fopen(fname, "w"); 145 FILE *fp = fopen(fname, "we");
152 if (fp) { 146 if (fp) {
153 if (cfg.bridge0.configured) 147 if (cfg.bridge0.configured)
154 fprintf(fp, "%s:%s\n", cfg.bridge0.dev, cfg.bridge0.devsandbox); 148 fprintf(fp, "%s:%s\n", cfg.bridge0.dev, cfg.bridge0.devsandbox);
@@ -178,7 +172,7 @@ static void read_bandwidth_file(pid_t pid) {
178 if (asprintf(&fname, "%s/%d-bandwidth", RUN_FIREJAIL_BANDWIDTH_DIR, (int) pid) == -1) 172 if (asprintf(&fname, "%s/%d-bandwidth", RUN_FIREJAIL_BANDWIDTH_DIR, (int) pid) == -1)
179 errExit("asprintf"); 173 errExit("asprintf");
180 174
181 FILE *fp = fopen(fname, "r"); 175 FILE *fp = fopen(fname, "re");
182 if (fp) { 176 if (fp) {
183 char buf[1024]; 177 char buf[1024];
184 while (fgets(buf, 1024,fp)) { 178 while (fgets(buf, 1024,fp)) {
@@ -214,7 +208,7 @@ static void write_bandwidth_file(pid_t pid) {
214 if (asprintf(&fname, "%s/%d-bandwidth", RUN_FIREJAIL_BANDWIDTH_DIR, (int) pid) == -1) 208 if (asprintf(&fname, "%s/%d-bandwidth", RUN_FIREJAIL_BANDWIDTH_DIR, (int) pid) == -1)
215 errExit("asprintf"); 209 errExit("asprintf");
216 210
217 FILE *fp = fopen(fname, "w"); 211 FILE *fp = fopen(fname, "we");
218 if (fp) { 212 if (fp) {
219 IFBW *ptr = ifbw; 213 IFBW *ptr = ifbw;
220 while (ptr) { 214 while (ptr) {
@@ -307,7 +301,7 @@ void bandwidth_pid(pid_t pid, const char *command, const char *dev, int down, in
307 char *fname; 301 char *fname;
308 if (asprintf(&fname, "%s/%d-netmap", RUN_FIREJAIL_NETWORK_DIR, (int) pid) == -1) 302 if (asprintf(&fname, "%s/%d-netmap", RUN_FIREJAIL_NETWORK_DIR, (int) pid) == -1)
309 errExit("asprintf"); 303 errExit("asprintf");
310 FILE *fp = fopen(fname, "r"); 304 FILE *fp = fopen(fname, "re");
311 if (!fp) { 305 if (!fp) {
312 fprintf(stderr, "Error: cannot read network map file %s\n", fname); 306 fprintf(stderr, "Error: cannot read network map file %s\n", fname);
313 exit(1); 307 exit(1);
diff --git a/src/firejail/caps.c b/src/firejail/caps.c
index 597f9915b..c5c06c675 100644
--- a/src/firejail/caps.c
+++ b/src/firejail/caps.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -389,7 +389,7 @@ static uint64_t extract_caps(int pid) {
389 errExit("asprintf"); 389 errExit("asprintf");
390 390
391 EUID_ROOT(); // grsecurity 391 EUID_ROOT(); // grsecurity
392 FILE *fp = fopen(file, "r"); 392 FILE *fp = fopen(file, "re");
393 EUID_USER(); // grsecurity 393 EUID_USER(); // grsecurity
394 if (!fp) 394 if (!fp)
395 goto errexit; 395 goto errexit;
diff --git a/src/firejail/cgroup.c b/src/firejail/cgroup.c
index 986b1157d..f1e16187f 100644
--- a/src/firejail/cgroup.c
+++ b/src/firejail/cgroup.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -18,7 +18,9 @@
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include "firejail.h" 20#include "firejail.h"
21#include <sys/stat.h> 21#include "../include/gcov_wrapper.h"
22#include <sys/wait.h>
23#include <errno.h>
22 24
23#define MAXBUF 4096 25#define MAXBUF 4096
24 26
@@ -26,7 +28,7 @@ void save_cgroup(void) {
26 if (cfg.cgroup == NULL) 28 if (cfg.cgroup == NULL)
27 return; 29 return;
28 30
29 FILE *fp = fopen(RUN_CGROUP_CFG, "w"); 31 FILE *fp = fopen(RUN_CGROUP_CFG, "wxe");
30 if (fp) { 32 if (fp) {
31 fprintf(fp, "%s", cfg.cgroup); 33 fprintf(fp, "%s", cfg.cgroup);
32 fflush(0); 34 fflush(0);
@@ -48,7 +50,7 @@ void load_cgroup(const char *fname) {
48 if (!fname) 50 if (!fname)
49 return; 51 return;
50 52
51 FILE *fp = fopen(fname, "r"); 53 FILE *fp = fopen(fname, "re");
52 if (fp) { 54 if (fp) {
53 char buf[MAXBUF]; 55 char buf[MAXBUF];
54 if (fgets(buf, MAXBUF, fp)) { 56 if (fgets(buf, MAXBUF, fp)) {
@@ -68,52 +70,63 @@ errout:
68 fclose(fp); 70 fclose(fp);
69} 71}
70 72
73static int is_cgroup_path(const char *fname) {
74 // path starts with /sys/fs/cgroup
75 if (strncmp(fname, "/sys/fs/cgroup", 14) != 0)
76 return 0;
71 77
72void set_cgroup(const char *path) { 78 // no .. traversal
73 EUID_ASSERT(); 79 char *ptr = strstr(fname, "..");
80 if (ptr)
81 return 0;
74 82
75 invalid_filename(path, 0); // no globbing 83 return 1;
84}
76 85
77 // path starts with /sys/fs/cgroup 86void check_cgroup_file(const char *fname) {
78 if (strncmp(path, "/sys/fs/cgroup", 14) != 0) 87 assert(fname);
79 goto errout; 88 invalid_filename(fname, 0); // no globbing
80 89
81 // path ends in tasks 90 if (!is_cgroup_path(fname))
82 char *ptr = strstr(path, "tasks");
83 if (!ptr)
84 goto errout;
85 if (*(ptr + 5) != '\0')
86 goto errout; 91 goto errout;
87 92
88 // no .. traversal 93 const char *base = gnu_basename(fname);
89 ptr = strstr(path, ".."); 94 if (strcmp(base, "tasks") != 0 && // cgroup v1
90 if (ptr) 95 strcmp(base, "cgroup.procs") != 0)
91 goto errout; 96 goto errout;
92 97
93 // tasks file exists 98 if (access(fname, W_OK) == 0)
94 struct stat s; 99 return;
95 if (stat(path, &s) == -1)
96 goto errout;
97 100
98 // task file belongs to the user running the sandbox 101errout:
99 if (s.st_uid != getuid() && s.st_gid != getgid()) 102 fprintf(stderr, "Error: invalid cgroup\n");
100 goto errout2; 103 exit(1);
104}
105
106static void do_set_cgroup(const char *fname, pid_t pid) {
107 FILE *fp = fopen(fname, "ae");
108 if (!fp) {
109 fwarning("cannot open %s for writing: %s\n", fname, strerror(errno));
110 return;
111 }
101 112
102 // add the task to cgroup
103 /* coverity[toctou] */
104 FILE *fp = fopen(path, "a");
105 if (!fp)
106 goto errout;
107 pid_t pid = getpid();
108 int rv = fprintf(fp, "%d\n", pid); 113 int rv = fprintf(fp, "%d\n", pid);
109 (void) rv; 114 (void) rv;
110 fclose(fp); 115 fclose(fp);
111 return; 116}
112 117
113errout: 118void set_cgroup(const char *fname, pid_t pid) {
114 fprintf(stderr, "Error: invalid cgroup\n"); 119 pid_t child = fork();
115 exit(1); 120 if (child < 0)
116errout2: 121 errExit("fork");
117 fprintf(stderr, "Error: you don't have permissions to use this control group\n"); 122 if (child == 0) {
118 exit(1); 123 drop_privs(0);
124
125 do_set_cgroup(fname, pid);
126
127 __gcov_flush();
128
129 _exit(0);
130 }
131 waitpid(child, NULL, 0);
119} 132}
diff --git a/src/firejail/checkcfg.c b/src/firejail/checkcfg.c
index e1613b325..6fc70318b 100644
--- a/src/firejail/checkcfg.c
+++ b/src/firejail/checkcfg.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -35,6 +35,8 @@ char *xvfb_extra_params = "";
35char *netfilter_default = NULL; 35char *netfilter_default = NULL;
36unsigned long join_timeout = 5000000; // microseconds 36unsigned long join_timeout = 5000000; // microseconds
37char *config_seccomp_error_action_str = "EPERM"; 37char *config_seccomp_error_action_str = "EPERM";
38char *config_seccomp_filter_add = NULL;
39char **whitelist_reject_topdirs = NULL;
38 40
39int checkcfg(int val) { 41int checkcfg(int val) {
40 assert(val < CFG_MAX); 42 assert(val < CFG_MAX);
@@ -56,10 +58,11 @@ int checkcfg(int val) {
56 cfg_val[CFG_XPRA_ATTACH] = 0; 58 cfg_val[CFG_XPRA_ATTACH] = 0;
57 cfg_val[CFG_SECCOMP_ERROR_ACTION] = -1; 59 cfg_val[CFG_SECCOMP_ERROR_ACTION] = -1;
58 cfg_val[CFG_BROWSER_ALLOW_DRM] = 0; 60 cfg_val[CFG_BROWSER_ALLOW_DRM] = 0;
61 cfg_val[CFG_ALLOW_TRAY] = 0;
59 62
60 // open configuration file 63 // open configuration file
61 const char *fname = SYSCONFDIR "/firejail.config"; 64 const char *fname = SYSCONFDIR "/firejail.config";
62 fp = fopen(fname, "r"); 65 fp = fopen(fname, "re");
63 if (!fp) { 66 if (!fp) {
64#ifdef HAVE_GLOBALCFG 67#ifdef HAVE_GLOBALCFG
65 fprintf(stderr, "Error: Firejail configuration file %s not found\n", fname); 68 fprintf(stderr, "Error: Firejail configuration file %s not found\n", fname);
@@ -102,22 +105,25 @@ int checkcfg(int val) {
102 PARSE_YESNO(CFG_USERNS, "userns") 105 PARSE_YESNO(CFG_USERNS, "userns")
103 PARSE_YESNO(CFG_CHROOT, "chroot") 106 PARSE_YESNO(CFG_CHROOT, "chroot")
104 PARSE_YESNO(CFG_FIREJAIL_PROMPT, "firejail-prompt") 107 PARSE_YESNO(CFG_FIREJAIL_PROMPT, "firejail-prompt")
105 PARSE_YESNO(CFG_FOLLOW_SYMLINK_AS_USER, "follow-symlink-as-user")
106 PARSE_YESNO(CFG_FORCE_NONEWPRIVS, "force-nonewprivs") 108 PARSE_YESNO(CFG_FORCE_NONEWPRIVS, "force-nonewprivs")
107 PARSE_YESNO(CFG_SECCOMP, "seccomp") 109 PARSE_YESNO(CFG_SECCOMP, "seccomp")
108 PARSE_YESNO(CFG_WHITELIST, "whitelist")
109 PARSE_YESNO(CFG_NETWORK, "network") 110 PARSE_YESNO(CFG_NETWORK, "network")
110 PARSE_YESNO(CFG_RESTRICTED_NETWORK, "restricted-network") 111 PARSE_YESNO(CFG_RESTRICTED_NETWORK, "restricted-network")
111 PARSE_YESNO(CFG_XEPHYR_WINDOW_TITLE, "xephyr-window-title") 112 PARSE_YESNO(CFG_XEPHYR_WINDOW_TITLE, "xephyr-window-title")
112 PARSE_YESNO(CFG_OVERLAYFS, "overlayfs") 113 PARSE_YESNO(CFG_OVERLAYFS, "overlayfs")
113 PARSE_YESNO(CFG_PRIVATE_HOME, "private-home") 114 PARSE_YESNO(CFG_PRIVATE_BIN, "private-bin")
115 PARSE_YESNO(CFG_PRIVATE_BIN_NO_LOCAL, "private-bin-no-local")
114 PARSE_YESNO(CFG_PRIVATE_CACHE, "private-cache") 116 PARSE_YESNO(CFG_PRIVATE_CACHE, "private-cache")
117 PARSE_YESNO(CFG_PRIVATE_ETC, "private-etc")
118 PARSE_YESNO(CFG_PRIVATE_HOME, "private-home")
115 PARSE_YESNO(CFG_PRIVATE_LIB, "private-lib") 119 PARSE_YESNO(CFG_PRIVATE_LIB, "private-lib")
116 PARSE_YESNO(CFG_PRIVATE_BIN_NO_LOCAL, "private-bin-no-local") 120 PARSE_YESNO(CFG_PRIVATE_OPT, "private-opt")
121 PARSE_YESNO(CFG_PRIVATE_SRV, "private-srv")
117 PARSE_YESNO(CFG_DISABLE_MNT, "disable-mnt") 122 PARSE_YESNO(CFG_DISABLE_MNT, "disable-mnt")
118 PARSE_YESNO(CFG_XPRA_ATTACH, "xpra-attach") 123 PARSE_YESNO(CFG_XPRA_ATTACH, "xpra-attach")
119 PARSE_YESNO(CFG_BROWSER_DISABLE_U2F, "browser-disable-u2f") 124 PARSE_YESNO(CFG_BROWSER_DISABLE_U2F, "browser-disable-u2f")
120 PARSE_YESNO(CFG_BROWSER_ALLOW_DRM, "browser-allow-drm") 125 PARSE_YESNO(CFG_BROWSER_ALLOW_DRM, "browser-allow-drm")
126 PARSE_YESNO(CFG_ALLOW_TRAY, "allow-tray")
121#undef PARSE_YESNO 127#undef PARSE_YESNO
122 128
123 // netfilter 129 // netfilter
@@ -130,8 +136,7 @@ int checkcfg(int val) {
130 *end = '\0'; 136 *end = '\0';
131 137
132 // is the file present? 138 // is the file present?
133 struct stat s; 139 if (access(fname, F_OK) == -1) {
134 if (stat(fname, &s) == -1) {
135 fprintf(stderr, "Error: netfilter-default file %s not available\n", fname); 140 fprintf(stderr, "Error: netfilter-default file %s not available\n", fname);
136 exit(1); 141 exit(1);
137 } 142 }
@@ -222,6 +227,10 @@ int checkcfg(int val) {
222 else if (strncmp(ptr, "join-timeout ", 13) == 0) 227 else if (strncmp(ptr, "join-timeout ", 13) == 0)
223 join_timeout = strtoul(ptr + 13, NULL, 10) * 1000000; // seconds to microseconds 228 join_timeout = strtoul(ptr + 13, NULL, 10) * 1000000; // seconds to microseconds
224 229
230 // add rules to default seccomp filter
231 else if (strncmp(ptr, "seccomp-filter-add ", 19) == 0)
232 config_seccomp_filter_add = seccomp_check_list(ptr + 19);
233
225 // seccomp error action 234 // seccomp error action
226 else if (strncmp(ptr, "seccomp-error-action ", 21) == 0) { 235 else if (strncmp(ptr, "seccomp-error-action ", 21) == 0) {
227 if (strcmp(ptr + 21, "kill") == 0) 236 if (strcmp(ptr + 21, "kill") == 0)
@@ -238,6 +247,31 @@ int checkcfg(int val) {
238 errExit("strdup"); 247 errExit("strdup");
239 } 248 }
240 249
250 else if (strncmp(ptr, "whitelist-disable-topdir ", 25) == 0) {
251 char *str = strdup(ptr + 25);
252 if (!str)
253 errExit("strdup");
254
255 size_t cnt = 0;
256 size_t sz = 4;
257 whitelist_reject_topdirs = malloc(sz * sizeof(char *));
258 if (!whitelist_reject_topdirs)
259 errExit("malloc");
260
261 char *tok = strtok(str, ",");
262 while (tok) {
263 whitelist_reject_topdirs[cnt++] = tok;
264 if (cnt >= sz) {
265 sz *= 2;
266 whitelist_reject_topdirs = realloc(whitelist_reject_topdirs, sz * sizeof(char *));
267 if (!whitelist_reject_topdirs)
268 errExit("realloc");
269 }
270 tok = strtok(NULL, ",");
271 }
272 whitelist_reject_topdirs[cnt] = NULL;
273 }
274
241 else 275 else
242 goto errout; 276 goto errout;
243 277
@@ -269,7 +303,7 @@ errout:
269 303
270void print_compiletime_support(void) { 304void print_compiletime_support(void) {
271 printf("Compile time support:\n"); 305 printf("Compile time support:\n");
272 printf("\t- Always force nonewprivs support is %s\n", 306 printf("\t- always force nonewprivs support is %s\n",
273#ifdef HAVE_FORCE_NONEWPRIVS 307#ifdef HAVE_FORCE_NONEWPRIVS
274 "enabled" 308 "enabled"
275#else 309#else
@@ -309,14 +343,6 @@ void print_compiletime_support(void) {
309#endif 343#endif
310 ); 344 );
311 345
312 printf("\t- file and directory whitelisting support is %s\n",
313#ifdef HAVE_WHITELIST
314 "enabled"
315#else
316 "disabled"
317#endif
318 );
319
320 printf("\t- file transfer support is %s\n", 346 printf("\t- file transfer support is %s\n",
321#ifdef HAVE_FILE_TRANSFER 347#ifdef HAVE_FILE_TRANSFER
322 "enabled" 348 "enabled"
diff --git a/src/firejail/chroot.c b/src/firejail/chroot.c
index d7e96cf4c..551948318 100644
--- a/src/firejail/chroot.c
+++ b/src/firejail/chroot.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -20,6 +20,7 @@
20 20
21#ifdef HAVE_CHROOT 21#ifdef HAVE_CHROOT
22#include "firejail.h" 22#include "firejail.h"
23#include "../include/gcov_wrapper.h"
23#include <sys/mount.h> 24#include <sys/mount.h>
24#include <sys/sendfile.h> 25#include <sys/sendfile.h>
25#include <errno.h> 26#include <errno.h>
@@ -29,7 +30,6 @@
29#define O_PATH 010000000 30#define O_PATH 010000000
30#endif 31#endif
31 32
32
33// exit if error 33// exit if error
34void fs_check_chroot_dir(void) { 34void fs_check_chroot_dir(void) {
35 EUID_ASSERT(); 35 EUID_ASSERT();
@@ -86,7 +86,7 @@ static void update_file(int parentfd, const char *relpath) {
86 if (arg_debug) 86 if (arg_debug)
87 printf("Updating chroot /%s\n", relpath); 87 printf("Updating chroot /%s\n", relpath);
88 unlinkat(parentfd, relpath, 0); 88 unlinkat(parentfd, relpath, 0);
89 int out = openat(parentfd, relpath, O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, S_IRUSR | S_IWRITE | S_IRGRP | S_IROTH); 89 int out = openat(parentfd, relpath, O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
90 if (out == -1) { 90 if (out == -1) {
91 close(in); 91 close(in);
92 goto errout; 92 goto errout;
@@ -131,9 +131,9 @@ void fs_chroot(const char *rootdir) {
131 assert(rootdir); 131 assert(rootdir);
132 132
133 // fails if there is any symlink or if rootdir is not a directory 133 // fails if there is any symlink or if rootdir is not a directory
134 int parentfd = safe_fd(rootdir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC); 134 int parentfd = safer_openat(-1, rootdir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
135 if (parentfd == -1) 135 if (parentfd == -1)
136 errExit("safe_fd"); 136 errExit("safer_openat");
137 // rootdir has to be owned by root and is not allowed to be generally writable, 137 // rootdir has to be owned by root and is not allowed to be generally writable,
138 // this also excludes /tmp and friends 138 // this also excludes /tmp and friends
139 struct stat s; 139 struct stat s;
@@ -163,12 +163,8 @@ void fs_chroot(const char *rootdir) {
163 int fd = openat(parentfd, "dev", O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC); 163 int fd = openat(parentfd, "dev", O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
164 if (fd == -1) 164 if (fd == -1)
165 errExit("open"); 165 errExit("open");
166 char *proc; 166 if (bind_mount_path_to_fd("/dev", fd))
167 if (asprintf(&proc, "/proc/self/fd/%d", fd) == -1)
168 errExit("asprintf");
169 if (mount("/dev", proc, NULL, MS_BIND|MS_REC, NULL) < 0)
170 errExit("mounting /dev"); 167 errExit("mounting /dev");
171 free(proc);
172 close(fd); 168 close(fd);
173 169
174#ifdef HAVE_X11 170#ifdef HAVE_X11
@@ -192,11 +188,8 @@ void fs_chroot(const char *rootdir) {
192 fd = openat(parentfd, "tmp/.X11-unix", O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC); 188 fd = openat(parentfd, "tmp/.X11-unix", O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
193 if (fd == -1) 189 if (fd == -1)
194 errExit("open"); 190 errExit("open");
195 if (asprintf(&proc, "/proc/self/fd/%d", fd) == -1) 191 if (bind_mount_path_to_fd("/tmp/.X11-unix", fd))
196 errExit("asprintf");
197 if (mount("/tmp/.X11-unix", proc, NULL, MS_BIND|MS_REC, NULL) < 0)
198 errExit("mounting /tmp/.X11-unix"); 192 errExit("mounting /tmp/.X11-unix");
199 free(proc);
200 close(fd); 193 close(fd);
201 } 194 }
202#endif // HAVE_X11 195#endif // HAVE_X11
@@ -215,29 +208,21 @@ void fs_chroot(const char *rootdir) {
215 208
216 if (arg_debug) 209 if (arg_debug)
217 printf("Mounting %s on chroot %s\n", orig_pulse, orig_pulse); 210 printf("Mounting %s on chroot %s\n", orig_pulse, orig_pulse);
218 int src = safe_fd(orig_pulse, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC); 211 int src = safer_openat(-1, orig_pulse, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
219 if (src == -1) { 212 if (src == -1) {
220 fprintf(stderr, "Error: cannot open %s\n", orig_pulse); 213 fprintf(stderr, "Error: cannot open %s\n", orig_pulse);
221 exit(1); 214 exit(1);
222 } 215 }
223 int dst = safe_fd(pulse, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC); 216 int dst = safer_openat(-1, pulse, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
224 if (dst == -1) { 217 if (dst == -1) {
225 fprintf(stderr, "Error: cannot open %s\n", pulse); 218 fprintf(stderr, "Error: cannot open %s\n", pulse);
226 exit(1); 219 exit(1);
227 } 220 }
228 free(pulse); 221 if (bind_mount_by_fd(src, dst))
229 222 errExit("mounting pulseaudio");
230 char *proc_src, *proc_dst;
231 if (asprintf(&proc_src, "/proc/self/fd/%d", src) == -1)
232 errExit("asprintf");
233 if (asprintf(&proc_dst, "/proc/self/fd/%d", dst) == -1)
234 errExit("asprintf");
235 if (mount(proc_src, proc_dst, NULL, MS_BIND|MS_REC, NULL) < 0)
236 errExit("mount bind");
237 free(proc_src);
238 free(proc_dst);
239 close(src); 223 close(src);
240 close(dst); 224 close(dst);
225 free(pulse);
241 226
242 // update /etc/machine-id in chroot 227 // update /etc/machine-id in chroot
243 update_file(parentfd, "etc/machine-id"); 228 update_file(parentfd, "etc/machine-id");
@@ -256,11 +241,8 @@ void fs_chroot(const char *rootdir) {
256 fd = openat(parentfd, &RUN_FIREJAIL_LIB_DIR[1], O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC); 241 fd = openat(parentfd, &RUN_FIREJAIL_LIB_DIR[1], O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
257 if (fd == -1) 242 if (fd == -1)
258 errExit("open"); 243 errExit("open");
259 if (asprintf(&proc, "/proc/self/fd/%d", fd) == -1) 244 if (bind_mount_path_to_fd(RUN_FIREJAIL_LIB_DIR, fd))
260 errExit("asprintf");
261 if (mount(RUN_FIREJAIL_LIB_DIR, proc, NULL, MS_BIND|MS_REC, NULL) < 0)
262 errExit("mount bind"); 245 errExit("mount bind");
263 free(proc);
264 close(fd); 246 close(fd);
265 247
266 // create /run/firejail/mnt directory in chroot 248 // create /run/firejail/mnt directory in chroot
@@ -271,29 +253,22 @@ void fs_chroot(const char *rootdir) {
271 fd = openat(parentfd, &RUN_MNT_DIR[1], O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC); 253 fd = openat(parentfd, &RUN_MNT_DIR[1], O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
272 if (fd == -1) 254 if (fd == -1)
273 errExit("open"); 255 errExit("open");
274 if (asprintf(&proc, "/proc/self/fd/%d", fd) == -1) 256 if (bind_mount_path_to_fd(RUN_MNT_DIR, fd))
275 errExit("asprintf");
276 if (mount(RUN_MNT_DIR, proc, NULL, MS_BIND|MS_REC, NULL) < 0)
277 errExit("mount bind"); 257 errExit("mount bind");
278 free(proc);
279 close(fd); 258 close(fd);
280 259
281 // update chroot resolv.conf 260 // update chroot resolv.conf
282 update_file(parentfd, "etc/resolv.conf"); 261 update_file(parentfd, "etc/resolv.conf");
283 262
284#ifdef HAVE_GCOV
285 __gcov_flush(); 263 __gcov_flush();
286#endif 264
287 // create /run/firejail/mnt/oroot 265 // create /run/firejail/mnt/oroot
288 char *oroot = RUN_OVERLAY_ROOT; 266 char *oroot = RUN_OVERLAY_ROOT;
289 if (mkdir(oroot, 0755) == -1) 267 if (mkdir(oroot, 0755) == -1)
290 errExit("mkdir"); 268 errExit("mkdir");
291 // mount the chroot dir on top of /run/firejail/mnt/oroot in order to reuse the apparmor rules for overlay 269 // mount the chroot dir on top of /run/firejail/mnt/oroot in order to reuse the apparmor rules for overlay
292 if (asprintf(&proc, "/proc/self/fd/%d", parentfd) == -1) 270 if (bind_mount_fd_to_path(parentfd, oroot))
293 errExit("asprintf");
294 if (mount(proc, oroot, NULL, MS_BIND|MS_REC, NULL) < 0)
295 errExit("mounting rootdir oroot"); 271 errExit("mounting rootdir oroot");
296 free(proc);
297 close(parentfd); 272 close(parentfd);
298 // chroot into the new directory 273 // chroot into the new directory
299 if (arg_debug) 274 if (arg_debug)
diff --git a/src/firejail/cmdline.c b/src/firejail/cmdline.c
index f902c4e1c..6f7739da0 100644
--- a/src/firejail/cmdline.c
+++ b/src/firejail/cmdline.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -26,7 +26,7 @@
26#include <assert.h> 26#include <assert.h>
27#include <errno.h> 27#include <errno.h>
28 28
29static int cmdline_length(int argc, char **argv, int index) { 29static int cmdline_length(int argc, char **argv, int index, bool want_extra_quotes) {
30 assert(index != -1); 30 assert(index != -1);
31 31
32 unsigned i,j; 32 unsigned i,j;
@@ -46,10 +46,11 @@ static int cmdline_length(int argc, char **argv, int index) {
46 len += 3; 46 len += 3;
47 in_quotes = false; 47 in_quotes = false;
48 } else { 48 } else {
49 if (!in_quotes) 49 if (!in_quotes && want_extra_quotes)
50 len++; 50 len++;
51 len++; 51 len++;
52 in_quotes = true; 52 if (want_extra_quotes)
53 in_quotes = true;
53 } 54 }
54 } 55 }
55 if (in_quotes) { 56 if (in_quotes) {
@@ -64,7 +65,7 @@ static int cmdline_length(int argc, char **argv, int index) {
64 return len; 65 return len;
65} 66}
66 67
67static void quote_cmdline(char *command_line, char *window_title, int len, int argc, char **argv, int index) { 68static void quote_cmdline(char *command_line, char *window_title, int len, int argc, char **argv, int index, bool want_extra_quotes) {
68 assert(index != -1); 69 assert(index != -1);
69 70
70 unsigned i,j; 71 unsigned i,j;
@@ -103,14 +104,15 @@ static void quote_cmdline(char *command_line, char *window_title, int len, int a
103 // anything other 104 // anything other
104 else 105 else
105 { 106 {
106 if (!in_quotes) { 107 if (!in_quotes && want_extra_quotes) {
107 // open quotes 108 // open quotes
108 ptr1[0] = '\''; 109 ptr1[0] = '\'';
109 ptr1++; 110 ptr1++;
110 } 111 }
111 ptr1[0] = argv[i + index][j]; 112 ptr1[0] = argv[i + index][j];
112 ptr1++; 113 ptr1++;
113 in_quotes = true; 114 if (want_extra_quotes)
115 in_quotes = true;
114 } 116 }
115 } 117 }
116 // close quotes 118 // close quotes
@@ -134,12 +136,12 @@ static void quote_cmdline(char *command_line, char *window_title, int len, int a
134 assert((unsigned) len == strlen(command_line)); 136 assert((unsigned) len == strlen(command_line));
135} 137}
136 138
137void build_cmdline(char **command_line, char **window_title, int argc, char **argv, int index) { 139void build_cmdline(char **command_line, char **window_title, int argc, char **argv, int index, bool want_extra_quotes) {
138 // index == -1 could happen if we have --shell=none and no program was specified 140 // index == -1 could happen if we have --shell=none and no program was specified
139 // the program should exit with an error before entering this function 141 // the program should exit with an error before entering this function
140 assert(index != -1); 142 assert(index != -1);
141 143
142 int len = cmdline_length(argc, argv, index); 144 int len = cmdline_length(argc, argv, index, want_extra_quotes);
143 if (len > ARG_MAX) { 145 if (len > ARG_MAX) {
144 errno = E2BIG; 146 errno = E2BIG;
145 errExit("cmdline_length"); 147 errExit("cmdline_length");
@@ -152,7 +154,7 @@ void build_cmdline(char **command_line, char **window_title, int argc, char **ar
152 if (!*window_title) 154 if (!*window_title)
153 errExit("malloc"); 155 errExit("malloc");
154 156
155 quote_cmdline(*command_line, *window_title, len, argc, argv, index); 157 quote_cmdline(*command_line, *window_title, len, argc, argv, index, want_extra_quotes);
156 158
157 if (arg_debug) 159 if (arg_debug)
158 printf("Building quoted command line: %s\n", *command_line); 160 printf("Building quoted command line: %s\n", *command_line);
@@ -161,17 +163,17 @@ void build_cmdline(char **command_line, char **window_title, int argc, char **ar
161 assert(*window_title); 163 assert(*window_title);
162} 164}
163 165
164void build_appimage_cmdline(char **command_line, char **window_title, int argc, char **argv, int index) { 166void build_appimage_cmdline(char **command_line, char **window_title, int argc, char **argv, int index, bool want_extra_quotes) {
165 // index == -1 could happen if we have --shell=none and no program was specified 167 // index == -1 could happen if we have --shell=none and no program was specified
166 // the program should exit with an error before entering this function 168 // the program should exit with an error before entering this function
167 assert(index != -1); 169 assert(index != -1);
168 170
169 char *apprun_path = RUN_FIREJAIL_APPIMAGE_DIR "/AppRun"; 171 char *apprun_path = RUN_FIREJAIL_APPIMAGE_DIR "/AppRun";
170 172
171 int len1 = cmdline_length(argc, argv, index); // length of argv w/o changes 173 int len1 = cmdline_length(argc, argv, index, want_extra_quotes); // length of argv w/o changes
172 int len2 = cmdline_length(1, &argv[index], 0); // apptest.AppImage 174 int len2 = cmdline_length(1, &argv[index], 0, want_extra_quotes); // apptest.AppImage
173 int len3 = cmdline_length(1, &apprun_path, 0); // /run/firejail/appimage/AppRun 175 int len3 = cmdline_length(1, &apprun_path, 0, want_extra_quotes); // /run/firejail/appimage/AppRun
174 int len4 = (len1 - len2 + len3) + 1; // apptest.AppImage is replaced by /path/to/AppRun 176 int len4 = (len1 - len2 + len3) + 1; // apptest.AppImage is replaced by /path/to/AppRun
175 177
176 if (len4 > ARG_MAX) { 178 if (len4 > ARG_MAX) {
177 errno = E2BIG; 179 errno = E2BIG;
@@ -187,7 +189,7 @@ void build_appimage_cmdline(char **command_line, char **window_title, int argc,
187 errExit("malloc"); 189 errExit("malloc");
188 190
189 // run default quote_cmdline 191 // run default quote_cmdline
190 quote_cmdline(command_line_tmp, *window_title, len1, argc, argv, index); 192 quote_cmdline(command_line_tmp, *window_title, len1, argc, argv, index, want_extra_quotes);
191 193
192 assert(command_line_tmp); 194 assert(command_line_tmp);
193 assert(*window_title); 195 assert(*window_title);
diff --git a/src/firejail/cpu.c b/src/firejail/cpu.c
index 3427e8ade..1ec510456 100644
--- a/src/firejail/cpu.c
+++ b/src/firejail/cpu.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -75,7 +75,7 @@ void save_cpu(void) {
75 if (cfg.cpus == 0) 75 if (cfg.cpus == 0)
76 return; 76 return;
77 77
78 FILE *fp = fopen(RUN_CPU_CFG, "w"); 78 FILE *fp = fopen(RUN_CPU_CFG, "wxe");
79 if (fp) { 79 if (fp) {
80 fprintf(fp, "%x\n", cfg.cpus); 80 fprintf(fp, "%x\n", cfg.cpus);
81 SET_PERMS_STREAM(fp, 0, 0, 0600); 81 SET_PERMS_STREAM(fp, 0, 0, 0600);
@@ -91,7 +91,7 @@ void load_cpu(const char *fname) {
91 if (!fname) 91 if (!fname)
92 return; 92 return;
93 93
94 FILE *fp = fopen(fname, "r"); 94 FILE *fp = fopen(fname, "re");
95 if (fp) { 95 if (fp) {
96 unsigned tmp; 96 unsigned tmp;
97 int rv = fscanf(fp, "%x", &tmp); 97 int rv = fscanf(fp, "%x", &tmp);
@@ -139,7 +139,7 @@ static void print_cpu(int pid) {
139 } 139 }
140 140
141 EUID_ROOT(); // grsecurity 141 EUID_ROOT(); // grsecurity
142 FILE *fp = fopen(file, "r"); 142 FILE *fp = fopen(file, "re");
143 EUID_USER(); // grsecurity 143 EUID_USER(); // grsecurity
144 if (!fp) { 144 if (!fp) {
145 printf(" Error: cannot open %s\n", file); 145 printf(" Error: cannot open %s\n", file);
diff --git a/src/firejail/dbus.c b/src/firejail/dbus.c
index 658b84537..66738bd4b 100644
--- a/src/firejail/dbus.c
+++ b/src/firejail/dbus.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -180,7 +180,7 @@ static void dbus_check_bus_profile(char const *prefix, DbusPolicy *policy) {
180 } 180 }
181 } 181 }
182 182
183 if (num_matches > 0) { 183 if (num_matches > 0 && !arg_quiet) {
184 assert(first_match != NULL); 184 assert(first_match != NULL);
185 if (num_matches == 1) { 185 if (num_matches == 1) {
186 fprintf(stderr, "Ignoring \"%s\".\n", first_match); 186 fprintf(stderr, "Ignoring \"%s\".\n", first_match);
@@ -258,12 +258,8 @@ static char *find_user_socket_by_format(char *format) {
258 if (asprintf(&dbus_user_socket, format, (int) getuid()) == -1) 258 if (asprintf(&dbus_user_socket, format, (int) getuid()) == -1)
259 errExit("asprintf"); 259 errExit("asprintf");
260 struct stat s; 260 struct stat s;
261 if (stat(dbus_user_socket, &s) == -1) { 261 if (lstat(dbus_user_socket, &s) == -1)
262 if (errno == ENOENT) 262 goto fail;
263 goto fail;
264 return NULL;
265 errExit("stat");
266 }
267 if (!S_ISSOCK(s.st_mode)) 263 if (!S_ISSOCK(s.st_mode))
268 goto fail; 264 goto fail;
269 return dbus_user_socket; 265 return dbus_user_socket;
@@ -301,11 +297,12 @@ void dbus_proxy_start(void) {
301 if (dbus_proxy_pid == -1) 297 if (dbus_proxy_pid == -1)
302 errExit("fork"); 298 errExit("fork");
303 if (dbus_proxy_pid == 0) { 299 if (dbus_proxy_pid == 0) {
304 int i; 300 // close open files
305 for (i = STDERR_FILENO + 1; i < FIREJAIL_MAX_FD; i++) { 301 int keep[2];
306 if (i != status_pipe[1] && i != args_pipe[0]) 302 keep[0] = status_pipe[1];
307 close(i); // close open files 303 keep[1] = args_pipe[0];
308 } 304 close_all(keep, ARRAY_SIZE(keep));
305
309 if (arg_dbus_log_file != NULL) { 306 if (arg_dbus_log_file != NULL) {
310 int output_fd = creat(arg_dbus_log_file, 0666); 307 int output_fd = creat(arg_dbus_log_file, 0666);
311 if (output_fd < 0) 308 if (output_fd < 0)
@@ -416,7 +413,7 @@ void dbus_proxy_stop(void) {
416} 413}
417 414
418static void socket_overlay(char *socket_path, char *proxy_path) { 415static void socket_overlay(char *socket_path, char *proxy_path) {
419 int fd = safe_fd(proxy_path, O_PATH | O_NOFOLLOW | O_CLOEXEC); 416 int fd = safer_openat(-1, proxy_path, O_PATH | O_NOFOLLOW | O_CLOEXEC);
420 if (fd == -1) 417 if (fd == -1)
421 errExit("opening DBus proxy socket"); 418 errExit("opening DBus proxy socket");
422 struct stat s; 419 struct stat s;
@@ -426,12 +423,8 @@ static void socket_overlay(char *socket_path, char *proxy_path) {
426 errno = ENOTSOCK; 423 errno = ENOTSOCK;
427 errExit("mounting DBus proxy socket"); 424 errExit("mounting DBus proxy socket");
428 } 425 }
429 char *proxy_fd_path; 426 if (bind_mount_fd_to_path(fd, socket_path))
430 if (asprintf(&proxy_fd_path, "/proc/self/fd/%d", fd) == -1)
431 errExit("asprintf");
432 if (mount(proxy_path, socket_path, NULL, MS_BIND | MS_REC, NULL) == -1)
433 errExit("mount bind"); 427 errExit("mount bind");
434 free(proxy_fd_path);
435 close(fd); 428 close(fd);
436} 429}
437 430
@@ -478,7 +471,7 @@ void dbus_apply_policy(void) {
478 create_empty_dir_as_root(RUN_DBUS_DIR, 0755); 471 create_empty_dir_as_root(RUN_DBUS_DIR, 0755);
479 472
480 if (arg_dbus_user != DBUS_POLICY_ALLOW) { 473 if (arg_dbus_user != DBUS_POLICY_ALLOW) {
481 create_empty_file_as_root(RUN_DBUS_USER_SOCKET, 0700); 474 create_empty_file_as_root(RUN_DBUS_USER_SOCKET, 0600);
482 475
483 if (arg_dbus_user == DBUS_POLICY_FILTER) { 476 if (arg_dbus_user == DBUS_POLICY_FILTER) {
484 assert(dbus_user_proxy_socket != NULL); 477 assert(dbus_user_proxy_socket != NULL);
@@ -517,7 +510,7 @@ void dbus_apply_policy(void) {
517 } 510 }
518 511
519 if (arg_dbus_system != DBUS_POLICY_ALLOW) { 512 if (arg_dbus_system != DBUS_POLICY_ALLOW) {
520 create_empty_file_as_root(RUN_DBUS_SYSTEM_SOCKET, 0700); 513 create_empty_file_as_root(RUN_DBUS_SYSTEM_SOCKET, 0600);
521 514
522 if (arg_dbus_system == DBUS_POLICY_FILTER) { 515 if (arg_dbus_system == DBUS_POLICY_FILTER) {
523 assert(dbus_system_proxy_socket != NULL); 516 assert(dbus_system_proxy_socket != NULL);
diff --git a/src/firejail/dhcp.c b/src/firejail/dhcp.c
index bdbb338d5..fb66d74ff 100644
--- a/src/firejail/dhcp.c
+++ b/src/firejail/dhcp.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -93,7 +93,7 @@ static pid_t dhcp_read_pidfile(const Dhclient *client) {
93 while (found == 0 && tries < 10) { 93 while (found == 0 && tries < 10) {
94 if (tries >= 1) 94 if (tries >= 1)
95 usleep(100000); 95 usleep(100000);
96 FILE *pidfile = fopen(client->pid_file, "r"); 96 FILE *pidfile = fopen(client->pid_file, "re");
97 if (pidfile) { 97 if (pidfile) {
98 long pid; 98 long pid;
99 if (fscanf(pidfile, "%ld", &pid) == 1) 99 if (fscanf(pidfile, "%ld", &pid) == 1)
@@ -153,19 +153,13 @@ void dhcp_start(void) {
153 if (!any_dhcp()) 153 if (!any_dhcp())
154 return; 154 return;
155 155
156 char *dhclient_path = RUN_MNT_DIR "/dhclient";; 156 char *dhclient_path = RUN_MNT_DIR "/dhclient";
157 struct stat s; 157 struct stat s;
158 if (stat(dhclient_path, &s) == -1) { 158 if (stat(dhclient_path, &s) == -1) {
159 dhclient_path = "/usr/sbin/dhclient"; 159 fprintf(stderr, "Error: %s was not found.\n", dhclient_path);
160 if (stat(dhclient_path, &s) == -1) { 160 exit(1);
161 fprintf(stderr, "Error: dhclient was not found.\n");
162 exit(1);
163 }
164 } 161 }
165 162
166 sbox_run(SBOX_ROOT| SBOX_SECCOMP, 4, PATH_FCOPY, "--follow-link", dhclient_path, RUN_MNT_DIR);
167 dhclient_path = RUN_MNT_DIR "/dhclient";
168
169 EUID_ROOT(); 163 EUID_ROOT();
170 if (mkdir(RUN_DHCLIENT_DIR, 0700)) 164 if (mkdir(RUN_DHCLIENT_DIR, 0700))
171 errExit("mkdir"); 165 errExit("mkdir");
diff --git a/src/firejail/env.c b/src/firejail/env.c
index 03818df0b..963288459 100644
--- a/src/firejail/env.c
+++ b/src/firejail/env.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -22,6 +22,7 @@
22#include <sys/stat.h> 22#include <sys/stat.h>
23#include <unistd.h> 23#include <unistd.h>
24#include <dirent.h> 24#include <dirent.h>
25#include <limits.h>
25 26
26typedef struct env_t { 27typedef struct env_t {
27 struct env_t *next; 28 struct env_t *next;
@@ -59,12 +60,7 @@ void env_ibus_load(void) {
59 if (asprintf(&dirname, "%s/.config/ibus/bus", cfg.homedir) == -1) 60 if (asprintf(&dirname, "%s/.config/ibus/bus", cfg.homedir) == -1)
60 errExit("asprintf"); 61 errExit("asprintf");
61 62
62 struct stat s;
63 if (stat(dirname, &s) == -1)
64 return;
65
66 // find the file 63 // find the file
67 /* coverity[toctou] */
68 DIR *dir = opendir(dirname); 64 DIR *dir = opendir(dirname);
69 if (!dir) { 65 if (!dir) {
70 free(dirname); 66 free(dirname);
@@ -84,7 +80,7 @@ void env_ibus_load(void) {
84 char *fname; 80 char *fname;
85 if (asprintf(&fname, "%s/%s", dirname, entry->d_name) == -1) 81 if (asprintf(&fname, "%s/%s", dirname, entry->d_name) == -1)
86 errExit("asprintf"); 82 errExit("asprintf");
87 FILE *fp = fopen(fname, "r"); 83 FILE *fp = fopen(fname, "re");
88 free(fname); 84 free(fname);
89 if (!fp) 85 if (!fp)
90 continue; 86 continue;
@@ -267,7 +263,7 @@ static const char * const env_whitelist[] = {
267 "LANG", 263 "LANG",
268 "LANGUAGE", 264 "LANGUAGE",
269 "LC_MESSAGES", 265 "LC_MESSAGES",
270 "PATH", 266 // "PATH",
271 "DISPLAY" // required by X11 267 "DISPLAY" // required by X11
272}; 268};
273 269
@@ -316,6 +312,10 @@ void env_apply_whitelist(void) {
316 errExit("clearenv"); 312 errExit("clearenv");
317 313
318 env_apply_list(env_whitelist, ARRAY_SIZE(env_whitelist)); 314 env_apply_list(env_whitelist, ARRAY_SIZE(env_whitelist));
315
316 // hardcoding PATH
317 if (setenv("PATH", "/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin", 1) < 0)
318 errExit("setenv");
319} 319}
320 320
321// Filter env variables for a sbox app 321// Filter env variables for a sbox app
diff --git a/src/firejail/firejail.h b/src/firejail/firejail.h
index e07035ae6..316518534 100644
--- a/src/firejail/firejail.h
+++ b/src/firejail/firejail.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -22,6 +22,7 @@
22#include "../include/common.h" 22#include "../include/common.h"
23#include "../include/euid_common.h" 23#include "../include/euid_common.h"
24#include "../include/rundefs.h" 24#include "../include/rundefs.h"
25#include <linux/limits.h> // Note: Plain limits.h may break ARG_MAX (see #4583)
25#include <stdarg.h> 26#include <stdarg.h>
26#include <sys/stat.h> 27#include <sys/stat.h>
27 28
@@ -45,6 +46,15 @@
45 assert(s.st_gid == gid);\ 46 assert(s.st_gid == gid);\
46 assert((s.st_mode & 07777) == (mode));\ 47 assert((s.st_mode & 07777) == (mode));\
47 } while (0) 48 } while (0)
49#define ASSERT_PERMS_AS_USER(file, uid, gid, mode) \
50 do { \
51 assert(file);\
52 struct stat s;\
53 if (stat_as_user(file, &s) == -1) errExit("stat");\
54 assert(s.st_uid == uid);\
55 assert(s.st_gid == gid);\
56 assert((s.st_mode & 07777) == (mode));\
57 } while (0)
48#define ASSERT_PERMS_FD(fd, uid, gid, mode) \ 58#define ASSERT_PERMS_FD(fd, uid, gid, mode) \
49 do { \ 59 do { \
50 struct stat s;\ 60 struct stat s;\
@@ -122,26 +132,22 @@ typedef struct interface_t {
122 uint8_t configured; 132 uint8_t configured;
123} Interface; 133} Interface;
124 134
135typedef struct topdir_t {
136 char *path;
137 int fd;
138} TopDir;
139
125typedef struct profile_entry_t { 140typedef struct profile_entry_t {
126 struct profile_entry_t *next; 141 struct profile_entry_t *next;
127 char *data; // command 142 char *data; // command
128 143
129 // whitelist command parameters 144 // whitelist command parameters
130 char *link; // link name - set if the file is a link 145 struct wparam_t {
131 enum { 146 char *file; // resolved file path
132 WLDIR_HOME = 1, // whitelist in home directory 147 char *link; // link path
133 WLDIR_TMP, // whitelist in /tmp directory 148 TopDir *top; // top level directory
134 WLDIR_MEDIA, // whitelist in /media directory 149 } *wparam;
135 WLDIR_MNT, // whitelist in /mnt directory 150
136 WLDIR_VAR, // whitelist in /var directory
137 WLDIR_DEV, // whitelist in /dev directory
138 WLDIR_OPT, // whitelist in /opt directory
139 WLDIR_SRV, // whitelist in /srv directory
140 WLDIR_ETC, // whitelist in /etc directory
141 WLDIR_SHARE, // whitelist in /usr/share directory
142 WLDIR_MODULE, // whitelist in /sys/module directory
143 WLDIR_RUN // whitelist in /run/user/$uid directory
144 } wldir;
145} ProfileEntry; 151} ProfileEntry;
146 152
147typedef struct config_t { 153typedef struct config_t {
@@ -151,8 +157,11 @@ typedef struct config_t {
151 157
152 // filesystem 158 // filesystem
153 ProfileEntry *profile; 159 ProfileEntry *profile;
160 ProfileEntry *profile_rebuild_etc; // blacklist files in /etc directory used by fs_rebuild_etc()
161
154#define MAX_PROFILE_IGNORE 32 162#define MAX_PROFILE_IGNORE 32
155 char *profile_ignore[MAX_PROFILE_IGNORE]; 163 char *profile_ignore[MAX_PROFILE_IGNORE];
164 char *keep_fd; // inherit file descriptors to sandbox
156 char *chrootdir; // chroot directory 165 char *chrootdir; // chroot directory
157 char *home_private; // private home directory 166 char *home_private; // private home directory
158 char *home_private_keep; // keep list for private home directory 167 char *home_private_keep; // keep list for private home directory
@@ -314,15 +323,16 @@ extern int arg_private_cwd; // private working directory
314extern int arg_scan; // arp-scan all interfaces 323extern int arg_scan; // arp-scan all interfaces
315extern int arg_whitelist; // whitelist command 324extern int arg_whitelist; // whitelist command
316extern int arg_nosound; // disable sound 325extern int arg_nosound; // disable sound
317extern int arg_noautopulse; // disable automatic ~/.config/pulse init
318extern int arg_novideo; //disable video devices in /dev 326extern int arg_novideo; //disable video devices in /dev
319extern int arg_no3d; // disable 3d hardware acceleration 327extern int arg_no3d; // disable 3d hardware acceleration
328extern int arg_noprinters; // disable printers
320extern int arg_quiet; // no output for scripting 329extern int arg_quiet; // no output for scripting
321extern int arg_join_network; // join only the network namespace 330extern int arg_join_network; // join only the network namespace
322extern int arg_join_filesystem; // join only the mount namespace 331extern int arg_join_filesystem; // join only the mount namespace
323extern int arg_nice; // nice value configured 332extern int arg_nice; // nice value configured
324extern int arg_ipc; // enable ipc namespace 333extern int arg_ipc; // enable ipc namespace
325extern int arg_writable_etc; // writable etc 334extern int arg_writable_etc; // writable etc
335extern int arg_keep_config_pulse; // disable automatic ~/.config/pulse init
326extern int arg_writable_var; // writable var 336extern int arg_writable_var; // writable var
327extern int arg_keep_var_tmp; // don't overwrite /var/tmp 337extern int arg_keep_var_tmp; // don't overwrite /var/tmp
328extern int arg_writable_run_user; // writable /run/user 338extern int arg_writable_run_user; // writable /run/user
@@ -333,7 +343,7 @@ extern int arg_allow_debuggers; // allow debuggers
333extern int arg_x11_block; // block X11 343extern int arg_x11_block; // block X11
334extern int arg_x11_xorg; // use X11 security extension 344extern int arg_x11_xorg; // use X11 security extension
335extern int arg_allusers; // all user home directories visible 345extern int arg_allusers; // all user home directories visible
336extern int arg_machineid; // preserve /etc/machine-id 346extern int arg_machineid; // spoof /etc/machine-id
337extern int arg_disable_mnt; // disable /mnt and /media 347extern int arg_disable_mnt; // disable /mnt and /media
338extern int arg_noprofile; // use default.profile if none other found/specified 348extern int arg_noprofile; // use default.profile if none other found/specified
339extern int arg_memory_deny_write_execute; // block writable and executable memory 349extern int arg_memory_deny_write_execute; // block writable and executable memory
@@ -342,6 +352,8 @@ extern int arg_nodvd; // --nodvd
342extern int arg_nou2f; // --nou2f 352extern int arg_nou2f; // --nou2f
343extern int arg_noinput; // --noinput 353extern int arg_noinput; // --noinput
344extern int arg_deterministic_exit_code; // always exit with first child's exit status 354extern int arg_deterministic_exit_code; // always exit with first child's exit status
355extern int arg_deterministic_shutdown; // shut down the sandbox if first child dies
356extern int arg_keep_fd_all; // inherit all file descriptors to sandbox
345 357
346typedef enum { 358typedef enum {
347 DBUS_POLICY_ALLOW, // Allow unrestricted access to the bus 359 DBUS_POLICY_ALLOW, // Allow unrestricted access to the bus
@@ -353,6 +365,7 @@ extern DbusPolicy arg_dbus_system; // --dbus-system
353extern int arg_dbus_log_user; 365extern int arg_dbus_log_user;
354extern int arg_dbus_log_system; 366extern int arg_dbus_log_system;
355extern const char *arg_dbus_log_file; 367extern const char *arg_dbus_log_file;
368extern int arg_tab;
356 369
357extern int login_shell; 370extern int login_shell;
358extern int parent_to_child_fds[2]; 371extern int parent_to_child_fds[2];
@@ -426,13 +439,15 @@ void fs_proc_sys_dev_boot(void);
426void disable_config(void); 439void disable_config(void);
427// build a basic read-only filesystem 440// build a basic read-only filesystem
428void fs_basic_fs(void); 441void fs_basic_fs(void);
429// mount overlayfs on top of / directory
430char *fs_check_overlay_dir(const char *subdirname, int allow_reuse);
431void fs_overlayfs(void);
432void fs_private_tmp(void); 442void fs_private_tmp(void);
433void fs_private_cache(void); 443void fs_private_cache(void);
434void fs_mnt(const int enforce); 444void fs_mnt(const int enforce);
435 445
446// fs_overlayfs.c
447char *fs_check_overlay_dir(const char *subdirname, int allow_reuse);
448void fs_overlayfs(void);
449int remove_overlay_directory(void);
450
436// chroot.c 451// chroot.c
437// chroot into an existing directory; mount existing /dev and update /etc/resolv.conf 452// chroot into an existing directory; mount existing /dev and update /etc/resolv.conf
438void fs_check_chroot_dir(void); 453void fs_check_chroot_dir(void);
@@ -493,7 +508,9 @@ int macro_id(const char *name);
493void errLogExit(char* fmt, ...) __attribute__((noreturn)); 508void errLogExit(char* fmt, ...) __attribute__((noreturn));
494void fwarning(char* fmt, ...); 509void fwarning(char* fmt, ...);
495void fmessage(char* fmt, ...); 510void fmessage(char* fmt, ...);
496void drop_privs(int nogroups); 511long long unsigned parse_arg_size(char *str);
512int check_can_drop_all_groups();
513void drop_privs(int force_nogroups);
497int mkpath_as_root(const char* path); 514int mkpath_as_root(const char* path);
498void extract_command_name(int index, char **argv); 515void extract_command_name(int index, char **argv);
499void logsignal(int s); 516void logsignal(int s);
@@ -502,11 +519,15 @@ void logargs(int argc, char **argv) ;
502void logerr(const char *msg); 519void logerr(const char *msg);
503void set_nice(int inc); 520void set_nice(int inc);
504int copy_file(const char *srcname, const char *destname, uid_t uid, gid_t gid, mode_t mode); 521int copy_file(const char *srcname, const char *destname, uid_t uid, gid_t gid, mode_t mode);
505void copy_file_as_user(const char *srcname, const char *destname, uid_t uid, gid_t gid, mode_t mode); 522void copy_file_as_user(const char *srcname, const char *destname, mode_t mode);
506void copy_file_from_user_to_root(const char *srcname, const char *destname, uid_t uid, gid_t gid, mode_t mode); 523void copy_file_from_user_to_root(const char *srcname, const char *destname, uid_t uid, gid_t gid, mode_t mode);
507void touch_file_as_user(const char *fname, mode_t mode); 524void touch_file_as_user(const char *fname, mode_t mode);
508int is_dir(const char *fname); 525int is_dir(const char *fname);
509int is_link(const char *fname); 526int is_link(const char *fname);
527char *realpath_as_user(const char *fname);
528ssize_t readlink_as_user(const char *fname, char *buf, size_t sz);
529int stat_as_user(const char *fname, struct stat *s);
530int lstat_as_user(const char *fname, struct stat *s);
510void trim_trailing_slash_or_dot(char *path); 531void trim_trailing_slash_or_dot(char *path);
511char *line_remove_spaces(const char *buf); 532char *line_remove_spaces(const char *buf);
512char *split_comma(char *str); 533char *split_comma(char *str);
@@ -518,8 +539,7 @@ void update_map(char *mapping, char *map_file);
518void wait_for_other(int fd); 539void wait_for_other(int fd);
519void notify_other(int fd); 540void notify_other(int fd);
520uid_t pid_get_uid(pid_t pid); 541uid_t pid_get_uid(pid_t pid);
521uid_t get_group_id(const char *group); 542gid_t get_group_id(const char *groupname);
522int remove_overlay_directory(void);
523void flush_stdin(void); 543void flush_stdin(void);
524int create_empty_dir_as_user(const char *dir, mode_t mode); 544int create_empty_dir_as_user(const char *dir, mode_t mode);
525void create_empty_dir_as_root(const char *dir, mode_t mode); 545void create_empty_dir_as_root(const char *dir, mode_t mode);
@@ -529,12 +549,17 @@ void mkdir_attr(const char *fname, mode_t mode, uid_t uid, gid_t gid);
529unsigned extract_timeout(const char *str); 549unsigned extract_timeout(const char *str);
530void disable_file_or_dir(const char *fname); 550void disable_file_or_dir(const char *fname);
531void disable_file_path(const char *path, const char *file); 551void disable_file_path(const char *path, const char *file);
532int safe_fd(const char *path, int flags); 552int safer_openat(int dirfd, const char *path, int flags);
553int remount_by_fd(int dst, unsigned long mountflags);
554int bind_mount_by_fd(int src, int dst);
555int bind_mount_path_to_fd(const char *srcname, int dst);
556int bind_mount_fd_to_path(int src, const char *destname);
557void close_all(int *keep_list, size_t sz);
533int has_handler(pid_t pid, int signal); 558int has_handler(pid_t pid, int signal);
534void enter_network_namespace(pid_t pid); 559void enter_network_namespace(pid_t pid);
535int read_pid(const char *name, pid_t *pid); 560int read_pid(const char *name, pid_t *pid);
536pid_t require_pid(const char *name); 561pid_t require_pid(const char *name);
537void check_homedir(void); 562void check_homedir(const char *dir);
538 563
539// Get info regarding the last kernel mount operation from /proc/self/mountinfo 564// Get info regarding the last kernel mount operation from /proc/self/mountinfo
540// The return value points to a static area, and will be overwritten by subsequent calls. 565// The return value points to a static area, and will be overwritten by subsequent calls.
@@ -548,8 +573,8 @@ typedef struct {
548 573
549// mountinfo.c 574// mountinfo.c
550MountData *get_last_mount(void); 575MountData *get_last_mount(void);
551int get_mount_id(const char *path); 576int get_mount_id(int fd);
552char **build_mount_array(const int mount_id, const char *path); 577char **build_mount_array(const int mountid, const char *path);
553 578
554// fs_var.c 579// fs_var.c
555void fs_var_log(void); // mounting /var/log 580void fs_var_log(void); // mounting /var/log
@@ -606,13 +631,13 @@ void caps_print_filter(pid_t pid) __attribute__((noreturn));
606void caps_drop_dac_override(void); 631void caps_drop_dac_override(void);
607 632
608// fs_trace.c 633// fs_trace.c
609void fs_trace_preload(void); 634void fs_trace_touch_preload(void);
635void fs_trace_touch_or_store_preload(void);
610void fs_tracefile(void); 636void fs_tracefile(void);
611void fs_trace(void); 637void fs_trace(void);
612 638
613// fs_hostname.c 639// fs_hostname.c
614void fs_hostname(const char *hostname); 640void fs_hostname(const char *hostname);
615void fs_resolvconf(void);
616char *fs_check_hosts_file(const char *fname); 641char *fs_check_hosts_file(const char *fname);
617void fs_store_hosts_file(void); 642void fs_store_hosts_file(void);
618void fs_mount_hosts_file(void); 643void fs_mount_hosts_file(void);
@@ -630,12 +655,15 @@ void cpu_print_filter(pid_t pid) __attribute__((noreturn));
630// cgroup.c 655// cgroup.c
631void save_cgroup(void); 656void save_cgroup(void);
632void load_cgroup(const char *fname); 657void load_cgroup(const char *fname);
633void set_cgroup(const char *path); 658void check_cgroup_file(const char *fname);
659void set_cgroup(const char *fname, pid_t pid);
634 660
635// output.c 661// output.c
636void check_output(int argc, char **argv); 662void check_output(int argc, char **argv);
637 663
638// netfilter.c 664// netfilter.c
665void netfilter_netlock(pid_t pid);
666void netfilter_trace(pid_t pid);
639void check_netfilter_file(const char *fname); 667void check_netfilter_file(const char *fname);
640void netfilter(const char *fname); 668void netfilter(const char *fname);
641void netfilter6(const char *fname); 669void netfilter6(const char *fname);
@@ -655,6 +683,7 @@ void fs_machineid(void);
655void fs_private_dir_copy(const char *private_dir, const char *private_run_dir, const char *private_list); 683void fs_private_dir_copy(const char *private_dir, const char *private_run_dir, const char *private_list);
656void fs_private_dir_mount(const char *private_dir, const char *private_run_dir); 684void fs_private_dir_mount(const char *private_dir, const char *private_run_dir);
657void fs_private_dir_list(const char *private_dir, const char *private_run_dir, const char *private_list); 685void fs_private_dir_list(const char *private_dir, const char *private_run_dir, const char *private_list);
686void fs_rebuild_etc(void);
658 687
659// no_sandbox.c 688// no_sandbox.c
660int check_namespace_virt(void); 689int check_namespace_virt(void);
@@ -682,6 +711,7 @@ void env_ibus_load(void);
682void fs_whitelist(void); 711void fs_whitelist(void);
683 712
684// pulseaudio.c 713// pulseaudio.c
714void pipewire_disable(void);
685void pulseaudio_init(void); 715void pulseaudio_init(void);
686void pulseaudio_disable(void); 716void pulseaudio_disable(void);
687 717
@@ -689,6 +719,8 @@ void pulseaudio_disable(void);
689void fs_private_bin_list(void); 719void fs_private_bin_list(void);
690 720
691// fs_lib.c 721// fs_lib.c
722int is_firejail_link(const char *fname);
723char *find_in_path(const char *program);
692void fs_private_lib(void); 724void fs_private_lib(void);
693 725
694// protocol.c 726// protocol.c
@@ -763,27 +795,30 @@ enum {
763 CFG_NETWORK, 795 CFG_NETWORK,
764 CFG_RESTRICTED_NETWORK, 796 CFG_RESTRICTED_NETWORK,
765 CFG_FORCE_NONEWPRIVS, 797 CFG_FORCE_NONEWPRIVS,
766 CFG_WHITELIST,
767 CFG_XEPHYR_WINDOW_TITLE, 798 CFG_XEPHYR_WINDOW_TITLE,
768 CFG_OVERLAYFS, 799 CFG_OVERLAYFS,
769 CFG_PRIVATE_HOME, 800 CFG_PRIVATE_BIN,
770 CFG_PRIVATE_BIN_NO_LOCAL, 801 CFG_PRIVATE_BIN_NO_LOCAL,
802 CFG_PRIVATE_CACHE,
803 CFG_PRIVATE_ETC,
804 CFG_PRIVATE_HOME,
805 CFG_PRIVATE_LIB,
806 CFG_PRIVATE_OPT,
807 CFG_PRIVATE_SRV,
771 CFG_FIREJAIL_PROMPT, 808 CFG_FIREJAIL_PROMPT,
772 CFG_FOLLOW_SYMLINK_AS_USER,
773 CFG_DISABLE_MNT, 809 CFG_DISABLE_MNT,
774 CFG_JOIN, 810 CFG_JOIN,
775 CFG_ARP_PROBES, 811 CFG_ARP_PROBES,
776 CFG_XPRA_ATTACH, 812 CFG_XPRA_ATTACH,
777 CFG_BROWSER_DISABLE_U2F, 813 CFG_BROWSER_DISABLE_U2F,
778 CFG_BROWSER_ALLOW_DRM, 814 CFG_BROWSER_ALLOW_DRM,
779 CFG_PRIVATE_LIB,
780 CFG_APPARMOR, 815 CFG_APPARMOR,
781 CFG_DBUS, 816 CFG_DBUS,
782 CFG_PRIVATE_CACHE,
783 CFG_CGROUP, 817 CFG_CGROUP,
784 CFG_NAME_CHANGE, 818 CFG_NAME_CHANGE,
785 CFG_SECCOMP_ERROR_ACTION, 819 CFG_SECCOMP_ERROR_ACTION,
786 // CFG_FILE_COPY_LIMIT - file copy limit handled using setenv/getenv 820 // CFG_FILE_COPY_LIMIT - file copy limit handled using setenv/getenv
821 CFG_ALLOW_TRAY,
787 CFG_MAX // this should always be the last entry 822 CFG_MAX // this should always be the last entry
788}; 823};
789extern char *xephyr_screen; 824extern char *xephyr_screen;
@@ -794,11 +829,14 @@ extern char *xvfb_extra_params;
794extern char *netfilter_default; 829extern char *netfilter_default;
795extern unsigned long join_timeout; 830extern unsigned long join_timeout;
796extern char *config_seccomp_error_action_str; 831extern char *config_seccomp_error_action_str;
832extern char *config_seccomp_filter_add;
833extern char **whitelist_reject_topdirs;
797 834
798int checkcfg(int val); 835int checkcfg(int val);
799void print_compiletime_support(void); 836void print_compiletime_support(void);
800 837
801// appimage.c 838// appimage.c
839int appimage_find_profile(const char *archive);
802void appimage_set(const char *appimage_path); 840void appimage_set(const char *appimage_path);
803void appimage_mount(void); 841void appimage_mount(void);
804void appimage_clear(void); 842void appimage_clear(void);
@@ -807,15 +845,14 @@ void appimage_clear(void);
807long unsigned int appimage2_size(int fd); 845long unsigned int appimage2_size(int fd);
808 846
809// cmdline.c 847// cmdline.c
810void build_cmdline(char **command_line, char **window_title, int argc, char **argv, int index); 848void build_cmdline(char **command_line, char **window_title, int argc, char **argv, int index, bool want_extra_quotes);
811void build_appimage_cmdline(char **command_line, char **window_title, int argc, char **argv, int index); 849void build_appimage_cmdline(char **command_line, char **window_title, int argc, char **argv, int index, bool want_extra_quotes);
812 850
813// sbox.c 851// sbox.c
814// programs 852// programs
815#define PATH_FNET_MAIN (LIBDIR "/firejail/fnet") // when called from main thread 853#define PATH_FNET_MAIN (LIBDIR "/firejail/fnet") // when called from main thread
816#define PATH_FNET (RUN_FIREJAIL_LIB_DIR "/fnet") // when called from sandbox thread 854#define PATH_FNET (RUN_FIREJAIL_LIB_DIR "/fnet") // when called from sandbox thread
817 855
818//#define PATH_FNETFILTER (LIBDIR "/firejail/fnetfilter")
819#define PATH_FNETFILTER (RUN_FIREJAIL_LIB_DIR "/fnetfilter") 856#define PATH_FNETFILTER (RUN_FIREJAIL_LIB_DIR "/fnetfilter")
820 857
821#define PATH_FIREMON (PREFIX "/bin/firemon") 858#define PATH_FIREMON (PREFIX "/bin/firemon")
@@ -828,17 +865,16 @@ void build_appimage_cmdline(char **command_line, char **window_title, int argc,
828// it is also run from inside the sandbox by --debug; in this case we do an access(filename, X_OK) test first 865// it is also run from inside the sandbox by --debug; in this case we do an access(filename, X_OK) test first
829#define PATH_FSEC_PRINT (LIBDIR "/firejail/fsec-print") 866#define PATH_FSEC_PRINT (LIBDIR "/firejail/fsec-print")
830 867
831//#define PATH_FSEC_OPTIMIZE (LIBDIR "/firejail/fsec-optimize")
832#define PATH_FSEC_OPTIMIZE (RUN_FIREJAIL_LIB_DIR "/fsec-optimize") 868#define PATH_FSEC_OPTIMIZE (RUN_FIREJAIL_LIB_DIR "/fsec-optimize")
833 869
834//#define PATH_FCOPY (LIBDIR "/firejail/fcopy")
835#define PATH_FCOPY (RUN_FIREJAIL_LIB_DIR "/fcopy") 870#define PATH_FCOPY (RUN_FIREJAIL_LIB_DIR "/fcopy")
836 871
837#define SBOX_STDIN_FILE "/run/firejail/mnt/sbox_stdin" 872#define SBOX_STDIN_FILE "/run/firejail/mnt/sbox_stdin"
838 873
839//#define PATH_FLDD (LIBDIR "/firejail/fldd")
840#define PATH_FLDD (RUN_FIREJAIL_LIB_DIR "/fldd") 874#define PATH_FLDD (RUN_FIREJAIL_LIB_DIR "/fldd")
841 875
876#define PATH_FIDS (LIBDIR "/firejail/fids")
877
842// bitmapped filters for sbox_run 878// bitmapped filters for sbox_run
843#define SBOX_ROOT (1 << 0) // run the sandbox as root 879#define SBOX_ROOT (1 << 0) // run the sandbox as root
844#define SBOX_USER (1 << 1) // run the sandbox as a regular user 880#define SBOX_USER (1 << 1) // run the sandbox as a regular user
@@ -850,7 +886,6 @@ void build_appimage_cmdline(char **command_line, char **window_title, int argc,
850#define SBOX_CAPS_HIDEPID (1 << 7) // hidepid caps filter for running firemon 886#define SBOX_CAPS_HIDEPID (1 << 7) // hidepid caps filter for running firemon
851#define SBOX_CAPS_NET_SERVICE (1 << 8) // caps filter for programs running network services 887#define SBOX_CAPS_NET_SERVICE (1 << 8) // caps filter for programs running network services
852#define SBOX_KEEP_FDS (1 << 9) // keep file descriptors open 888#define SBOX_KEEP_FDS (1 << 9) // keep file descriptors open
853#define FIREJAIL_MAX_FD 20 // getdtablesize() is overkill for a firejail process
854 889
855// run sbox 890// run sbox
856int sbox_run(unsigned filter, int num, ...); 891int sbox_run(unsigned filter, int num, ...);
@@ -883,4 +918,7 @@ void dhcp_start(void);
883// selinux.c 918// selinux.c
884void selinux_relabel_path(const char *path, const char *inside_path); 919void selinux_relabel_path(const char *path, const char *inside_path);
885 920
921// ids.c
922void run_ids(int argc, char **argv);
923
886#endif 924#endif
diff --git a/src/firejail/fs.c b/src/firejail/fs.c
index fc67a15f3..c03cd7a12 100644
--- a/src/firejail/fs.c
+++ b/src/firejail/fs.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -18,11 +18,9 @@
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include "firejail.h" 20#include "firejail.h"
21#include "../include/gcov_wrapper.h"
21#include <sys/mount.h> 22#include <sys/mount.h>
22#include <sys/stat.h>
23#include <sys/statvfs.h> 23#include <sys/statvfs.h>
24#include <sys/wait.h>
25#include <linux/limits.h>
26#include <fnmatch.h> 24#include <fnmatch.h>
27#include <glob.h> 25#include <glob.h>
28#include <dirent.h> 26#include <dirent.h>
@@ -34,7 +32,7 @@
34#endif 32#endif
35 33
36#define MAX_BUF 4096 34#define MAX_BUF 4096
37#define EMPTY_STRING ("") 35
38// check noblacklist statements not matched by a proper blacklist in disable-*.inc files 36// check noblacklist statements not matched by a proper blacklist in disable-*.inc files
39//#define TEST_NO_BLACKLIST_MATCHING 37//#define TEST_NO_BLACKLIST_MATCHING
40 38
@@ -54,16 +52,10 @@ static char *opstr[] = {
54 [MOUNT_RDWR_NOCHECK] = "read-write", 52 [MOUNT_RDWR_NOCHECK] = "read-write",
55}; 53};
56 54
57typedef enum {
58 UNSUCCESSFUL,
59 SUCCESSFUL
60} LAST_DISABLE_OPERATION;
61LAST_DISABLE_OPERATION last_disable = UNSUCCESSFUL;
62
63static void disable_file(OPERATION op, const char *filename) { 55static void disable_file(OPERATION op, const char *filename) {
64 assert(filename); 56 assert(filename);
65 assert(op <OPERATION_MAX); 57 assert(op <OPERATION_MAX);
66 last_disable = UNSUCCESSFUL; 58 EUID_ASSERT();
67 59
68 // Resolve all symlinks 60 // Resolve all symlinks
69 char* fname = realpath(filename, NULL); 61 char* fname = realpath(filename, NULL);
@@ -71,20 +63,24 @@ static void disable_file(OPERATION op, const char *filename) {
71 return; 63 return;
72 } 64 }
73 if (fname == NULL && errno == EACCES) { 65 if (fname == NULL && errno == EACCES) {
74 if (arg_debug)
75 printf("Debug: no access to file %s, forcing mount\n", filename);
76 // realpath and stat functions will fail on FUSE filesystems 66 // realpath and stat functions will fail on FUSE filesystems
77 // they don't seem to like a uid of 0 67 // they don't seem to like a uid of 0
78 // force mounting 68 // force mounting
79 int rv = mount(RUN_RO_DIR, filename, "none", MS_BIND, "mode=400,gid=0"); 69 int fd = open(filename, O_PATH|O_CLOEXEC);
80 if (rv == 0) 70 if (fd < 0) {
81 last_disable = SUCCESSFUL; 71 if (arg_debug)
82 else { 72 printf("Warning (blacklisting): cannot open %s: %s\n", filename, strerror(errno));
83 rv = mount(RUN_RO_FILE, filename, "none", MS_BIND, "mode=400,gid=0"); 73 return;
84 if (rv == 0)
85 last_disable = SUCCESSFUL;
86 } 74 }
87 if (last_disable == SUCCESSFUL) { 75
76 EUID_ROOT();
77 int err = bind_mount_path_to_fd(RUN_RO_DIR, fd);
78 if (err != 0)
79 err = bind_mount_path_to_fd(RUN_RO_FILE, fd);
80 EUID_USER();
81 close(fd);
82
83 if (err == 0) {
88 if (arg_debug) 84 if (arg_debug)
89 printf("Disable %s\n", filename); 85 printf("Disable %s\n", filename);
90 if (op == BLACKLIST_FILE) 86 if (op == BLACKLIST_FILE)
@@ -92,31 +88,39 @@ static void disable_file(OPERATION op, const char *filename) {
92 else 88 else
93 fs_logger2("blacklist-nolog", filename); 89 fs_logger2("blacklist-nolog", filename);
94 } 90 }
95 else { 91 else if (arg_debug)
96 if (arg_debug) 92 printf("Warning (blacklisting): cannot mount on %s\n", filename);
97 printf("Warning (blacklisting): %s is an invalid file, skipping...\n", filename);
98 }
99 93
100 return; 94 return;
101 } 95 }
102 96
103 // if the file is not present, do nothing 97 assert(fname);
104 struct stat s; 98 // check for firejail executable
105 if (fname == NULL) 99 // we might have a file found in ${PATH} pointing to /usr/bin/firejail
100 // blacklisting it here will end up breaking situations like user clicks on a link in Thunderbird
101 // and expects Firefox to open in the same sandbox
102 if (strcmp(BINDIR "/firejail", fname) == 0) {
103 free(fname);
106 return; 104 return;
107 if (stat(fname, &s) == -1) { 105 }
106
107 // if the file is not present, do nothing
108 int fd = open(fname, O_PATH|O_CLOEXEC);
109 if (fd < 0) {
108 if (arg_debug) 110 if (arg_debug)
109 fwarning("%s does not exist, skipping...\n", fname); 111 printf("Warning (blacklisting): cannot open %s: %s\n", fname, strerror(errno));
110 free(fname); 112 free(fname);
111 return; 113 return;
112 } 114 }
113 115
114 // check for firejail executable 116 struct stat s;
115 // we migth have a file found in ${PATH} pointing to /usr/bin/firejail 117 if (fstat(fd, &s) < 0) {
116 // blacklisting it here will end up breaking situations like user clicks on a link in Thunderbird 118 if (arg_debug)
117 // and expects Firefox to open in the same sandbox 119 printf("Warning (blacklisting): cannot stat %s: %s\n", fname, strerror(errno));
118 if (strcmp(BINDIR "/firejail", fname) == 0) 120 free(fname);
121 close(fd);
119 return; 122 return;
123 }
120 124
121 // modify the file 125 // modify the file
122 if (op == BLACKLIST_FILE || op == BLACKLIST_NOLOG) { 126 if (op == BLACKLIST_FILE || op == BLACKLIST_NOLOG) {
@@ -141,44 +145,64 @@ static void disable_file(OPERATION op, const char *filename) {
141 printf(" - no logging\n"); 145 printf(" - no logging\n");
142 } 146 }
143 147
148 EUID_ROOT();
144 if (S_ISDIR(s.st_mode)) { 149 if (S_ISDIR(s.st_mode)) {
145 if (mount(RUN_RO_DIR, fname, "none", MS_BIND, "mode=400,gid=0") < 0) 150 if (bind_mount_path_to_fd(RUN_RO_DIR, fd) < 0)
146 errExit("disable file"); 151 errExit("disable file");
147 } 152 }
148 else { 153 else {
149 if (mount(RUN_RO_FILE, fname, "none", MS_BIND, "mode=400,gid=0") < 0) 154 if (bind_mount_path_to_fd(RUN_RO_FILE, fd) < 0)
150 errExit("disable file"); 155 errExit("disable file");
151 } 156 }
152 last_disable = SUCCESSFUL; 157 EUID_USER();
158
153 if (op == BLACKLIST_FILE) 159 if (op == BLACKLIST_FILE)
154 fs_logger2("blacklist", fname); 160 fs_logger2("blacklist", fname);
155 else 161 else
156 fs_logger2("blacklist-nolog", fname); 162 fs_logger2("blacklist-nolog", fname);
163
164 // files in /etc will be reprocessed during /etc rebuild
165 if (strncmp(fname, "/etc/", 5) == 0) {
166 ProfileEntry *prf = malloc(sizeof(ProfileEntry));
167 if (!prf)
168 errExit("malloc");
169 memset(prf, 0, sizeof(ProfileEntry));
170 prf->data = strdup(fname);
171 if (!prf->data)
172 errExit("strdup");
173 prf->next = cfg.profile_rebuild_etc;
174 cfg.profile_rebuild_etc = prf;
175 }
157 } 176 }
158 } 177 }
159 else if (op == MOUNT_READONLY || op == MOUNT_RDWR || op == MOUNT_NOEXEC) { 178 else if (op == MOUNT_READONLY || op == MOUNT_RDWR || op == MOUNT_NOEXEC) {
160 fs_remount_rec(fname, op); 179 fs_remount_rec(fname, op);
161 // todo: last_disable = SUCCESSFUL;
162 } 180 }
163 else if (op == MOUNT_TMPFS) { 181 else if (op == MOUNT_TMPFS) {
164 if (S_ISDIR(s.st_mode)) { 182 if (!S_ISDIR(s.st_mode)) {
165 if (getuid()) { 183 fwarning("%s is not a directory; cannot mount a tmpfs on top of it.\n", fname);
166 if (strncmp(cfg.homedir, fname, strlen(cfg.homedir)) != 0 || 184 goto out;
167 fname[strlen(cfg.homedir)] != '/') { 185 }
168 fprintf(stderr, "Error: tmpfs outside $HOME is only available for root\n"); 186
169 exit(1); 187 uid_t uid = getuid();
170 } 188 if (uid != 0) {
189 // only user owned directories in user home
190 if (s.st_uid != uid ||
191 strncmp(cfg.homedir, fname, strlen(cfg.homedir)) != 0 ||
192 fname[strlen(cfg.homedir)] != '/') {
193 fwarning("you are not allowed to mount a tmpfs on %s\n", fname);
194 goto out;
171 } 195 }
172 fs_tmpfs(fname, getuid());
173 selinux_relabel_path(fname, fname);
174 last_disable = SUCCESSFUL;
175 } 196 }
176 else 197
177 fwarning("%s is not a directory; cannot mount a tmpfs on top of it.\n", fname); 198 fs_tmpfs(fname, uid);
199 selinux_relabel_path(fname, fname);
178 } 200 }
179 else 201 else
180 assert(0); 202 assert(0);
181 203
204out:
205 close(fd);
182 free(fname); 206 free(fname);
183} 207}
184 208
@@ -191,6 +215,7 @@ static int *nbcheck = NULL;
191// Treat pattern as a shell glob pattern and blacklist matching files 215// Treat pattern as a shell glob pattern and blacklist matching files
192static void globbing(OPERATION op, const char *pattern, const char *noblacklist[], size_t noblacklist_len) { 216static void globbing(OPERATION op, const char *pattern, const char *noblacklist[], size_t noblacklist_len) {
193 assert(pattern); 217 assert(pattern);
218 EUID_ASSERT();
194 219
195#ifdef TEST_NO_BLACKLIST_MATCHING 220#ifdef TEST_NO_BLACKLIST_MATCHING
196 if (nbcheck_start == 0) { 221 if (nbcheck_start == 0) {
@@ -253,6 +278,8 @@ static void globbing(OPERATION op, const char *pattern, const char *noblacklist[
253 278
254// blacklist files or directories by mounting empty files on top of them 279// blacklist files or directories by mounting empty files on top of them
255void fs_blacklist(void) { 280void fs_blacklist(void) {
281 EUID_ASSERT();
282
256 ProfileEntry *entry = cfg.profile; 283 ProfileEntry *entry = cfg.profile;
257 if (!entry) 284 if (!entry)
258 return; 285 return;
@@ -294,11 +321,13 @@ void fs_blacklist(void) {
294 if (arg_debug) 321 if (arg_debug)
295 printf("Mount-bind %s on top of %s\n", dname1, dname2); 322 printf("Mount-bind %s on top of %s\n", dname1, dname2);
296 // preserve dname2 mode and ownership 323 // preserve dname2 mode and ownership
324 // EUID_ROOT(); - option not accessible to non-root users
297 if (mount(dname1, dname2, NULL, MS_BIND|MS_REC, NULL) < 0) 325 if (mount(dname1, dname2, NULL, MS_BIND|MS_REC, NULL) < 0)
298 errExit("mount bind"); 326 errExit("mount bind");
299 /* coverity[toctou] */ 327 /* coverity[toctou] */
300 if (set_perms(dname2, s.st_uid, s.st_gid,s.st_mode)) 328 if (set_perms(dname2, s.st_uid, s.st_gid,s.st_mode))
301 errExit("set_perms"); 329 errExit("set_perms");
330 // EUID_USER();
302 331
303 entry = entry->next; 332 entry = entry->next;
304 continue; 333 continue;
@@ -376,16 +405,12 @@ void fs_blacklist(void) {
376 op = MOUNT_TMPFS; 405 op = MOUNT_TMPFS;
377 } 406 }
378 else if (strncmp(entry->data, "mkdir ", 6) == 0) { 407 else if (strncmp(entry->data, "mkdir ", 6) == 0) {
379 EUID_USER();
380 fs_mkdir(entry->data + 6); 408 fs_mkdir(entry->data + 6);
381 EUID_ROOT();
382 entry = entry->next; 409 entry = entry->next;
383 continue; 410 continue;
384 } 411 }
385 else if (strncmp(entry->data, "mkfile ", 7) == 0) { 412 else if (strncmp(entry->data, "mkfile ", 7) == 0) {
386 EUID_USER();
387 fs_mkfile(entry->data + 7); 413 fs_mkfile(entry->data + 7);
388 EUID_ROOT();
389 entry = entry->next; 414 entry = entry->next;
390 continue; 415 continue;
391 } 416 }
@@ -449,11 +474,12 @@ void fs_blacklist(void) {
449 474
450// mount a writable tmpfs on directory; requires a resolved path 475// mount a writable tmpfs on directory; requires a resolved path
451void fs_tmpfs(const char *dir, unsigned check_owner) { 476void fs_tmpfs(const char *dir, unsigned check_owner) {
477 EUID_ASSERT();
452 assert(dir); 478 assert(dir);
453 if (arg_debug) 479 if (arg_debug)
454 printf("Mounting tmpfs on %s, check owner: %s\n", dir, (check_owner)? "yes": "no"); 480 printf("Mounting tmpfs on %s, check owner: %s\n", dir, (check_owner)? "yes": "no");
455 // get a file descriptor for dir, fails if there is any symlink 481 // get a file descriptor for dir, fails if there is any symlink
456 int fd = safe_fd(dir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC); 482 int fd = safer_openat(-1, dir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
457 if (fd == -1) 483 if (fd == -1)
458 errExit("while opening directory"); 484 errExit("while opening directory");
459 struct stat s; 485 struct stat s;
@@ -471,13 +497,15 @@ void fs_tmpfs(const char *dir, unsigned check_owner) {
471 struct statvfs buf; 497 struct statvfs buf;
472 if (fstatvfs(fd, &buf) == -1) 498 if (fstatvfs(fd, &buf) == -1)
473 errExit("fstatvfs"); 499 errExit("fstatvfs");
474 unsigned long flags = buf.f_flag & ~(MS_RDONLY|MS_BIND); 500 unsigned long flags = buf.f_flag & ~(MS_RDONLY|MS_BIND|MS_REMOUNT);
475 // mount via the symbolic link in /proc/self/fd 501 // mount via the symbolic link in /proc/self/fd
476 char *proc; 502 char *proc;
477 if (asprintf(&proc, "/proc/self/fd/%d", fd) == -1) 503 if (asprintf(&proc, "/proc/self/fd/%d", fd) == -1)
478 errExit("asprintf"); 504 errExit("asprintf");
505 EUID_ROOT();
479 if (mount("tmpfs", proc, "tmpfs", flags|MS_NOSUID|MS_NODEV, options) < 0) 506 if (mount("tmpfs", proc, "tmpfs", flags|MS_NOSUID|MS_NODEV, options) < 0)
480 errExit("mounting tmpfs"); 507 errExit("mounting tmpfs");
508 EUID_USER();
481 // check the last mount operation 509 // check the last mount operation
482 MountData *mdata = get_last_mount(); 510 MountData *mdata = get_last_mount();
483 if (strcmp(mdata->fstype, "tmpfs") != 0 || strcmp(mdata->dir, dir) != 0) 511 if (strcmp(mdata->fstype, "tmpfs") != 0 || strcmp(mdata->dir, dir) != 0)
@@ -490,38 +518,42 @@ void fs_tmpfs(const char *dir, unsigned check_owner) {
490 518
491// remount path, preserving other mount flags; requires a resolved path 519// remount path, preserving other mount flags; requires a resolved path
492static void fs_remount_simple(const char *path, OPERATION op) { 520static void fs_remount_simple(const char *path, OPERATION op) {
521 EUID_ASSERT();
493 assert(path); 522 assert(path);
494 523
495 // open path without following symbolic links 524 // open path without following symbolic links
496 int fd1 = safe_fd(path, O_PATH|O_NOFOLLOW|O_CLOEXEC); 525 int fd = safer_openat(-1, path, O_PATH|O_NOFOLLOW|O_CLOEXEC);
497 if (fd1 == -1) 526 if (fd < 0)
498 goto out; 527 goto out;
499 struct stat s1; 528
500 if (fstat(fd1, &s1) == -1) { 529 struct stat s;
530 if (fstat(fd, &s) < 0) {
501 // fstat can fail with EACCES if path is a FUSE mount, 531 // fstat can fail with EACCES if path is a FUSE mount,
502 // mounted without 'allow_root' or 'allow_other' 532 // mounted without 'allow_root' or 'allow_other'
503 if (errno != EACCES) 533 if (errno != EACCES)
504 errExit("fstat"); 534 errExit("fstat");
505 close(fd1); 535 close(fd);
506 goto out; 536 goto out;
507 } 537 }
508 // get mount flags 538 // get mount flags
509 struct statvfs buf; 539 struct statvfs buf;
510 if (fstatvfs(fd1, &buf) == -1) 540 if (fstatvfs(fd, &buf) < 0) {
511 errExit("fstatvfs"); 541 close(fd);
542 goto out;
543 }
512 unsigned long flags = buf.f_flag; 544 unsigned long flags = buf.f_flag;
513 545
514 // read-write option 546 // read-write option
515 if (op == MOUNT_RDWR || op == MOUNT_RDWR_NOCHECK) { 547 if (op == MOUNT_RDWR || op == MOUNT_RDWR_NOCHECK) {
516 // nothing to do if there is no read-only flag 548 // nothing to do if there is no read-only flag
517 if ((flags & MS_RDONLY) == 0) { 549 if ((flags & MS_RDONLY) == 0) {
518 close(fd1); 550 close(fd);
519 return; 551 return;
520 } 552 }
521 // allow only user owned directories, except the user is root 553 // allow only user owned directories, except the user is root
522 if (op != MOUNT_RDWR_NOCHECK && getuid() != 0 && s1.st_uid != getuid()) { 554 if (op != MOUNT_RDWR_NOCHECK && getuid() != 0 && s.st_uid != getuid()) {
523 fwarning("you are not allowed to change %s to read-write\n", path); 555 fwarning("you are not allowed to change %s to read-write\n", path);
524 close(fd1); 556 close(fd);
525 return; 557 return;
526 } 558 }
527 flags &= ~MS_RDONLY; 559 flags &= ~MS_RDONLY;
@@ -530,7 +562,7 @@ static void fs_remount_simple(const char *path, OPERATION op) {
530 else if (op == MOUNT_NOEXEC) { 562 else if (op == MOUNT_NOEXEC) {
531 // nothing to do if path is mounted noexec already 563 // nothing to do if path is mounted noexec already
532 if ((flags & (MS_NOEXEC|MS_NODEV|MS_NOSUID)) == (MS_NOEXEC|MS_NODEV|MS_NOSUID)) { 564 if ((flags & (MS_NOEXEC|MS_NODEV|MS_NOSUID)) == (MS_NOEXEC|MS_NODEV|MS_NOSUID)) {
533 close(fd1); 565 close(fd);
534 return; 566 return;
535 } 567 }
536 flags |= MS_NOEXEC|MS_NODEV|MS_NOSUID; 568 flags |= MS_NOEXEC|MS_NODEV|MS_NOSUID;
@@ -539,7 +571,7 @@ static void fs_remount_simple(const char *path, OPERATION op) {
539 else if (op == MOUNT_READONLY) { 571 else if (op == MOUNT_READONLY) {
540 // nothing to do if path is mounted read-only already 572 // nothing to do if path is mounted read-only already
541 if ((flags & MS_RDONLY) == MS_RDONLY) { 573 if ((flags & MS_RDONLY) == MS_RDONLY) {
542 close(fd1); 574 close(fd);
543 return; 575 return;
544 } 576 }
545 flags |= MS_RDONLY; 577 flags |= MS_RDONLY;
@@ -549,29 +581,37 @@ static void fs_remount_simple(const char *path, OPERATION op) {
549 581
550 if (arg_debug) 582 if (arg_debug)
551 printf("Mounting %s %s\n", opstr[op], path); 583 printf("Mounting %s %s\n", opstr[op], path);
584
585 // make path a mount point:
552 // mount --bind path path 586 // mount --bind path path
553 char *proc; 587 EUID_ROOT();
554 if (asprintf(&proc, "/proc/self/fd/%d", fd1) == -1) 588 int err = bind_mount_by_fd(fd, fd);
555 errExit("asprintf"); 589 EUID_USER();
556 if (mount(proc, proc, NULL, MS_BIND|MS_REC, NULL) < 0) 590 if (err) {
557 errExit("mount"); 591 close(fd);
558 free(proc); 592 goto out;
593 }
559 594
560 // mount --bind -o remount,ro path 595 // remount the mount point
561 // need to open path again without following symbolic links 596 // need to open path again
562 int fd2 = safe_fd(path, O_PATH|O_NOFOLLOW|O_CLOEXEC); 597 int fd2 = safer_openat(-1, path, O_PATH|O_NOFOLLOW|O_CLOEXEC);
563 if (fd2 == -1) 598 close(fd); // earliest timepoint to close fd
564 errExit("open"); 599 if (fd2 < 0)
600 goto out;
601
602 // device and inode number should be the same
565 struct stat s2; 603 struct stat s2;
566 if (fstat(fd2, &s2) == -1) 604 if (fstat(fd2, &s2) < 0)
567 errExit("fstat"); 605 errExit("fstat");
568 // device and inode number should be the same 606 if (s.st_dev != s2.st_dev || s.st_ino != s2.st_ino)
569 if (s1.st_dev != s2.st_dev || s1.st_ino != s2.st_ino)
570 errLogExit("invalid %s mount", opstr[op]); 607 errLogExit("invalid %s mount", opstr[op]);
571 if (asprintf(&proc, "/proc/self/fd/%d", fd2) == -1) 608
572 errExit("asprintf"); 609 EUID_ROOT();
573 if (mount(NULL, proc, NULL, flags|MS_BIND|MS_REMOUNT, NULL) < 0) 610 err = remount_by_fd(fd2, flags);
574 errExit("mount"); 611 EUID_USER();
612 close(fd2);
613 if (err)
614 goto out;
575 615
576 // run a sanity check on /proc/self/mountinfo and confirm that target of the last 616 // run a sanity check on /proc/self/mountinfo and confirm that target of the last
577 // mount operation was path; if there are other mount points contained inside path, 617 // mount operation was path; if there are other mount points contained inside path,
@@ -582,10 +622,8 @@ static void fs_remount_simple(const char *path, OPERATION op) {
582 (*(mptr->dir + len) != '\0' && *(mptr->dir + len) != '/')) 622 (*(mptr->dir + len) != '\0' && *(mptr->dir + len) != '/'))
583 && strcmp(path, "/") != 0) // support read-only=/ 623 && strcmp(path, "/") != 0) // support read-only=/
584 errLogExit("invalid %s mount", opstr[op]); 624 errLogExit("invalid %s mount", opstr[op]);
625
585 fs_logger2(opstr[op], path); 626 fs_logger2(opstr[op], path);
586 free(proc);
587 close(fd1);
588 close(fd2);
589 return; 627 return;
590 628
591out: 629out:
@@ -593,38 +631,37 @@ out:
593} 631}
594 632
595// remount recursively; requires a resolved path 633// remount recursively; requires a resolved path
596static void fs_remount_rec(const char *dir, OPERATION op) { 634static void fs_remount_rec(const char *path, OPERATION op) {
597 assert(dir); 635 EUID_ASSERT();
598 struct stat s; 636 assert(op < OPERATION_MAX);
599 if (stat(dir, &s) != 0) 637 assert(path);
600 return; 638
601 if (!S_ISDIR(s.st_mode)) { 639 // no need to search /proc/self/mountinfo for submounts if not a directory
602 // no need to search in /proc/self/mountinfo for submounts if not a directory 640 int fd = open(path, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
603 fs_remount_simple(dir, op); 641 if (fd < 0) {
642 fs_remount_simple(path, op);
604 return; 643 return;
605 } 644 }
606 // get mount point of the directory 645
607 int mountid = get_mount_id(dir); 646 // get mount id of the directory
608 if (mountid == -1) 647 int mountid = get_mount_id(fd);
609 return; 648 close(fd);
610 if (mountid == -2) { 649 if (mountid < 0) {
611 // falling back to a simple remount on old kernels 650 // falling back to a simple remount
612 static int mount_warning = 0; 651 fwarning("%s %s not applied recursively\n", opstr[op], path);
613 if (!mount_warning) { 652 fs_remount_simple(path, op);
614 fwarning("read-only, read-write and noexec options are not applied recursively\n");
615 mount_warning = 1;
616 }
617 fs_remount_simple(dir, op);
618 return; 653 return;
619 } 654 }
655
620 // build array with all mount points that need to get remounted 656 // build array with all mount points that need to get remounted
621 char **arr = build_mount_array(mountid, dir); 657 char **arr = build_mount_array(mountid, path);
622 assert(arr); 658 if (!arr)
659 return;
623 // remount 660 // remount
624 char **tmp = arr; 661 int i;
625 while (*tmp) { 662 for (i = 0; arr[i]; i++) {
626 fs_remount_simple(*tmp, op); 663 fs_remount_simple(arr[i], op);
627 free(*tmp++); 664 free(arr[i]);
628 } 665 }
629 free(arr); 666 free(arr);
630} 667}
@@ -632,6 +669,14 @@ static void fs_remount_rec(const char *dir, OPERATION op) {
632// resolve a path and remount it 669// resolve a path and remount it
633void fs_remount(const char *path, OPERATION op, int rec) { 670void fs_remount(const char *path, OPERATION op, int rec) {
634 assert(path); 671 assert(path);
672
673 int called_as_root = 0;
674 if (geteuid() == 0)
675 called_as_root = 1;
676
677 if (called_as_root)
678 EUID_USER();
679
635 char *rpath = realpath(path, NULL); 680 char *rpath = realpath(path, NULL);
636 if (rpath) { 681 if (rpath) {
637 if (rec) 682 if (rec)
@@ -640,10 +685,14 @@ void fs_remount(const char *path, OPERATION op, int rec) {
640 fs_remount_simple(rpath, op); 685 fs_remount_simple(rpath, op);
641 free(rpath); 686 free(rpath);
642 } 687 }
688
689 if (called_as_root)
690 EUID_ROOT();
643} 691}
644 692
645// Disable /mnt, /media, /run/mount and /run/media access 693// Disable /mnt, /media, /run/mount and /run/media access
646void fs_mnt(const int enforce) { 694void fs_mnt(const int enforce) {
695 EUID_USER();
647 if (enforce) { 696 if (enforce) {
648 // disable-mnt set in firejail.config 697 // disable-mnt set in firejail.config
649 // overriding with noblacklist is not possible in this case 698 // overriding with noblacklist is not possible in this case
@@ -653,13 +702,12 @@ void fs_mnt(const int enforce) {
653 disable_file(BLACKLIST_FILE, "/run/media"); 702 disable_file(BLACKLIST_FILE, "/run/media");
654 } 703 }
655 else { 704 else {
656 EUID_USER();
657 profile_add("blacklist /mnt"); 705 profile_add("blacklist /mnt");
658 profile_add("blacklist /media"); 706 profile_add("blacklist /media");
659 profile_add("blacklist /run/mount"); 707 profile_add("blacklist /run/mount");
660 profile_add("blacklist /run/media"); 708 profile_add("blacklist /run/media");
661 EUID_ROOT();
662 } 709 }
710 EUID_ROOT();
663} 711}
664 712
665 713
@@ -674,7 +722,6 @@ void fs_proc_sys_dev_boot(void) {
674 errExit("mounting /proc/sys"); 722 errExit("mounting /proc/sys");
675 fs_logger("read-only /proc/sys"); 723 fs_logger("read-only /proc/sys");
676 724
677
678 /* Mount a version of /sys that describes the network namespace */ 725 /* Mount a version of /sys that describes the network namespace */
679 if (arg_debug) 726 if (arg_debug)
680 printf("Remounting /sys directory\n"); 727 printf("Remounting /sys directory\n");
@@ -689,13 +736,13 @@ void fs_proc_sys_dev_boot(void) {
689 else 736 else
690 fs_logger("remount /sys"); 737 fs_logger("remount /sys");
691 738
739 EUID_USER();
740
692 disable_file(BLACKLIST_FILE, "/sys/firmware"); 741 disable_file(BLACKLIST_FILE, "/sys/firmware");
693 disable_file(BLACKLIST_FILE, "/sys/hypervisor"); 742 disable_file(BLACKLIST_FILE, "/sys/hypervisor");
694 { // allow user access to some directories in /sys/ by specifying 'noblacklist' option 743 { // allow user access to some directories in /sys/ by specifying 'noblacklist' option
695 EUID_USER();
696 profile_add("blacklist /sys/fs"); 744 profile_add("blacklist /sys/fs");
697 profile_add("blacklist /sys/module"); 745 profile_add("blacklist /sys/module");
698 EUID_ROOT();
699 } 746 }
700 disable_file(BLACKLIST_FILE, "/sys/power"); 747 disable_file(BLACKLIST_FILE, "/sys/power");
701 disable_file(BLACKLIST_FILE, "/sys/kernel/debug"); 748 disable_file(BLACKLIST_FILE, "/sys/kernel/debug");
@@ -739,12 +786,8 @@ void fs_proc_sys_dev_boot(void) {
739 // disable /dev/port 786 // disable /dev/port
740 disable_file(BLACKLIST_FILE, "/dev/port"); 787 disable_file(BLACKLIST_FILE, "/dev/port");
741 788
742
743
744 // disable various ipc sockets in /run/user 789 // disable various ipc sockets in /run/user
745 if (!arg_writable_run_user) { 790 if (!arg_writable_run_user) {
746 struct stat s;
747
748 char *fname; 791 char *fname;
749 if (asprintf(&fname, "/run/user/%d", getuid()) == -1) 792 if (asprintf(&fname, "/run/user/%d", getuid()) == -1)
750 errExit("asprintf"); 793 errExit("asprintf");
@@ -755,8 +798,7 @@ void fs_proc_sys_dev_boot(void) {
755 errExit("asprintf"); 798 errExit("asprintf");
756 if (create_empty_dir_as_user(fnamegpg, 0700)) 799 if (create_empty_dir_as_user(fnamegpg, 0700))
757 fs_logger2("create", fnamegpg); 800 fs_logger2("create", fnamegpg);
758 if (stat(fnamegpg, &s) == 0) 801 disable_file(BLACKLIST_FILE, fnamegpg);
759 disable_file(BLACKLIST_FILE, fnamegpg);
760 free(fnamegpg); 802 free(fnamegpg);
761 803
762 // disable /run/user/{uid}/systemd 804 // disable /run/user/{uid}/systemd
@@ -765,8 +807,7 @@ void fs_proc_sys_dev_boot(void) {
765 errExit("asprintf"); 807 errExit("asprintf");
766 if (create_empty_dir_as_user(fnamesysd, 0755)) 808 if (create_empty_dir_as_user(fnamesysd, 0755))
767 fs_logger2("create", fnamesysd); 809 fs_logger2("create", fnamesysd);
768 if (stat(fnamesysd, &s) == 0) 810 disable_file(BLACKLIST_FILE, fnamesysd);
769 disable_file(BLACKLIST_FILE, fnamesysd);
770 free(fnamesysd); 811 free(fnamesysd);
771 } 812 }
772 free(fname); 813 free(fname);
@@ -777,35 +818,32 @@ void fs_proc_sys_dev_boot(void) {
777 disable_file(BLACKLIST_FILE, "/dev/kmsg"); 818 disable_file(BLACKLIST_FILE, "/dev/kmsg");
778 disable_file(BLACKLIST_FILE, "/proc/kmsg"); 819 disable_file(BLACKLIST_FILE, "/proc/kmsg");
779 } 820 }
821
822 EUID_ROOT();
780} 823}
781 824
782// disable firejail configuration in ~/.config/firejail 825// disable firejail configuration in ~/.config/firejail
783void disable_config(void) { 826void disable_config(void) {
784 struct stat s; 827 EUID_USER();
785 828#ifndef HAVE_ONLY_SYSCFG_PROFILES
786 char *fname; 829 char *fname;
787 if (asprintf(&fname, "%s/.config/firejail", cfg.homedir) == -1) 830 if (asprintf(&fname, "%s/.config/firejail", cfg.homedir) == -1)
788 errExit("asprintf"); 831 errExit("asprintf");
789 if (stat(fname, &s) == 0) 832 disable_file(BLACKLIST_FILE, fname);
790 disable_file(BLACKLIST_FILE, fname);
791 free(fname); 833 free(fname);
834#endif
792 835
793 // disable run time information 836 // disable run time information
794 if (stat(RUN_FIREJAIL_NETWORK_DIR, &s) == 0) 837 disable_file(BLACKLIST_FILE, RUN_FIREJAIL_NETWORK_DIR);
795 disable_file(BLACKLIST_FILE, RUN_FIREJAIL_NETWORK_DIR); 838 disable_file(BLACKLIST_FILE, RUN_FIREJAIL_BANDWIDTH_DIR);
796 if (stat(RUN_FIREJAIL_BANDWIDTH_DIR, &s) == 0) 839 disable_file(BLACKLIST_FILE, RUN_FIREJAIL_NAME_DIR);
797 disable_file(BLACKLIST_FILE, RUN_FIREJAIL_BANDWIDTH_DIR); 840 disable_file(BLACKLIST_FILE, RUN_FIREJAIL_PROFILE_DIR);
798 if (stat(RUN_FIREJAIL_NAME_DIR, &s) == 0) 841 disable_file(BLACKLIST_FILE, RUN_FIREJAIL_X11_DIR);
799 disable_file(BLACKLIST_FILE, RUN_FIREJAIL_NAME_DIR); 842 EUID_ROOT();
800 if (stat(RUN_FIREJAIL_PROFILE_DIR, &s) == 0)
801 disable_file(BLACKLIST_FILE, RUN_FIREJAIL_PROFILE_DIR);
802 if (stat(RUN_FIREJAIL_X11_DIR, &s) == 0)
803 disable_file(BLACKLIST_FILE, RUN_FIREJAIL_X11_DIR);
804} 843}
805 844
806 845
807// build a basic read-only filesystem 846// build a basic read-only filesystem
808// top level directories could be links, run no after-mount checks
809void fs_basic_fs(void) { 847void fs_basic_fs(void) {
810 uid_t uid = getuid(); 848 uid_t uid = getuid();
811 849
@@ -815,6 +853,7 @@ void fs_basic_fs(void) {
815 if (mount("proc", "/proc", "proc", MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_REC, NULL) < 0) 853 if (mount("proc", "/proc", "proc", MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_REC, NULL) < 0)
816 errExit("mounting /proc"); 854 errExit("mounting /proc");
817 855
856 EUID_USER();
818 if (arg_debug) 857 if (arg_debug)
819 printf("Basic read-only filesystem:\n"); 858 printf("Basic read-only filesystem:\n");
820 if (!arg_writable_etc) { 859 if (!arg_writable_etc) {
@@ -834,6 +873,7 @@ void fs_basic_fs(void) {
834 fs_remount("/lib64", MOUNT_READONLY, 1); 873 fs_remount("/lib64", MOUNT_READONLY, 1);
835 fs_remount("/lib32", MOUNT_READONLY, 1); 874 fs_remount("/lib32", MOUNT_READONLY, 1);
836 fs_remount("/libx32", MOUNT_READONLY, 1); 875 fs_remount("/libx32", MOUNT_READONLY, 1);
876 EUID_ROOT();
837 877
838 // update /var directory in order to support multiple sandboxes running on the same root directory 878 // update /var directory in order to support multiple sandboxes running on the same root directory
839 fs_var_lock(); 879 fs_var_lock();
@@ -858,369 +898,9 @@ void fs_basic_fs(void) {
858} 898}
859 899
860 900
861
862#ifdef HAVE_OVERLAYFS
863char *fs_check_overlay_dir(const char *subdirname, int allow_reuse) {
864 assert(subdirname);
865 struct stat s;
866 char *dirname;
867
868 if (asprintf(&dirname, "%s/.firejail", cfg.homedir) == -1)
869 errExit("asprintf");
870 // check if ~/.firejail already exists
871 if (lstat(dirname, &s) == 0) {
872 if (!S_ISDIR(s.st_mode)) {
873 if (S_ISLNK(s.st_mode))
874 fprintf(stderr, "Error: %s is a symbolic link\n", dirname);
875 else
876 fprintf(stderr, "Error: %s is not a directory\n", dirname);
877 exit(1);
878 }
879 if (s.st_uid != getuid()) {
880 fprintf(stderr, "Error: %s is not owned by the current user\n", dirname);
881 exit(1);
882 }
883 }
884 else {
885 // create ~/.firejail directory
886 create_empty_dir_as_user(dirname, 0700);
887 if (stat(dirname, &s) == -1) {
888 fprintf(stderr, "Error: cannot create directory %s\n", dirname);
889 exit(1);
890 }
891 }
892 free(dirname);
893
894 // check overlay directory
895 if (asprintf(&dirname, "%s/.firejail/%s", cfg.homedir, subdirname) == -1)
896 errExit("asprintf");
897 if (lstat(dirname, &s) == 0) {
898 if (!S_ISDIR(s.st_mode)) {
899 if (S_ISLNK(s.st_mode))
900 fprintf(stderr, "Error: %s is a symbolic link\n", dirname);
901 else
902 fprintf(stderr, "Error: %s is not a directory\n", dirname);
903 exit(1);
904 }
905 if (s.st_uid != 0) {
906 fprintf(stderr, "Error: overlay directory %s is not owned by the root user\n", dirname);
907 exit(1);
908 }
909 if (allow_reuse == 0) {
910 fprintf(stderr, "Error: overlay directory exists, but reuse is not allowed\n");
911 exit(1);
912 }
913 }
914
915 return dirname;
916}
917
918
919
920// mount overlayfs on top of / directory
921// mounting an overlay and chrooting into it:
922//
923// Old Ubuntu kernel
924// # cd ~
925// # mkdir -p overlay/root
926// # mkdir -p overlay/diff
927// # mount -t overlayfs -o lowerdir=/,upperdir=/root/overlay/diff overlayfs /root/overlay/root
928// # chroot /root/overlay/root
929// to shutdown, first exit the chroot and then unmount the overlay
930// # exit
931// # umount /root/overlay/root
932//
933// Kernels 3.18+
934// # cd ~
935// # mkdir -p overlay/root
936// # mkdir -p overlay/diff
937// # mkdir -p overlay/work
938// # mount -t overlay -o lowerdir=/,upperdir=/root/overlay/diff,workdir=/root/overlay/work overlay /root/overlay/root
939// # cat /etc/mtab | grep overlay
940// /root/overlay /root/overlay/root overlay rw,relatime,lowerdir=/,upperdir=/root/overlay/diff,workdir=/root/overlay/work 0 0
941// # chroot /root/overlay/root
942// to shutdown, first exit the chroot and then unmount the overlay
943// # exit
944// # umount /root/overlay/root
945
946
947// to do: fix the code below; also, it might work without /dev, but consider keeping /dev/shm; add locking mechanism for overlay-clean
948#include <sys/utsname.h>
949void fs_overlayfs(void) {
950 struct stat s;
951
952 // check kernel version
953 struct utsname u;
954 int rv = uname(&u);
955 if (rv != 0)
956 errExit("uname");
957 int major;
958 int minor;
959 if (2 != sscanf(u.release, "%d.%d", &major, &minor)) {
960 fprintf(stderr, "Error: cannot extract Linux kernel version: %s\n", u.version);
961 exit(1);
962 }
963
964 if (arg_debug)
965 printf("Linux kernel version %d.%d\n", major, minor);
966 int oldkernel = 0;
967 if (major < 3) {
968 fprintf(stderr, "Error: minimum kernel version required 3.x\n");
969 exit(1);
970 }
971 if (major == 3 && minor < 18)
972 oldkernel = 1;
973
974 // mounting an overlayfs on top of / seems to be broken for kernels > 4.19
975 // we disable overlayfs for now, pending fixing
976 if (major >= 4 &&minor >= 19) {
977 fprintf(stderr, "Error: OverlayFS disabled for Linux kernels 4.19 and newer, pending fixing.\n");
978 exit(1);
979 }
980
981 char *oroot = RUN_OVERLAY_ROOT;
982 mkdir_attr(oroot, 0755, 0, 0);
983
984 // set base for working and diff directories
985 char *basedir = RUN_MNT_DIR;
986 int basefd = -1;
987
988 if (arg_overlay_keep) {
989 basedir = cfg.overlay_dir;
990 assert(basedir);
991 // get a file descriptor for ~/.firejail, fails if there is any symlink
992 char *firejail;
993 if (asprintf(&firejail, "%s/.firejail", cfg.homedir) == -1)
994 errExit("asprintf");
995 int fd = safe_fd(firejail, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
996 if (fd == -1)
997 errExit("safe_fd");
998 free(firejail);
999 // create basedir if it doesn't exist
1000 // the new directory will be owned by root
1001 const char *dirname = gnu_basename(basedir);
1002 if (mkdirat(fd, dirname, 0755) == -1 && errno != EEXIST) {
1003 perror("mkdir");
1004 fprintf(stderr, "Error: cannot create overlay directory %s\n", basedir);
1005 exit(1);
1006 }
1007 // open basedir
1008 basefd = openat(fd, dirname, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
1009 close(fd);
1010 }
1011 else {
1012 basefd = open(basedir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
1013 }
1014 if (basefd == -1) {
1015 perror("open");
1016 fprintf(stderr, "Error: cannot open overlay directory %s\n", basedir);
1017 exit(1);
1018 }
1019
1020 // confirm once more base is owned by root
1021 if (fstat(basefd, &s) == -1)
1022 errExit("fstat");
1023 if (s.st_uid != 0) {
1024 fprintf(stderr, "Error: overlay directory %s is not owned by the root user\n", basedir);
1025 exit(1);
1026 }
1027 // confirm permissions of base are 0755
1028 if (((S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) & s.st_mode) != (S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)) {
1029 fprintf(stderr, "Error: invalid permissions on overlay directory %s\n", basedir);
1030 exit(1);
1031 }
1032
1033 // create diff and work directories inside base
1034 // no need to check arg_overlay_reuse
1035 char *odiff;
1036 if (asprintf(&odiff, "%s/odiff", basedir) == -1)
1037 errExit("asprintf");
1038 // the new directory will be owned by root
1039 if (mkdirat(basefd, "odiff", 0755) == -1 && errno != EEXIST) {
1040 perror("mkdir");
1041 fprintf(stderr, "Error: cannot create overlay directory %s\n", odiff);
1042 exit(1);
1043 }
1044 ASSERT_PERMS(odiff, 0, 0, 0755);
1045
1046 char *owork;
1047 if (asprintf(&owork, "%s/owork", basedir) == -1)
1048 errExit("asprintf");
1049 // the new directory will be owned by root
1050 if (mkdirat(basefd, "owork", 0755) == -1 && errno != EEXIST) {
1051 perror("mkdir");
1052 fprintf(stderr, "Error: cannot create overlay directory %s\n", owork);
1053 exit(1);
1054 }
1055 ASSERT_PERMS(owork, 0, 0, 0755);
1056
1057 // mount overlayfs
1058 if (arg_debug)
1059 printf("Mounting OverlayFS\n");
1060 char *option;
1061 if (oldkernel) { // old Ubuntu/OpenSUSE kernels
1062 if (arg_overlay_keep) {
1063 fprintf(stderr, "Error: option --overlay= not available for kernels older than 3.18\n");
1064 exit(1);
1065 }
1066 if (asprintf(&option, "lowerdir=/,upperdir=%s", odiff) == -1)
1067 errExit("asprintf");
1068 if (mount("overlayfs", oroot, "overlayfs", MS_MGC_VAL, option) < 0)
1069 errExit("mounting overlayfs");
1070 }
1071 else { // kernel 3.18 or newer
1072 if (asprintf(&option, "lowerdir=/,upperdir=%s,workdir=%s", odiff, owork) == -1)
1073 errExit("asprintf");
1074 if (mount("overlay", oroot, "overlay", MS_MGC_VAL, option) < 0) {
1075 fprintf(stderr, "Debug: running on kernel version %d.%d\n", major, minor);
1076 errExit("mounting overlayfs");
1077 }
1078
1079 //***************************
1080 // issue #263 start code
1081 // My setup has a separate mount point for /home. When the overlay is mounted,
1082 // the overlay does not contain the original /home contents.
1083 // I added code to create a second overlay for /home if the overlay home dir is empty and this seems to work
1084 // @dshmgh, Jan 2016
1085 {
1086 char *overlayhome;
1087 struct stat s;
1088 char *hroot;
1089 char *hdiff;
1090 char *hwork;
1091
1092 // dons add debug
1093 if (arg_debug) printf ("DEBUG: chroot dirs are oroot %s odiff %s owork %s\n",oroot,odiff,owork);
1094
1095 // BEFORE NEXT, WE NEED TO TEST IF /home has any contents or do we need to mount it?
1096 // must create var for oroot/cfg.homedir
1097 if (asprintf(&overlayhome, "%s%s", oroot, cfg.homedir) == -1)
1098 errExit("asprintf");
1099 if (arg_debug) printf ("DEBUG: overlayhome var holds ##%s##\n", overlayhome);
1100
1101 // if no homedir in overlay -- create another overlay for /home
1102 if (stat(cfg.homedir, &s) == 0 && stat(overlayhome, &s) == -1) {
1103
1104 // no need to check arg_overlay_reuse
1105 if (asprintf(&hdiff, "%s/hdiff", basedir) == -1)
1106 errExit("asprintf");
1107 // the new directory will be owned by root
1108 if (mkdirat(basefd, "hdiff", 0755) == -1 && errno != EEXIST) {
1109 perror("mkdir");
1110 fprintf(stderr, "Error: cannot create overlay directory %s\n", hdiff);
1111 exit(1);
1112 }
1113 ASSERT_PERMS(hdiff, 0, 0, 0755);
1114
1115 // no need to check arg_overlay_reuse
1116 if (asprintf(&hwork, "%s/hwork", basedir) == -1)
1117 errExit("asprintf");
1118 // the new directory will be owned by root
1119 if (mkdirat(basefd, "hwork", 0755) == -1 && errno != EEXIST) {
1120 perror("mkdir");
1121 fprintf(stderr, "Error: cannot create overlay directory %s\n", hwork);
1122 exit(1);
1123 }
1124 ASSERT_PERMS(hwork, 0, 0, 0755);
1125
1126 // no homedir in overlay so now mount another overlay for /home
1127 if (asprintf(&hroot, "%s/home", oroot) == -1)
1128 errExit("asprintf");
1129 if (asprintf(&option, "lowerdir=/home,upperdir=%s,workdir=%s", hdiff, hwork) == -1)
1130 errExit("asprintf");
1131 if (mount("overlay", hroot, "overlay", MS_MGC_VAL, option) < 0)
1132 errExit("mounting overlayfs for mounted home directory");
1133
1134 printf("OverlayFS for /home configured in %s directory\n", basedir);
1135 free(hroot);
1136 free(hdiff);
1137 free(hwork);
1138
1139 } // stat(overlayhome)
1140 free(overlayhome);
1141 }
1142 // issue #263 end code
1143 //***************************
1144 }
1145 fmessage("OverlayFS configured in %s directory\n", basedir);
1146 close(basefd);
1147
1148 // /dev, /run and /tmp are not covered by the overlay
1149 // mount-bind dev directory
1150 if (arg_debug)
1151 printf("Mounting /dev\n");
1152 char *dev;
1153 if (asprintf(&dev, "%s/dev", oroot) == -1)
1154 errExit("asprintf");
1155 if (mount("/dev", dev, NULL, MS_BIND|MS_REC, NULL) < 0)
1156 errExit("mounting /dev");
1157 fs_logger("whitelist /dev");
1158
1159 // mount-bind run directory
1160 if (arg_debug)
1161 printf("Mounting /run\n");
1162 char *run;
1163 if (asprintf(&run, "%s/run", oroot) == -1)
1164 errExit("asprintf");
1165 if (mount("/run", run, NULL, MS_BIND|MS_REC, NULL) < 0)
1166 errExit("mounting /run");
1167 fs_logger("whitelist /run");
1168
1169 // mount-bind tmp directory
1170 if (arg_debug)
1171 printf("Mounting /tmp\n");
1172 char *tmp;
1173 if (asprintf(&tmp, "%s/tmp", oroot) == -1)
1174 errExit("asprintf");
1175 if (mount("/tmp", tmp, NULL, MS_BIND|MS_REC, NULL) < 0)
1176 errExit("mounting /tmp");
1177 fs_logger("whitelist /tmp");
1178
1179 // chroot in the new filesystem
1180#ifdef HAVE_GCOV
1181 __gcov_flush();
1182#endif
1183 if (chroot(oroot) == -1)
1184 errExit("chroot");
1185
1186 // mount a new proc filesystem
1187 if (arg_debug)
1188 printf("Mounting /proc filesystem representing the PID namespace\n");
1189 if (mount("proc", "/proc", "proc", MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_REC, NULL) < 0)
1190 errExit("mounting /proc");
1191
1192 // update /var directory in order to support multiple sandboxes running on the same root directory
1193// if (!arg_private_dev)
1194// fs_dev_shm();
1195 fs_var_lock();
1196 if (!arg_keep_var_tmp)
1197 fs_var_tmp();
1198 if (!arg_writable_var_log)
1199 fs_var_log();
1200 fs_var_lib();
1201 fs_var_cache();
1202 fs_var_utmp();
1203 fs_machineid();
1204
1205 // don't leak user information
1206 restrict_users();
1207
1208 // when starting as root, firejail config is not disabled;
1209 if (getuid() != 0)
1210 disable_config();
1211
1212 // cleanup and exit
1213 free(option);
1214 free(odiff);
1215 free(owork);
1216 free(dev);
1217 free(run);
1218 free(tmp);
1219}
1220#endif
1221
1222// this function is called from sandbox.c before blacklist/whitelist functions 901// this function is called from sandbox.c before blacklist/whitelist functions
1223void fs_private_tmp(void) { 902void fs_private_tmp(void) {
903 EUID_ASSERT();
1224 if (arg_debug) 904 if (arg_debug)
1225 printf("Generate private-tmp whitelist commands\n"); 905 printf("Generate private-tmp whitelist commands\n");
1226 906
@@ -1241,8 +921,10 @@ void fs_private_tmp(void) {
1241 921
1242 // whitelist x11 directory 922 // whitelist x11 directory
1243 profile_add("whitelist /tmp/.X11-unix"); 923 profile_add("whitelist /tmp/.X11-unix");
1244 // read-only x11 directory 924 profile_add("read-only /tmp/.X11-unix");
1245 profile_add("read-only /tmp/.X11-unix"); 925
926 // whitelist sndio directory
927 profile_add("whitelist /tmp/sndio");
1246 928
1247 // whitelist any pulse* file in /tmp directory 929 // whitelist any pulse* file in /tmp directory
1248 // some distros use PulseAudio sockets under /tmp instead of the socket in /urn/user 930 // some distros use PulseAudio sockets under /tmp instead of the socket in /urn/user
diff --git a/src/firejail/fs_bin.c b/src/firejail/fs_bin.c
index 61398f12b..2b0b3003e 100644
--- a/src/firejail/fs_bin.c
+++ b/src/firejail/fs_bin.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -41,9 +41,9 @@ static char *paths[] = {
41 41
42// return 1 if found, 0 if not found 42// return 1 if found, 0 if not found
43static char *check_dir_or_file(const char *name) { 43static char *check_dir_or_file(const char *name) {
44 EUID_ASSERT();
44 assert(name); 45 assert(name);
45 struct stat s; 46 struct stat s;
46 char *fname = NULL;
47 47
48 int i = 0; 48 int i = 0;
49 while (paths[i]) { 49 while (paths[i]) {
@@ -54,50 +54,34 @@ static char *check_dir_or_file(const char *name) {
54 } 54 }
55 55
56 // check file 56 // check file
57 char *fname;
57 if (asprintf(&fname, "%s/%s", paths[i], name) == -1) 58 if (asprintf(&fname, "%s/%s", paths[i], name) == -1)
58 errExit("asprintf"); 59 errExit("asprintf");
59 if (arg_debug) 60 if (arg_debug)
60 printf("Checking %s/%s\n", paths[i], name); 61 printf("Checking %s/%s\n", paths[i], name);
61 if (stat(fname, &s) == 0 && !S_ISDIR(s.st_mode)) { // do not allow directories 62 if (stat(fname, &s) == 0 &&
62 // check symlink to firejail executable in /usr/local/bin 63 !S_ISDIR(s.st_mode) && // do not allow directories
63 if (strcmp(paths[i], "/usr/local/bin") == 0 && is_link(fname)) { 64 !is_firejail_link(fname)) { // skip symlinks to firejail executable, as created by firecfg
64 /* coverity[toctou] */ 65 free(fname);
65 char *actual_path = realpath(fname, NULL);
66 if (actual_path) {
67 char *ptr = strstr(actual_path, "/firejail");
68 if (ptr && strlen(ptr) == strlen("/firejail")) {
69 if (arg_debug)
70 printf("firejail exec symlink detected\n");
71 free(actual_path);
72 free(fname);
73 fname = NULL;
74 i++;
75 continue;
76 }
77 free(actual_path);
78 }
79
80 }
81 break; // file found 66 break; // file found
82 } 67 }
83 68
84 free(fname); 69 free(fname);
85 fname = NULL;
86 i++; 70 i++;
87 } 71 }
88 72
89 if (!fname) { 73 if (!paths[i]) {
90 if (arg_debug) 74 if (arg_debug)
91 fwarning("file %s not found\n", name); 75 fwarning("file %s not found\n", name);
92 return NULL; 76 return NULL;
93 } 77 }
94 78
95 free(fname);
96 return paths[i]; 79 return paths[i];
97} 80}
98 81
99// return 1 if the file is in paths[] 82// return 1 if the file is in paths[]
100static int valid_full_path_file(const char *name) { 83static int valid_full_path_file(const char *name) {
84 EUID_ASSERT();
101 assert(name); 85 assert(name);
102 86
103 if (*name != '/') 87 if (*name != '/')
@@ -149,6 +133,7 @@ static void report_duplication(const char *fname) {
149} 133}
150 134
151static void duplicate(char *fname) { 135static void duplicate(char *fname) {
136 EUID_ASSERT();
152 assert(fname); 137 assert(fname);
153 138
154 if (*fname == '~' || strstr(fname, "..")) { 139 if (*fname == '~' || strstr(fname, "..")) {
@@ -220,6 +205,7 @@ static void duplicate(char *fname) {
220} 205}
221 206
222static void globbing(char *fname) { 207static void globbing(char *fname) {
208 EUID_ASSERT();
223 assert(fname); 209 assert(fname);
224 210
225 // go directly to duplicate() if no globbing char is present - see man 7 glob 211 // go directly to duplicate() if no globbing char is present - see man 7 glob
@@ -256,6 +242,9 @@ static void globbing(char *fname) {
256 // testing for GLOB_NOCHECK - no pattern matched returns the original pattern 242 // testing for GLOB_NOCHECK - no pattern matched returns the original pattern
257 if (strcmp(globbuf.gl_pathv[j], pattern) == 0) 243 if (strcmp(globbuf.gl_pathv[j], pattern) == 0)
258 continue; 244 continue;
245 // skip symlinks to firejail executable, as created by firecfg
246 if (is_firejail_link(globbuf.gl_pathv[j]))
247 continue;
259 248
260 duplicate(globbuf.gl_pathv[j]); 249 duplicate(globbuf.gl_pathv[j]);
261 } 250 }
@@ -267,6 +256,7 @@ static void globbing(char *fname) {
267} 256}
268 257
269void fs_private_bin_list(void) { 258void fs_private_bin_list(void) {
259 EUID_ASSERT();
270 char *private_list = cfg.bin_private_keep; 260 char *private_list = cfg.bin_private_keep;
271 assert(private_list); 261 assert(private_list);
272 262
@@ -274,7 +264,9 @@ void fs_private_bin_list(void) {
274 timetrace_start(); 264 timetrace_start();
275 265
276 // create /run/firejail/mnt/bin directory 266 // create /run/firejail/mnt/bin directory
267 EUID_ROOT();
277 mkdir_attr(RUN_BIN_DIR, 0755, 0, 0); 268 mkdir_attr(RUN_BIN_DIR, 0755, 0, 0);
269 EUID_USER();
278 270
279 if (arg_debug) 271 if (arg_debug)
280 printf("Copying files in the new bin directory\n"); 272 printf("Copying files in the new bin directory\n");
@@ -293,9 +285,9 @@ void fs_private_bin_list(void) {
293 while ((ptr = strtok(NULL, ",")) != NULL) 285 while ((ptr = strtok(NULL, ",")) != NULL)
294 globbing(ptr); 286 globbing(ptr);
295 free(dlist); 287 free(dlist);
296 fs_logger_print();
297 288
298 // mount-bind 289 // mount-bind
290 EUID_ROOT();
299 int i = 0; 291 int i = 0;
300 while (paths[i]) { 292 while (paths[i]) {
301 struct stat s; 293 struct stat s;
@@ -309,6 +301,9 @@ void fs_private_bin_list(void) {
309 } 301 }
310 i++; 302 i++;
311 } 303 }
304 fs_logger_print();
305 EUID_USER();
306
312 selinux_relabel_path(RUN_BIN_DIR, "/bin"); 307 selinux_relabel_path(RUN_BIN_DIR, "/bin");
313 fmessage("%d %s installed in %0.2f ms\n", prog_cnt, (prog_cnt == 1)? "program": "programs", timetrace_end()); 308 fmessage("%d %s installed in %0.2f ms\n", prog_cnt, (prog_cnt == 1)? "program": "programs", timetrace_end());
314} 309}
diff --git a/src/firejail/fs_dev.c b/src/firejail/fs_dev.c
index 2f0067c93..a6fbbb89a 100644
--- a/src/firejail/fs_dev.c
+++ b/src/firejail/fs_dev.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -20,7 +20,6 @@
20#include "firejail.h" 20#include "firejail.h"
21#include <sys/mount.h> 21#include <sys/mount.h>
22#include <sys/stat.h> 22#include <sys/stat.h>
23#include <linux/limits.h>
24#include <glob.h> 23#include <glob.h>
25#include <dirent.h> 24#include <dirent.h>
26#include <fcntl.h> 25#include <fcntl.h>
@@ -122,7 +121,7 @@ static void deventry_mount(void) {
122 i++; 121 i++;
123 continue; 122 continue;
124 } 123 }
125 FILE *fp = fopen(dev[i].dev_fname, "w"); 124 FILE *fp = fopen(dev[i].dev_fname, "we");
126 if (fp) { 125 if (fp) {
127 fprintf(fp, "\n"); 126 fprintf(fp, "\n");
128 SET_PERMS_STREAM(fp, s.st_uid, s.st_gid, s.st_mode); 127 SET_PERMS_STREAM(fp, s.st_uid, s.st_gid, s.st_mode);
@@ -187,8 +186,10 @@ static void mount_dev_shm(void) {
187static void process_dev_shm(void) { 186static void process_dev_shm(void) {
188 // Jack audio keeps an Unix socket under (/dev/shm/jack_default_1000_0 or /dev/shm/jack/...) 187 // Jack audio keeps an Unix socket under (/dev/shm/jack_default_1000_0 or /dev/shm/jack/...)
189 // looking for jack socket 188 // looking for jack socket
189 EUID_USER();
190 glob_t globbuf; 190 glob_t globbuf;
191 int globerr = glob(RUN_DEV_DIR "/shm/jack*", GLOB_NOSORT, NULL, &globbuf); 191 int globerr = glob(RUN_DEV_DIR "/shm/jack*", GLOB_NOSORT, NULL, &globbuf);
192 EUID_ROOT();
192 if (globerr && !arg_keep_dev_shm) { 193 if (globerr && !arg_keep_dev_shm) {
193 empty_dev_shm(); 194 empty_dev_shm();
194 return; 195 return;
@@ -218,7 +219,7 @@ void fs_private_dev(void){
218 struct stat s; 219 struct stat s;
219 if (stat("/dev/log", &s) == 0) { 220 if (stat("/dev/log", &s) == 0) {
220 have_devlog = 1; 221 have_devlog = 1;
221 FILE *fp = fopen(RUN_DEVLOG_FILE, "w"); 222 FILE *fp = fopen(RUN_DEVLOG_FILE, "we");
222 if (!fp) 223 if (!fp)
223 have_devlog = 0; 224 have_devlog = 0;
224 else { 225 else {
@@ -239,7 +240,7 @@ void fs_private_dev(void){
239 240
240 // bring back /dev/log 241 // bring back /dev/log
241 if (have_devlog) { 242 if (have_devlog) {
242 FILE *fp = fopen("/dev/log", "w"); 243 FILE *fp = fopen("/dev/log", "we");
243 if (fp) { 244 if (fp) {
244 fprintf(fp, "\n"); 245 fprintf(fp, "\n");
245 fclose(fp); 246 fclose(fp);
@@ -328,8 +329,10 @@ void fs_dev_disable_sound(void) {
328 } 329 }
329 330
330 // disable all jack sockets in /dev/shm 331 // disable all jack sockets in /dev/shm
332 EUID_USER();
331 glob_t globbuf; 333 glob_t globbuf;
332 int globerr = glob("/dev/shm/jack*", GLOB_NOSORT, NULL, &globbuf); 334 int globerr = glob("/dev/shm/jack*", GLOB_NOSORT, NULL, &globbuf);
335 EUID_ROOT();
333 if (globerr) 336 if (globerr)
334 return; 337 return;
335 338
diff --git a/src/firejail/fs_etc.c b/src/firejail/fs_etc.c
index 8cb25a1ff..deaee31bb 100644
--- a/src/firejail/fs_etc.c
+++ b/src/firejail/fs_etc.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -24,6 +24,7 @@
24#include <sys/types.h> 24#include <sys/types.h>
25#include <time.h> 25#include <time.h>
26#include <unistd.h> 26#include <unistd.h>
27#include <dirent.h>
27 28
28// spoof /etc/machine_id 29// spoof /etc/machine_id
29void fs_machineid(void) { 30void fs_machineid(void) {
@@ -52,7 +53,7 @@ void fs_machineid(void) {
52 mid.u8[8] = (mid.u8[8] & 0x3F) | 0x80; 53 mid.u8[8] = (mid.u8[8] & 0x3F) | 0x80;
53 54
54 // write it in a file 55 // write it in a file
55 FILE *fp = fopen(RUN_MACHINEID, "w"); 56 FILE *fp = fopen(RUN_MACHINEID, "we");
56 if (!fp) 57 if (!fp)
57 errExit("fopen"); 58 errExit("fopen");
58 fprintf(fp, "%08x%08x%08x%08x\n", mid.u32[0], mid.u32[1], mid.u32[2], mid.u32[3]); 59 fprintf(fp, "%08x%08x%08x%08x\n", mid.u32[0], mid.u32[1], mid.u32[2], mid.u32[3]);
@@ -141,7 +142,7 @@ errexit:
141static void duplicate(const char *fname, const char *private_dir, const char *private_run_dir) { 142static void duplicate(const char *fname, const char *private_dir, const char *private_run_dir) {
142 assert(fname); 143 assert(fname);
143 144
144 if (*fname == '~' || *fname == '/' || strncmp(fname, "..", 2) == 0) { 145 if (*fname == '~' || *fname == '/' || strstr(fname, "..")) {
145 fprintf(stderr, "Error: \"%s\" is an invalid filename\n", fname); 146 fprintf(stderr, "Error: \"%s\" is an invalid filename\n", fname);
146 exit(1); 147 exit(1);
147 } 148 }
@@ -164,7 +165,14 @@ static void duplicate(const char *fname, const char *private_dir, const char *pr
164 errExit("asprintf"); 165 errExit("asprintf");
165 166
166 build_dirs(src, dst, strlen(private_dir), strlen(private_run_dir)); 167 build_dirs(src, dst, strlen(private_dir), strlen(private_run_dir));
167 sbox_run(SBOX_ROOT | SBOX_SECCOMP, 3, PATH_FCOPY, src, dst); 168
169 // follow links! this will make a copy of the file or directory pointed by the symlink
170 // this will solve problems such as NixOS #4887
171 // don't follow links to dynamic directories such as /proc
172 if (strcmp(src, "/etc/mtab") == 0)
173 sbox_run(SBOX_ROOT | SBOX_SECCOMP, 3, PATH_FCOPY, src, dst);
174 else
175 sbox_run(SBOX_ROOT | SBOX_SECCOMP, 4, PATH_FCOPY, "--follow-link", src, dst);
168 176
169 free(dst); 177 free(dst);
170 fs_logger2("clone", src); 178 fs_logger2("clone", src);
@@ -250,3 +258,128 @@ void fs_private_dir_list(const char *private_dir, const char *private_run_dir, c
250 fs_private_dir_mount(private_dir, private_run_dir); 258 fs_private_dir_mount(private_dir, private_run_dir);
251 fmessage("Private %s installed in %0.2f ms\n", private_dir, timetrace_end()); 259 fmessage("Private %s installed in %0.2f ms\n", private_dir, timetrace_end());
252} 260}
261
262void fs_rebuild_etc(void) {
263 int have_dhcp = 1;
264 if (cfg.dns1 == NULL && !any_dhcp())
265 have_dhcp = 0;
266
267 if (arg_debug)
268 printf("rebuilding /etc directory\n");
269 if (mkdir(RUN_DNS_ETC, 0755))
270 errExit("mkdir");
271 selinux_relabel_path(RUN_DNS_ETC, "/etc");
272 fs_logger("tmpfs /etc");
273
274 DIR *dir = opendir("/etc");
275 if (!dir)
276 errExit("opendir");
277
278 struct stat s;
279 struct dirent *entry;
280 while ((entry = readdir(dir))) {
281 if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0)
282 continue;
283
284 // skip files in cfg.profile_rebuild_etc list
285 // these files are already blacklisted
286 {
287 ProfileEntry *prf = cfg.profile_rebuild_etc;
288 int found = 0;
289 while (prf) {
290 if (strcmp(entry->d_name, prf->data + 5) == 0) { // 5 is strlen("/etc/")
291 found = 1;
292 break;
293 }
294 prf = prf->next;
295 }
296 if (found)
297 continue;
298 }
299
300 // for resolv.conf we might have to create a brand new file later
301 if (have_dhcp &&
302 (strcmp(entry->d_name, "resolv.conf") == 0 ||
303 strcmp(entry->d_name, "resolv.conf.dhclient-new") == 0))
304 continue;
305// printf("linking %s\n", entry->d_name);
306
307 char *src;
308 if (asprintf(&src, "/etc/%s", entry->d_name) == -1)
309 errExit("asprintf");
310 if (stat(src, &s) != 0) {
311 free(src);
312 continue;
313 }
314
315 char *dest;
316 if (asprintf(&dest, "%s/%s", RUN_DNS_ETC, entry->d_name) == -1)
317 errExit("asprintf");
318
319 int symlink_done = 0;
320 if (is_link(src)) {
321 char *rp =realpath(src, NULL);
322 if (rp == NULL) {
323 free(src);
324 free(dest);
325 continue;
326 }
327 if (symlink(rp, dest))
328 errExit("symlink");
329 else
330 symlink_done = 1;
331 }
332 else if (S_ISDIR(s.st_mode))
333 create_empty_dir_as_root(dest, s.st_mode);
334 else
335 create_empty_file_as_root(dest, s.st_mode);
336
337 // bind-mount src on top of dest
338 if (!symlink_done) {
339 if (mount(src, dest, NULL, MS_BIND|MS_REC, NULL) < 0)
340 errExit("mount bind mirroring /etc");
341 }
342 fs_logger2("clone", src);
343
344 free(src);
345 free(dest);
346 }
347 closedir(dir);
348
349 // mount bind our private etc directory on top of /etc
350 if (arg_debug)
351 printf("Mount-bind %s on top of /etc\n", RUN_DNS_ETC);
352 if (mount(RUN_DNS_ETC, "/etc", NULL, MS_BIND|MS_REC, NULL) < 0)
353 errExit("mount bind mirroring /etc");
354 fs_logger("mount /etc");
355
356 if (have_dhcp == 0)
357 return;
358
359 if (arg_debug)
360 printf("Creating a new /etc/resolv.conf file\n");
361 FILE *fp = fopen("/etc/resolv.conf", "wxe");
362 if (!fp) {
363 fprintf(stderr, "Error: cannot create /etc/resolv.conf file\n");
364 exit(1);
365 }
366
367 if (cfg.dns1) {
368 if (any_dhcp())
369 fwarning("network setup uses DHCP, nameservers will likely be overwritten\n");
370 fprintf(fp, "nameserver %s\n", cfg.dns1);
371 }
372 if (cfg.dns2)
373 fprintf(fp, "nameserver %s\n", cfg.dns2);
374 if (cfg.dns3)
375 fprintf(fp, "nameserver %s\n", cfg.dns3);
376 if (cfg.dns4)
377 fprintf(fp, "nameserver %s\n", cfg.dns4);
378
379 // mode and owner
380 SET_PERMS_STREAM(fp, 0, 0, 0644);
381
382 fclose(fp);
383
384 fs_logger("create /etc/resolv.conf");
385}
diff --git a/src/firejail/fs_home.c b/src/firejail/fs_home.c
index 46f32d7ad..061461590 100644
--- a/src/firejail/fs_home.c
+++ b/src/firejail/fs_home.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -19,7 +19,6 @@
19*/ 19*/
20#include "firejail.h" 20#include "firejail.h"
21#include <sys/mount.h> 21#include <sys/mount.h>
22#include <linux/limits.h>
23#include <dirent.h> 22#include <dirent.h>
24#include <errno.h> 23#include <errno.h>
25#include <sys/stat.h> 24#include <sys/stat.h>
@@ -34,24 +33,48 @@
34#define O_PATH 010000000 33#define O_PATH 010000000
35#endif 34#endif
36 35
37static void skel(const char *homedir, uid_t u, gid_t g) { 36static void disable_tab_completion(const char *homedir) {
37 if (arg_tab)
38 return;
39
38 char *fname; 40 char *fname;
41 if (asprintf(&fname, "%s/.inputrc", homedir) == -1)
42 errExit("asprintf");
43
44 // don't create a new one if we already have it
45 if (access(fname, F_OK)) {
46 FILE *fp = fopen(fname, "w");
47 if (!fp)
48 errExit("fopen");
49 fprintf(fp, "set disable-completion on\n");
50 fclose(fp);
51 if (chmod(fname, 0644))
52 errExit("chmod");
53 }
54 free(fname);
55}
56
57
58static void skel(const char *homedir) {
59 EUID_ASSERT();
60 char *fname;
61
62 disable_tab_completion(homedir);
39 63
40 // zsh 64 // zsh
41 if (!arg_shell_none && (strcmp(cfg.shell,"/usr/bin/zsh") == 0 || strcmp(cfg.shell,"/bin/zsh") == 0)) { 65 if (!arg_shell_none && (strcmp(cfg.shell,"/usr/bin/zsh") == 0 || strcmp(cfg.shell,"/bin/zsh") == 0)) {
42 // copy skel files 66 // copy skel files
43 if (asprintf(&fname, "%s/.zshrc", homedir) == -1) 67 if (asprintf(&fname, "%s/.zshrc", homedir) == -1)
44 errExit("asprintf"); 68 errExit("asprintf");
45 struct stat s;
46 // don't copy it if we already have the file 69 // don't copy it if we already have the file
47 if (stat(fname, &s) == 0) 70 if (access(fname, F_OK) == 0)
48 return; 71 return;
49 if (is_link(fname)) { // stat on dangling symlinks fails, try again using lstat 72 if (is_link(fname)) { // access(3) on dangling symlinks fails, try again using lstat
50 fprintf(stderr, "Error: invalid %s file\n", fname); 73 fprintf(stderr, "Error: invalid %s file\n", fname);
51 exit(1); 74 exit(1);
52 } 75 }
53 if (stat("/etc/skel/.zshrc", &s) == 0) { 76 if (access("/etc/skel/.zshrc", R_OK) == 0) {
54 copy_file_as_user("/etc/skel/.zshrc", fname, u, g, 0644); // regular user 77 copy_file_as_user("/etc/skel/.zshrc", fname, 0644); // regular user
55 fs_logger("clone /etc/skel/.zshrc"); 78 fs_logger("clone /etc/skel/.zshrc");
56 fs_logger2("clone", fname); 79 fs_logger2("clone", fname);
57 } 80 }
@@ -67,17 +90,15 @@ static void skel(const char *homedir, uid_t u, gid_t g) {
67 // copy skel files 90 // copy skel files
68 if (asprintf(&fname, "%s/.cshrc", homedir) == -1) 91 if (asprintf(&fname, "%s/.cshrc", homedir) == -1)
69 errExit("asprintf"); 92 errExit("asprintf");
70 struct stat s;
71
72 // don't copy it if we already have the file 93 // don't copy it if we already have the file
73 if (stat(fname, &s) == 0) 94 if (access(fname, F_OK) == 0)
74 return; 95 return;
75 if (is_link(fname)) { // stat on dangling symlinks fails, try again using lstat 96 if (is_link(fname)) { // access(3) on dangling symlinks fails, try again using lstat
76 fprintf(stderr, "Error: invalid %s file\n", fname); 97 fprintf(stderr, "Error: invalid %s file\n", fname);
77 exit(1); 98 exit(1);
78 } 99 }
79 if (stat("/etc/skel/.cshrc", &s) == 0) { 100 if (access("/etc/skel/.cshrc", R_OK) == 0) {
80 copy_file_as_user("/etc/skel/.cshrc", fname, u, g, 0644); // regular user 101 copy_file_as_user("/etc/skel/.cshrc", fname, 0644); // regular user
81 fs_logger("clone /etc/skel/.cshrc"); 102 fs_logger("clone /etc/skel/.cshrc");
82 fs_logger2("clone", fname); 103 fs_logger2("clone", fname);
83 } 104 }
@@ -93,16 +114,15 @@ static void skel(const char *homedir, uid_t u, gid_t g) {
93 // copy skel files 114 // copy skel files
94 if (asprintf(&fname, "%s/.bashrc", homedir) == -1) 115 if (asprintf(&fname, "%s/.bashrc", homedir) == -1)
95 errExit("asprintf"); 116 errExit("asprintf");
96 struct stat s;
97 // don't copy it if we already have the file 117 // don't copy it if we already have the file
98 if (stat(fname, &s) == 0) 118 if (access(fname, F_OK) == 0)
99 return; 119 return;
100 if (is_link(fname)) { // stat on dangling symlinks fails, try again using lstat 120 if (is_link(fname)) { // access(3) on dangling symlinks fails, try again using lstat
101 fprintf(stderr, "Error: invalid %s file\n", fname); 121 fprintf(stderr, "Error: invalid %s file\n", fname);
102 exit(1); 122 exit(1);
103 } 123 }
104 if (stat("/etc/skel/.bashrc", &s) == 0) { 124 if (access("/etc/skel/.bashrc", R_OK) == 0) {
105 copy_file_as_user("/etc/skel/.bashrc", fname, u, g, 0644); // regular user 125 copy_file_as_user("/etc/skel/.bashrc", fname, 0644); // regular user
106 fs_logger("clone /etc/skel/.bashrc"); 126 fs_logger("clone /etc/skel/.bashrc");
107 fs_logger2("clone", fname); 127 fs_logger2("clone", fname);
108 } 128 }
@@ -112,6 +132,7 @@ static void skel(const char *homedir, uid_t u, gid_t g) {
112} 132}
113 133
114static int store_xauthority(void) { 134static int store_xauthority(void) {
135 EUID_ASSERT();
115 if (arg_x11_block) 136 if (arg_x11_block)
116 return 0; 137 return 0;
117 138
@@ -122,15 +143,16 @@ static int store_xauthority(void) {
122 errExit("asprintf"); 143 errExit("asprintf");
123 144
124 struct stat s; 145 struct stat s;
125 if (stat(src, &s) == 0) { 146 if (lstat(src, &s) == 0) {
126 if (is_link(src)) { 147 if (S_ISLNK(s.st_mode)) {
127 fwarning("invalid .Xauthority file\n"); 148 fwarning("invalid .Xauthority file\n");
128 free(src); 149 free(src);
129 return 0; 150 return 0;
130 } 151 }
131 152
132 // create an empty file as root, and change ownership to user 153 // create an empty file as root, and change ownership to user
133 FILE *fp = fopen(dest, "w"); 154 EUID_ROOT();
155 FILE *fp = fopen(dest, "we");
134 if (fp) { 156 if (fp) {
135 fprintf(fp, "\n"); 157 fprintf(fp, "\n");
136 SET_PERMS_STREAM(fp, getuid(), getgid(), 0600); 158 SET_PERMS_STREAM(fp, getuid(), getgid(), 0600);
@@ -138,10 +160,11 @@ static int store_xauthority(void) {
138 } 160 }
139 else 161 else
140 errExit("fopen"); 162 errExit("fopen");
163 EUID_USER();
141 164
142 copy_file_as_user(src, dest, getuid(), getgid(), 0600); // regular user 165 copy_file_as_user(src, dest, 0600); // regular user
143 fs_logger2("clone", dest);
144 selinux_relabel_path(dest, src); 166 selinux_relabel_path(dest, src);
167 fs_logger2("clone", dest);
145 free(src); 168 free(src);
146 return 1; // file copied 169 return 1; // file copied
147 } 170 }
@@ -151,6 +174,7 @@ static int store_xauthority(void) {
151} 174}
152 175
153static int store_asoundrc(void) { 176static int store_asoundrc(void) {
177 EUID_ASSERT();
154 if (arg_nosound) 178 if (arg_nosound)
155 return 0; 179 return 0;
156 180
@@ -161,11 +185,11 @@ static int store_asoundrc(void) {
161 errExit("asprintf"); 185 errExit("asprintf");
162 186
163 struct stat s; 187 struct stat s;
164 if (stat(src, &s) == 0) { 188 if (lstat(src, &s) == 0) {
165 if (is_link(src)) { 189 if (S_ISLNK(s.st_mode)) {
166 // make sure the real path of the file is inside the home directory 190 // make sure the real path of the file is inside the home directory
167 /* coverity[toctou] */ 191 /* coverity[toctou] */
168 char* rp = realpath(src, NULL); 192 char *rp = realpath(src, NULL);
169 if (!rp) { 193 if (!rp) {
170 fprintf(stderr, "Error: Cannot access %s\n", src); 194 fprintf(stderr, "Error: Cannot access %s\n", src);
171 exit(1); 195 exit(1);
@@ -178,7 +202,8 @@ static int store_asoundrc(void) {
178 } 202 }
179 203
180 // create an empty file as root, and change ownership to user 204 // create an empty file as root, and change ownership to user
181 FILE *fp = fopen(dest, "w"); 205 EUID_ROOT();
206 FILE *fp = fopen(dest, "we");
182 if (fp) { 207 if (fp) {
183 fprintf(fp, "\n"); 208 fprintf(fp, "\n");
184 SET_PERMS_STREAM(fp, getuid(), getgid(), 0644); 209 SET_PERMS_STREAM(fp, getuid(), getgid(), 0644);
@@ -186,10 +211,11 @@ static int store_asoundrc(void) {
186 } 211 }
187 else 212 else
188 errExit("fopen"); 213 errExit("fopen");
214 EUID_USER();
189 215
190 copy_file_as_user(src, dest, getuid(), getgid(), 0644); // regular user 216 copy_file_as_user(src, dest, 0644); // regular user
191 selinux_relabel_path(dest, src);
192 fs_logger2("clone", dest); 217 fs_logger2("clone", dest);
218 selinux_relabel_path(dest, src);
193 free(src); 219 free(src);
194 return 1; // file copied 220 return 1; // file copied
195 } 221 }
@@ -199,6 +225,7 @@ static int store_asoundrc(void) {
199} 225}
200 226
201static void copy_xauthority(void) { 227static void copy_xauthority(void) {
228 EUID_ASSERT();
202 // copy XAUTHORITY_FILE in the new home directory 229 // copy XAUTHORITY_FILE in the new home directory
203 char *src = RUN_XAUTHORITY_FILE ; 230 char *src = RUN_XAUTHORITY_FILE ;
204 char *dest; 231 char *dest;
@@ -211,16 +238,18 @@ static void copy_xauthority(void) {
211 exit(1); 238 exit(1);
212 } 239 }
213 240
214 copy_file_as_user(src, dest, getuid(), getgid(), S_IRUSR | S_IWUSR); // regular user 241 copy_file_as_user(src, dest, S_IRUSR | S_IWUSR); // regular user
215 selinux_relabel_path(dest, src);
216 fs_logger2("clone", dest); 242 fs_logger2("clone", dest);
243 selinux_relabel_path(dest, dest);
217 free(dest); 244 free(dest);
218 245
219 // delete the temporary file 246 EUID_ROOT();
220 unlink(src); 247 unlink(src); // delete the temporary file
248 EUID_USER();
221} 249}
222 250
223static void copy_asoundrc(void) { 251static void copy_asoundrc(void) {
252 EUID_ASSERT();
224 // copy ASOUNDRC_FILE in the new home directory 253 // copy ASOUNDRC_FILE in the new home directory
225 char *src = RUN_ASOUNDRC_FILE ; 254 char *src = RUN_ASOUNDRC_FILE ;
226 char *dest; 255 char *dest;
@@ -233,12 +262,14 @@ static void copy_asoundrc(void) {
233 exit(1); 262 exit(1);
234 } 263 }
235 264
236 copy_file_as_user(src, dest, getuid(), getgid(), S_IRUSR | S_IWUSR); // regular user 265 copy_file_as_user(src, dest, S_IRUSR | S_IWUSR); // regular user
237 fs_logger2("clone", dest); 266 fs_logger2("clone", dest);
267 selinux_relabel_path(dest, dest);
238 free(dest); 268 free(dest);
239 269
240 // delete the temporary file 270 EUID_ROOT();
241 unlink(src); 271 unlink(src); // delete the temporary file
272 EUID_USER();
242} 273}
243 274
244// private mode (--private=homedir): 275// private mode (--private=homedir):
@@ -251,21 +282,22 @@ void fs_private_homedir(void) {
251 char *private_homedir = cfg.home_private; 282 char *private_homedir = cfg.home_private;
252 assert(homedir); 283 assert(homedir);
253 assert(private_homedir); 284 assert(private_homedir);
285 EUID_ASSERT();
286
287 uid_t u = getuid();
288 // gid_t g = getgid();
254 289
255 int xflag = store_xauthority(); 290 int xflag = store_xauthority();
256 int aflag = store_asoundrc(); 291 int aflag = store_asoundrc();
257 292
258 uid_t u = getuid();
259 gid_t g = getgid();
260
261 // mount bind private_homedir on top of homedir 293 // mount bind private_homedir on top of homedir
262 if (arg_debug) 294 if (arg_debug)
263 printf("Mount-bind %s on top of %s\n", private_homedir, homedir); 295 printf("Mount-bind %s on top of %s\n", private_homedir, homedir);
264 // get file descriptors for homedir and private_homedir, fails if there is any symlink 296 // get file descriptors for homedir and private_homedir, fails if there is any symlink
265 int src = safe_fd(private_homedir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC); 297 int src = safer_openat(-1, private_homedir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
266 if (src == -1) 298 if (src == -1)
267 errExit("opening private directory"); 299 errExit("opening private directory");
268 int dst = safe_fd(homedir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC); 300 int dst = safer_openat(-1, homedir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
269 if (dst == -1) 301 if (dst == -1)
270 errExit("opening home directory"); 302 errExit("opening home directory");
271 // both mount source and target should be owned by the user 303 // both mount source and target should be owned by the user
@@ -286,17 +318,11 @@ void fs_private_homedir(void) {
286 exit(1); 318 exit(1);
287 } 319 }
288 // mount via the links in /proc/self/fd 320 // mount via the links in /proc/self/fd
289 char *proc_src, *proc_dst; 321 EUID_ROOT();
290 if (asprintf(&proc_src, "/proc/self/fd/%d", src) == -1) 322 if (bind_mount_by_fd(src, dst))
291 errExit("asprintf");
292 if (asprintf(&proc_dst, "/proc/self/fd/%d", dst) == -1)
293 errExit("asprintf");
294 if (mount(proc_src, proc_dst, NULL, MS_NOSUID | MS_NODEV | MS_BIND | MS_REC, NULL) < 0)
295 errExit("mount bind"); 323 errExit("mount bind");
296 free(proc_src); 324 EUID_USER();
297 free(proc_dst); 325
298 close(src);
299 close(dst);
300 // check /proc/self/mountinfo to confirm the mount is ok 326 // check /proc/self/mountinfo to confirm the mount is ok
301 MountData *mptr = get_last_mount(); 327 MountData *mptr = get_last_mount();
302 size_t len = strlen(homedir); 328 size_t len = strlen(homedir);
@@ -304,6 +330,8 @@ void fs_private_homedir(void) {
304 (*(mptr->dir + len) != '\0' && *(mptr->dir + len) != '/')) 330 (*(mptr->dir + len) != '\0' && *(mptr->dir + len) != '/'))
305 errLogExit("invalid private mount"); 331 errLogExit("invalid private mount");
306 332
333 close(src);
334 close(dst);
307 fs_logger3("mount-bind", private_homedir, homedir); 335 fs_logger3("mount-bind", private_homedir, homedir);
308 fs_logger2("whitelist", homedir); 336 fs_logger2("whitelist", homedir);
309// preserve mode and ownership 337// preserve mode and ownership
@@ -312,6 +340,7 @@ void fs_private_homedir(void) {
312// if (chmod(homedir, s.st_mode) == -1) 340// if (chmod(homedir, s.st_mode) == -1)
313// errExit("mount-bind chmod"); 341// errExit("mount-bind chmod");
314 342
343 EUID_ROOT();
315 if (u != 0) { 344 if (u != 0) {
316 // mask /root 345 // mask /root
317 if (arg_debug) 346 if (arg_debug)
@@ -330,8 +359,9 @@ void fs_private_homedir(void) {
330 selinux_relabel_path("/home", "/home"); 359 selinux_relabel_path("/home", "/home");
331 fs_logger("tmpfs /home"); 360 fs_logger("tmpfs /home");
332 } 361 }
362 EUID_USER();
333 363
334 skel(homedir, u, g); 364 skel(homedir);
335 if (xflag) 365 if (xflag)
336 copy_xauthority(); 366 copy_xauthority();
337 if (aflag) 367 if (aflag)
@@ -346,12 +376,15 @@ void fs_private_homedir(void) {
346void fs_private(void) { 376void fs_private(void) {
347 char *homedir = cfg.homedir; 377 char *homedir = cfg.homedir;
348 assert(homedir); 378 assert(homedir);
379 EUID_ASSERT();
380
349 uid_t u = getuid(); 381 uid_t u = getuid();
350 gid_t g = getgid(); 382 gid_t g = getgid();
351 383
352 int xflag = store_xauthority(); 384 int xflag = store_xauthority();
353 int aflag = store_asoundrc(); 385 int aflag = store_asoundrc();
354 386
387 EUID_ROOT();
355 // mask /root 388 // mask /root
356 if (arg_debug) 389 if (arg_debug)
357 printf("Mounting a new /root directory\n"); 390 printf("Mounting a new /root directory\n");
@@ -369,12 +402,14 @@ void fs_private(void) {
369 selinux_relabel_path("/home", "/home"); 402 selinux_relabel_path("/home", "/home");
370 fs_logger("tmpfs /home"); 403 fs_logger("tmpfs /home");
371 } 404 }
405 EUID_USER();
372 406
373 if (u != 0) { 407 if (u != 0) {
374 if (!arg_allusers && strncmp(homedir, "/home/", 6) == 0) { 408 if (!arg_allusers && strncmp(homedir, "/home/", 6) == 0) {
375 // create new empty /home/user directory 409 // create new empty /home/user directory
376 if (arg_debug) 410 if (arg_debug)
377 printf("Create a new user directory\n"); 411 printf("Create a new user directory\n");
412 EUID_ROOT();
378 if (mkdir(homedir, S_IRWXU) == -1) { 413 if (mkdir(homedir, S_IRWXU) == -1) {
379 if (mkpath_as_root(homedir) == -1) 414 if (mkpath_as_root(homedir) == -1)
380 errExit("mkpath"); 415 errExit("mkpath");
@@ -383,7 +418,7 @@ void fs_private(void) {
383 } 418 }
384 if (chown(homedir, u, g) < 0) 419 if (chown(homedir, u, g) < 0)
385 errExit("chown"); 420 errExit("chown");
386 421 EUID_USER();
387 fs_logger2("mkdir", homedir); 422 fs_logger2("mkdir", homedir);
388 fs_logger2("tmpfs", homedir); 423 fs_logger2("tmpfs", homedir);
389 } 424 }
@@ -395,7 +430,7 @@ void fs_private(void) {
395 selinux_relabel_path(homedir, homedir); 430 selinux_relabel_path(homedir, homedir);
396 } 431 }
397 432
398 skel(homedir, u, g); 433 skel(homedir);
399 if (xflag) 434 if (xflag)
400 copy_xauthority(); 435 copy_xauthority();
401 if (aflag) 436 if (aflag)
@@ -420,24 +455,40 @@ void fs_check_private_dir(void) {
420} 455}
421 456
422// check new private working directory (--private-cwd= option) - exit if it fails 457// check new private working directory (--private-cwd= option) - exit if it fails
458// for testing:
459// $ firejail --private --private-cwd=. --noprofile ls
460// issue #4780: exposes full home directory, not the --private one
461// $ firejail --private-cwd=.. --noprofile ls -> error: full dir path required
462// $ firejail --private-cwd=/etc --noprofile ls -> OK
463// $ firejail --private-cwd=FULL-SYMLINK-PATH --noprofile ls -> error: no symlinks
464// $ firejail --private --private-cwd="${HOME}" --noprofile ls -al --> OK
465// $ firejail --private --private-cwd='${HOME}' --noprofile ls -al --> OK
466// $ firejail --private-cwd --> OK: should go in top of the home dir
467// profile with "private-cwd ${HOME}
423void fs_check_private_cwd(const char *dir) { 468void fs_check_private_cwd(const char *dir) {
424 EUID_ASSERT(); 469 EUID_ASSERT();
425 invalid_filename(dir, 0); // no globbing 470 invalid_filename(dir, 0); // no globbing
471 if (strcmp(dir, ".") == 0)
472 goto errout;
426 473
427 // Expand the working directory 474 // Expand the working directory
428 cfg.cwd = expand_macros(dir); 475 cfg.cwd = expand_macros(dir);
429 476
430 // realpath/is_dir not used because path may not exist outside of jail 477 // realpath/is_dir not used because path may not exist outside of jail
431 if (strstr(cfg.cwd, "..")) { 478 if (strstr(cfg.cwd, "..") || *cfg.cwd != '/')
432 fprintf(stderr, "Error: invalid private working directory\n"); 479 goto errout;
433 exit(1); 480
434 } 481 return;
482errout:
483 fprintf(stderr, "Error: invalid private working directory\n");
484 exit(1);
435} 485}
436 486
437//*********************************************************************************** 487//***********************************************************************************
438// --private-home 488// --private-home
439//*********************************************************************************** 489//***********************************************************************************
440static char *check_dir_or_file(const char *name) { 490static char *check_dir_or_file(const char *name) {
491 EUID_ASSERT();
441 assert(name); 492 assert(name);
442 493
443 // basic checks 494 // basic checks
@@ -498,6 +549,7 @@ errexit:
498} 549}
499 550
500static void duplicate(char *name) { 551static void duplicate(char *name) {
552 EUID_ASSERT();
501 char *fname = check_dir_or_file(name); 553 char *fname = check_dir_or_file(name);
502 554
503 if (arg_debug) 555 if (arg_debug)
@@ -535,28 +587,32 @@ static void duplicate(char *name) {
535// set skel files, 587// set skel files,
536// restore .Xauthority 588// restore .Xauthority
537void fs_private_home_list(void) { 589void fs_private_home_list(void) {
538 timetrace_start();
539
540 char *homedir = cfg.homedir; 590 char *homedir = cfg.homedir;
541 char *private_list = cfg.home_private_keep; 591 char *private_list = cfg.home_private_keep;
542 assert(homedir); 592 assert(homedir);
543 assert(private_list); 593 assert(private_list);
594 EUID_ASSERT();
544 595
545 int xflag = store_xauthority(); 596 timetrace_start();
546 int aflag = store_asoundrc();
547 597
548 uid_t uid = getuid(); 598 uid_t uid = getuid();
549 gid_t gid = getgid(); 599 gid_t gid = getgid();
550 600
601 int xflag = store_xauthority();
602 int aflag = store_asoundrc();
603
604 EUID_ROOT();
551 // create /run/firejail/mnt/home directory 605 // create /run/firejail/mnt/home directory
552 mkdir_attr(RUN_HOME_DIR, 0755, uid, gid); 606 mkdir_attr(RUN_HOME_DIR, 0755, uid, gid);
553 selinux_relabel_path(RUN_HOME_DIR, homedir); 607 selinux_relabel_path(RUN_HOME_DIR, homedir);
554 fs_logger_print(); // save the current log
555 608
556 if (arg_debug) 609 // save the current log
557 printf("Copying files in the new home:\n"); 610 fs_logger_print();
611 EUID_USER();
558 612
559 // copy the list of files in the new home directory 613 // copy the list of files in the new home directory
614 if (arg_debug)
615 printf("Copying files in the new home:\n");
560 char *dlist = strdup(cfg.home_private_keep); 616 char *dlist = strdup(cfg.home_private_keep);
561 if (!dlist) 617 if (!dlist)
562 errExit("strdup"); 618 errExit("strdup");
@@ -576,7 +632,7 @@ void fs_private_home_list(void) {
576 if (arg_debug) 632 if (arg_debug)
577 printf("Mount-bind %s on top of %s\n", RUN_HOME_DIR, homedir); 633 printf("Mount-bind %s on top of %s\n", RUN_HOME_DIR, homedir);
578 634
579 int fd = safe_fd(homedir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC); 635 int fd = safer_openat(-1, homedir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
580 if (fd == -1) 636 if (fd == -1)
581 errExit("opening home directory"); 637 errExit("opening home directory");
582 // home directory should be owned by the user 638 // home directory should be owned by the user
@@ -589,24 +645,19 @@ void fs_private_home_list(void) {
589 exit(1); 645 exit(1);
590 } 646 }
591 // mount using the file descriptor 647 // mount using the file descriptor
592 char *proc; 648 EUID_ROOT();
593 if (asprintf(&proc, "/proc/self/fd/%d", fd) == -1) 649 if (bind_mount_path_to_fd(RUN_HOME_DIR, fd))
594 errExit("asprintf");
595 if (mount(RUN_HOME_DIR, proc, NULL, MS_BIND|MS_REC, NULL) < 0)
596 errExit("mount bind"); 650 errExit("mount bind");
597 free(proc); 651 EUID_USER();
598 close(fd); 652 close(fd);
653
599 // check /proc/self/mountinfo to confirm the mount is ok 654 // check /proc/self/mountinfo to confirm the mount is ok
600 MountData *mptr = get_last_mount(); 655 MountData *mptr = get_last_mount();
601 if (strcmp(mptr->dir, homedir) != 0 || strcmp(mptr->fstype, "tmpfs") != 0) 656 if (strcmp(mptr->dir, homedir) != 0 || strcmp(mptr->fstype, "tmpfs") != 0)
602 errLogExit("invalid private-home mount"); 657 errLogExit("invalid private-home mount");
603 fs_logger2("tmpfs", homedir); 658 fs_logger2("tmpfs", homedir);
604 659
605 // mask RUN_HOME_DIR, it is writable and not noexec 660 EUID_ROOT();
606 if (mount("tmpfs", RUN_HOME_DIR, "tmpfs", MS_NOSUID | MS_NODEV | MS_STRICTATIME, "mode=755,gid=0") < 0)
607 errExit("mounting tmpfs");
608 fs_logger2("tmpfs", RUN_HOME_DIR);
609
610 if (uid != 0) { 661 if (uid != 0) {
611 // mask /root 662 // mask /root
612 if (arg_debug) 663 if (arg_debug)
@@ -626,7 +677,12 @@ void fs_private_home_list(void) {
626 fs_logger("tmpfs /home"); 677 fs_logger("tmpfs /home");
627 } 678 }
628 679
629 skel(homedir, uid, gid); 680 // mask RUN_HOME_DIR, it is writable and not noexec
681 if (mount("tmpfs", RUN_HOME_DIR, "tmpfs", MS_NOSUID | MS_NODEV | MS_STRICTATIME, "mode=755,gid=0") < 0)
682 errExit("mounting tmpfs");
683 EUID_USER();
684
685 skel(homedir);
630 if (xflag) 686 if (xflag)
631 copy_xauthority(); 687 copy_xauthority();
632 if (aflag) 688 if (aflag)
diff --git a/src/firejail/fs_hostname.c b/src/firejail/fs_hostname.c
index 8a3bb71ea..dca394865 100644
--- a/src/firejail/fs_hostname.c
+++ b/src/firejail/fs_hostname.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -20,7 +20,6 @@
20#include "firejail.h" 20#include "firejail.h"
21#include <sys/mount.h> 21#include <sys/mount.h>
22#include <sys/stat.h> 22#include <sys/stat.h>
23#include <linux/limits.h>
24#include <glob.h> 23#include <glob.h>
25#include <dirent.h> 24#include <dirent.h>
26#include <fcntl.h> 25#include <fcntl.h>
@@ -33,7 +32,7 @@ void fs_hostname(const char *hostname) {
33 if (arg_debug) 32 if (arg_debug)
34 printf("Creating a new /etc/hostname file\n"); 33 printf("Creating a new /etc/hostname file\n");
35 34
36 create_empty_file_as_root(RUN_HOSTNAME_FILE, S_IRUSR | S_IWRITE | S_IRGRP | S_IROTH); 35 create_empty_file_as_root(RUN_HOSTNAME_FILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
37 36
38 // bind-mount the file on top of /etc/hostname 37 // bind-mount the file on top of /etc/hostname
39 if (mount(RUN_HOSTNAME_FILE, "/etc/hostname", NULL, MS_BIND|MS_REC, NULL) < 0) 38 if (mount(RUN_HOSTNAME_FILE, "/etc/hostname", NULL, MS_BIND|MS_REC, NULL) < 0)
@@ -47,11 +46,11 @@ void fs_hostname(const char *hostname) {
47 printf("Creating a new /etc/hosts file\n"); 46 printf("Creating a new /etc/hosts file\n");
48 // copy /etc/host into our new file, and modify it on the fly 47 // copy /etc/host into our new file, and modify it on the fly
49 /* coverity[toctou] */ 48 /* coverity[toctou] */
50 FILE *fp1 = fopen("/etc/hosts", "r"); 49 FILE *fp1 = fopen("/etc/hosts", "re");
51 if (!fp1) 50 if (!fp1)
52 goto errexit; 51 goto errexit;
53 52
54 FILE *fp2 = fopen(RUN_HOSTS_FILE, "w"); 53 FILE *fp2 = fopen(RUN_HOSTS_FILE, "we");
55 if (!fp2) { 54 if (!fp2) {
56 fclose(fp1); 55 fclose(fp1);
57 goto errexit; 56 goto errexit;
@@ -75,7 +74,7 @@ void fs_hostname(const char *hostname) {
75 } 74 }
76 fclose(fp1); 75 fclose(fp1);
77 // mode and owner 76 // mode and owner
78 SET_PERMS_STREAM(fp2, 0, 0, S_IRUSR | S_IWRITE | S_IRGRP | S_IROTH); 77 SET_PERMS_STREAM(fp2, 0, 0, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
79 fclose(fp2); 78 fclose(fp2);
80 79
81 // bind-mount the file on top of /etc/hostname 80 // bind-mount the file on top of /etc/hostname
@@ -88,118 +87,11 @@ errexit:
88 exit(1); 87 exit(1);
89} 88}
90 89
91void fs_resolvconf(void) {
92 if (cfg.dns1 == NULL && !any_dhcp())
93 return;
94
95 if (arg_debug)
96 printf("mirroring /etc directory\n");
97 if (mkdir(RUN_DNS_ETC, 0755))
98 errExit("mkdir");
99 selinux_relabel_path(RUN_DNS_ETC, "/etc");
100 fs_logger("tmpfs /etc");
101
102 DIR *dir = opendir("/etc");
103 if (!dir)
104 errExit("opendir");
105
106 struct stat s;
107 struct dirent *entry;
108 while ((entry = readdir(dir))) {
109 if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0)
110 continue;
111 // for resolv.conf we create a brand new file
112 if (strcmp(entry->d_name, "resolv.conf") == 0 ||
113 strcmp(entry->d_name, "resolv.conf.dhclient-new") == 0)
114 continue;
115// printf("linking %s\n", entry->d_name);
116
117 char *src;
118 if (asprintf(&src, "/etc/%s", entry->d_name) == -1)
119 errExit("asprintf");
120 if (stat(src, &s) != 0) {
121 free(src);
122 continue;
123 }
124
125 char *dest;
126 if (asprintf(&dest, "%s/%s", RUN_DNS_ETC, entry->d_name) == -1)
127 errExit("asprintf");
128
129 int symlink_done = 0;
130 if (is_link(src)) {
131 char *rp =realpath(src, NULL);
132 if (rp == NULL) {
133 free(src);
134 free(dest);
135 continue;
136 }
137 if (symlink(rp, dest))
138 errExit("symlink");
139 else
140 symlink_done = 1;
141 }
142 else if (S_ISDIR(s.st_mode))
143 create_empty_dir_as_root(dest, s.st_mode);
144 else
145 create_empty_file_as_root(dest, s.st_mode);
146
147 // bind-mount src on top of dest
148 if (!symlink_done) {
149 if (mount(src, dest, NULL, MS_BIND|MS_REC, NULL) < 0)
150 errExit("mount bind mirroring /etc");
151 }
152 fs_logger2("clone", src);
153
154 free(src);
155 free(dest);
156 }
157 closedir(dir);
158
159 // mount bind our private etc directory on top of /etc
160 if (arg_debug)
161 printf("Mount-bind %s on top of /etc\n", RUN_DNS_ETC);
162 if (mount(RUN_DNS_ETC, "/etc", NULL, MS_BIND|MS_REC, NULL) < 0)
163 errExit("mount bind mirroring /etc");
164 fs_logger("mount /etc");
165
166 if (arg_debug)
167 printf("Creating a new /etc/resolv.conf file\n");
168 FILE *fp = fopen("/etc/resolv.conf", "w");
169 if (!fp) {
170 fprintf(stderr, "Error: cannot create /etc/resolv.conf file\n");
171 exit(1);
172 }
173
174 if (cfg.dns1) {
175 if (any_dhcp())
176 fwarning("network setup uses DHCP, nameservers will likely be overwritten\n");
177 fprintf(fp, "nameserver %s\n", cfg.dns1);
178 }
179 if (cfg.dns2)
180 fprintf(fp, "nameserver %s\n", cfg.dns2);
181 if (cfg.dns3)
182 fprintf(fp, "nameserver %s\n", cfg.dns3);
183 if (cfg.dns4)
184 fprintf(fp, "nameserver %s\n", cfg.dns4);
185
186 // mode and owner
187 SET_PERMS_STREAM(fp, 0, 0, 0644);
188
189 fclose(fp);
190
191 fs_logger("create /etc/resolv.conf");
192}
193
194char *fs_check_hosts_file(const char *fname) { 90char *fs_check_hosts_file(const char *fname) {
195 assert(fname); 91 assert(fname);
196 invalid_filename(fname, 0); // no globbing 92 invalid_filename(fname, 0); // no globbing
197 char *rv = expand_macros(fname); 93 char *rv = expand_macros(fname);
198 94
199 // no a link
200 if (is_link(rv))
201 goto errexit;
202
203 // the user has read access to the file 95 // the user has read access to the file
204 if (access(rv, R_OK)) 96 if (access(rv, R_OK))
205 goto errexit; 97 goto errexit;
@@ -222,9 +114,6 @@ void fs_mount_hosts_file(void) {
222 struct stat s; 114 struct stat s;
223 if (stat("/etc/hosts", &s) == -1) 115 if (stat("/etc/hosts", &s) == -1)
224 goto errexit; 116 goto errexit;
225 // not a link
226 if (is_link("/etc/hosts"))
227 goto errexit;
228 // owned by root 117 // owned by root
229 if (s.st_uid != 0) 118 if (s.st_uid != 0)
230 goto errexit; 119 goto errexit;
diff --git a/src/firejail/fs_lib.c b/src/firejail/fs_lib.c
index 85fb70854..848691a56 100644
--- a/src/firejail/fs_lib.c
+++ b/src/firejail/fs_lib.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -61,17 +61,31 @@ static int valid_full_path(const char *full_path) {
61 return 0; 61 return 0;
62} 62}
63 63
64// return 1 if symlink to firejail executable
65int is_firejail_link(const char *fname) {
66 EUID_ASSERT();
67
68 if (!is_link(fname))
69 return 0;
70
71 char *rp = realpath(fname, NULL);
72 if (!rp)
73 return 0;
74
75 int rv = 0;
76 const char *base = gnu_basename(rp);
77 if (strcmp(base, "firejail") == 0)
78 rv = 1;
79
80 free(rp);
81 return rv;
82}
83
64char *find_in_path(const char *program) { 84char *find_in_path(const char *program) {
65 EUID_ASSERT(); 85 EUID_ASSERT();
66 if (arg_debug) 86 if (arg_debug)
67 printf("Searching $PATH for %s\n", program); 87 printf("Searching $PATH for %s\n", program);
68 88
69 char self[MAXBUF];
70 ssize_t len = readlink("/proc/self/exe", self, MAXBUF - 1);
71 if (len < 0)
72 errExit("readlink");
73 self[len] = '\0';
74
75 const char *path = env_get("PATH"); 89 const char *path = env_get("PATH");
76 if (!path) 90 if (!path)
77 return NULL; 91 return NULL;
@@ -88,18 +102,12 @@ char *find_in_path(const char *program) {
88 if (arg_debug) 102 if (arg_debug)
89 printf("trying #%s#\n", fname); 103 printf("trying #%s#\n", fname);
90 struct stat s; 104 struct stat s;
91 if (stat(fname, &s) == 0) { 105 if (stat(fname, &s) == 0 &&
92 // but skip links created by firecfg 106 !is_firejail_link(fname)) { // skip links created by firecfg
93 char *rp = realpath(fname, NULL); 107 free(dup);
94 if (!rp) 108 return fname;
95 errExit("realpath");
96 if (strcmp(self, rp) != 0) {
97 free(rp);
98 free(dup);
99 return fname;
100 }
101 free(rp);
102 } 109 }
110
103 free(fname); 111 free(fname);
104 tok = strtok(NULL, ":"); 112 tok = strtok(NULL, ":");
105 } 113 }
@@ -178,8 +186,7 @@ void fslib_mount(const char *full_path) {
178 186
179 if (*full_path == '\0' || 187 if (*full_path == '\0' ||
180 !valid_full_path(full_path) || 188 !valid_full_path(full_path) ||
181 access(full_path, F_OK) != 0 || 189 stat_as_user(full_path, &s) != 0 ||
182 stat(full_path, &s) != 0 ||
183 s.st_uid != 0) 190 s.st_uid != 0)
184 return; 191 return;
185 192
@@ -196,6 +203,11 @@ void fslib_mount_libs(const char *full_path, unsigned user) {
196 assert(full_path); 203 assert(full_path);
197 // if library/executable does not exist or the user does not have read access to it 204 // if library/executable does not exist or the user does not have read access to it
198 // print a warning and exit the function. 205 // print a warning and exit the function.
206 if (access(full_path, F_OK)) {
207 if (arg_debug || arg_debug_private_lib)
208 printf("Cannot find %s, skipping...\n", full_path);
209 return;
210 }
199 if (user && access(full_path, R_OK)) { 211 if (user && access(full_path, R_OK)) {
200 if (arg_debug || arg_debug_private_lib) 212 if (arg_debug || arg_debug_private_lib)
201 printf("Cannot read %s, skipping...\n", full_path); 213 printf("Cannot read %s, skipping...\n", full_path);
@@ -203,7 +215,7 @@ void fslib_mount_libs(const char *full_path, unsigned user) {
203 } 215 }
204 216
205 if (arg_debug || arg_debug_private_lib) 217 if (arg_debug || arg_debug_private_lib)
206 printf(" fslib_mount_libs %s (parse as %s)\n", full_path, user ? "user" : "root"); 218 printf(" fslib_mount_libs %s\n", full_path);
207 // create an empty RUN_LIB_FILE and allow the user to write to it 219 // create an empty RUN_LIB_FILE and allow the user to write to it
208 unlink(RUN_LIB_FILE); // in case is there 220 unlink(RUN_LIB_FILE); // in case is there
209 create_empty_file_as_root(RUN_LIB_FILE, 0644); 221 create_empty_file_as_root(RUN_LIB_FILE, 0644);
@@ -212,7 +224,7 @@ void fslib_mount_libs(const char *full_path, unsigned user) {
212 224
213 // run fldd to extract the list of files 225 // run fldd to extract the list of files
214 if (arg_debug || arg_debug_private_lib) 226 if (arg_debug || arg_debug_private_lib)
215 printf(" running fldd %s\n", full_path); 227 printf(" running fldd %s as %s\n", full_path, user ? "user" : "root");
216 unsigned mask; 228 unsigned mask;
217 if (user) 229 if (user)
218 mask = SBOX_USER; 230 mask = SBOX_USER;
@@ -221,7 +233,7 @@ void fslib_mount_libs(const char *full_path, unsigned user) {
221 sbox_run(mask | SBOX_SECCOMP | SBOX_CAPS_NONE, 3, PATH_FLDD, full_path, RUN_LIB_FILE); 233 sbox_run(mask | SBOX_SECCOMP | SBOX_CAPS_NONE, 3, PATH_FLDD, full_path, RUN_LIB_FILE);
222 234
223 // open the list of libraries and install them on by one 235 // open the list of libraries and install them on by one
224 FILE *fp = fopen(RUN_LIB_FILE, "r"); 236 FILE *fp = fopen(RUN_LIB_FILE, "re");
225 if (!fp) 237 if (!fp)
226 errExit("fopen"); 238 errExit("fopen");
227 239
@@ -246,7 +258,7 @@ static void load_library(const char *fname) {
246 258
247 // existing file owned by root 259 // existing file owned by root
248 struct stat s; 260 struct stat s;
249 if (!access(fname, F_OK) && stat(fname, &s) == 0 && s.st_uid == 0) { 261 if (stat_as_user(fname, &s) == 0 && s.st_uid == 0) {
250 // load directories, regular 64 bit libraries, and 64 bit executables 262 // load directories, regular 64 bit libraries, and 64 bit executables
251 if (S_ISDIR(s.st_mode)) 263 if (S_ISDIR(s.st_mode))
252 fslib_mount(fname); 264 fslib_mount(fname);
@@ -264,9 +276,9 @@ static void install_list_entry(const char *lib) {
264 assert(lib); 276 assert(lib);
265 277
266 // filename check 278 // filename check
267 int len = strlen(lib); 279 reject_meta_chars(lib, 1);
268 if (strcspn(lib, "\\&!?\"'<>%^(){}[];,") != (size_t)len || 280
269 strstr(lib, "..")) { 281 if (strstr(lib, "..")) {
270 fprintf(stderr, "Error: \"%s\" is an invalid library\n", lib); 282 fprintf(stderr, "Error: \"%s\" is an invalid library\n", lib);
271 exit(1); 283 exit(1);
272 } 284 }
@@ -286,19 +298,21 @@ static void install_list_entry(const char *lib) {
286#define DO_GLOBBING 298#define DO_GLOBBING
287#ifdef DO_GLOBBING 299#ifdef DO_GLOBBING
288 // globbing 300 // globbing
301 EUID_USER();
289 glob_t globbuf; 302 glob_t globbuf;
290 int globerr = glob(fname, GLOB_NOCHECK | GLOB_NOSORT | GLOB_PERIOD, NULL, &globbuf); 303 int globerr = glob(fname, GLOB_NOCHECK | GLOB_NOSORT | GLOB_PERIOD, NULL, &globbuf);
291 if (globerr) { 304 if (globerr) {
292 fprintf(stderr, "Error: failed to glob private-lib pattern %s\n", fname); 305 fprintf(stderr, "Error: failed to glob private-lib pattern %s\n", fname);
293 exit(1); 306 exit(1);
294 } 307 }
308 EUID_ROOT();
295 size_t j; 309 size_t j;
296 for (j = 0; j < globbuf.gl_pathc; j++) { 310 for (j = 0; j < globbuf.gl_pathc; j++) {
297 assert(globbuf.gl_pathv[j]); 311 assert(globbuf.gl_pathv[j]);
298//printf("glob %s\n", globbuf.gl_pathv[j]); 312//printf("glob %s\n", globbuf.gl_pathv[j]);
299 // GLOB_NOCHECK - no pattern matched returns the original pattern; try to load it anyway 313 // GLOB_NOCHECK - no pattern matched returns the original pattern; try to load it anyway
300 314
301 // foobar/* includes foobar/. and foobar/.. 315 // foobar/* expands to foobar/. and foobar/..
302 const char *base = gnu_basename(globbuf.gl_pathv[j]); 316 const char *base = gnu_basename(globbuf.gl_pathv[j]);
303 if (strcmp(base, ".") == 0 || strcmp(base, "..") == 0) 317 if (strcmp(base, ".") == 0 || strcmp(base, "..") == 0)
304 continue; 318 continue;
diff --git a/src/firejail/fs_lib2.c b/src/firejail/fs_lib2.c
index c69bf7c98..aefd38e3c 100644
--- a/src/firejail/fs_lib2.c
+++ b/src/firejail/fs_lib2.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -143,7 +143,7 @@ static void fdir(void) {
143 NULL, 143 NULL,
144 }; 144 };
145 145
146 // need to parse as root user, unprivileged users have no read permission on executables 146 // need to parse as root user, unprivileged users have no read permission on some of these binaries
147 int i; 147 int i;
148 for (i = 0; fbin[i]; i++) 148 for (i = 0; fbin[i]; i++)
149 fslib_mount_libs(fbin[i], 0); 149 fslib_mount_libs(fbin[i], 0);
@@ -153,7 +153,9 @@ void fslib_install_firejail(void) {
153 timetrace_start(); 153 timetrace_start();
154 // bring in firejail executable libraries, in case we are redirected here 154 // bring in firejail executable libraries, in case we are redirected here
155 // by a firejail symlink from /usr/local/bin/firejail 155 // by a firejail symlink from /usr/local/bin/firejail
156 fslib_mount_libs(PATH_FIREJAIL, 1); // parse as user 156 // fldd might have no read permission on the firejail executable
157 // parse as root in order to support these setups
158 fslib_mount_libs(PATH_FIREJAIL, 0);
157 159
158 // bring in firejail directory 160 // bring in firejail directory
159 fdir(); 161 fdir();
diff --git a/src/firejail/fs_logger.c b/src/firejail/fs_logger.c
index 67ad4b52e..06f03dac5 100644
--- a/src/firejail/fs_logger.c
+++ b/src/firejail/fs_logger.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -92,7 +92,7 @@ void fs_logger_print(void) {
92 if (!head) 92 if (!head)
93 return; 93 return;
94 94
95 FILE *fp = fopen(RUN_FSLOGGER_FILE, "a"); 95 FILE *fp = fopen(RUN_FSLOGGER_FILE, "ae");
96 if (!fp) { 96 if (!fp) {
97 perror("fopen"); 97 perror("fopen");
98 return; 98 return;
@@ -123,15 +123,8 @@ void fs_logger_print_log(pid_t pid) {
123 // in case the pid is that of a firejail process, use the pid of the first child process 123 // in case the pid is that of a firejail process, use the pid of the first child process
124 pid = switch_to_child(pid); 124 pid = switch_to_child(pid);
125 125
126 // check privileges for non-root users 126 // exit if no permission to join the sandbox
127 uid_t uid = getuid(); 127 check_join_permission(pid);
128 if (uid != 0) {
129 uid_t sandbox_uid = pid_get_uid(pid);
130 if (uid != sandbox_uid) {
131 fprintf(stderr, "Error: permission denied\n");
132 exit(1);
133 }
134 }
135 128
136 // print RUN_FSLOGGER_FILE 129 // print RUN_FSLOGGER_FILE
137 char *fname; 130 char *fname;
@@ -139,24 +132,16 @@ void fs_logger_print_log(pid_t pid) {
139 errExit("asprintf"); 132 errExit("asprintf");
140 133
141 EUID_ROOT(); 134 EUID_ROOT();
142 struct stat s; 135 FILE *fp = fopen(fname, "re");
143 if (stat(fname, &s) == -1 || s.st_uid != 0) { 136 free(fname);
144 fprintf(stderr, "Error: Cannot access filesystem log\n");
145 exit(1);
146 }
147
148 /* coverity[toctou] */
149 FILE *fp = fopen(fname, "r");
150 if (!fp) { 137 if (!fp) {
151 fprintf(stderr, "Error: Cannot open filesystem log\n"); 138 fprintf(stderr, "Error: Cannot open filesystem log\n");
152 exit(1); 139 exit(1);
153 } 140 }
154
155 char buf[MAXBUF]; 141 char buf[MAXBUF];
156 while (fgets(buf, MAXBUF, fp)) 142 while (fgets(buf, MAXBUF, fp))
157 printf("%s", buf); 143 printf("%s", buf);
158 fclose(fp); 144 fclose(fp);
159 free(fname);
160 145
161 exit(0); 146 exit(0);
162} 147}
diff --git a/src/firejail/fs_mkdir.c b/src/firejail/fs_mkdir.c
index 8cfeea582..30dbd8e9b 100644
--- a/src/firejail/fs_mkdir.c
+++ b/src/firejail/fs_mkdir.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -18,6 +18,7 @@
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */ 19 */
20#include "firejail.h" 20#include "firejail.h"
21#include "../include/gcov_wrapper.h"
21#include <sys/types.h> 22#include <sys/types.h>
22#include <sys/stat.h> 23#include <sys/stat.h>
23#include <unistd.h> 24#include <unistd.h>
@@ -25,7 +26,6 @@
25#include <sys/wait.h> 26#include <sys/wait.h>
26#include <string.h> 27#include <string.h>
27 28
28
29static void check(const char *fname) { 29static void check(const char *fname) {
30 // manufacture /run/user directory 30 // manufacture /run/user directory
31 char *runuser; 31 char *runuser;
@@ -95,9 +95,9 @@ void fs_mkdir(const char *name) {
95 95
96 // create directory 96 // create directory
97 mkdir_recursive(expanded); 97 mkdir_recursive(expanded);
98#ifdef HAVE_GCOV 98
99 __gcov_flush(); 99 __gcov_flush();
100#endif 100
101 _exit(0); 101 _exit(0);
102 } 102 }
103 // wait for the child to finish 103 // wait for the child to finish
diff --git a/src/firejail/fs_overlayfs.c b/src/firejail/fs_overlayfs.c
new file mode 100644
index 000000000..167a7e28b
--- /dev/null
+++ b/src/firejail/fs_overlayfs.c
@@ -0,0 +1,470 @@
1/*
2 * Copyright (C) 2014-2022 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20
21#ifdef HAVE_OVERLAYFS
22#include "firejail.h"
23#include "../include/gcov_wrapper.h"
24#include <sys/mount.h>
25#include <sys/wait.h>
26#include <ftw.h>
27#include <errno.h>
28
29#include <fcntl.h>
30#ifndef O_PATH
31#define O_PATH 010000000
32#endif
33
34
35char *fs_check_overlay_dir(const char *subdirname, int allow_reuse) {
36 assert(subdirname);
37 EUID_ASSERT();
38 struct stat s;
39 char *dirname;
40
41 if (asprintf(&dirname, "%s/.firejail", cfg.homedir) == -1)
42 errExit("asprintf");
43 // check if ~/.firejail already exists
44 if (lstat(dirname, &s) == 0) {
45 if (!S_ISDIR(s.st_mode)) {
46 if (S_ISLNK(s.st_mode))
47 fprintf(stderr, "Error: %s is a symbolic link\n", dirname);
48 else
49 fprintf(stderr, "Error: %s is not a directory\n", dirname);
50 exit(1);
51 }
52 if (s.st_uid != getuid()) {
53 fprintf(stderr, "Error: %s is not owned by the current user\n", dirname);
54 exit(1);
55 }
56 }
57 else {
58 // create ~/.firejail directory
59 create_empty_dir_as_user(dirname, 0700);
60 if (stat(dirname, &s) == -1) {
61 fprintf(stderr, "Error: cannot create directory %s\n", dirname);
62 exit(1);
63 }
64 }
65 free(dirname);
66
67 // check overlay directory
68 if (asprintf(&dirname, "%s/.firejail/%s", cfg.homedir, subdirname) == -1)
69 errExit("asprintf");
70 if (lstat(dirname, &s) == 0) {
71 if (!S_ISDIR(s.st_mode)) {
72 if (S_ISLNK(s.st_mode))
73 fprintf(stderr, "Error: %s is a symbolic link\n", dirname);
74 else
75 fprintf(stderr, "Error: %s is not a directory\n", dirname);
76 exit(1);
77 }
78 if (s.st_uid != 0) {
79 fprintf(stderr, "Error: overlay directory %s is not owned by the root user\n", dirname);
80 exit(1);
81 }
82 if (allow_reuse == 0) {
83 fprintf(stderr, "Error: overlay directory exists, but reuse is not allowed\n");
84 exit(1);
85 }
86 }
87
88 return dirname;
89}
90
91
92// mount overlayfs on top of / directory
93// mounting an overlay and chrooting into it:
94//
95// Old Ubuntu kernel
96// # cd ~
97// # mkdir -p overlay/root
98// # mkdir -p overlay/diff
99// # mount -t overlayfs -o lowerdir=/,upperdir=/root/overlay/diff overlayfs /root/overlay/root
100// # chroot /root/overlay/root
101// to shutdown, first exit the chroot and then unmount the overlay
102// # exit
103// # umount /root/overlay/root
104//
105// Kernels 3.18+
106// # cd ~
107// # mkdir -p overlay/root
108// # mkdir -p overlay/diff
109// # mkdir -p overlay/work
110// # mount -t overlay -o lowerdir=/,upperdir=/root/overlay/diff,workdir=/root/overlay/work overlay /root/overlay/root
111// # cat /etc/mtab | grep overlay
112// /root/overlay /root/overlay/root overlay rw,relatime,lowerdir=/,upperdir=/root/overlay/diff,workdir=/root/overlay/work 0 0
113// # chroot /root/overlay/root
114// to shutdown, first exit the chroot and then unmount the overlay
115// # exit
116// # umount /root/overlay/root
117
118// to do: fix the code below
119#include <sys/utsname.h>
120void fs_overlayfs(void) {
121 struct stat s;
122
123 // check kernel version
124 struct utsname u;
125 int rv = uname(&u);
126 if (rv != 0)
127 errExit("uname");
128 int major;
129 int minor;
130 if (2 != sscanf(u.release, "%d.%d", &major, &minor)) {
131 fprintf(stderr, "Error: cannot extract Linux kernel version: %s\n", u.version);
132 exit(1);
133 }
134
135 if (arg_debug)
136 printf("Linux kernel version %d.%d\n", major, minor);
137 int oldkernel = 0;
138 if (major < 3) {
139 fprintf(stderr, "Error: minimum kernel version required 3.x\n");
140 exit(1);
141 }
142 if (major == 3 && minor < 18)
143 oldkernel = 1;
144
145 // mounting an overlayfs on top of / seems to be broken for kernels > 4.19
146 // we disable overlayfs for now, pending fixing
147 if (major >= 4 &&minor >= 19) {
148 fprintf(stderr, "Error: OverlayFS disabled for Linux kernels 4.19 and newer, pending fixing.\n");
149 exit(1);
150 }
151
152 char *oroot = RUN_OVERLAY_ROOT;
153 mkdir_attr(oroot, 0755, 0, 0);
154
155 // set base for working and diff directories
156 char *basedir = RUN_MNT_DIR;
157 int basefd = -1;
158
159 if (arg_overlay_keep) {
160 basedir = cfg.overlay_dir;
161 assert(basedir);
162 // get a file descriptor for ~/.firejail, fails if there is any symlink
163 char *firejail;
164 if (asprintf(&firejail, "%s/.firejail", cfg.homedir) == -1)
165 errExit("asprintf");
166 int fd = safer_openat(-1, firejail, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
167 if (fd == -1)
168 errExit("safer_openat");
169 free(firejail);
170 // create basedir if it doesn't exist
171 // the new directory will be owned by root
172 const char *dirname = gnu_basename(basedir);
173 if (mkdirat(fd, dirname, 0755) == -1 && errno != EEXIST) {
174 perror("mkdir");
175 fprintf(stderr, "Error: cannot create overlay directory %s\n", basedir);
176 exit(1);
177 }
178 // open basedir
179 basefd = openat(fd, dirname, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
180 close(fd);
181 }
182 else {
183 basefd = open(basedir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
184 }
185 if (basefd == -1) {
186 perror("open");
187 fprintf(stderr, "Error: cannot open overlay directory %s\n", basedir);
188 exit(1);
189 }
190
191 // confirm once more base is owned by root
192 if (fstat(basefd, &s) == -1)
193 errExit("fstat");
194 if (s.st_uid != 0) {
195 fprintf(stderr, "Error: overlay directory %s is not owned by the root user\n", basedir);
196 exit(1);
197 }
198 // confirm permissions of base are 0755
199 if (((S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) & s.st_mode) != (S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)) {
200 fprintf(stderr, "Error: invalid permissions on overlay directory %s\n", basedir);
201 exit(1);
202 }
203
204 // create diff and work directories inside base
205 // no need to check arg_overlay_reuse
206 char *odiff;
207 if (asprintf(&odiff, "%s/odiff", basedir) == -1)
208 errExit("asprintf");
209 // the new directory will be owned by root
210 if (mkdirat(basefd, "odiff", 0755) == -1 && errno != EEXIST) {
211 perror("mkdir");
212 fprintf(stderr, "Error: cannot create overlay directory %s\n", odiff);
213 exit(1);
214 }
215 ASSERT_PERMS(odiff, 0, 0, 0755);
216
217 char *owork;
218 if (asprintf(&owork, "%s/owork", basedir) == -1)
219 errExit("asprintf");
220 // the new directory will be owned by root
221 if (mkdirat(basefd, "owork", 0755) == -1 && errno != EEXIST) {
222 perror("mkdir");
223 fprintf(stderr, "Error: cannot create overlay directory %s\n", owork);
224 exit(1);
225 }
226 ASSERT_PERMS(owork, 0, 0, 0755);
227
228 // mount overlayfs
229 if (arg_debug)
230 printf("Mounting OverlayFS\n");
231 char *option;
232 if (oldkernel) { // old Ubuntu/OpenSUSE kernels
233 if (arg_overlay_keep) {
234 fprintf(stderr, "Error: option --overlay= not available for kernels older than 3.18\n");
235 exit(1);
236 }
237 if (asprintf(&option, "lowerdir=/,upperdir=%s", odiff) == -1)
238 errExit("asprintf");
239 if (mount("overlayfs", oroot, "overlayfs", MS_MGC_VAL, option) < 0)
240 errExit("mounting overlayfs");
241 }
242 else { // kernel 3.18 or newer
243 if (asprintf(&option, "lowerdir=/,upperdir=%s,workdir=%s", odiff, owork) == -1)
244 errExit("asprintf");
245 if (mount("overlay", oroot, "overlay", MS_MGC_VAL, option) < 0) {
246 fprintf(stderr, "Debug: running on kernel version %d.%d\n", major, minor);
247 errExit("mounting overlayfs");
248 }
249
250 //***************************
251 // issue #263 start code
252 // My setup has a separate mount point for /home. When the overlay is mounted,
253 // the overlay does not contain the original /home contents.
254 // I added code to create a second overlay for /home if the overlay home dir is empty and this seems to work
255 // @dshmgh, Jan 2016
256 {
257 char *overlayhome;
258 struct stat s;
259 char *hroot;
260 char *hdiff;
261 char *hwork;
262
263 // dons add debug
264 if (arg_debug) printf ("DEBUG: chroot dirs are oroot %s odiff %s owork %s\n",oroot,odiff,owork);
265
266 // BEFORE NEXT, WE NEED TO TEST IF /home has any contents or do we need to mount it?
267 // must create var for oroot/cfg.homedir
268 if (asprintf(&overlayhome, "%s%s", oroot, cfg.homedir) == -1)
269 errExit("asprintf");
270 if (arg_debug) printf ("DEBUG: overlayhome var holds ##%s##\n", overlayhome);
271
272 // if no homedir in overlay -- create another overlay for /home
273 if (stat(cfg.homedir, &s) == 0 && stat(overlayhome, &s) == -1) {
274
275 // no need to check arg_overlay_reuse
276 if (asprintf(&hdiff, "%s/hdiff", basedir) == -1)
277 errExit("asprintf");
278 // the new directory will be owned by root
279 if (mkdirat(basefd, "hdiff", 0755) == -1 && errno != EEXIST) {
280 perror("mkdir");
281 fprintf(stderr, "Error: cannot create overlay directory %s\n", hdiff);
282 exit(1);
283 }
284 ASSERT_PERMS(hdiff, 0, 0, 0755);
285
286 // no need to check arg_overlay_reuse
287 if (asprintf(&hwork, "%s/hwork", basedir) == -1)
288 errExit("asprintf");
289 // the new directory will be owned by root
290 if (mkdirat(basefd, "hwork", 0755) == -1 && errno != EEXIST) {
291 perror("mkdir");
292 fprintf(stderr, "Error: cannot create overlay directory %s\n", hwork);
293 exit(1);
294 }
295 ASSERT_PERMS(hwork, 0, 0, 0755);
296
297 // no homedir in overlay so now mount another overlay for /home
298 if (asprintf(&hroot, "%s/home", oroot) == -1)
299 errExit("asprintf");
300 if (asprintf(&option, "lowerdir=/home,upperdir=%s,workdir=%s", hdiff, hwork) == -1)
301 errExit("asprintf");
302 if (mount("overlay", hroot, "overlay", MS_MGC_VAL, option) < 0)
303 errExit("mounting overlayfs for mounted home directory");
304
305 printf("OverlayFS for /home configured in %s directory\n", basedir);
306 free(hroot);
307 free(hdiff);
308 free(hwork);
309
310 } // stat(overlayhome)
311 free(overlayhome);
312 }
313 // issue #263 end code
314 //***************************
315 }
316 fmessage("OverlayFS configured in %s directory\n", basedir);
317 close(basefd);
318
319 // /dev, /run and /tmp are not covered by the overlay
320 // mount-bind dev directory
321 if (arg_debug)
322 printf("Mounting /dev\n");
323 char *dev;
324 if (asprintf(&dev, "%s/dev", oroot) == -1)
325 errExit("asprintf");
326 if (mount("/dev", dev, NULL, MS_BIND|MS_REC, NULL) < 0)
327 errExit("mounting /dev");
328 fs_logger("whitelist /dev");
329
330 // mount-bind run directory
331 if (arg_debug)
332 printf("Mounting /run\n");
333 char *run;
334 if (asprintf(&run, "%s/run", oroot) == -1)
335 errExit("asprintf");
336 if (mount("/run", run, NULL, MS_BIND|MS_REC, NULL) < 0)
337 errExit("mounting /run");
338 fs_logger("whitelist /run");
339
340 // mount-bind tmp directory
341 if (arg_debug)
342 printf("Mounting /tmp\n");
343 char *tmp;
344 if (asprintf(&tmp, "%s/tmp", oroot) == -1)
345 errExit("asprintf");
346 if (mount("/tmp", tmp, NULL, MS_BIND|MS_REC, NULL) < 0)
347 errExit("mounting /tmp");
348 fs_logger("whitelist /tmp");
349
350 // chroot in the new filesystem
351 __gcov_flush();
352
353 if (chroot(oroot) == -1)
354 errExit("chroot");
355
356 // mount a new proc filesystem
357 if (arg_debug)
358 printf("Mounting /proc filesystem representing the PID namespace\n");
359 if (mount("proc", "/proc", "proc", MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_REC, NULL) < 0)
360 errExit("mounting /proc");
361
362 // update /var directory in order to support multiple sandboxes running on the same root directory
363// if (!arg_private_dev)
364// fs_dev_shm();
365 fs_var_lock();
366 if (!arg_keep_var_tmp)
367 fs_var_tmp();
368 if (!arg_writable_var_log)
369 fs_var_log();
370 fs_var_lib();
371 fs_var_cache();
372 fs_var_utmp();
373 fs_machineid();
374
375 // don't leak user information
376 restrict_users();
377
378 // when starting as root, firejail config is not disabled;
379 if (getuid() != 0)
380 disable_config();
381
382 // cleanup and exit
383 free(option);
384 free(odiff);
385 free(owork);
386 free(dev);
387 free(run);
388 free(tmp);
389}
390
391
392static int remove_callback(const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf) {
393 (void) sb;
394 (void) typeflag;
395 (void) ftwbuf;
396 assert(fpath);
397
398 if (strcmp(fpath, ".") == 0) // rmdir would fail with EINVAL
399 return 0;
400
401 if (remove(fpath)) { // removes the link not the actual file
402 fprintf(stderr, "Error: cannot remove file: %s\n", strerror(errno));
403 exit(1);
404 }
405
406 return 0;
407}
408
409int remove_overlay_directory(void) {
410 EUID_ASSERT();
411 sleep(1);
412
413 char *path;
414 if (asprintf(&path, "%s/.firejail", cfg.homedir) == -1)
415 errExit("asprintf");
416
417 if (access(path, F_OK) == 0) {
418 pid_t child = fork();
419 if (child < 0)
420 errExit("fork");
421 if (child == 0) {
422 // open ~/.firejail
423 int fd = safer_openat(-1, path, O_PATH|O_NOFOLLOW|O_CLOEXEC);
424 if (fd == -1) {
425 fprintf(stderr, "Error: cannot open %s\n", path);
426 exit(1);
427 }
428 struct stat s;
429 if (fstat(fd, &s) == -1)
430 errExit("fstat");
431 if (!S_ISDIR(s.st_mode)) {
432 if (S_ISLNK(s.st_mode))
433 fprintf(stderr, "Error: %s is a symbolic link\n", path);
434 else
435 fprintf(stderr, "Error: %s is not a directory\n", path);
436 exit(1);
437 }
438 if (s.st_uid != getuid()) {
439 fprintf(stderr, "Error: %s is not owned by the current user\n", path);
440 exit(1);
441 }
442 // chdir to ~/.firejail
443 if (fchdir(fd) == -1)
444 errExit("fchdir");
445 close(fd);
446
447 EUID_ROOT();
448 // FTW_PHYS - do not follow symbolic links
449 if (nftw(".", remove_callback, 64, FTW_DEPTH | FTW_PHYS) == -1)
450 errExit("nftw");
451
452 EUID_USER();
453 // remove ~/.firejail
454 if (rmdir(path) == -1)
455 errExit("rmdir");
456
457 __gcov_flush();
458
459 _exit(0);
460 }
461 // wait for the child to finish
462 waitpid(child, NULL, 0);
463 // check if ~/.firejail was deleted
464 if (access(path, F_OK) == 0)
465 return 1;
466 }
467 return 0;
468}
469
470#endif // HAVE_OVERLAYFS
diff --git a/src/firejail/fs_trace.c b/src/firejail/fs_trace.c
index 8f939b5f5..4cecea9ce 100644
--- a/src/firejail/fs_trace.c
+++ b/src/firejail/fs_trace.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -20,26 +20,31 @@
20#include "firejail.h" 20#include "firejail.h"
21#include <sys/mount.h> 21#include <sys/mount.h>
22#include <sys/stat.h> 22#include <sys/stat.h>
23#include <linux/limits.h>
24#include <glob.h> 23#include <glob.h>
25#include <dirent.h> 24#include <dirent.h>
26#include <fcntl.h> 25#include <fcntl.h>
27#include <pwd.h> 26#include <pwd.h>
28 27
29void fs_trace_preload(void) { 28// create an empty /etc/ld.so.preload
29void fs_trace_touch_preload(void) {
30 create_empty_file_as_root("/etc/ld.so.preload", S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
31}
32
33void fs_trace_touch_or_store_preload(void) {
30 struct stat s; 34 struct stat s;
31 35
32 // create an empty /etc/ld.so.preload 36 if (stat("/etc/ld.so.preload", &s) != 0) {
33 if (stat("/etc/ld.so.preload", &s)) { 37 fs_trace_touch_preload();
34 if (arg_debug) 38 return;
35 printf("Creating an empty /etc/ld.so.preload file\n"); 39 }
36 /* coverity[toctou] */ 40
37 FILE *fp = fopen("/etc/ld.so.preload", "w"); 41 if (s.st_size == 0)
38 if (!fp) 42 return;
39 errExit("fopen"); 43
40 SET_PERMS_STREAM(fp, 0, 0, S_IRUSR | S_IWRITE | S_IRGRP | S_IROTH); 44 // create a copy of /etc/ld.so.preload
41 fclose(fp); 45 if (copy_file("/etc/ld.so.preload", RUN_LDPRELOAD_FILE, 0, 0, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) {
42 fs_logger("touch /etc/ld.so.preload"); 46 fprintf(stderr, "Error: cannot copy /etc/ld.so.preload file\n");
47 exit(1);
43 } 48 }
44} 49}
45 50
@@ -48,7 +53,7 @@ void fs_tracefile(void) {
48 if (arg_debug) 53 if (arg_debug)
49 printf("Creating an empty trace log file: %s\n", arg_tracefile); 54 printf("Creating an empty trace log file: %s\n", arg_tracefile);
50 EUID_USER(); 55 EUID_USER();
51 int fd = open(arg_tracefile, O_CREAT|O_WRONLY|O_CLOEXEC, S_IRUSR | S_IWRITE | S_IRGRP | S_IROTH); 56 int fd = open(arg_tracefile, O_CREAT|O_WRONLY|O_CLOEXEC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
52 if (fd == -1) { 57 if (fd == -1) {
53 perror("open"); 58 perror("open");
54 fprintf(stderr, "Error: cannot open trace log file %s for writing\n", arg_tracefile); 59 fprintf(stderr, "Error: cannot open trace log file %s for writing\n", arg_tracefile);
@@ -64,20 +69,16 @@ void fs_tracefile(void) {
64 if (ftruncate(fd, 0) == -1) 69 if (ftruncate(fd, 0) == -1)
65 errExit("ftruncate"); 70 errExit("ftruncate");
66 EUID_ROOT(); 71 EUID_ROOT();
67 FILE *fp = fopen(RUN_TRACE_FILE, "w"); 72 FILE *fp = fopen(RUN_TRACE_FILE, "we");
68 if (!fp) 73 if (!fp)
69 errExit("fopen " RUN_TRACE_FILE); 74 errExit("fopen " RUN_TRACE_FILE);
70 fclose(fp); 75 fclose(fp);
71 fs_logger2("touch ", arg_tracefile); 76 fs_logger2("touch", arg_tracefile);
72 // mount using the symbolic link in /proc/self/fd 77 // mount using the symbolic link in /proc/self/fd
73 if (arg_debug) 78 if (arg_debug)
74 printf("Bind mount %s to %s\n", arg_tracefile, RUN_TRACE_FILE); 79 printf("Bind mount %s to %s\n", arg_tracefile, RUN_TRACE_FILE);
75 char *proc; 80 if (bind_mount_fd_to_path(fd, RUN_TRACE_FILE))
76 if (asprintf(&proc, "/proc/self/fd/%d", fd) == -1)
77 errExit("asprintf");
78 if (mount(proc, RUN_TRACE_FILE, NULL, MS_BIND|MS_REC, NULL) < 0)
79 errExit("mount bind " RUN_TRACE_FILE); 81 errExit("mount bind " RUN_TRACE_FILE);
80 free(proc);
81 close(fd); 82 close(fd);
82 // now that RUN_TRACE_FILE is user-writable, mount it noexec 83 // now that RUN_TRACE_FILE is user-writable, mount it noexec
83 fs_remount(RUN_TRACE_FILE, MOUNT_NOEXEC, 0); 84 fs_remount(RUN_TRACE_FILE, MOUNT_NOEXEC, 0);
@@ -88,7 +89,7 @@ void fs_trace(void) {
88 if (arg_debug) 89 if (arg_debug)
89 printf("Create the new ld.so.preload file\n"); 90 printf("Create the new ld.so.preload file\n");
90 91
91 FILE *fp = fopen(RUN_LDPRELOAD_FILE, "w"); 92 FILE *fp = fopen(RUN_LDPRELOAD_FILE, "ae");
92 if (!fp) 93 if (!fp)
93 errExit("fopen"); 94 errExit("fopen");
94 const char *prefix = RUN_FIREJAIL_LIB_DIR; 95 const char *prefix = RUN_FIREJAIL_LIB_DIR;
@@ -105,7 +106,7 @@ void fs_trace(void) {
105 fmessage("Post-exec seccomp protector enabled\n"); 106 fmessage("Post-exec seccomp protector enabled\n");
106 } 107 }
107 108
108 SET_PERMS_STREAM(fp, 0, 0, S_IRUSR | S_IWRITE | S_IRGRP | S_IROTH); 109 SET_PERMS_STREAM(fp, 0, 0, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
109 fclose(fp); 110 fclose(fp);
110 111
111 // mount the new preload file 112 // mount the new preload file
diff --git a/src/firejail/fs_var.c b/src/firejail/fs_var.c
index f07581cd8..9523875d7 100644
--- a/src/firejail/fs_var.c
+++ b/src/firejail/fs_var.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -20,7 +20,6 @@
20#include "firejail.h" 20#include "firejail.h"
21#include <sys/mount.h> 21#include <sys/mount.h>
22#include <sys/stat.h> 22#include <sys/stat.h>
23#include <linux/limits.h>
24#include <glob.h> 23#include <glob.h>
25#include <dirent.h> 24#include <dirent.h>
26#include <fcntl.h> 25#include <fcntl.h>
@@ -127,17 +126,17 @@ void fs_var_log(void) {
127 126
128 // create an empty /var/log/wtmp file 127 // create an empty /var/log/wtmp file
129 /* coverity[toctou] */ 128 /* coverity[toctou] */
130 FILE *fp = fopen("/var/log/wtmp", "w"); 129 FILE *fp = fopen("/var/log/wtmp", "wxe");
131 if (fp) { 130 if (fp) {
132 SET_PERMS_STREAM(fp, 0, wtmp_group, S_IRUSR | S_IWRITE | S_IRGRP | S_IWGRP | S_IROTH); 131 SET_PERMS_STREAM(fp, 0, wtmp_group, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
133 fclose(fp); 132 fclose(fp);
134 } 133 }
135 fs_logger("touch /var/log/wtmp"); 134 fs_logger("touch /var/log/wtmp");
136 135
137 // create an empty /var/log/btmp file 136 // create an empty /var/log/btmp file
138 fp = fopen("/var/log/btmp", "w"); 137 fp = fopen("/var/log/btmp", "wxe");
139 if (fp) { 138 if (fp) {
140 SET_PERMS_STREAM(fp, 0, wtmp_group, S_IRUSR | S_IWRITE | S_IRGRP | S_IWGRP); 139 SET_PERMS_STREAM(fp, 0, wtmp_group, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
141 fclose(fp); 140 fclose(fp);
142 } 141 }
143 fs_logger("touch /var/log/btmp"); 142 fs_logger("touch /var/log/btmp");
@@ -158,8 +157,7 @@ void fs_var_lib(void) {
158 fs_logger("tmpfs /var/lib/dhcp"); 157 fs_logger("tmpfs /var/lib/dhcp");
159 158
160 // isc dhcp server requires a /var/lib/dhcp/dhcpd.leases file 159 // isc dhcp server requires a /var/lib/dhcp/dhcpd.leases file
161 FILE *fp = fopen("/var/lib/dhcp/dhcpd.leases", "w"); 160 FILE *fp = fopen("/var/lib/dhcp/dhcpd.leases", "wxe");
162
163 if (fp) { 161 if (fp) {
164 fprintf(fp, "\n"); 162 fprintf(fp, "\n");
165 SET_PERMS_STREAM(fp, 0, 0, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); 163 SET_PERMS_STREAM(fp, 0, 0, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
@@ -287,7 +285,7 @@ void fs_var_utmp(void) {
287 if (stat(UTMP_FILE, &s) == 0) 285 if (stat(UTMP_FILE, &s) == 0)
288 utmp_group = s.st_gid; 286 utmp_group = s.st_gid;
289 else { 287 else {
290 fwarning("cannot find /var/run/utmp\n"); 288 fwarning("cannot find %s\n", UTMP_FILE);
291 return; 289 return;
292 } 290 }
293 291
@@ -296,7 +294,7 @@ void fs_var_utmp(void) {
296 printf("Create the new utmp file\n"); 294 printf("Create the new utmp file\n");
297 295
298 /* coverity[toctou] */ 296 /* coverity[toctou] */
299 FILE *fp = fopen(RUN_UTMP_FILE, "w"); 297 FILE *fp = fopen(RUN_UTMP_FILE, "we");
300 if (!fp) 298 if (!fp)
301 errExit("fopen"); 299 errExit("fopen");
302 300
@@ -315,7 +313,7 @@ void fs_var_utmp(void) {
315 // save new utmp file 313 // save new utmp file
316 int rv = fwrite(&u_boot, sizeof(u_boot), 1, fp); 314 int rv = fwrite(&u_boot, sizeof(u_boot), 1, fp);
317 (void) rv; 315 (void) rv;
318 SET_PERMS_STREAM(fp, 0, utmp_group, S_IRUSR | S_IWRITE | S_IRGRP | S_IWGRP | S_IROTH); 316 SET_PERMS_STREAM(fp, 0, utmp_group, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
319 fclose(fp); 317 fclose(fp);
320 318
321 // mount the new utmp file 319 // mount the new utmp file
@@ -323,5 +321,9 @@ void fs_var_utmp(void) {
323 printf("Mount the new utmp file\n"); 321 printf("Mount the new utmp file\n");
324 if (mount(RUN_UTMP_FILE, UTMP_FILE, NULL, MS_BIND|MS_NOSUID|MS_NOEXEC | MS_NODEV | MS_REC, NULL) < 0) 322 if (mount(RUN_UTMP_FILE, UTMP_FILE, NULL, MS_BIND|MS_NOSUID|MS_NOEXEC | MS_NODEV | MS_REC, NULL) < 0)
325 errExit("mount bind utmp"); 323 errExit("mount bind utmp");
326 fs_logger("create /var/run/utmp"); 324 fs_logger2("create", UTMP_FILE);
325
326 // blacklist RUN_UTMP_FILE
327 if (mount(RUN_RO_FILE, RUN_UTMP_FILE, NULL, MS_BIND, "mode=400,gid=0") < 0)
328 errExit("mount bind");
327} 329}
diff --git a/src/firejail/fs_whitelist.c b/src/firejail/fs_whitelist.c
index 698d47b69..3377b2592 100644
--- a/src/firejail/fs_whitelist.c
+++ b/src/firejail/fs_whitelist.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -16,63 +16,70 @@
16 * You should have received a copy of the GNU General Public License along 16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc., 17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19 */
20#include "firejail.h" 20#include "firejail.h"
21#include <sys/mount.h> 21#include <sys/mount.h>
22#include <sys/stat.h> 22#include <sys/stat.h>
23#include <linux/limits.h>
24#include <fnmatch.h> 23#include <fnmatch.h>
25#include <glob.h> 24#include <glob.h>
26#include <dirent.h>
27#include <errno.h> 25#include <errno.h>
28 26
29#include <fcntl.h> 27#include <fcntl.h>
30#ifndef O_PATH 28#ifndef O_PATH
31# define O_PATH 010000000 29#define O_PATH 010000000
32#endif 30#endif
33 31
32#define TOP_MAX 64 // maximum number of top level directories
33
34// mountinfo functionality test; 34// mountinfo functionality test;
35// 1. enable TEST_MOUNTINFO definition 35// 1. enable TEST_MOUNTINFO definition
36// 2. run firejail --whitelist=/any/directory 36// 2. run firejail --whitelist=/any/directory
37//#define TEST_MOUNTINFO 37//#define TEST_MOUNTINFO
38 38
39#define EMPTY_STRING ("") 39static size_t homedir_len = 0; // cache length of homedir string
40static size_t homedir_len; // cache length of homedir string 40static size_t runuser_len = 0; // cache length of runuser string
41static size_t runuser_len; // cache length of runuser string 41static char *runuser = NULL;
42static char *runuser;
43 42
44 43
45static int mkpath(const char* path, mode_t mode) {
46 assert(path && *path);
47 mode |= 0111;
48 44
49 // create directories with uid/gid as root, or as current user if inside home or run/user/$uid directory 45static void whitelist_error(const char *path) {
50 int userprivs = 0; 46 assert(path);
51 if ((strncmp(path, cfg.homedir, homedir_len) == 0 && path[homedir_len] == '/') || 47
52 (strncmp(path, runuser, runuser_len) == 0 && path[runuser_len] == '/')) { 48 fprintf(stderr, "Error: invalid whitelist path %s\n", path);
53 EUID_USER(); 49 exit(1);
54 userprivs = 1; 50}
51
52static int whitelist_mkpath(const char *parentdir, const char *relpath, mode_t mode) {
53 // starting from top level directory
54 int parentfd = safer_openat(-1, parentdir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
55 if (parentfd < 0)
56 errExit("open");
57
58 // top level directory mount id
59 int mountid = get_mount_id(parentfd);
60 if (mountid < 0) {
61 close(parentfd);
62 return -1;
55 } 63 }
56 64
57 // work on a copy of the path 65 // work on a copy of the path
58 char *dup = strdup(path); 66 char *dup = strdup(relpath);
59 if (!dup) 67 if (!dup)
60 errExit("strdup"); 68 errExit("strdup");
61 69
62 // don't create the last path element 70 // only create leading directories, don't create the file
63 char *p = strrchr(dup, '/'); 71 char *p = strrchr(dup, '/');
64 assert(p); 72 if (!p) { // nothing to do
73 free(dup);
74 return parentfd;
75 }
65 *p = '\0'; 76 *p = '\0';
66 77
67 int parentfd = open("/", O_PATH|O_DIRECTORY|O_CLOEXEC);
68 if (parentfd == -1)
69 errExit("open");
70
71 // traverse the path, return -1 if a symlink is encountered 78 // traverse the path, return -1 if a symlink is encountered
72 int done = 0;
73 int fd = -1; 79 int fd = -1;
80 int done = 0;
74 char *tok = strtok(dup, "/"); 81 char *tok = strtok(dup, "/");
75 assert(tok); // path is no top level directory 82 assert(tok);
76 while (tok) { 83 while (tok) {
77 // create the directory if necessary 84 // create the directory if necessary
78 if (mkdirat(parentfd, tok, mode) == -1) { 85 if (mkdirat(parentfd, tok, mode) == -1) {
@@ -81,9 +88,6 @@ static int mkpath(const char* path, mode_t mode) {
81 perror("mkdir"); 88 perror("mkdir");
82 close(parentfd); 89 close(parentfd);
83 free(dup); 90 free(dup);
84 if (userprivs) {
85 EUID_ROOT();
86 }
87 return -1; 91 return -1;
88 } 92 }
89 } 93 }
@@ -96,9 +100,15 @@ static int mkpath(const char* path, mode_t mode) {
96 perror("open"); 100 perror("open");
97 close(parentfd); 101 close(parentfd);
98 free(dup); 102 free(dup);
99 if (userprivs) { 103 return -1;
100 EUID_ROOT(); 104 }
101 } 105 // different mount id indicates earlier whitelist mount
106 if (get_mount_id(fd) != mountid) {
107 if (arg_debug || arg_debug_whitelists)
108 printf("Debug %d: whitelisted already\n", __LINE__);
109 close(parentfd);
110 close(fd);
111 free(dup);
102 return -1; 112 return -1;
103 } 113 }
104 // move on to next path segment 114 // move on to next path segment
@@ -107,199 +117,110 @@ static int mkpath(const char* path, mode_t mode) {
107 tok = strtok(NULL, "/"); 117 tok = strtok(NULL, "/");
108 } 118 }
109 119
110 if (done) 120 if (done) {
111 fs_logger2("mkpath", path); 121 char *abspath;
122 if (asprintf(&abspath, "%s/%s", parentdir, relpath) < 0)
123 errExit("asprintf");
124 fs_logger2("mkpath", abspath);
125 free(abspath);
126 }
112 127
113 free(dup); 128 free(dup);
114 if (userprivs) {
115 EUID_ROOT();
116 }
117 return fd; 129 return fd;
118} 130}
119 131
120static void whitelist_path(ProfileEntry *entry) { 132static void whitelist_file(const TopDir * const top, const char *path) {
121 assert(entry); 133 EUID_ASSERT();
122 const char *path = entry->data + 10; 134 assert(top && path);
123 const char *fname;
124 char *wfile = NULL;
125
126 if (entry->wldir == WLDIR_HOME) {
127 if (strncmp(path, cfg.homedir, homedir_len) != 0 || path[homedir_len] != '/')
128 // either symlink pointing outside home directory
129 // or entire home directory, skip the mount
130 return;
131
132 fname = path + homedir_len + 1; // strlen("/home/user/")
133
134 if (asprintf(&wfile, "%s/%s", RUN_WHITELIST_HOME_USER_DIR, fname) == -1)
135 errExit("asprintf");
136 }
137 else if (entry->wldir == WLDIR_TMP) {
138 fname = path + 5; // strlen("/tmp/")
139
140 if (asprintf(&wfile, "%s/%s", RUN_WHITELIST_TMP_DIR, fname) == -1)
141 errExit("asprintf");
142 }
143 else if (entry->wldir == WLDIR_MEDIA) {
144 fname = path + 7; // strlen("/media/")
145 135
146 if (asprintf(&wfile, "%s/%s", RUN_WHITELIST_MEDIA_DIR, fname) == -1) 136 // check if path is inside top level directory
147 errExit("asprintf"); 137 size_t top_pathlen = strlen(top->path);
148 } 138 if (strncmp(top->path, path, top_pathlen) != 0 || path[top_pathlen] != '/')
149 else if (entry->wldir == WLDIR_MNT) { 139 return;
150 fname = path + 5; // strlen("/mnt/") 140 const char *relpath = path + top_pathlen + 1;
151 141
152 if (asprintf(&wfile, "%s/%s", RUN_WHITELIST_MNT_DIR, fname) == -1) 142 // open mount source, using a file descriptor that refers to the
153 errExit("asprintf"); 143 // top level directory
154 } 144 // as the top level directory was opened before mounting the tmpfs
155 else if (entry->wldir == WLDIR_VAR) { 145 // we still have full access to all directory contents
156 if (strncmp(path, "/var/", 5) != 0) 146 // take care to not follow symbolic links (top->fd was obtained without
157 // symlink pointing outside /var, skip the mount 147 // following a link, too)
158 return; 148 int fd = safer_openat(top->fd, relpath, O_PATH|O_NOFOLLOW|O_CLOEXEC);
159
160 fname = path + 5; // strlen("/var/")
161
162 if (asprintf(&wfile, "%s/%s", RUN_WHITELIST_VAR_DIR, fname) == -1)
163 errExit("asprintf");
164 }
165 else if (entry->wldir == WLDIR_DEV) {
166 if (strncmp(path, "/dev/", 5) != 0)
167 // symlink pointing outside /dev, skip the mount
168 return;
169
170 fname = path + 5; // strlen("/dev/")
171
172 if (asprintf(&wfile, "%s/%s", RUN_WHITELIST_DEV_DIR, fname) == -1)
173 errExit("asprintf");
174 }
175 else if (entry->wldir == WLDIR_OPT) {
176 fname = path + 5; // strlen("/opt/")
177
178 if (asprintf(&wfile, "%s/%s", RUN_WHITELIST_OPT_DIR, fname) == -1)
179 errExit("asprintf");
180 }
181 else if (entry->wldir == WLDIR_SRV) {
182 fname = path + 5; // strlen("/srv/")
183
184 if (asprintf(&wfile, "%s/%s", RUN_WHITELIST_SRV_DIR, fname) == -1)
185 errExit("asprintf");
186 }
187 else if (entry->wldir == WLDIR_ETC) {
188 if (strncmp(path, "/etc/", 5) != 0)
189 // symlink pointing outside /etc, skip the mount
190 return;
191
192 fname = path + 5; // strlen("/etc/")
193
194 if (asprintf(&wfile, "%s/%s", RUN_WHITELIST_ETC_DIR, fname) == -1)
195 errExit("asprintf");
196 }
197 else if (entry->wldir == WLDIR_SHARE) {
198 fname = path + 11; // strlen("/usr/share/")
199
200 if (asprintf(&wfile, "%s/%s", RUN_WHITELIST_SHARE_DIR, fname) == -1)
201 errExit("asprintf");
202 }
203 else if (entry->wldir == WLDIR_MODULE) {
204 fname = path + 12; // strlen("/sys/module/")
205
206 if (asprintf(&wfile, "%s/%s", RUN_WHITELIST_MODULE_DIR, fname) == -1)
207 errExit("asprintf");
208 }
209 else if (entry->wldir == WLDIR_RUN) {
210 fname = path + runuser_len + 1; // strlen("/run/user/$uid/")
211
212 if (asprintf(&wfile, "%s/%s", RUN_WHITELIST_RUN_USER_DIR, fname) == -1)
213 errExit("asprintf");
214 }
215 assert(wfile);
216
217 if (arg_debug || arg_debug_whitelists)
218 printf("Whitelisting %s\n", path);
219
220 // confirm again the mount source exists and there is no symlink
221 struct stat wfilestat;
222 EUID_USER();
223 int fd = safe_fd(wfile, O_PATH|O_NOFOLLOW|O_CLOEXEC);
224 EUID_ROOT();
225 if (fd == -1) { 149 if (fd == -1) {
226 if (arg_debug || arg_debug_whitelists) 150 if (arg_debug || arg_debug_whitelists)
227 printf("Debug %d: skip whitelisting of %s\n", __LINE__, path); 151 printf("Debug %d: skip whitelist %s\n", __LINE__, path);
228 free(wfile);
229 return; 152 return;
230 } 153 }
231 if (fstat(fd, &wfilestat) == -1) 154 struct stat s;
155 if (fstat(fd, &s) == -1)
232 errExit("fstat"); 156 errExit("fstat");
233 close(fd); 157 if (S_ISLNK(s.st_mode)) {
234 if (S_ISLNK(wfilestat.st_mode)) {
235 if (arg_debug || arg_debug_whitelists) 158 if (arg_debug || arg_debug_whitelists)
236 printf("Debug %d: skip whitelisting of %s\n", __LINE__, path); 159 printf("Debug %d: skip whitelist %s\n", __LINE__, path);
237 free(wfile); 160 close(fd);
238 return; 161 return;
239 } 162 }
240 163
241 // create path of the mount target if necessary 164 // now modify the tmpfs:
242 int fd2 = mkpath(path, 0755); 165 // create mount target as root, except if inside home or run/user/$UID directory
166 if (strcmp(top->path, cfg.homedir) != 0 &&
167 strcmp(top->path, runuser) != 0)
168 EUID_ROOT();
169
170 // create path of the mount target
171 int fd2 = whitelist_mkpath(top->path, relpath, 0755);
243 if (fd2 == -1) { 172 if (fd2 == -1) {
244 // something went wrong during path creation or a symlink was found;
245 // if there is a symlink somewhere in the path of the mount target,
246 // assume the file is whitelisted already
247 if (arg_debug || arg_debug_whitelists) 173 if (arg_debug || arg_debug_whitelists)
248 printf("Debug %d: skip whitelisting of %s\n", __LINE__, path); 174 printf("Debug %d: skip whitelist %s\n", __LINE__, path);
249 free(wfile); 175 close(fd);
176 EUID_USER();
250 return; 177 return;
251 } 178 }
252 179
253 // get file name of the mount target 180 // get file name of the mount target
254 const char *file = gnu_basename(path); 181 const char *file = gnu_basename(relpath);
255 182
256 // create the mount target if necessary and open it, a symlink is rejected 183 // create mount target itself if necessary
184 // and open it, a symlink is not allowed
257 int fd3 = -1; 185 int fd3 = -1;
258 if (S_ISDIR(wfilestat.st_mode)) { 186 if (S_ISDIR(s.st_mode)) {
259 // directory foo can exist already: 187 // directory bar can exist already:
260 // firejail --whitelist=/foo/bar --whitelist=/foo 188 // firejail --whitelist=/foo/bar/baz --whitelist=/foo/bar
261 if (mkdirat(fd2, file, 0755) == -1 && errno != EEXIST) { 189 if (mkdirat(fd2, file, 0755) == -1 && errno != EEXIST) {
262 if (arg_debug || arg_debug_whitelists) { 190 if (arg_debug || arg_debug_whitelists) {
263 perror("mkdir"); 191 perror("mkdir");
264 printf("Debug %d: skip whitelisting of %s\n", __LINE__, path); 192 printf("Debug %d: skip whitelist %s\n", __LINE__, path);
265 } 193 }
194 close(fd);
266 close(fd2); 195 close(fd2);
267 free(wfile); 196 EUID_USER();
268 return; 197 return;
269 } 198 }
270 fd3 = openat(fd2, file, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC); 199 fd3 = openat(fd2, file, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
271 } 200 }
272 else { 201 else
273 // create an empty file, fails with EEXIST if it is whitelisted already: 202 // create an empty file
274 // firejail --whitelist=/foo --whitelist=/foo/bar 203 // fails with EEXIST if it is whitelisted already
275 fd3 = openat(fd2, file, O_RDONLY|O_CREAT|O_EXCL|O_CLOEXEC, S_IRUSR|S_IWUSR); 204 fd3 = openat(fd2, file, O_RDONLY|O_CREAT|O_EXCL|O_CLOEXEC, S_IRUSR|S_IWUSR);
276 }
277 205
278 if (fd3 == -1) { 206 if (fd3 == -1) {
279 if (arg_debug || arg_debug_whitelists) { 207 if (errno != EEXIST && (arg_debug || arg_debug_whitelists)) {
280 if (errno != EEXIST) { 208 perror("open");
281 perror("open"); 209 printf("Debug %d: skip whitelist %s\n", __LINE__, path);
282 printf("Debug %d: skip whitelisting of %s\n", __LINE__, path);
283 }
284 } 210 }
211 close(fd);
285 close(fd2); 212 close(fd2);
286 free(wfile); 213 EUID_USER();
287 return; 214 return;
288 } 215 }
289 close(fd2); 216 close(fd2);
290 217
291 fs_logger2("whitelist", path); 218 if (arg_debug || arg_debug_whitelists)
292 219 printf("Whitelisting %s\n", path);
293 // in order to make this mount resilient against symlink attacks, use 220 EUID_ROOT();
294 // a magic link in /proc/self/fd instead of mounting on path directly 221 if (bind_mount_by_fd(fd, fd3))
295 char *proc;
296 if (asprintf(&proc, "/proc/self/fd/%d", fd3) == -1)
297 errExit("asprintf");
298 if (mount(wfile, proc, NULL, MS_BIND|MS_REC, NULL) < 0)
299 errExit("mount bind"); 222 errExit("mount bind");
300 free(proc); 223 EUID_USER();
301 close(fd3);
302
303 // check the last mount operation 224 // check the last mount operation
304 MountData *mptr = get_last_mount(); // will do exit(1) if the mount cannot be found 225 MountData *mptr = get_last_mount(); // will do exit(1) if the mount cannot be found
305#ifdef TEST_MOUNTINFO 226#ifdef TEST_MOUNTINFO
@@ -316,37 +237,54 @@ static void whitelist_path(ProfileEntry *entry) {
316 // - there should be more than one '/' char in dest string 237 // - there should be more than one '/' char in dest string
317 if (mptr->dir == strrchr(mptr->dir, '/')) 238 if (mptr->dir == strrchr(mptr->dir, '/'))
318 errLogExit("invalid whitelist mount"); 239 errLogExit("invalid whitelist mount");
319 // confirm the right file was mounted by comparing device and inode numbers 240 close(fd);
320 int fd4 = safe_fd(path, O_PATH|O_NOFOLLOW|O_CLOEXEC); 241 close(fd3);
321 if (fd4 == -1) 242 fs_logger2("whitelist", path);
322 errExit("safe_fd");
323 struct stat s;
324 if (fstat(fd4, &s) == -1)
325 errExit("fstat");
326 if (s.st_dev != wfilestat.st_dev || s.st_ino != wfilestat.st_ino)
327 errLogExit("invalid whitelist mount");
328 close(fd4);
329
330 free(wfile);
331 return;
332} 243}
333 244
334static void whitelist_home(int topdir) { 245static void whitelist_symlink(const TopDir * const top, const char *link, const char *target) {
335 ProfileEntry entry; 246 EUID_ASSERT();
336 memset(&entry, 0, sizeof(entry)); 247 assert(top && link && target);
337 char *cmd; 248
338 if (asprintf(&cmd, "whitelist %s", cfg.homedir) == -1) 249 // confirm link is inside top level directory
339 errExit("asprintf"); 250 // this should never fail
340 entry.data = cmd; 251 size_t top_pathlen = strlen(top->path);
341 entry.wldir = topdir; 252 assert(strncmp(top->path, link, top_pathlen) == 0 && link[top_pathlen] == '/');
342 // creates path owned by root, except homedir is inside /run/user/$uid 253
343 // does nothing if homedir does not exist 254 const char *relpath = link + top_pathlen + 1;
344 whitelist_path(&entry); 255
345 free(cmd); 256 // create link as root, except if inside home or run/user/$UID directory
346} 257 if (strcmp(top->path, cfg.homedir) != 0 &&
258 strcmp(top->path, runuser) != 0)
259 EUID_ROOT();
347 260
261 int fd = whitelist_mkpath(top->path, relpath, 0755);
262 if (fd == -1) {
263 if (arg_debug || arg_debug_whitelists)
264 printf("Debug %d: cannot create symbolic link %s\n", __LINE__, link);
265 EUID_USER();
266 return;
267 }
268
269 // get file name of symlink
270 const char *file = gnu_basename(relpath);
271
272 // create the link
273 if (symlinkat(target, fd, file) == -1) {
274 if (arg_debug || arg_debug_whitelists) {
275 perror("symlink");
276 printf("Debug %d: cannot create symbolic link %s\n", __LINE__, link);
277 }
278 }
279 else if (arg_debug || arg_debug_whitelists)
280 printf("Created symbolic link %s -> %s\n", link, target);
281
282 close(fd);
283 EUID_USER();
284}
348 285
349static void globbing(const char *pattern) { 286static void globbing(const char *pattern) {
287 EUID_ASSERT();
350 assert(pattern); 288 assert(pattern);
351 289
352 // globbing 290 // globbing
@@ -363,6 +301,11 @@ static void globbing(const char *pattern) {
363 // testing for GLOB_NOCHECK - no pattern matched returns the original pattern 301 // testing for GLOB_NOCHECK - no pattern matched returns the original pattern
364 if (strcmp(globbuf.gl_pathv[i], pattern) == 0) 302 if (strcmp(globbuf.gl_pathv[i], pattern) == 0)
365 continue; 303 continue;
304 // foo/* expands to foo/. and foo/..
305 const char *base = gnu_basename(globbuf.gl_pathv[i]);
306 if (strcmp(base, ".") == 0 ||
307 strcmp(base, "..") == 0)
308 continue;
366 309
367 // build the new profile command 310 // build the new profile command
368 char *newcmd; 311 char *newcmd;
@@ -378,8 +321,237 @@ static void globbing(const char *pattern) {
378 globfree(&globbuf); 321 globfree(&globbuf);
379} 322}
380 323
324// mount tmpfs on all top level directories
325static void tmpfs_topdirs(const TopDir * const topdirs) {
326 int tmpfs_home = 0;
327 int tmpfs_runuser = 0;
328
329 int i;
330 for (i = 0; i < TOP_MAX && topdirs[i].path; i++) {
331 // do nested top level directories last
332 // this way '--whitelist=nested_top_level_dir'
333 // yields the full, unmodified directory
334 // instead of the tmpfs
335 if (strcmp(topdirs[i].path, cfg.homedir) == 0) {
336 tmpfs_home = 1;
337 continue;
338 }
339 if (strcmp(topdirs[i].path, runuser) == 0) {
340 tmpfs_runuser = 1;
341 continue;
342 }
343
344 // special case /run
345 // open /run/firejail, so it can be restored right after mounting the tmpfs
346 int fd = -1;
347 if (strcmp(topdirs[i].path, "/run") == 0) {
348 fd = open(RUN_FIREJAIL_DIR, O_PATH|O_CLOEXEC);
349 if (fd == -1)
350 errExit("open");
351 }
352
353 // mount tmpfs
354 fs_tmpfs(topdirs[i].path, 0);
355 selinux_relabel_path(topdirs[i].path, topdirs[i].path);
356
357 // init tmpfs
358 if (strcmp(topdirs[i].path, "/run") == 0) {
359 // restore /run/firejail directory
360 EUID_ROOT();
361 mkdir_attr(RUN_FIREJAIL_DIR, 0755, 0, 0);
362 if (bind_mount_fd_to_path(fd, RUN_FIREJAIL_DIR))
363 errExit("mount bind");
364 EUID_USER();
365 close(fd);
366 fs_logger2("whitelist", RUN_FIREJAIL_DIR);
367
368 // restore /run/user/$UID directory
369 whitelist_file(&topdirs[i], runuser);
370 }
371 else if (strcmp(topdirs[i].path, "/tmp") == 0) {
372 // fix pam-tmpdir (#2685)
373 const char *env = env_get("TMP");
374 if (env) {
375 // we allow TMP env set as /tmp/user/$UID and /tmp/$UID - see #4151
376 char *pamtmpdir1;
377 if (asprintf(&pamtmpdir1, "/tmp/user/%u", getuid()) == -1)
378 errExit("asprintf");
379 char *pamtmpdir2;
380 if (asprintf(&pamtmpdir2, "/tmp/%u", getuid()) == -1)
381 errExit("asprintf");
382 if (strcmp(env, pamtmpdir1) == 0) {
383 // create empty user-owned /tmp/user/$UID directory
384 EUID_ROOT();
385 mkdir_attr("/tmp/user", 0755, 0, 0);
386 selinux_relabel_path("/tmp/user", "/tmp/user");
387 fs_logger("mkdir /tmp/user");
388 mkdir_attr(pamtmpdir1, 0700, getuid(), 0);
389 selinux_relabel_path(pamtmpdir1, pamtmpdir1);
390 fs_logger2("mkdir", pamtmpdir1);
391 EUID_USER();
392 }
393 else if (strcmp(env, pamtmpdir2) == 0) {
394 // create empty user-owned /tmp/$UID directory
395 EUID_ROOT();
396 mkdir_attr(pamtmpdir2, 0700, getuid(), 0);
397 selinux_relabel_path(pamtmpdir2, pamtmpdir2);
398 fs_logger2("mkdir", pamtmpdir2);
399 EUID_USER();
400 }
401 free(pamtmpdir1);
402 free(pamtmpdir2);
403 }
404 }
405
406 // restore user home directory if it is masked by the tmpfs
407 // creates path owned by root
408 // does nothing if user home directory doesn't exist
409 whitelist_file(&topdirs[i], cfg.homedir);
410 }
411
412 // user home directory
413 if (tmpfs_home)
414 fs_private(); // checks owner if outside /home
415
416 // /run/user/$UID directory
417 if (tmpfs_runuser) {
418 fs_tmpfs(runuser, 0);
419 selinux_relabel_path(runuser, runuser);
420 }
421}
422
423static int reject_topdir(const char *dir) {
424 if (!whitelist_reject_topdirs)
425 return 0;
426
427 size_t i;
428 for (i = 0; whitelist_reject_topdirs[i]; i++) {
429 if (strcmp(dir, whitelist_reject_topdirs[i]) == 0)
430 return 1;
431 }
432 return 0;
433}
434
435// keep track of whitelist top level directories by adding them to an array
436// open each directory
437static TopDir *add_topdir(const char *dir, TopDir *topdirs, const char *path) {
438 EUID_ASSERT();
439 assert(dir && path);
440
441 // /proc and /sys are not allowed
442 if (strcmp(dir, "/") == 0 ||
443 strcmp(dir, "/proc") == 0 ||
444 strcmp(dir, "/sys") == 0)
445 whitelist_error(path);
446
447 // whitelisting home directory is disabled if --private option is present
448 if (arg_private && strcmp(dir, cfg.homedir) == 0) {
449 if (arg_debug || arg_debug_whitelists)
450 printf("Debug %d: skip %s - a private home dir is configured!\n", __LINE__, path);
451 return NULL;
452 }
453
454 // do nothing if directory doesn't exist
455 struct stat s;
456 if (lstat(dir, &s) != 0) {
457 if (arg_debug || arg_debug_whitelists)
458 printf("Cannot access whitelist top level directory %s: %s\n", dir, strerror(errno));
459 return NULL;
460 }
461 // do nothing if directory is a link
462 if (!S_ISDIR(s.st_mode)) {
463 if (S_ISLNK(s.st_mode)) {
464 fwarning("skipping whitelist %s because %s is a symbolic link\n", path, dir);
465 return NULL;
466 }
467 whitelist_error(path);
468 }
469 // do nothing if directory is disabled by administrator
470 if (reject_topdir(dir)) {
471 fmessage("Whitelist top level directory %s is disabled in Firejail configuration file\n", dir);
472 return NULL;
473 }
474
475 // add directory to array
476 if (arg_debug || arg_debug_whitelists)
477 printf("Adding whitelist top level directory %s\n", dir);
478 static int cnt = 0;
479 if (cnt >= TOP_MAX) {
480 fprintf(stderr, "Error: too many whitelist top level directories\n");
481 exit(1);
482 }
483 TopDir *rv = topdirs + cnt;
484 cnt++;
485
486 rv->path = strdup(dir);
487 if (!rv->path)
488 errExit("strdup");
489
490 // open the directory, don't follow symbolic links
491 rv->fd = safer_openat(-1, dir, O_PATH|O_NOFOLLOW|O_DIRECTORY|O_CLOEXEC);
492 if (rv->fd == -1) {
493 fprintf(stderr, "Error: cannot open %s\n", dir);
494 exit(1);
495 }
496
497 return rv;
498}
499
500static TopDir *have_topdir(const char *dir, TopDir *topdirs) {
501 assert(dir);
502
503 int i;
504 for (i = 0; i < TOP_MAX; i++) {
505 TopDir *rv = topdirs + i;
506 if (!rv->path)
507 break;
508 if (strcmp(dir, rv->path) == 0)
509 return rv;
510 }
511 return NULL;
512}
513
514static char *extract_topdir(const char *path) {
515 assert(path);
516
517 char *dup = strdup(path);
518 if (!dup)
519 errExit("strdup");
520
521 // user home directory can be anywhere; disconnect user home
522 // whitelisting from top level directory whitelisting
523 // by treating user home as separate whitelist top level directory
524 if (strncmp(dup, cfg.homedir, homedir_len) == 0 && dup[homedir_len] == '/')
525 dup[homedir_len] = '\0';
526 // /run/user/$UID is treated as top level directory
527 else if (strncmp(dup, runuser, runuser_len) == 0 && dup[runuser_len] == '/')
528 dup[runuser_len] = '\0';
529 // whitelisting in /sys is not allowed, but /sys/module is an exception
530 // and is treated as top level directory here
531 else if (strncmp(dup, "/sys/module", 11) == 0 && dup[11] == '/')
532 dup[11] = '\0';
533 // treat /usr subdirectories as top level directories
534 else if (strncmp(dup, "/usr/", 5) == 0) {
535 char *p = strchr(dup+5, '/');
536 if (!p)
537 whitelist_error(path);
538 *p = '\0';
539 }
540 // all other top level directories
541 else {
542 assert(dup[0] == '/');
543 char *p = strchr(dup+1, '/');
544 if (!p)
545 whitelist_error(path);
546 *p = '\0';
547 }
548
549 return dup;
550}
381 551
382void fs_whitelist(void) { 552void fs_whitelist(void) {
553 EUID_ASSERT();
554
383 ProfileEntry *entry = cfg.profile; 555 ProfileEntry *entry = cfg.profile;
384 if (!entry) 556 if (!entry)
385 return; 557 return;
@@ -389,29 +561,17 @@ void fs_whitelist(void) {
389 runuser_len = strlen(runuser); 561 runuser_len = strlen(runuser);
390 homedir_len = strlen(cfg.homedir); 562 homedir_len = strlen(cfg.homedir);
391 563
392 char *new_name = NULL;
393 int home_dir = 0; // /home/user directory flag
394 int tmp_dir = 0; // /tmp directory flag
395 int media_dir = 0; // /media directory flag
396 int mnt_dir = 0; // /mnt directory flag
397 int var_dir = 0; // /var directory flag
398 int dev_dir = 0; // /dev directory flag
399 int opt_dir = 0; // /opt directory flag
400 int srv_dir = 0; // /srv directory flag
401 int etc_dir = 0; // /etc directory flag
402 int share_dir = 0; // /usr/share directory flag
403 int module_dir = 0; // /sys/module directory flag
404 int run_dir = 0; // /run/user/$uid directory flag
405
406 size_t nowhitelist_c = 0; 564 size_t nowhitelist_c = 0;
407 size_t nowhitelist_m = 32; 565 size_t nowhitelist_m = 32;
408 char **nowhitelist = calloc(nowhitelist_m, sizeof(*nowhitelist)); 566 char **nowhitelist = calloc(nowhitelist_m, sizeof(*nowhitelist));
409 if (nowhitelist == NULL) 567 if (nowhitelist == NULL)
410 errExit("failed allocating memory for nowhitelist entries"); 568 errExit("calloc");
569
570 TopDir *topdirs = calloc(TOP_MAX, sizeof(*topdirs));
571 if (topdirs == NULL)
572 errExit("calloc");
411 573
412 // verify whitelist files, extract symbolic links, etc. 574 // verify whitelist files, extract symbolic links, etc.
413 EUID_USER();
414 struct stat s;
415 while (entry) { 575 while (entry) {
416 int nowhitelist_flag = 0; 576 int nowhitelist_flag = 0;
417 577
@@ -424,48 +584,76 @@ void fs_whitelist(void) {
424 entry = entry->next; 584 entry = entry->next;
425 continue; 585 continue;
426 } 586 }
427 char *dataptr = (nowhitelist_flag)? entry->data + 12: entry->data + 10; 587 if (arg_debug || arg_debug_whitelists)
428 588 printf("Debug %d: %s\n", __LINE__, entry->data);
429 // replace ~/ or ${HOME} into /home/username or resolve macro 589
430 new_name = expand_macros(dataptr); 590 const char *dataptr = (nowhitelist_flag)? entry->data + 12: entry->data + 10;
431 assert(new_name); 591
432 592 // replace ~ into /home/username or resolve macro
433 // mount empty home directory if resolving the macro was not successful 593 char *expanded = expand_macros(dataptr);
434 if (is_macro(new_name) && macro_id(new_name) > -1) { 594
435 // no warning if home does not exist (e.g. in a chroot) 595 // check if respolving the macro was successful
436 if (stat(cfg.homedir, &s) == 0 && !nowhitelist_flag && !arg_private) { 596 if (is_macro(expanded) && macro_id(expanded) > -1) {
437 home_dir = 1; 597 if (!nowhitelist_flag && (have_topdir(cfg.homedir, topdirs) || add_topdir(cfg.homedir, topdirs, expanded)) && !arg_quiet) {
438 if (!arg_quiet) { 598 fprintf(stderr, "***\n");
439 fprintf(stderr, "***\n"); 599 fprintf(stderr, "*** Warning: cannot whitelist %s directory\n", expanded);
440 fprintf(stderr, "*** Warning: cannot whitelist %s directory\n", new_name); 600 fprintf(stderr, "*** Any file saved in this directory will be lost when the sandbox is closed.\n");
441 fprintf(stderr, "*** Any file saved in this directory will be lost when the sandbox is closed.\n"); 601 fprintf(stderr, "***\n");
442 fprintf(stderr, "***\n");
443 }
444 } 602 }
445 entry->data = EMPTY_STRING;
446 entry = entry->next; 603 entry = entry->next;
447 free(new_name); 604 free(expanded);
448 continue; 605 continue;
449 } 606 }
450 607
451 // remove trailing slashes and single dots 608 if (arg_debug || arg_debug_whitelists)
452 if (!nowhitelist_flag) 609 printf("Debug %d: expanded: %s\n", __LINE__, expanded);
453 trim_trailing_slash_or_dot(new_name); 610
611 // path should be absolute at this point
612 if (expanded[0] != '/')
613 whitelist_error(expanded);
614
615 // sane pathname
616 char *new_name = clean_pathname(expanded);
617 free(expanded);
454 618
455 if (arg_debug || arg_debug_whitelists) 619 if (arg_debug || arg_debug_whitelists)
456 fprintf(stderr, "Debug %d: new_name #%s#, %s\n", __LINE__, new_name, (nowhitelist_flag)? "nowhitelist": "whitelist"); 620 printf("Debug %d: new_name: %s\n", __LINE__, new_name);
621
622 if (strstr(new_name, ".."))
623 whitelist_error(new_name);
457 624
458 // valid path referenced to filesystem root 625 TopDir *current_top = NULL;
459 if (*new_name != '/') { 626 if (!nowhitelist_flag) {
627 // extract whitelist top level directory
628 char *dir = extract_topdir(new_name);
460 if (arg_debug || arg_debug_whitelists) 629 if (arg_debug || arg_debug_whitelists)
461 fprintf(stderr, "Debug %d: \n", __LINE__); 630 printf("Debug %d: dir: %s\n", __LINE__, dir);
462 goto errexit; 631
632 // check if this top level directory has been processed already
633 current_top = have_topdir(dir, topdirs);
634 if (!current_top) { // got new top level directory
635 current_top = add_topdir(dir, topdirs, new_name);
636 if (!current_top) { // skip this command, top level directory not valid
637 entry = entry->next;
638 free(new_name);
639 free(dir);
640 continue;
641 }
642 }
643 free(dir);
644 }
645
646 // /run/firejail directory is internal and not allowed
647 if (strncmp(new_name, RUN_FIREJAIL_DIR, strlen(RUN_FIREJAIL_DIR)) == 0) {
648 entry = entry->next;
649 free(new_name);
650 continue;
463 } 651 }
464 652
465 // extract the absolute path of the file 653 // extract resolved path of the file
466 // realpath function will fail with ENOENT if the file is not found or with EACCES if user has no permission 654 // realpath function will fail with ENOENT if the file is not found or with EACCES if user has no permission
467 // special processing for /dev/fd, /dev/stdin, /dev/stdout and /dev/stderr 655 // special processing for /dev/fd, /dev/stdin, /dev/stdout and /dev/stderr
468 char *fname; 656 char *fname = NULL;
469 if (strcmp(new_name, "/dev/fd") == 0) 657 if (strcmp(new_name, "/dev/fd") == 0)
470 fname = strdup("/proc/self/fd"); 658 fname = strdup("/proc/self/fd");
471 else if (strcmp(new_name, "/dev/stdin") == 0) 659 else if (strcmp(new_name, "/dev/stdin") == 0)
@@ -477,60 +665,34 @@ void fs_whitelist(void) {
477 else 665 else
478 fname = realpath(new_name, NULL); 666 fname = realpath(new_name, NULL);
479 667
480 // if this is not a real path, let's try globbing
481 // mark this entry as EMPTY_STRING and push the new paths at the end of profile entry list
482 // the new profile entries will be processed in this loop
483 // currently there is no globbing support for nowhitelist
484 if (!fname && !nowhitelist_flag)
485 globbing(new_name);
486
487 if (!fname) { 668 if (!fname) {
488 // file not found, blank the entry in the list and continue
489 if (arg_debug || arg_debug_whitelists) { 669 if (arg_debug || arg_debug_whitelists) {
490 printf("Removed whitelist/nowhitelist path: %s\n", entry->data); 670 printf("Removed path: %s\n", entry->data);
491 printf("\texpanded: %s\n", new_name); 671 printf("\tnew_name: %s\n", new_name);
492 printf("\treal path: (null)\n"); 672 printf("\trealpath: (null)\n");
493 printf("\t");fflush(0); 673 printf("\t%s\n", strerror(errno));
494 perror("realpath");
495 } 674 }
496 675
497 // if 1 the file was not found; mount an empty directory
498 if (!nowhitelist_flag) { 676 if (!nowhitelist_flag) {
499 if (strncmp(new_name, cfg.homedir, homedir_len) == 0 && new_name[homedir_len] == '/') { 677 // if this is not a real path, let's try globbing
500 if(!arg_private) 678 // push the new paths at the end of profile entry list
501 home_dir = 1; 679 // the new profile entries will be processed in this loop
502 } 680 // currently there is no globbing support for nowhitelist
503 else if (strncmp(new_name, "/tmp/", 5) == 0) 681 globbing(new_name);
504 tmp_dir = 1;
505 else if (strncmp(new_name, "/media/", 7) == 0)
506 media_dir = 1;
507 else if (strncmp(new_name, "/mnt/", 5) == 0)
508 mnt_dir = 1;
509 else if (strncmp(new_name, "/var/", 5) == 0)
510 var_dir = 1;
511 else if (strncmp(new_name, "/dev/", 5) == 0)
512 dev_dir = 1;
513 else if (strncmp(new_name, "/opt/", 5) == 0)
514 opt_dir = 1;
515 else if (strncmp(new_name, "/srv/", 5) == 0)
516 srv_dir = 1;
517 else if (strncmp(new_name, "/etc/", 5) == 0)
518 etc_dir = 1;
519 else if (strncmp(new_name, "/usr/share/", 11) == 0)
520 share_dir = 1;
521 else if (strncmp(new_name, "/sys/module/", 12) == 0)
522 module_dir = 1;
523 else if (strncmp(new_name, runuser, runuser_len) == 0 && new_name[runuser_len] == '/')
524 run_dir = 1;
525 } 682 }
526 683
527 entry->data = EMPTY_STRING;
528 entry = entry->next; 684 entry = entry->next;
529 free(new_name); 685 free(new_name);
530 continue; 686 continue;
531 } 687 }
532 else if (arg_debug_whitelists) 688
533 printf("real path %s\n", fname); 689 // /run/firejail directory is internal and not allowed
690 if (strncmp(fname, RUN_FIREJAIL_DIR, strlen(RUN_FIREJAIL_DIR)) == 0) {
691 entry = entry->next;
692 free(new_name);
693 free(fname);
694 continue;
695 }
534 696
535 if (nowhitelist_flag) { 697 if (nowhitelist_flag) {
536 // store the path in nowhitelist array 698 // store the path in nowhitelist array
@@ -544,175 +706,12 @@ void fs_whitelist(void) {
544 errExit("failed increasing memory for nowhitelist entries"); 706 errExit("failed increasing memory for nowhitelist entries");
545 } 707 }
546 nowhitelist[nowhitelist_c++] = fname; 708 nowhitelist[nowhitelist_c++] = fname;
547 entry->data = EMPTY_STRING;
548 entry = entry->next; 709 entry = entry->next;
549 free(new_name); 710 free(new_name);
550 continue; 711 continue;
551 } 712 }
552
553 // check for supported directories
554 if (strncmp(new_name, cfg.homedir, homedir_len) == 0 && new_name[homedir_len] == '/') {
555 // whitelisting home directory is disabled if --private option is present
556 if (arg_private) {
557 if (arg_debug || arg_debug_whitelists)
558 printf("\"%s\" disabled by --private\n", entry->data);
559
560 entry->data = EMPTY_STRING;
561 entry = entry->next;
562 free(fname);
563 free(new_name);
564 continue;
565 }
566
567 entry->wldir = WLDIR_HOME;
568 home_dir = 1;
569 if (arg_debug || arg_debug_whitelists)
570 fprintf(stderr, "Debug %d: fname #%s#, cfg.homedir #%s#\n",
571 __LINE__, fname, cfg.homedir);
572
573 // both path and absolute path are in user home,
574 // if not check if the symlink destination is owned by the user
575 if (strncmp(fname, cfg.homedir, homedir_len) != 0 || fname[homedir_len] != '/') {
576 if (checkcfg(CFG_FOLLOW_SYMLINK_AS_USER)) {
577 if (stat(fname, &s) == 0 && s.st_uid != getuid()) {
578 free(fname);
579 goto errexit;
580 }
581 }
582 }
583 }
584 else if (strncmp(new_name, "/tmp/", 5) == 0) {
585 entry->wldir = WLDIR_TMP;
586 tmp_dir = 1;
587
588 // both path and absolute path are under /tmp
589 if (strncmp(fname, "/tmp/", 5) != 0) {
590 free(fname);
591 goto errexit;
592 }
593 }
594 else if (strncmp(new_name, "/media/", 7) == 0) {
595 entry->wldir = WLDIR_MEDIA;
596 media_dir = 1;
597 // both path and absolute path are under /media
598 if (strncmp(fname, "/media/", 7) != 0) {
599 free(fname);
600 goto errexit;
601 }
602 }
603 else if (strncmp(new_name, "/mnt/", 5) == 0) {
604 entry->wldir = WLDIR_MNT;
605 mnt_dir = 1;
606 // both path and absolute path are under /mnt
607 if (strncmp(fname, "/mnt/", 5) != 0) {
608 free(fname);
609 goto errexit;
610 }
611 }
612 else if (strncmp(new_name, "/var/", 5) == 0) {
613 entry->wldir = WLDIR_VAR;
614 var_dir = 1;
615 // both path and absolute path are under /var
616 // exceptions: /var/tmp, /var/run and /var/lock
617 if (strcmp(new_name, "/var/run")== 0 && strcmp(fname, "/run") == 0);
618 else if (strcmp(new_name, "/var/lock")== 0 && strcmp(fname, "/run/lock") == 0);
619 else if (strcmp(new_name, "/var/tmp")== 0 && strcmp(fname, "/tmp") == 0);
620 else {
621 // both path and absolute path are under /var
622 if (strncmp(fname, "/var/", 5) != 0) {
623 free(fname);
624 goto errexit;
625 }
626 }
627 }
628 else if (strncmp(new_name, "/dev/", 5) == 0) {
629 entry->wldir = WLDIR_DEV;
630 dev_dir = 1;
631 // special handling for /dev/shm
632 // on some platforms (Debian wheezy, Ubuntu 14.04), it is a symlink to /run/shm
633 if (strcmp(new_name, "/dev/shm") == 0 && strcmp(fname, "/run/shm") == 0);
634 // special handling for /dev/log, which can be a symlink to /run/systemd/journal/dev-log
635 else if (strcmp(new_name, "/dev/log") == 0 && strcmp(fname, "/run/systemd/journal/dev-log") == 0);
636 // special processing for /proc/self/fd files
637 else if (strcmp(new_name, "/dev/fd") == 0 && strcmp(fname, "/proc/self/fd") == 0);
638 else if (strcmp(new_name, "/dev/stdin") == 0 && strcmp(fname, "/proc/self/fd/0") == 0);
639 else if (strcmp(new_name, "/dev/stdout") == 0 && strcmp(fname, "/proc/self/fd/1") == 0);
640 else if (strcmp(new_name, "/dev/stderr") == 0 && strcmp(fname, "/proc/self/fd/2") == 0);
641 else {
642 // both path and absolute path are under /dev
643 if (strncmp(fname, "/dev/", 5) != 0) {
644 free(fname);
645 goto errexit;
646 }
647 }
648 }
649 else if (strncmp(new_name, "/opt/", 5) == 0) {
650 entry->wldir = WLDIR_OPT;
651 opt_dir = 1;
652 // both path and absolute path are under /dev
653 if (strncmp(fname, "/opt/", 5) != 0) {
654 free(fname);
655 goto errexit;
656 }
657 }
658 else if (strncmp(new_name, "/srv/", 5) == 0) {
659 entry->wldir = WLDIR_SRV;
660 srv_dir = 1;
661 // both path and absolute path are under /srv
662 if (strncmp(fname, "/srv/", 5) != 0) {
663 free(fname);
664 goto errexit;
665 }
666 }
667 else if (strncmp(new_name, "/etc/", 5) == 0) {
668 entry->wldir = WLDIR_ETC;
669 etc_dir = 1;
670 // special handling for some of the symlinks
671 if (strcmp(new_name, "/etc/localtime") == 0);
672 else if (strcmp(new_name, "/etc/mtab") == 0);
673 else if (strcmp(new_name, "/etc/os-release") == 0);
674 // both path and absolute path are under /etc
675 else {
676 if (strncmp(fname, "/etc/", 5) != 0) {
677 free(fname);
678 goto errexit;
679 }
680 }
681 }
682 else if (strncmp(new_name, "/usr/share/", 11) == 0) {
683 entry->wldir = WLDIR_SHARE;
684 share_dir = 1;
685 // both path and absolute path are under /etc
686 if (strncmp(fname, "/usr/share/", 11) != 0) {
687 free(fname);
688 goto errexit;
689 }
690 }
691 else if (strncmp(new_name, "/sys/module/", 12) == 0) {
692 entry->wldir = WLDIR_MODULE;
693 module_dir = 1;
694 // both path and absolute path are under /sys/module
695 if (strncmp(fname, "/sys/module/", 12) != 0) {
696 free(fname);
697 goto errexit;
698 }
699 }
700 else if (strncmp(new_name, runuser, runuser_len) == 0 && new_name[runuser_len] == '/') {
701 entry->wldir = WLDIR_RUN;
702 run_dir = 1;
703 // both path and absolute path are under /run/user/$uid
704 if (strncmp(fname, runuser, runuser_len) != 0 || fname[runuser_len] != '/') {
705 free(fname);
706 goto errexit;
707 }
708 }
709 else { 713 else {
710 free(fname); 714 // check if the path is in nowhitelist array
711 goto errexit;
712 }
713
714 // check if the path is in nowhitelist array
715 if (nowhitelist_flag == 0) {
716 size_t i; 715 size_t i;
717 int found = 0; 716 int found = 0;
718 for (i = 0; i < nowhitelist_c; i++) { 717 for (i = 0; i < nowhitelist_c; i++) {
@@ -726,494 +725,70 @@ void fs_whitelist(void) {
726 if (found) { 725 if (found) {
727 if (arg_debug || arg_debug_whitelists) 726 if (arg_debug || arg_debug_whitelists)
728 printf("Skip nowhitelisted path %s\n", fname); 727 printf("Skip nowhitelisted path %s\n", fname);
729 entry->data = EMPTY_STRING;
730 entry = entry->next; 728 entry = entry->next;
731 free(fname);
732 free(new_name); 729 free(new_name);
730 free(fname);
733 continue; 731 continue;
734 } 732 }
735 } 733 }
736 734
737 // mark symbolic links 735 // attach whitelist parameters to profile entry
738 if (is_link(new_name)) 736 entry->wparam = calloc(1, sizeof(struct wparam_t));
739 entry->link = new_name; 737 if (!entry->wparam)
740 else { 738 errExit("calloc");
741 free(new_name);
742 entry->link = NULL;
743 }
744
745 // change file name in entry->data
746 if (strcmp(fname, entry->data + 10) != 0) {
747 char *newdata;
748 if (asprintf(&newdata, "whitelist %s", fname) == -1)
749 errExit("asprintf");
750 entry->data = newdata;
751 if (arg_debug || arg_debug_whitelists)
752 printf("Replaced whitelist path: %s\n", entry->data);
753 }
754 free(fname);
755 entry = entry->next;
756 }
757
758 // release nowhitelist memory
759 assert(nowhitelist);
760 free(nowhitelist);
761
762 EUID_ROOT();
763 // /tmp mountpoint
764 if (tmp_dir) {
765 // check if /tmp directory exists
766 if (stat("/tmp", &s) == 0) {
767 // keep a copy of real /tmp directory in RUN_WHITELIST_TMP_DIR
768 mkdir_attr(RUN_WHITELIST_TMP_DIR, 1777, 0, 0);
769 if (mount("/tmp", RUN_WHITELIST_TMP_DIR, NULL, MS_BIND|MS_REC, NULL) < 0)
770 errExit("mount bind");
771
772 // mount tmpfs on /tmp
773 if (arg_debug || arg_debug_whitelists)
774 printf("Mounting tmpfs on /tmp directory\n");
775 if (mount("tmpfs", "/tmp", "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=1777,gid=0") < 0)
776 errExit("mounting tmpfs on /tmp");
777 selinux_relabel_path("/tmp", "/tmp");
778 fs_logger("tmpfs /tmp");
779
780 // pam-tmpdir - issue #2685
781 const char *env = env_get("TMP");
782 if (env) {
783 char *pamtmpdir;
784 if (asprintf(&pamtmpdir, "/tmp/user/%u", getuid()) == -1)
785 errExit("asprintf");
786 if (strcmp(env, pamtmpdir) == 0) {
787 // create empty user-owned /tmp/user/$uid directory
788 mkdir_attr("/tmp/user", 0711, 0, 0);
789 selinux_relabel_path("/tmp/user", "/tmp/user");
790 fs_logger("mkdir /tmp/user");
791 mkdir_attr(pamtmpdir, 0700, getuid(), 0);
792 selinux_relabel_path(pamtmpdir, pamtmpdir);
793 fs_logger2("mkdir", pamtmpdir);
794 }
795 free(pamtmpdir);
796 }
797
798 // autowhitelist home directory if it is masked by the tmpfs
799 if (strncmp(cfg.homedir, "/tmp/", 5) == 0)
800 whitelist_home(WLDIR_TMP);
801 }
802 else
803 tmp_dir = 0;
804 }
805
806 // /media mountpoint
807 if (media_dir) {
808 // some distros don't have a /media directory
809 if (stat("/media", &s) == 0) {
810 // keep a copy of real /media directory in RUN_WHITELIST_MEDIA_DIR
811 mkdir_attr(RUN_WHITELIST_MEDIA_DIR, 0755, 0, 0);
812 if (mount("/media", RUN_WHITELIST_MEDIA_DIR, NULL, MS_BIND|MS_REC, NULL) < 0)
813 errExit("mount bind");
814
815 // mount tmpfs on /media
816 if (arg_debug || arg_debug_whitelists)
817 printf("Mounting tmpfs on /media directory\n");
818 if (mount("tmpfs", "/media", "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
819 errExit("mounting tmpfs on /media");
820 selinux_relabel_path("/media", "/media");
821 fs_logger("tmpfs /media");
822
823 // autowhitelist home directory if it is masked by the tmpfs
824 if (strncmp(cfg.homedir, "/media/", 7) == 0)
825 whitelist_home(WLDIR_MEDIA);
826 }
827 else
828 media_dir = 0;
829 }
830
831 // /mnt mountpoint
832 if (mnt_dir) {
833 // check if /mnt directory exists
834 if (stat("/mnt", &s) == 0) {
835 // keep a copy of real /mnt directory in RUN_WHITELIST_MNT_DIR
836 mkdir_attr(RUN_WHITELIST_MNT_DIR, 0755, 0, 0);
837 if (mount("/mnt", RUN_WHITELIST_MNT_DIR, NULL, MS_BIND|MS_REC, NULL) < 0)
838 errExit("mount bind");
839
840 // mount tmpfs on /mnt
841 if (arg_debug || arg_debug_whitelists)
842 printf("Mounting tmpfs on /mnt directory\n");
843 if (mount("tmpfs", "/mnt", "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
844 errExit("mounting tmpfs on /mnt");
845 selinux_relabel_path("/mnt", "/mnt");
846 fs_logger("tmpfs /mnt");
847
848 // autowhitelist home directory if it is masked by the tmpfs
849 if (strncmp(cfg.homedir, "/mnt/", 5) == 0)
850 whitelist_home(WLDIR_MNT);
851 }
852 else
853 mnt_dir = 0;
854 }
855
856 // /var mountpoint
857 if (var_dir) {
858 // check if /var directory exists
859 if (stat("/var", &s) == 0) {
860 // keep a copy of real /var directory in RUN_WHITELIST_VAR_DIR
861 mkdir_attr(RUN_WHITELIST_VAR_DIR, 0755, 0, 0);
862 if (mount("/var", RUN_WHITELIST_VAR_DIR, NULL, MS_BIND|MS_REC, NULL) < 0)
863 errExit("mount bind");
864 739
865 // mount tmpfs on /var 740 assert(current_top);
866 if (arg_debug || arg_debug_whitelists) 741 entry->wparam->top = current_top;
867 printf("Mounting tmpfs on /var directory\n"); 742 entry->wparam->file = fname;
868 if (mount("tmpfs", "/var", "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
869 errExit("mounting tmpfs on /var");
870 selinux_relabel_path("/var", "/var");
871 fs_logger("tmpfs /var");
872
873 // autowhitelist home directory if it is masked by the tmpfs
874 if (strncmp(cfg.homedir, "/var/", 5) == 0)
875 whitelist_home(WLDIR_VAR);
876 }
877 else
878 var_dir = 0;
879 }
880
881 // /dev mountpoint
882 if (dev_dir) {
883 // check if /dev directory exists
884 if (stat("/dev", &s) == 0) {
885 // keep a copy of real /dev directory in RUN_WHITELIST_DEV_DIR
886 mkdir_attr(RUN_WHITELIST_DEV_DIR, 0755, 0, 0);
887 if (mount("/dev", RUN_WHITELIST_DEV_DIR, NULL, MS_BIND|MS_REC, "mode=755,gid=0") < 0)
888 errExit("mount bind");
889
890 // mount tmpfs on /dev
891 if (arg_debug || arg_debug_whitelists)
892 printf("Mounting tmpfs on /dev directory\n");
893 if (mount("tmpfs", "/dev", "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
894 errExit("mounting tmpfs on /dev");
895 selinux_relabel_path("/dev", "/dev");
896 fs_logger("tmpfs /dev");
897
898 // autowhitelist home directory if it is masked by the tmpfs
899 if (strncmp(cfg.homedir, "/dev/", 5) == 0)
900 whitelist_home(WLDIR_DEV);
901 }
902 else
903 dev_dir = 0;
904 }
905
906 // /opt mountpoint
907 if (opt_dir) {
908 // check if /opt directory exists
909 if (stat("/opt", &s) == 0) {
910 // keep a copy of real /opt directory in RUN_WHITELIST_OPT_DIR
911 mkdir_attr(RUN_WHITELIST_OPT_DIR, 0755, 0, 0);
912 if (mount("/opt", RUN_WHITELIST_OPT_DIR, NULL, MS_BIND|MS_REC, NULL) < 0)
913 errExit("mount bind");
914
915 // mount tmpfs on /opt
916 if (arg_debug || arg_debug_whitelists)
917 printf("Mounting tmpfs on /opt directory\n");
918 if (mount("tmpfs", "/opt", "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
919 errExit("mounting tmpfs on /opt");
920 selinux_relabel_path("/opt", "/opt");
921 fs_logger("tmpfs /opt");
922
923 // autowhitelist home directory if it is masked by the tmpfs
924 if (strncmp(cfg.homedir, "/opt/", 5) == 0)
925 whitelist_home(WLDIR_OPT);
926 }
927 else
928 opt_dir = 0;
929 }
930
931 // /srv mountpoint
932 if (srv_dir) {
933 // check if /srv directory exists
934 if (stat("/srv", &s) == 0) {
935 // keep a copy of real /srv directory in RUN_WHITELIST_SRV_DIR
936 mkdir_attr(RUN_WHITELIST_SRV_DIR, 0755, 0, 0);
937 if (mount("/srv", RUN_WHITELIST_SRV_DIR, NULL, MS_BIND|MS_REC, NULL) < 0)
938 errExit("mount bind");
939
940 // mount tmpfs on /srv
941 if (arg_debug || arg_debug_whitelists)
942 printf("Mounting tmpfs on /srv directory\n");
943 if (mount("tmpfs", "/srv", "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
944 errExit("mounting tmpfs on /srv");
945 selinux_relabel_path("/srv", "/srv");
946 fs_logger("tmpfs /srv");
947
948 // autowhitelist home directory if it is masked by the tmpfs
949 if (strncmp(cfg.homedir, "/srv/", 5) == 0)
950 whitelist_home(WLDIR_SRV);
951 }
952 else
953 srv_dir = 0;
954 }
955
956 // /etc mountpoint
957 if (etc_dir) {
958 // check if /etc directory exists
959 if (stat("/etc", &s) == 0) {
960 // keep a copy of real /etc directory in RUN_WHITELIST_ETC_DIR
961 mkdir_attr(RUN_WHITELIST_ETC_DIR, 0755, 0, 0);
962 if (mount("/etc", RUN_WHITELIST_ETC_DIR, NULL, MS_BIND|MS_REC, NULL) < 0)
963 errExit("mount bind");
964
965 // mount tmpfs on /etc
966 if (arg_debug || arg_debug_whitelists)
967 printf("Mounting tmpfs on /etc directory\n");
968 if (mount("tmpfs", "/etc", "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
969 errExit("mounting tmpfs on /etc");
970 selinux_relabel_path("/etc", "/etc");
971 fs_logger("tmpfs /etc");
972
973 // autowhitelist home directory if it is masked by the tmpfs
974 if (strncmp(cfg.homedir, "/etc/", 5) == 0)
975 whitelist_home(WLDIR_ETC);
976 }
977 else
978 etc_dir = 0;
979 }
980
981 // /usr/share mountpoint
982 if (share_dir) {
983 // check if /usr/share directory exists
984 if (stat("/usr/share", &s) == 0) {
985 // keep a copy of real /usr/share directory in RUN_WHITELIST_ETC_DIR
986 mkdir_attr(RUN_WHITELIST_SHARE_DIR, 0755, 0, 0);
987 if (mount("/usr/share", RUN_WHITELIST_SHARE_DIR, NULL, MS_BIND|MS_REC, NULL) < 0)
988 errExit("mount bind");
989
990 // mount tmpfs on /srv
991 if (arg_debug || arg_debug_whitelists)
992 printf("Mounting tmpfs on /usr/share directory\n");
993 if (mount("tmpfs", "/usr/share", "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
994 errExit("mounting tmpfs on /usr/share");
995 selinux_relabel_path("/usr/share", "/usr/share");
996 fs_logger("tmpfs /usr/share");
997
998 // autowhitelist home directory if it is masked by the tmpfs
999 if (strncmp(cfg.homedir, "/usr/share/", 11) == 0)
1000 whitelist_home(WLDIR_SHARE);
1001 }
1002 else
1003 share_dir = 0;
1004 }
1005
1006 // /sys/module mountpoint
1007 if (module_dir) {
1008 // check if /sys/module directory exists
1009 if (stat("/sys/module", &s) == 0) {
1010 // keep a copy of real /sys/module directory in RUN_WHITELIST_MODULE_DIR
1011 mkdir_attr(RUN_WHITELIST_MODULE_DIR, 0755, 0, 0);
1012 if (mount("/sys/module", RUN_WHITELIST_MODULE_DIR, NULL, MS_BIND|MS_REC, NULL) < 0)
1013 errExit("mount bind");
1014 743
1015 // mount tmpfs on /sys/module 744 // mark link
1016 if (arg_debug || arg_debug_whitelists) 745 if (is_link(new_name))
1017 printf("Mounting tmpfs on /sys/module directory\n"); 746 entry->wparam->link = new_name;
1018 if (mount("tmpfs", "/sys/module", "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
1019 errExit("mounting tmpfs on /sys/module");
1020 selinux_relabel_path("/sys/module", "/sys/module");
1021 fs_logger("tmpfs /sys/module");
1022 }
1023 else 747 else
1024 module_dir = 0; 748 free(new_name);
1025 }
1026
1027 // /run/user/$uid mountpoint
1028 if (run_dir) {
1029 // check if /run/user/$uid directory exists
1030 if (stat(runuser, &s) == 0) {
1031 // keep a copy of real /run/user/$uid directory in RUN_WHITELIST_RUN_USER_DIR
1032 mkdir_attr(RUN_WHITELIST_RUN_USER_DIR, 0700, getuid(), getgid());
1033 if (mount(runuser, RUN_WHITELIST_RUN_USER_DIR, NULL, MS_BIND|MS_REC, NULL) < 0)
1034 errExit("mount bind");
1035 749
1036 // mount tmpfs on /run/user/$uid 750 entry = entry->next;
1037 if (arg_debug || arg_debug_whitelists)
1038 printf("Mounting tmpfs on %s directory\n", runuser);
1039 char *options;
1040 if (asprintf(&options, "mode=700,uid=%u,gid=%u", getuid(), getgid()) == -1)
1041 errExit("asprintf");
1042 if (mount("tmpfs", runuser, "tmpfs", MS_NOSUID | MS_NODEV | MS_STRICTATIME, options) < 0)
1043 errExit("mounting tmpfs on /run/user/<uid>");
1044 selinux_relabel_path(runuser, runuser);
1045 free(options);
1046 fs_logger2("tmpfs", runuser);
1047
1048 // autowhitelist home directory if it is masked by the tmpfs
1049 if (strncmp(cfg.homedir, runuser, runuser_len) == 0 && cfg.homedir[runuser_len] == '/')
1050 whitelist_home(WLDIR_RUN);
1051 }
1052 else
1053 run_dir = 0;
1054 } 751 }
1055 752
1056 // home mountpoint 753 // mount tmpfs on all top level directories
1057 if (home_dir) { 754 tmpfs_topdirs(topdirs);
1058 // check if home directory exists
1059 if (stat(cfg.homedir, &s) == 0) {
1060 // keep a copy of real home dir in RUN_WHITELIST_HOME_USER_DIR
1061 mkdir_attr(RUN_WHITELIST_HOME_USER_DIR, 0755, getuid(), getgid());
1062 int fd = safe_fd(cfg.homedir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
1063 if (fd == -1)
1064 errExit("safe_fd");
1065 char *proc;
1066 if (asprintf(&proc, "/proc/self/fd/%d", fd) == -1)
1067 errExit("asprintf");
1068 if (mount(proc, RUN_WHITELIST_HOME_USER_DIR, NULL, MS_BIND|MS_REC, NULL) < 0)
1069 errExit("mount bind");
1070 free(proc);
1071 close(fd);
1072
1073 // mount a tmpfs and initialize home directory
1074 fs_private();
1075 }
1076 else
1077 home_dir = 0;
1078 }
1079 755
1080 // go through profile rules again, and interpret whitelist commands 756 // go through profile rules again, and interpret whitelist commands
1081 entry = cfg.profile; 757 entry = cfg.profile;
1082 while (entry) { 758 while (entry) {
1083 // handle only whitelist commands 759 if (entry->wparam) {
1084 if (strncmp(entry->data, "whitelist ", 10)) { 760 char *file = entry->wparam->file;
1085 entry = entry->next; 761 char *link = entry->wparam->link;
1086 continue; 762 const TopDir * const current_top = entry->wparam->top;
1087 } 763
1088 764 // top level directories of link and file can differ
1089//printf("here %d#%s#\n", __LINE__, entry->data); 765 // will whitelist the file only if it is in same top level directory
1090 // whitelist the real file 766 whitelist_file(current_top, file);
1091 whitelist_path(entry); 767
1092 768 // create the link if any
1093 // create the link if any 769 if (link) {
1094 if (entry->link) { 770 whitelist_symlink(current_top, link, file);
1095 // if the link is already there, do not bother 771 free(link);
1096 if (lstat(entry->link, &s) != 0) {
1097 // create the path if necessary
1098 // entry->link has no trailing slashes or single dots
1099 int fd = mkpath(entry->link, 0755);
1100 if (fd == -1) {
1101 if (arg_debug || arg_debug_whitelists)
1102 printf("Debug %d: cannot create symbolic link %s\n", __LINE__, entry->link);
1103 free(entry->link);
1104 entry->link = NULL;
1105 entry = entry->next;
1106 continue;
1107 }
1108 // get file name of symlink
1109 const char *file = gnu_basename(entry->link);
1110 // create the link
1111 int rv = symlinkat(entry->data + 10, fd, file);
1112 if (rv) {
1113 if (arg_debug || arg_debug_whitelists) {
1114 perror("symlink");
1115 printf("Debug %d: cannot create symbolic link %s\n", __LINE__, entry->link);
1116 }
1117 }
1118 else if (arg_debug || arg_debug_whitelists)
1119 printf("Created symbolic link %s -> %s\n", entry->link, entry->data + 10);
1120 close(fd);
1121 } 772 }
1122 free(entry->link); 773
1123 entry->link = NULL; 774 free(file);
775 free(entry->wparam);
776 entry->wparam = NULL;
1124 } 777 }
1125 778
1126 entry = entry->next; 779 entry = entry->next;
1127 } 780 }
1128 781
1129 // mask the real home directory, currently mounted on RUN_WHITELIST_HOME_DIR 782 // release resources
1130 if (home_dir) { 783 size_t i;
1131 if (mount("tmpfs", RUN_WHITELIST_HOME_USER_DIR, "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0) 784 for (i = 0; i < nowhitelist_c; i++)
1132 errExit("mount tmpfs"); 785 free(nowhitelist[i]);
1133 fs_logger2("tmpfs", RUN_WHITELIST_HOME_USER_DIR); 786 free(nowhitelist);
1134 }
1135
1136 // mask the real /tmp directory, currently mounted on RUN_WHITELIST_TMP_DIR
1137 if (tmp_dir) {
1138 if (mount("tmpfs", RUN_WHITELIST_TMP_DIR, "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
1139 errExit("mount tmpfs");
1140 fs_logger2("tmpfs", RUN_WHITELIST_TMP_DIR);
1141 }
1142
1143 // mask the real /var directory, currently mounted on RUN_WHITELIST_VAR_DIR
1144 if (var_dir) {
1145 if (mount("tmpfs", RUN_WHITELIST_VAR_DIR, "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
1146 errExit("mount tmpfs");
1147 fs_logger2("tmpfs", RUN_WHITELIST_VAR_DIR);
1148 }
1149
1150 // mask the real /opt directory, currently mounted on RUN_WHITELIST_OPT_DIR
1151 if (opt_dir) {
1152 if (mount("tmpfs", RUN_WHITELIST_OPT_DIR, "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
1153 errExit("mount tmpfs");
1154 fs_logger2("tmpfs", RUN_WHITELIST_OPT_DIR);
1155 }
1156
1157 // mask the real /dev directory, currently mounted on RUN_WHITELIST_DEV_DIR
1158 if (dev_dir) {
1159 if (mount("tmpfs", RUN_WHITELIST_DEV_DIR, "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
1160 errExit("mount tmpfs");
1161 fs_logger2("tmpfs", RUN_WHITELIST_DEV_DIR);
1162 }
1163
1164 // mask the real /media directory, currently mounted on RUN_WHITELIST_MEDIA_DIR
1165 if (media_dir) {
1166 if (mount("tmpfs", RUN_WHITELIST_MEDIA_DIR, "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
1167 errExit("mount tmpfs");
1168 fs_logger2("tmpfs", RUN_WHITELIST_MEDIA_DIR);
1169 }
1170
1171 // mask the real /mnt directory, currently mounted on RUN_WHITELIST_MNT_DIR
1172 if (mnt_dir) {
1173 if (mount("tmpfs", RUN_WHITELIST_MNT_DIR, "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
1174 errExit("mount tmpfs");
1175 fs_logger2("tmpfs", RUN_WHITELIST_MNT_DIR);
1176 }
1177
1178 // mask the real /srv directory, currently mounted on RUN_WHITELIST_SRV_DIR
1179 if (srv_dir) {
1180 if (mount("tmpfs", RUN_WHITELIST_SRV_DIR, "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
1181 errExit("mount tmpfs");
1182 fs_logger2("tmpfs", RUN_WHITELIST_SRV_DIR);
1183 }
1184
1185 // mask the real /etc directory, currently mounted on RUN_WHITELIST_ETC_DIR
1186 if (etc_dir) {
1187 if (mount("tmpfs", RUN_WHITELIST_ETC_DIR, "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
1188 errExit("mount tmpfs");
1189 fs_logger2("tmpfs", RUN_WHITELIST_ETC_DIR);
1190 }
1191
1192 // mask the real /usr/share directory, currently mounted on RUN_WHITELIST_SHARE_DIR
1193 if (share_dir) {
1194 if (mount("tmpfs", RUN_WHITELIST_SHARE_DIR, "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
1195 errExit("mount tmpfs");
1196 fs_logger2("tmpfs", RUN_WHITELIST_SHARE_DIR);
1197 }
1198
1199 // mask the real /sys/module directory, currently mounted on RUN_WHITELIST_MODULE_DIR
1200 if (module_dir) {
1201 if (mount("tmpfs", RUN_WHITELIST_MODULE_DIR, "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0)
1202 errExit("mount tmpfs");
1203 fs_logger2("tmpfs", RUN_WHITELIST_MODULE_DIR);
1204 }
1205 787
1206 // mask the real /run/user/$uid directory, currently mounted on RUN_WHITELIST_RUN_USER_DIR 788 for (i = 0; i < TOP_MAX && topdirs[i].path; i++) {
1207 if (run_dir) { 789 free(topdirs[i].path);
1208 if (mount("tmpfs", RUN_WHITELIST_RUN_USER_DIR, "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0) 790 close(topdirs[i].fd);
1209 errExit("mount tmpfs");
1210 fs_logger2("tmpfs", RUN_WHITELIST_RUN_USER_DIR);
1211 } 791 }
1212 792 free(topdirs);
1213 free(runuser); 793 free(runuser);
1214 return;
1215
1216errexit:
1217 fprintf(stderr, "Error: invalid whitelist path %s\n", new_name);
1218 exit(1);
1219} 794}
diff --git a/src/firejail/ids.c b/src/firejail/ids.c
new file mode 100644
index 000000000..fdb78d6e6
--- /dev/null
+++ b/src/firejail/ids.c
@@ -0,0 +1,89 @@
1/*
2 * Copyright (C) 2014-2022 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20#include "firejail.h"
21#include <sys/types.h>
22#include <sys/stat.h>
23#include <fcntl.h>
24
25
26static void ids_init(void) {
27 // store checksums as root in /var/lib/firejail/${USERNAME}.ids
28 char *fname;
29 if (asprintf(&fname, VARDIR"/%s.ids", cfg.username) == -1)
30 errExit("asprintf");
31
32 int rv = unlink(fname);
33 (void) rv;
34 int fd = open(fname, O_CREAT | O_TRUNC | O_WRONLY, 0600);
35 if (fd < 0) {
36 fprintf(stderr, "Error: cannot create %s\n", fname);
37 exit(1);
38 }
39
40 // redirect output
41 close(STDOUT_FILENO);
42 if (dup(fd) != STDOUT_FILENO)
43 errExit("dup");
44 close(fd);
45
46 sbox_run(SBOX_USER | SBOX_CAPS_NONE | SBOX_SECCOMP, 3, PATH_FIDS, "--init", cfg.homedir);
47}
48
49static void ids_check(void) {
50 // store checksums as root in /var/lib/firejail/${USERNAME}.ids
51 char *fname;
52 if (asprintf(&fname, VARDIR"/%s.ids", cfg.username) == -1)
53 errExit("asprintf");
54
55 int fd = open(fname, O_RDONLY);
56 if (fd < 0) {
57 fprintf(stderr, "Error: cannot open %s\n", fname);
58 exit(1);
59 }
60
61 // redirect input
62 close(STDIN_FILENO);
63 if (dup(fd) != STDIN_FILENO)
64 errExit("dup");
65 close(fd);
66
67 sbox_run(SBOX_USER | SBOX_CAPS_NONE | SBOX_SECCOMP| SBOX_ALLOW_STDIN, 3, PATH_FIDS, "--check", cfg.homedir);
68}
69
70void run_ids(int argc, char **argv) {
71 if (argc != 2) {
72 fprintf(stderr, "Error: only one IDS command expected\n");
73 exit(1);
74 }
75
76 EUID_ROOT();
77 struct stat s;
78 if (stat(VARDIR, &s)) // /var/lib/firejail
79 create_empty_dir_as_root(VARDIR, 0700);
80
81 if (strcmp(argv[1], "--ids-init") == 0)
82 ids_init();
83 else if (strcmp(argv[1], "--ids-check") == 0)
84 ids_check();
85 else
86 fprintf(stderr, "Error: unrecognized IDS command\n");
87
88 exit(0);
89}
diff --git a/src/firejail/join.c b/src/firejail/join.c
index 1575a7469..5d73f71be 100644
--- a/src/firejail/join.c
+++ b/src/firejail/join.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -45,7 +45,7 @@ static unsigned display = 0;
45static void signal_handler(int sig){ 45static void signal_handler(int sig){
46 flush_stdin(); 46 flush_stdin();
47 47
48 exit(sig); 48 exit(128 + sig);
49} 49}
50 50
51static void install_handler(void) { 51static void install_handler(void) {
@@ -103,7 +103,7 @@ static void extract_x11_display(pid_t pid) {
103 if (asprintf(&fname, "%s/%d", RUN_FIREJAIL_X11_DIR, pid) == -1) 103 if (asprintf(&fname, "%s/%d", RUN_FIREJAIL_X11_DIR, pid) == -1)
104 errExit("asprintf"); 104 errExit("asprintf");
105 105
106 FILE *fp = fopen(fname, "r"); 106 FILE *fp = fopen(fname, "re");
107 free(fname); 107 free(fname);
108 if (!fp) 108 if (!fp)
109 return; 109 return;
@@ -147,7 +147,7 @@ static void extract_command(int argc, char **argv, int index) {
147 } 147 }
148 148
149 // build command 149 // build command
150 build_cmdline(&cfg.command_line, &cfg.window_title, argc, argv, index); 150 build_cmdline(&cfg.command_line, &cfg.window_title, argc, argv, index, true);
151} 151}
152 152
153static void extract_nogroups(pid_t pid) { 153static void extract_nogroups(pid_t pid) {
@@ -219,7 +219,7 @@ static void extract_caps(pid_t pid) {
219 perror("asprintf"); 219 perror("asprintf");
220 exit(1); 220 exit(1);
221 } 221 }
222 FILE *fp = fopen(file, "r"); 222 FILE *fp = fopen(file, "re");
223 if (!fp) 223 if (!fp)
224 goto errexit; 224 goto errexit;
225 225
@@ -266,7 +266,7 @@ static void extract_user_namespace(pid_t pid) {
266 char *uidmap; 266 char *uidmap;
267 if (asprintf(&uidmap, "/proc/%u/uid_map", pid) == -1) 267 if (asprintf(&uidmap, "/proc/%u/uid_map", pid) == -1)
268 errExit("asprintf"); 268 errExit("asprintf");
269 FILE *fp = fopen(uidmap, "r"); 269 FILE *fp = fopen(uidmap, "re");
270 if (!fp) { 270 if (!fp) {
271 free(uidmap); 271 free(uidmap);
272 return; 272 return;
@@ -315,6 +315,11 @@ static int open_shell(void) {
315 fprintf(stderr, "Error: cannot open shell %s\n", cfg.shell); 315 fprintf(stderr, "Error: cannot open shell %s\n", cfg.shell);
316 exit(1); 316 exit(1);
317 } 317 }
318
319 // pass file descriptor through to the final fexecve
320 if (asprintf(&cfg.keep_fd, "%s,%d", cfg.keep_fd ? cfg.keep_fd : "", fd) == -1)
321 errExit("asprintf");
322
318 return fd; 323 return fd;
319} 324}
320 325
@@ -431,7 +436,7 @@ void join(pid_t pid, int argc, char **argv, int index) {
431 436
432 // set cgroup 437 // set cgroup
433 if (cfg.cgroup) // not available for uid 0 438 if (cfg.cgroup) // not available for uid 0
434 set_cgroup(cfg.cgroup); 439 set_cgroup(cfg.cgroup, getpid());
435 440
436 // join namespaces 441 // join namespaces
437 if (arg_join_network) { 442 if (arg_join_network) {
@@ -536,7 +541,6 @@ void join(pid_t pid, int argc, char **argv, int index) {
536 prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); 541 prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
537 542
538#ifdef HAVE_APPARMOR 543#ifdef HAVE_APPARMOR
539 // add apparmor confinement after the execve
540 set_apparmor(); 544 set_apparmor();
541#endif 545#endif
542 546
@@ -552,10 +556,6 @@ void join(pid_t pid, int argc, char **argv, int index) {
552 if (cfg.cpus) // not available for uid 0 556 if (cfg.cpus) // not available for uid 0
553 set_cpu_affinity(); 557 set_cpu_affinity();
554 558
555 // set nice value
556 if (arg_nice)
557 set_nice(cfg.nice);
558
559 // add x11 display 559 // add x11 display
560 if (display) { 560 if (display) {
561 char *display_str; 561 char *display_str;
@@ -596,15 +596,17 @@ void join(pid_t pid, int argc, char **argv, int index) {
596 596
597 // end of signal-safe code 597 // end of signal-safe code
598 //***************************** 598 //*****************************
599 flush_stdin();
600 599
601 if (WIFEXITED(status)) { 600 if (WIFEXITED(status)) {
601 // if we had a proper exit, return that exit status
602 status = WEXITSTATUS(status); 602 status = WEXITSTATUS(status);
603 } else if (WIFSIGNALED(status)) { 603 } else if (WIFSIGNALED(status)) {
604 status = WTERMSIG(status); 604 // distinguish fatal signals by adding 128
605 status = 128 + WTERMSIG(status);
605 } else { 606 } else {
606 status = 0; 607 status = -1;
607 } 608 }
608 609
610 flush_stdin();
609 exit(status); 611 exit(status);
610} 612}
diff --git a/src/firejail/ls.c b/src/firejail/ls.c
index 63ef2309b..4156a7b25 100644
--- a/src/firejail/ls.c
+++ b/src/firejail/ls.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -19,6 +19,7 @@
19*/ 19*/
20 20
21#include "firejail.h" 21#include "firejail.h"
22#include "../include/gcov_wrapper.h"
22#include <sys/types.h> 23#include <sys/types.h>
23#include <sys/stat.h> 24#include <sys/stat.h>
24#include <sys/wait.h> 25#include <sys/wait.h>
@@ -45,7 +46,8 @@ static void print_file_or_dir(const char *path, const char *fname) {
45 struct stat s; 46 struct stat s;
46 if (stat(name, &s) == -1) { 47 if (stat(name, &s) == -1) {
47 if (lstat(name, &s) == -1) { 48 if (lstat(name, &s) == -1) {
48 printf("Error: cannot access %s\n", name); 49 printf("Error: cannot access %s\n", do_replace_cntrl_chars(name, '?'));
50 free(name);
49 return; 51 return;
50 } 52 }
51 } 53 }
@@ -150,12 +152,17 @@ static void print_file_or_dir(const char *path, const char *fname) {
150 if (allocated) 152 if (allocated)
151 free(groupname); 153 free(groupname);
152 154
155 // file size
153 char *sz; 156 char *sz;
154 if (asprintf(&sz, "%d", (int) s.st_size) == -1) 157 if (asprintf(&sz, "%d", (int) s.st_size) == -1)
155 errExit("asprintf"); 158 errExit("asprintf");
156 printf("%11.10s %s\n", sz, fname);
157 free(sz);
158 159
160 // file name
161 char *fname_print = replace_cntrl_chars(fname, '?');
162
163 printf("%11.10s %s\n", sz, fname_print);
164 free(sz);
165 free(fname_print);
159} 166}
160 167
161static void print_directory(const char *path) { 168static void print_directory(const char *path) {
@@ -191,13 +198,15 @@ void ls(const char *path) {
191 fprintf(stderr, "Error: cannot access %s\n", path); 198 fprintf(stderr, "Error: cannot access %s\n", path);
192 exit(1); 199 exit(1);
193 } 200 }
201
202 // debug doesn't filter control characters currently
194 if (arg_debug) 203 if (arg_debug)
195 printf("ls %s\n", rp); 204 printf("ls %s\n", rp);
196 205
197 // list directory contents 206 // list directory contents
198 struct stat s; 207 struct stat s;
199 if (stat(rp, &s) == -1) { 208 if (stat(rp, &s) == -1) {
200 fprintf(stderr, "Error: cannot access %s\n", rp); 209 fprintf(stderr, "Error: cannot access %s\n", do_replace_cntrl_chars(rp, '?'));
201 exit(1); 210 exit(1);
202 } 211 }
203 if (S_ISDIR(s.st_mode)) 212 if (S_ISDIR(s.st_mode))
@@ -221,7 +230,7 @@ void cat(const char *path) {
221 230
222 if (arg_debug) 231 if (arg_debug)
223 printf("cat %s\n", path); 232 printf("cat %s\n", path);
224 FILE *fp = fopen(path, "r"); 233 FILE *fp = fopen(path, "re");
225 if (!fp) { 234 if (!fp) {
226 fprintf(stderr, "Error: cannot read %s\n", path); 235 fprintf(stderr, "Error: cannot read %s\n", path);
227 exit(1); 236 exit(1);
@@ -236,13 +245,13 @@ void cat(const char *path) {
236 fprintf(stderr, "Error: %s is not a regular file\n", path); 245 fprintf(stderr, "Error: %s is not a regular file\n", path);
237 exit(1); 246 exit(1);
238 } 247 }
239 bool tty = isatty(STDOUT_FILENO); 248 int tty = isatty(STDOUT_FILENO);
240 249
241 int c; 250 int c;
242 while ((c = fgetc(fp)) != EOF) { 251 while ((c = fgetc(fp)) != EOF) {
243 // file is untrusted 252 // file is untrusted
244 // replace control characters when printing to a terminal 253 // replace control characters when printing to a terminal
245 if (tty && c != '\t' && c != '\n' && iscntrl((unsigned char) c)) 254 if (tty && iscntrl((unsigned char) c) && c != '\t' && c != '\n')
246 c = '?'; 255 c = '?';
247 fputc(c, stdout); 256 fputc(c, stdout);
248 } 257 }
@@ -304,7 +313,7 @@ void sandboxfs(int op, pid_t pid, const char *path1, const char *path2) {
304 } 313 }
305 // create destination file if necessary 314 // create destination file if necessary
306 EUID_ASSERT(); 315 EUID_ASSERT();
307 int fd = open(dest_fname, O_WRONLY|O_CREAT|O_CLOEXEC, S_IRUSR | S_IWRITE); 316 int fd = open(dest_fname, O_WRONLY|O_CREAT|O_CLOEXEC, S_IRUSR | S_IWUSR);
308 if (fd == -1) { 317 if (fd == -1) {
309 fprintf(stderr, "Error: cannot open %s for writing\n", dest_fname); 318 fprintf(stderr, "Error: cannot open %s for writing\n", dest_fname);
310 exit(1); 319 exit(1);
@@ -324,7 +333,6 @@ void sandboxfs(int op, pid_t pid, const char *path1, const char *path2) {
324 // redirection 333 // redirection
325 if (dup2(fd, STDOUT_FILENO) == -1) 334 if (dup2(fd, STDOUT_FILENO) == -1)
326 errExit("dup2"); 335 errExit("dup2");
327 assert(fd != STDOUT_FILENO);
328 close(fd); 336 close(fd);
329 op = SANDBOX_FS_CAT; 337 op = SANDBOX_FS_CAT;
330 } 338 }
@@ -349,9 +357,8 @@ void sandboxfs(int op, pid_t pid, const char *path1, const char *path2) {
349 ls(fname1); 357 ls(fname1);
350 else 358 else
351 cat(fname1); 359 cat(fname1);
352#ifdef HAVE_GCOV 360
353 __gcov_flush(); 361 __gcov_flush();
354#endif
355 } 362 }
356 // get file from host and store it in the sandbox 363 // get file from host and store it in the sandbox
357 else if (op == SANDBOX_FS_PUT && path2) { 364 else if (op == SANDBOX_FS_PUT && path2) {
@@ -383,9 +390,9 @@ void sandboxfs(int op, pid_t pid, const char *path1, const char *path2) {
383 // copy the file 390 // copy the file
384 if (copy_file(src_fname, tmp_fname, getuid(), getgid(), 0600)) // already a regular user 391 if (copy_file(src_fname, tmp_fname, getuid(), getgid(), 0600)) // already a regular user
385 _exit(1); 392 _exit(1);
386#ifdef HAVE_GCOV 393
387 __gcov_flush(); 394 __gcov_flush();
388#endif 395
389 _exit(0); 396 _exit(0);
390 } 397 }
391 398
@@ -415,9 +422,9 @@ void sandboxfs(int op, pid_t pid, const char *path1, const char *path2) {
415 // copy the file 422 // copy the file
416 if (copy_file(tmp_fname, dest_fname, getuid(), getgid(), 0600)) // already a regular user 423 if (copy_file(tmp_fname, dest_fname, getuid(), getgid(), 0600)) // already a regular user
417 _exit(1); 424 _exit(1);
418#ifdef HAVE_GCOV 425
419 __gcov_flush(); 426 __gcov_flush();
420#endif 427
421 _exit(0); 428 _exit(0);
422 } 429 }
423 430
diff --git a/src/firejail/macros.c b/src/firejail/macros.c
index 7f2f6dbf3..3f9460041 100644
--- a/src/firejail/macros.c
+++ b/src/firejail/macros.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -22,9 +22,11 @@
22#define MAXBUF 4098 22#define MAXBUF 4098
23 23
24typedef struct macro_t { 24typedef struct macro_t {
25 char *name; // macro name 25 char *name; // macro name
26 char *xdg; // xdg line in ~/.config/user-dirs.dirs 26 char *xdg; // xdg line in ~/.config/user-dirs.dirs
27#define MAX_TRANSLATIONS 3 // several translations in case ~/.config/user-dirs.dirs not found 27 // several translations in case ~/.config/user-dirs.dirs not found
28 // covered currently: English, Russian, French, Italian, Spanish, Portuguese, German
29#define MAX_TRANSLATIONS 7
28 char *translation[MAX_TRANSLATIONS]; 30 char *translation[MAX_TRANSLATIONS];
29} Macro; 31} Macro;
30 32
@@ -32,37 +34,37 @@ Macro macro[] = {
32 { 34 {
33 "${DOWNLOADS}", 35 "${DOWNLOADS}",
34 "XDG_DOWNLOAD_DIR=\"$HOME/", 36 "XDG_DOWNLOAD_DIR=\"$HOME/",
35 { "Downloads", "Загрузки", "Téléchargement" } 37 {"Downloads", "Загрузки", "Téléchargement", "Scaricati", "Descargas"}
36 }, 38 },
37 39
38 { 40 {
39 "${MUSIC}", 41 "${MUSIC}",
40 "XDG_MUSIC_DIR=\"$HOME/", 42 "XDG_MUSIC_DIR=\"$HOME/",
41 {"Music", "Музыка", "Musique"} 43 {"Music", "Музыка", "Musique", "Musica", "Música", "Musik"}
42 }, 44 },
43 45
44 { 46 {
45 "${VIDEOS}", 47 "${VIDEOS}",
46 "XDG_VIDEOS_DIR=\"$HOME/", 48 "XDG_VIDEOS_DIR=\"$HOME/",
47 {"Videos", "Видео", "Vidéos"} 49 {"Videos", "Видео", "Vidéos", "Video", "Vídeos"}
48 }, 50 },
49 51
50 { 52 {
51 "${PICTURES}", 53 "${PICTURES}",
52 "XDG_PICTURES_DIR=\"$HOME/", 54 "XDG_PICTURES_DIR=\"$HOME/",
53 {"Pictures", "Изображения", "Photos"} 55 {"Pictures", "Изображения", "Photos", "Immagini", "Imágenes", "Imagens", "Bilder"}
54 }, 56 },
55 57
56 { 58 {
57 "${DESKTOP}", 59 "${DESKTOP}",
58 "XDG_DESKTOP_DIR=\"$HOME/", 60 "XDG_DESKTOP_DIR=\"$HOME/",
59 {"Desktop", "Рабочий стол", "Bureau"} 61 {"Desktop", "Рабочий стол", "Bureau", "Scrivania", "Escritorio", "Área de trabalho", "Schreibtisch"}
60 }, 62 },
61 63
62 { 64 {
63 "${DOCUMENTS}", 65 "${DOCUMENTS}",
64 "XDG_DOCUMENTS_DIR=\"$HOME/", 66 "XDG_DOCUMENTS_DIR=\"$HOME/",
65 {"Documents", "Документы", "Documents"} 67 {"Documents", "Документы", "Documenti", "Documentos", "Dokumente"}
66 }, 68 },
67 69
68 { 0 } 70 { 0 }
@@ -99,7 +101,7 @@ static char *resolve_xdg(const char *var) {
99 101
100 if (asprintf(&fname, "%s/.config/user-dirs.dirs", cfg.homedir) == -1) 102 if (asprintf(&fname, "%s/.config/user-dirs.dirs", cfg.homedir) == -1)
101 errExit("asprintf"); 103 errExit("asprintf");
102 FILE *fp = fopen(fname, "r"); 104 FILE *fp = fopen(fname, "re");
103 if (!fp) { 105 if (!fp) {
104 free(fname); 106 free(fname);
105 return NULL; 107 return NULL;
@@ -149,11 +151,12 @@ static char *resolve_xdg(const char *var) {
149 151
150// returns mallocated memory 152// returns mallocated memory
151static char *resolve_hardcoded(char *entries[]) { 153static char *resolve_hardcoded(char *entries[]) {
154 EUID_ASSERT();
152 char *fname; 155 char *fname;
153 struct stat s; 156 struct stat s;
154 157
155 int i = 0; 158 int i = 0;
156 while (entries[i] != NULL) { 159 while (i < MAX_TRANSLATIONS && entries[i] != NULL) {
157 if (asprintf(&fname, "%s/%s", cfg.homedir, entries[i]) == -1) 160 if (asprintf(&fname, "%s/%s", cfg.homedir, entries[i]) == -1)
158 errExit("asprintf"); 161 errExit("asprintf");
159 162
@@ -262,28 +265,6 @@ char *expand_macros(const char *path) {
262 return rv; 265 return rv;
263} 266}
264 267
265// replace control characters with a '?'
266static char *fix_control_chars(const char *fname) {
267 assert(fname);
268
269 size_t len = strlen(fname);
270 char *rv = malloc(len + 1);
271 if (!rv)
272 errExit("malloc");
273
274 size_t i = 0;
275 while (fname[i] != '\0') {
276 if (iscntrl((unsigned char) fname[i]))
277 rv[i] = '?';
278 else
279 rv[i] = fname[i];
280 i++;
281 }
282 rv[i] = '\0';
283
284 return rv;
285}
286
287void invalid_filename(const char *fname, int globbing) { 268void invalid_filename(const char *fname, int globbing) {
288// EUID_ASSERT(); 269// EUID_ASSERT();
289 assert(fname); 270 assert(fname);
@@ -301,24 +282,5 @@ void invalid_filename(const char *fname, int globbing) {
301 return; 282 return;
302 } 283 }
303 284
304 size_t i = 0; 285 reject_meta_chars(ptr, globbing);
305 while (ptr[i] != '\0') {
306 if (iscntrl((unsigned char) ptr[i])) {
307 char *new = fix_control_chars(fname);
308 fprintf(stderr, "Error: \"%s\" is an invalid filename: no control characters allowed\n", new);
309 exit(1);
310 }
311 i++;
312 }
313
314 char *reject;
315 if (globbing)
316 reject = "\\&!\"'<>%^{};,"; // file globbing ('*?[]') is allowed
317 else
318 reject = "\\&!?\"'<>%^{};,*[]";
319 char *c = strpbrk(ptr, reject);
320 if (c) {
321 fprintf(stderr, "Error: \"%s\" is an invalid filename: rejected character: \"%c\"\n", fname, *c);
322 exit(1);
323 }
324} 286}
diff --git a/src/firejail/main.c b/src/firejail/main.c
index d6de6d997..4b01ea0a5 100644
--- a/src/firejail/main.c
+++ b/src/firejail/main.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -20,6 +20,7 @@
20#include "firejail.h" 20#include "firejail.h"
21#include "../include/pid.h" 21#include "../include/pid.h"
22#include "../include/firejail_user.h" 22#include "../include/firejail_user.h"
23#include "../include/gcov_wrapper.h"
23#include "../include/syscall.h" 24#include "../include/syscall.h"
24#include "../include/seccomp.h" 25#include "../include/seccomp.h"
25#define _GNU_SOURCE 26#define _GNU_SOURCE
@@ -31,7 +32,8 @@
31#include <dirent.h> 32#include <dirent.h>
32#include <pwd.h> 33#include <pwd.h>
33#include <errno.h> 34#include <errno.h>
34//#include <limits.h> 35
36#include <limits.h>
35#include <sys/file.h> 37#include <sys/file.h>
36#include <sys/prctl.h> 38#include <sys/prctl.h>
37#include <signal.h> 39#include <signal.h>
@@ -116,15 +118,16 @@ int arg_private_cwd = 0; // private working directory
116int arg_scan = 0; // arp-scan all interfaces 118int arg_scan = 0; // arp-scan all interfaces
117int arg_whitelist = 0; // whitelist command 119int arg_whitelist = 0; // whitelist command
118int arg_nosound = 0; // disable sound 120int arg_nosound = 0; // disable sound
119int arg_noautopulse = 0; // disable automatic ~/.config/pulse init
120int arg_novideo = 0; //disable video devices in /dev 121int arg_novideo = 0; //disable video devices in /dev
121int arg_no3d; // disable 3d hardware acceleration 122int arg_no3d; // disable 3d hardware acceleration
123int arg_noprinters = 0; // disable printers
122int arg_quiet = 0; // no output for scripting 124int arg_quiet = 0; // no output for scripting
123int arg_join_network = 0; // join only the network namespace 125int arg_join_network = 0; // join only the network namespace
124int arg_join_filesystem = 0; // join only the mount namespace 126int arg_join_filesystem = 0; // join only the mount namespace
125int arg_nice = 0; // nice value configured 127int arg_nice = 0; // nice value configured
126int arg_ipc = 0; // enable ipc namespace 128int arg_ipc = 0; // enable ipc namespace
127int arg_writable_etc = 0; // writable etc 129int arg_writable_etc = 0; // writable etc
130int arg_keep_config_pulse = 0; // disable automatic ~/.config/pulse init
128int arg_writable_var = 0; // writable var 131int arg_writable_var = 0; // writable var
129int arg_keep_var_tmp = 0; // don't overwrite /var/tmp 132int arg_keep_var_tmp = 0; // don't overwrite /var/tmp
130int arg_writable_run_user = 0; // writable /run/user 133int arg_writable_run_user = 0; // writable /run/user
@@ -135,7 +138,7 @@ int arg_allow_debuggers = 0; // allow debuggers
135int arg_x11_block = 0; // block X11 138int arg_x11_block = 0; // block X11
136int arg_x11_xorg = 0; // use X11 security extension 139int arg_x11_xorg = 0; // use X11 security extension
137int arg_allusers = 0; // all user home directories visible 140int arg_allusers = 0; // all user home directories visible
138int arg_machineid = 0; // preserve /etc/machine-id 141int arg_machineid = 0; // spoof /etc/machine-id
139int arg_allow_private_blacklist = 0; // blacklist things in private directories 142int arg_allow_private_blacklist = 0; // blacklist things in private directories
140int arg_disable_mnt = 0; // disable /mnt and /media 143int arg_disable_mnt = 0; // disable /mnt and /media
141int arg_noprofile = 0; // use default.profile if none other found/specified 144int arg_noprofile = 0; // use default.profile if none other found/specified
@@ -145,11 +148,14 @@ int arg_nodvd = 0; // --nodvd
145int arg_nou2f = 0; // --nou2f 148int arg_nou2f = 0; // --nou2f
146int arg_noinput = 0; // --noinput 149int arg_noinput = 0; // --noinput
147int arg_deterministic_exit_code = 0; // always exit with first child's exit status 150int arg_deterministic_exit_code = 0; // always exit with first child's exit status
151int arg_deterministic_shutdown = 0; // shut down the sandbox if first child dies
152int arg_keep_fd_all = 0; // inherit all file descriptors to sandbox
148DbusPolicy arg_dbus_user = DBUS_POLICY_ALLOW; // --dbus-user 153DbusPolicy arg_dbus_user = DBUS_POLICY_ALLOW; // --dbus-user
149DbusPolicy arg_dbus_system = DBUS_POLICY_ALLOW; // --dbus-system 154DbusPolicy arg_dbus_system = DBUS_POLICY_ALLOW; // --dbus-system
150const char *arg_dbus_log_file = NULL; 155const char *arg_dbus_log_file = NULL;
151int arg_dbus_log_user = 0; 156int arg_dbus_log_user = 0;
152int arg_dbus_log_system = 0; 157int arg_dbus_log_system = 0;
158int arg_tab = 0;
153int login_shell = 0; 159int login_shell = 0;
154 160
155int parent_to_child_fds[2]; 161int parent_to_child_fds[2];
@@ -188,13 +194,15 @@ static void my_handler(int s) {
188 logsignal(s); 194 logsignal(s);
189 195
190 if (waitpid(child, NULL, WNOHANG) == 0) { 196 if (waitpid(child, NULL, WNOHANG) == 0) {
191 if (has_handler(child, s)) // signals are not delivered if there is no handler yet 197 // child is pid 1 of a pid namespace:
198 // signals are not delivered if there is no handler yet
199 if (has_handler(child, s))
192 kill(child, s); 200 kill(child, s);
193 else 201 else
194 kill(child, SIGKILL); 202 kill(child, SIGKILL);
195 waitpid(child, NULL, 0); 203 waitpid(child, NULL, 0);
196 } 204 }
197 myexit(s); 205 myexit(128 + s);
198} 206}
199 207
200static void install_handler(void) { 208static void install_handler(void) {
@@ -259,8 +267,8 @@ static void init_cfg(int argc, char **argv) {
259 fprintf(stderr, "Error: user %s doesn't have a user directory assigned\n", cfg.username); 267 fprintf(stderr, "Error: user %s doesn't have a user directory assigned\n", cfg.username);
260 exit(1); 268 exit(1);
261 } 269 }
270 check_homedir(pw->pw_dir);
262 cfg.homedir = clean_pathname(pw->pw_dir); 271 cfg.homedir = clean_pathname(pw->pw_dir);
263 check_homedir();
264 272
265 // initialize random number generator 273 // initialize random number generator
266 sandbox_pid = getpid(); 274 sandbox_pid = getpid();
@@ -402,6 +410,23 @@ static void run_cmd_and_exit(int i, int argc, char **argv) {
402 } 410 }
403#endif 411#endif
404#ifdef HAVE_NETWORK 412#ifdef HAVE_NETWORK
413 else if (strcmp(argv[i], "--nettrace") == 0) {
414 if (checkcfg(CFG_NETWORK)) {
415 netfilter_trace(0);
416 }
417 else
418 exit_err_feature("networking");
419 exit(0);
420 }
421 else if (strncmp(argv[i], "--nettrace=", 11) == 0) {
422 if (checkcfg(CFG_NETWORK)) {
423 pid_t pid = require_pid(argv[i] + 11);
424 netfilter_trace(pid);
425 }
426 else
427 exit_err_feature("networking");
428 exit(0);
429 }
405 else if (strncmp(argv[i], "--bandwidth=", 12) == 0) { 430 else if (strncmp(argv[i], "--bandwidth=", 12) == 0) {
406 if (checkcfg(CFG_NETWORK)) { 431 if (checkcfg(CFG_NETWORK)) {
407 logargs(argc, argv); 432 logargs(argc, argv);
@@ -535,7 +560,7 @@ static void run_cmd_and_exit(int i, int argc, char **argv) {
535 char *fname; 560 char *fname;
536 if (asprintf(&fname, RUN_FIREJAIL_PROFILE_DIR "/%d", pid) == -1) 561 if (asprintf(&fname, RUN_FIREJAIL_PROFILE_DIR "/%d", pid) == -1)
537 errExit("asprintf"); 562 errExit("asprintf");
538 FILE *fp = fopen(fname, "r"); 563 FILE *fp = fopen(fname, "re");
539 if (!fp) { 564 if (!fp) {
540 fprintf(stderr, "Error: sandbox %s not found\n", argv[i] + 16); 565 fprintf(stderr, "Error: sandbox %s not found\n", argv[i] + 16);
541 exit(1); 566 exit(1);
@@ -862,13 +887,12 @@ static void run_cmd_and_exit(int i, int argc, char **argv) {
862char *guess_shell(void) { 887char *guess_shell(void) {
863 const char *shell; 888 const char *shell;
864 char *retval; 889 char *retval;
865 struct stat s;
866 890
867 shell = env_get("SHELL"); 891 shell = env_get("SHELL");
868 if (shell) { 892 if (shell) {
869 invalid_filename(shell, 0); // no globbing 893 invalid_filename(shell, 0); // no globbing
870 if (!is_dir(shell) && strstr(shell, "..") == NULL && stat(shell, &s) == 0 && access(shell, X_OK) == 0 && 894 if (access(shell, X_OK) == 0 && !is_dir(shell) && strstr(shell, "..") == NULL &&
871 strcmp(shell, PATH_FIREJAIL) != 0) 895 strcmp(gnu_basename(shell), "firejail") != 0)
872 goto found; 896 goto found;
873 } 897 }
874 898
@@ -878,12 +902,15 @@ char *guess_shell(void) {
878 int i = 0; 902 int i = 0;
879 while (shells[i] != NULL) { 903 while (shells[i] != NULL) {
880 // access call checks as real UID/GID, not as effective UID/GID 904 // access call checks as real UID/GID, not as effective UID/GID
881 if (stat(shells[i], &s) == 0 && access(shells[i], X_OK) == 0) { 905 if (access(shells[i], X_OK) == 0) {
882 shell = shells[i]; 906 shell = shells[i];
883 break; 907 goto found;
884 } 908 }
885 i++; 909 i++;
886 } 910 }
911
912 return NULL;
913
887 found: 914 found:
888 retval = strdup(shell); 915 retval = strdup(shell);
889 if (!retval) 916 if (!retval)
@@ -929,12 +956,14 @@ static void run_builder(int argc, char **argv) {
929 if (setresuid(-1, getuid(), getuid()) != 0) 956 if (setresuid(-1, getuid(), getuid()) != 0)
930 errExit("setresuid"); 957 errExit("setresuid");
931 958
959 if (env_get("LD_PRELOAD") != NULL)
960 fprintf(stderr, "run_builder: LD_PRELOAD is: '%s'\n", env_get("LD_PRELOAD"));
932 assert(env_get("LD_PRELOAD") == NULL); 961 assert(env_get("LD_PRELOAD") == NULL);
933 assert(getenv("LD_PRELOAD") == NULL); 962 assert(getenv("LD_PRELOAD") == NULL);
934 umask(orig_umask); 963 umask(orig_umask);
935 964
936 // restore some environment variables 965 // restore original environment variables
937 env_apply_whitelist_sbox(); 966 env_apply_all();
938 967
939 argv[0] = LIBDIR "/firejail/fbuilder"; 968 argv[0] = LIBDIR "/firejail/fbuilder";
940 execvp(argv[0], argv); 969 execvp(argv[0], argv);
@@ -961,7 +990,7 @@ void filter_add_blacklist_override(int fd, int syscall, int arg, void *ptrarg, b
961static int check_postexec(const char *list) { 990static int check_postexec(const char *list) {
962 char *prelist, *postlist; 991 char *prelist, *postlist;
963 992
964 if (list) { 993 if (list && list[0]) {
965 syscalls_in_list(list, "@default-keep", -1, &prelist, &postlist, true); 994 syscalls_in_list(list, "@default-keep", -1, &prelist, &postlist, true);
966 if (postlist) 995 if (postlist)
967 return 1; 996 return 1;
@@ -980,125 +1009,64 @@ int main(int argc, char **argv, char **envp) {
980 int option_cgroup = 0; 1009 int option_cgroup = 0;
981 int custom_profile = 0; // custom profile loaded 1010 int custom_profile = 0; // custom profile loaded
982 int arg_caps_cmdline = 0; // caps requested on command line (used to break out of --chroot) 1011 int arg_caps_cmdline = 0; // caps requested on command line (used to break out of --chroot)
1012 int arg_netlock = 0;
983 char **ptr; 1013 char **ptr;
984 1014
1015
985 // sanitize the umask 1016 // sanitize the umask
986 orig_umask = umask(022); 1017 orig_umask = umask(022);
987 1018
988 // check standard streams before printing anything
989 fix_std_streams();
990
991 // drop permissions by default and rise them when required 1019 // drop permissions by default and rise them when required
992 EUID_INIT(); 1020 EUID_INIT();
993 EUID_USER(); 1021 EUID_USER();
994 1022
1023 // check standard streams before opening any file
1024 fix_std_streams();
1025
995 // argument count should be larger than 0 1026 // argument count should be larger than 0
996 if (argc == 0 || !argv || strlen(argv[0]) == 0) { 1027 if (argc == 0 || !argv || strlen(argv[0]) == 0) {
997 fprintf(stderr, "Error: argv is invalid\n"); 1028 fprintf(stderr, "Error: argv is invalid\n");
998 exit(1); 1029 exit(1);
999 } else if (argc >= MAX_ARGS) { 1030 } else if (argc >= MAX_ARGS) {
1000 fprintf(stderr, "Error: too many arguments\n"); 1031 fprintf(stderr, "Error: too many arguments: argc (%d) >= MAX_ARGS (%d)\n", argc, MAX_ARGS);
1001 exit(1); 1032 exit(1);
1002 } 1033 }
1003 1034
1035 // sanity check for arguments
1036 for (i = 0; i < argc; i++) {
1037// if (*argv[i] == 0) { // see #4395 - bug reported by Debian
1038// fprintf(stderr, "Error: too short arguments: argv[%d] is empty\n", i);
1039// exit(1);
1040// }
1041 if (strlen(argv[i]) >= MAX_ARG_LEN) {
1042 fprintf(stderr, "Error: too long arguments: argv[%d] len (%zu) >= MAX_ARG_LEN (%d)\n", i, strlen(argv[i]), MAX_ARG_LEN);
1043 exit(1);
1044 }
1045 }
1046
1004 // Stash environment variables 1047 // Stash environment variables
1005 for (i = 0, ptr = envp; ptr && *ptr && i < MAX_ENVS; i++, ptr++) 1048 for (i = 0, ptr = envp; ptr && *ptr && i < MAX_ENVS; i++, ptr++)
1006 env_store(*ptr, SETENV); 1049 env_store(*ptr, SETENV);
1007 1050
1008 // sanity check for environment variables 1051 // sanity check for environment variables
1009 if (i >= MAX_ENVS) { 1052 if (i >= MAX_ENVS) {
1010 fprintf(stderr, "Error: too many environment variables\n"); 1053 fprintf(stderr, "Error: too many environment variables: >= MAX_ENVS (%d)\n", MAX_ENVS);
1011 exit(1); 1054 exit(1);
1012 } 1055 }
1013 1056
1014 // sanity check for arguments
1015 for (i = 0; i < argc; i++) {
1016 if (*argv[i] == 0) {
1017 fprintf(stderr, "Error: too short arguments\n");
1018 exit(1);
1019 }
1020 if (strlen(argv[i]) >= MAX_ARG_LEN) {
1021 fprintf(stderr, "Error: too long arguments\n");
1022 exit(1);
1023 }
1024 }
1025
1026 // Reapply a minimal set of environment variables 1057 // Reapply a minimal set of environment variables
1027 env_apply_whitelist(); 1058 env_apply_whitelist();
1028 1059
1029 // check if the user is allowed to use firejail 1060 // process --quiet
1030 init_cfg(argc, argv);
1031
1032 // get starting timestamp, process --quiet
1033 timetrace_start();
1034 const char *env_quiet = env_get("FIREJAIL_QUIET"); 1061 const char *env_quiet = env_get("FIREJAIL_QUIET");
1035 if (check_arg(argc, argv, "--quiet", 1) || (env_quiet && strcmp(env_quiet, "yes") == 0)) 1062 if (check_arg(argc, argv, "--quiet", 1) || (env_quiet && strcmp(env_quiet, "yes") == 0))
1036 arg_quiet = 1; 1063 arg_quiet = 1;
1037 1064
1038 // cleanup at exit 1065 // check if the user is allowed to use firejail
1039 EUID_ROOT(); 1066 init_cfg(argc, argv);
1040 atexit(clear_atexit);
1041
1042 // build /run/firejail directory structure
1043 preproc_build_firejail_dir();
1044 const char *container_name = env_get("container");
1045 if (!container_name || strcmp(container_name, "firejail")) {
1046 lockfd_directory = open(RUN_DIRECTORY_LOCK_FILE, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
1047 if (lockfd_directory != -1) {
1048 int rv = fchown(lockfd_directory, 0, 0);
1049 (void) rv;
1050 flock(lockfd_directory, LOCK_EX);
1051 }
1052 preproc_clean_run();
1053 flock(lockfd_directory, LOCK_UN);
1054 close(lockfd_directory);
1055 }
1056 EUID_USER();
1057
1058 // --ip=dhcp - we need access to /sbin and /usr/sbin directories in order to run ISC DHCP client (dhclient)
1059 // these paths are disabled in disable-common.inc
1060 if ((i = check_arg(argc, argv, "--ip", 0)) != 0) {
1061 if (strncmp(argv[i] + 4, "=dhcp", 5) == 0) {
1062 profile_add("noblacklist /sbin");
1063 profile_add("noblacklist /usr/sbin");
1064 }
1065 }
1066
1067 // for appimages we need to remove "include disable-shell.inc from the profile
1068 // a --profile command can show up before --appimage
1069 if (check_arg(argc, argv, "--appimage", 1))
1070 arg_appimage = 1;
1071
1072 // process allow-debuggers
1073 if (check_arg(argc, argv, "--allow-debuggers", 1)) {
1074 // check kernel version
1075 struct utsname u;
1076 int rv = uname(&u);
1077 if (rv != 0)
1078 errExit("uname");
1079 int major;
1080 int minor;
1081 if (2 != sscanf(u.release, "%d.%d", &major, &minor)) {
1082 fprintf(stderr, "Error: cannot extract Linux kernel version: %s\n", u.version);
1083 exit(1);
1084 }
1085 if (major < 4 || (major == 4 && minor < 8)) {
1086 fprintf(stderr, "Error: --allow-debuggers is disabled on Linux kernels prior to 4.8. "
1087 "A bug in ptrace call allows a full bypass of the seccomp filter. "
1088 "Your current kernel version is %d.%d.\n", major, minor);
1089 exit(1);
1090 }
1091
1092 arg_allow_debuggers = 1;
1093 char *cmd = strdup("noblacklist ${PATH}/strace");
1094 if (!cmd)
1095 errExit("strdup");
1096 profile_add(cmd);
1097 }
1098 1067
1099 // profile builder 1068 // get starting timestamp
1100 if (check_arg(argc, argv, "--build", 0)) // supports both --build and --build=filename 1069 timetrace_start();
1101 run_builder(argc, argv); // this function will not return
1102 1070
1103 // check argv[0] symlink wrapper if this is not a login shell 1071 // check argv[0] symlink wrapper if this is not a login shell
1104 if (*argv[0] != '-') 1072 if (*argv[0] != '-')
@@ -1123,15 +1091,44 @@ int main(int argc, char **argv, char **envp) {
1123 __builtin_unreachable(); 1091 __builtin_unreachable();
1124 } 1092 }
1125 } 1093 }
1126 EUID_ASSERT();
1127 1094
1095 // profile builder
1096 if (check_arg(argc, argv, "--build", 0)) // supports both --build and --build=filename
1097 run_builder(argc, argv); // this function will not return
1098
1099 // intrusion detection system
1100 if (check_arg(argc, argv, "--ids-", 0)) // supports both --ids-init and --ids-check
1101 run_ids(argc, argv); // this function will not return
1128 1102
1129 // check firejail directories
1130 EUID_ROOT(); 1103 EUID_ROOT();
1131 delete_run_files(sandbox_pid); 1104#ifndef HAVE_SUID
1105 if (geteuid() != 0) {
1106 fprintf(stderr, "Error: Firejail needs to be SUID.\n");
1107 fprintf(stderr, "Assuming firejail is installed in /usr/bin, execute the following command as root:\n");
1108 fprintf(stderr, " chmod u+s /usr/bin/firejail\n");
1109 }
1110#endif
1111
1112 // build /run/firejail directory structure
1113 preproc_build_firejail_dir();
1114 const char *container_name = env_get("container");
1115 if (!container_name || strcmp(container_name, "firejail")) {
1116 lockfd_directory = open(RUN_DIRECTORY_LOCK_FILE, O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR);
1117 if (lockfd_directory != -1) {
1118 int rv = fchown(lockfd_directory, 0, 0);
1119 (void) rv;
1120 flock(lockfd_directory, LOCK_EX);
1121 }
1122 preproc_clean_run();
1123 flock(lockfd_directory, LOCK_UN);
1124 close(lockfd_directory);
1125 }
1126
1127 delete_run_files(getpid());
1128 atexit(clear_atexit);
1132 EUID_USER(); 1129 EUID_USER();
1133 1130
1134 //check if the parent is sshd daemon 1131 // check if the parent is sshd daemon
1135 int parent_sshd = 0; 1132 int parent_sshd = 0;
1136 { 1133 {
1137 pid_t ppid = getppid(); 1134 pid_t ppid = getppid();
@@ -1145,7 +1142,7 @@ int main(int argc, char **argv, char **envp) {
1145 1142
1146#ifdef DEBUG_RESTRICTED_SHELL 1143#ifdef DEBUG_RESTRICTED_SHELL
1147 {EUID_ROOT(); 1144 {EUID_ROOT();
1148 FILE *fp = fopen("/firelog", "w"); 1145 FILE *fp = fopen("/firelog", "we");
1149 if (fp) { 1146 if (fp) {
1150 int i; 1147 int i;
1151 fprintf(fp, "argc %d: ", argc); 1148 fprintf(fp, "argc %d: ", argc);
@@ -1164,7 +1161,7 @@ int main(int argc, char **argv, char **envp) {
1164 strncmp(argv[2], "scp ", 4) == 0) { 1161 strncmp(argv[2], "scp ", 4) == 0) {
1165#ifdef DEBUG_RESTRICTED_SHELL 1162#ifdef DEBUG_RESTRICTED_SHELL
1166 {EUID_ROOT(); 1163 {EUID_ROOT();
1167 FILE *fp = fopen("/firelog", "a"); 1164 FILE *fp = fopen("/firelog", "ae");
1168 if (fp) { 1165 if (fp) {
1169 fprintf(fp, "run without a sandbox\n"); 1166 fprintf(fp, "run without a sandbox\n");
1170 fclose(fp); 1167 fclose(fp);
@@ -1188,7 +1185,8 @@ int main(int argc, char **argv, char **envp) {
1188 } 1185 }
1189 EUID_ASSERT(); 1186 EUID_ASSERT();
1190 1187
1191 // is this a login shell, or a command passed by sshd, insert command line options from /etc/firejail/login.users 1188 // is this a login shell, or a command passed by sshd,
1189 // insert command line options from /etc/firejail/login.users
1192 if (*argv[0] == '-' || parent_sshd) { 1190 if (*argv[0] == '-' || parent_sshd) {
1193 if (argc == 1) 1191 if (argc == 1)
1194 login_shell = 1; 1192 login_shell = 1;
@@ -1197,7 +1195,7 @@ int main(int argc, char **argv, char **envp) {
1197 1195
1198#ifdef DEBUG_RESTRICTED_SHELL 1196#ifdef DEBUG_RESTRICTED_SHELL
1199 {EUID_ROOT(); 1197 {EUID_ROOT();
1200 FILE *fp = fopen("/firelog", "a"); 1198 FILE *fp = fopen("/firelog", "ae");
1201 if (fp) { 1199 if (fp) {
1202 fprintf(fp, "fullargc %d: ", fullargc); 1200 fprintf(fp, "fullargc %d: ", fullargc);
1203 int i; 1201 int i;
@@ -1219,7 +1217,7 @@ int main(int argc, char **argv, char **envp) {
1219 1217
1220#ifdef DEBUG_RESTRICTED_SHELL 1218#ifdef DEBUG_RESTRICTED_SHELL
1221 {EUID_ROOT(); 1219 {EUID_ROOT();
1222 FILE *fp = fopen("/firelog", "a"); 1220 FILE *fp = fopen("/firelog", "ae");
1223 if (fp) { 1221 if (fp) {
1224 fprintf(fp, "argc %d: ", argc); 1222 fprintf(fp, "argc %d: ", argc);
1225 int i; 1223 int i;
@@ -1240,6 +1238,47 @@ int main(int argc, char **argv, char **envp) {
1240#endif 1238#endif
1241 EUID_ASSERT(); 1239 EUID_ASSERT();
1242 1240
1241 // --ip=dhcp - we need access to /sbin and /usr/sbin directories in order to run ISC DHCP client (dhclient)
1242 // these paths are disabled in disable-common.inc
1243 if ((i = check_arg(argc, argv, "--ip", 0)) != 0) {
1244 if (strncmp(argv[i] + 4, "=dhcp", 5) == 0) {
1245 profile_add("noblacklist /sbin");
1246 profile_add("noblacklist /usr/sbin");
1247 }
1248 }
1249
1250 // process allow-debuggers
1251 if (check_arg(argc, argv, "--allow-debuggers", 1)) {
1252 // check kernel version
1253 struct utsname u;
1254 int rv = uname(&u);
1255 if (rv != 0)
1256 errExit("uname");
1257 int major;
1258 int minor;
1259 if (2 != sscanf(u.release, "%d.%d", &major, &minor)) {
1260 fprintf(stderr, "Error: cannot extract Linux kernel version: %s\n", u.version);
1261 exit(1);
1262 }
1263 if (major < 4 || (major == 4 && minor < 8)) {
1264 fprintf(stderr, "Error: --allow-debuggers is disabled on Linux kernels prior to 4.8. "
1265 "A bug in ptrace call allows a full bypass of the seccomp filter. "
1266 "Your current kernel version is %d.%d.\n", major, minor);
1267 exit(1);
1268 }
1269
1270 arg_allow_debuggers = 1;
1271 char *cmd = strdup("noblacklist ${PATH}/strace");
1272 if (!cmd)
1273 errExit("strdup");
1274 profile_add(cmd);
1275 }
1276
1277 // for appimages we need to remove "include disable-shell.inc from the profile
1278 // a --profile command can show up before --appimage
1279 if (check_arg(argc, argv, "--appimage", 1))
1280 arg_appimage = 1;
1281
1243 // check for force-nonewprivs in /etc/firejail/firejail.config file 1282 // check for force-nonewprivs in /etc/firejail/firejail.config file
1244 if (checkcfg(CFG_FORCE_NONEWPRIVS)) 1283 if (checkcfg(CFG_FORCE_NONEWPRIVS))
1245 arg_nonewprivs = 1; 1284 arg_nonewprivs = 1;
@@ -1248,8 +1287,10 @@ int main(int argc, char **argv, char **envp) {
1248 for (i = 1; i < argc; i++) { 1287 for (i = 1; i < argc; i++) {
1249 run_cmd_and_exit(i, argc, argv); // will exit if the command is recognized 1288 run_cmd_and_exit(i, argc, argv); // will exit if the command is recognized
1250 1289
1251 if (strcmp(argv[i], "--debug") == 0 && !arg_quiet) 1290 if (strcmp(argv[i], "--debug") == 0) {
1252 arg_debug = 1; 1291 arg_debug = 1;
1292 arg_quiet = 0;
1293 }
1253 else if (strcmp(argv[i], "--debug-blacklists") == 0) 1294 else if (strcmp(argv[i], "--debug-blacklists") == 0)
1254 arg_debug_blacklists = 1; 1295 arg_debug_blacklists = 1;
1255 else if (strcmp(argv[i], "--debug-whitelists") == 0) 1296 else if (strcmp(argv[i], "--debug-whitelists") == 0)
@@ -1257,8 +1298,8 @@ int main(int argc, char **argv, char **envp) {
1257 else if (strcmp(argv[i], "--debug-private-lib") == 0) 1298 else if (strcmp(argv[i], "--debug-private-lib") == 0)
1258 arg_debug_private_lib = 1; 1299 arg_debug_private_lib = 1;
1259 else if (strcmp(argv[i], "--quiet") == 0) { 1300 else if (strcmp(argv[i], "--quiet") == 0) {
1260 arg_quiet = 1; 1301 if (!arg_debug)
1261 arg_debug = 0; 1302 arg_quiet = 1;
1262 } 1303 }
1263 else if (strcmp(argv[i], "--allow-debuggers") == 0) { 1304 else if (strcmp(argv[i], "--allow-debuggers") == 0) {
1264 // already handled 1305 // already handled
@@ -1480,8 +1521,11 @@ int main(int argc, char **argv, char **envp) {
1480 arg_rlimit_nproc = 1; 1521 arg_rlimit_nproc = 1;
1481 } 1522 }
1482 else if (strncmp(argv[i], "--rlimit-fsize=", 15) == 0) { 1523 else if (strncmp(argv[i], "--rlimit-fsize=", 15) == 0) {
1483 check_unsigned(argv[i] + 15, "Error: invalid rlimit"); 1524 cfg.rlimit_fsize = parse_arg_size(argv[i] + 15);
1484 sscanf(argv[i] + 15, "%llu", &cfg.rlimit_fsize); 1525 if (cfg.rlimit_fsize == 0) {
1526 perror("Error: invalid rlimit-fsize. Only use positive numbers and k, m or g suffix.");
1527 exit(1);
1528 }
1485 arg_rlimit_fsize = 1; 1529 arg_rlimit_fsize = 1;
1486 } 1530 }
1487 else if (strncmp(argv[i], "--rlimit-sigpending=", 20) == 0) { 1531 else if (strncmp(argv[i], "--rlimit-sigpending=", 20) == 0) {
@@ -1490,8 +1534,11 @@ int main(int argc, char **argv, char **envp) {
1490 arg_rlimit_sigpending = 1; 1534 arg_rlimit_sigpending = 1;
1491 } 1535 }
1492 else if (strncmp(argv[i], "--rlimit-as=", 12) == 0) { 1536 else if (strncmp(argv[i], "--rlimit-as=", 12) == 0) {
1493 check_unsigned(argv[i] + 12, "Error: invalid rlimit"); 1537 cfg.rlimit_as = parse_arg_size(argv[i] + 12);
1494 sscanf(argv[i] + 12, "%llu", &cfg.rlimit_as); 1538 if (cfg.rlimit_as == 0) {
1539 perror("Error: invalid rlimit-as. Only use positive numbers and k, m or g suffix.");
1540 exit(1);
1541 }
1495 arg_rlimit_as = 1; 1542 arg_rlimit_as = 1;
1496 } 1543 }
1497 else if (strncmp(argv[i], "--ipc-namespace", 15) == 0) 1544 else if (strncmp(argv[i], "--ipc-namespace", 15) == 0)
@@ -1507,15 +1554,16 @@ int main(int argc, char **argv, char **envp) {
1507 else if (strncmp(argv[i], "--cgroup=", 9) == 0) { 1554 else if (strncmp(argv[i], "--cgroup=", 9) == 0) {
1508 if (checkcfg(CFG_CGROUP)) { 1555 if (checkcfg(CFG_CGROUP)) {
1509 if (option_cgroup) { 1556 if (option_cgroup) {
1510 fprintf(stderr, "Error: only a cgroup can be defined\n"); 1557 fprintf(stderr, "Error: only one cgroup can be defined\n");
1511 exit(1); 1558 exit(1);
1512 } 1559 }
1513
1514 option_cgroup = 1;
1515 cfg.cgroup = strdup(argv[i] + 9); 1560 cfg.cgroup = strdup(argv[i] + 9);
1516 if (!cfg.cgroup) 1561 if (!cfg.cgroup)
1517 errExit("strdup"); 1562 errExit("strdup");
1518 set_cgroup(cfg.cgroup); 1563
1564 check_cgroup_file(cfg.cgroup);
1565 set_cgroup(cfg.cgroup, getpid());
1566 option_cgroup = 1;
1519 } 1567 }
1520 else 1568 else
1521 exit_err_feature("cgroup"); 1569 exit_err_feature("cgroup");
@@ -1546,6 +1594,7 @@ int main(int argc, char **argv, char **envp) {
1546 profile_check_line(line, 0, NULL); // will exit if something wrong 1594 profile_check_line(line, 0, NULL); // will exit if something wrong
1547 profile_add(line); 1595 profile_add(line);
1548 } 1596 }
1597
1549 else if (strncmp(argv[i], "--blacklist=", 12) == 0) { 1598 else if (strncmp(argv[i], "--blacklist=", 12) == 0) {
1550 char *line; 1599 char *line;
1551 if (asprintf(&line, "blacklist %s", argv[i] + 12) == -1) 1600 if (asprintf(&line, "blacklist %s", argv[i] + 12) == -1)
@@ -1562,19 +1611,13 @@ int main(int argc, char **argv, char **envp) {
1562 profile_check_line(line, 0, NULL); // will exit if something wrong 1611 profile_check_line(line, 0, NULL); // will exit if something wrong
1563 profile_add(line); 1612 profile_add(line);
1564 } 1613 }
1565
1566#ifdef HAVE_WHITELIST
1567 else if (strncmp(argv[i], "--whitelist=", 12) == 0) { 1614 else if (strncmp(argv[i], "--whitelist=", 12) == 0) {
1568 if (checkcfg(CFG_WHITELIST)) { 1615 char *line;
1569 char *line; 1616 if (asprintf(&line, "whitelist %s", argv[i] + 12) == -1)
1570 if (asprintf(&line, "whitelist %s", argv[i] + 12) == -1) 1617 errExit("asprintf");
1571 errExit("asprintf");
1572 1618
1573 profile_check_line(line, 0, NULL); // will exit if something wrong 1619 profile_check_line(line, 0, NULL); // will exit if something wrong
1574 profile_add(line); 1620 profile_add(line);
1575 }
1576 else
1577 exit_err_feature("whitelist");
1578 } 1621 }
1579 else if (strncmp(argv[i], "--nowhitelist=", 14) == 0) { 1622 else if (strncmp(argv[i], "--nowhitelist=", 14) == 0) {
1580 char *line; 1623 char *line;
@@ -1584,7 +1627,7 @@ int main(int argc, char **argv, char **envp) {
1584 profile_check_line(line, 0, NULL); // will exit if something wrong 1627 profile_check_line(line, 0, NULL); // will exit if something wrong
1585 profile_add(line); 1628 profile_add(line);
1586 } 1629 }
1587#endif 1630
1588 else if (strncmp(argv[i], "--mkdir=", 8) == 0) { 1631 else if (strncmp(argv[i], "--mkdir=", 8) == 0) {
1589 char *line; 1632 char *line;
1590 if (asprintf(&line, "mkdir %s", argv[i] + 8) == -1) 1633 if (asprintf(&line, "mkdir %s", argv[i] + 8) == -1)
@@ -1824,6 +1867,8 @@ int main(int argc, char **argv, char **envp) {
1824 exit(1); 1867 exit(1);
1825 } 1868 }
1826 arg_noprofile = 1; 1869 arg_noprofile = 1;
1870 // force keep-config-pulse in order to keep ~/.config/pulse as is
1871 arg_keep_config_pulse = 1;
1827 } 1872 }
1828 else if (strncmp(argv[i], "--ignore=", 9) == 0) { 1873 else if (strncmp(argv[i], "--ignore=", 9) == 0) {
1829 if (custom_profile) { 1874 if (custom_profile) {
@@ -1832,6 +1877,14 @@ int main(int argc, char **argv, char **envp) {
1832 } 1877 }
1833 profile_add_ignore(argv[i] + 9); 1878 profile_add_ignore(argv[i] + 9);
1834 } 1879 }
1880 else if (strncmp(argv[i], "--keep-fd=", 10) == 0) {
1881 if (strcmp(argv[i] + 10, "all") == 0)
1882 arg_keep_fd_all = 1;
1883 else {
1884 const char *add = argv[i] + 10;
1885 profile_list_augment(&cfg.keep_fd, add);
1886 }
1887 }
1835#ifdef HAVE_CHROOT 1888#ifdef HAVE_CHROOT
1836 else if (strncmp(argv[i], "--chroot=", 9) == 0) { 1889 else if (strncmp(argv[i], "--chroot=", 9) == 0) {
1837 if (checkcfg(CFG_CHROOT)) { 1890 if (checkcfg(CFG_CHROOT)) {
@@ -1874,6 +1927,9 @@ int main(int argc, char **argv, char **envp) {
1874 } 1927 }
1875 arg_writable_etc = 1; 1928 arg_writable_etc = 1;
1876 } 1929 }
1930 else if (strcmp(argv[i], "--keep-config-pulse") == 0) {
1931 arg_keep_config_pulse = 1;
1932 }
1877 else if (strcmp(argv[i], "--writable-var") == 0) { 1933 else if (strcmp(argv[i], "--writable-var") == 0) {
1878 arg_writable_var = 1; 1934 arg_writable_var = 1;
1879 } 1935 }
@@ -1944,61 +2000,77 @@ int main(int argc, char **argv, char **envp) {
1944 arg_keep_dev_shm = 1; 2000 arg_keep_dev_shm = 1;
1945 } 2001 }
1946 else if (strncmp(argv[i], "--private-etc=", 14) == 0) { 2002 else if (strncmp(argv[i], "--private-etc=", 14) == 0) {
1947 if (arg_writable_etc) { 2003 if (checkcfg(CFG_PRIVATE_ETC)) {
1948 fprintf(stderr, "Error: --private-etc and --writable-etc are mutually exclusive\n"); 2004 if (arg_writable_etc) {
1949 exit(1); 2005 fprintf(stderr, "Error: --private-etc and --writable-etc are mutually exclusive\n");
1950 } 2006 exit(1);
2007 }
1951 2008
1952 // extract private etc list 2009 // extract private etc list
1953 if (*(argv[i] + 14) == '\0') { 2010 if (*(argv[i] + 14) == '\0') {
1954 fprintf(stderr, "Error: invalid private-etc option\n"); 2011 fprintf(stderr, "Error: invalid private-etc option\n");
1955 exit(1); 2012 exit(1);
2013 }
2014 if (cfg.etc_private_keep) {
2015 if ( asprintf(&cfg.etc_private_keep, "%s,%s", cfg.etc_private_keep, argv[i] + 14) < 0 )
2016 errExit("asprintf");
2017 } else
2018 cfg.etc_private_keep = argv[i] + 14;
2019 arg_private_etc = 1;
1956 } 2020 }
1957 if (cfg.etc_private_keep) { 2021 else
1958 if ( asprintf(&cfg.etc_private_keep, "%s,%s", cfg.etc_private_keep, argv[i] + 14) < 0 ) 2022 exit_err_feature("private-etc");
1959 errExit("asprintf");
1960 } else
1961 cfg.etc_private_keep = argv[i] + 14;
1962 arg_private_etc = 1;
1963 } 2023 }
1964 else if (strncmp(argv[i], "--private-opt=", 14) == 0) { 2024 else if (strncmp(argv[i], "--private-opt=", 14) == 0) {
1965 // extract private opt list 2025 if (checkcfg(CFG_PRIVATE_OPT)) {
1966 if (*(argv[i] + 14) == '\0') { 2026 // extract private opt list
1967 fprintf(stderr, "Error: invalid private-opt option\n"); 2027 if (*(argv[i] + 14) == '\0') {
1968 exit(1); 2028 fprintf(stderr, "Error: invalid private-opt option\n");
2029 exit(1);
2030 }
2031 if (cfg.opt_private_keep) {
2032 if ( asprintf(&cfg.opt_private_keep, "%s,%s", cfg.opt_private_keep, argv[i] + 14) < 0 )
2033 errExit("asprintf");
2034 } else
2035 cfg.opt_private_keep = argv[i] + 14;
2036 arg_private_opt = 1;
1969 } 2037 }
1970 if (cfg.opt_private_keep) { 2038 else
1971 if ( asprintf(&cfg.opt_private_keep, "%s,%s", cfg.opt_private_keep, argv[i] + 14) < 0 ) 2039 exit_err_feature("private-opt");
1972 errExit("asprintf");
1973 } else
1974 cfg.opt_private_keep = argv[i] + 14;
1975 arg_private_opt = 1;
1976 } 2040 }
1977 else if (strncmp(argv[i], "--private-srv=", 14) == 0) { 2041 else if (strncmp(argv[i], "--private-srv=", 14) == 0) {
1978 // extract private srv list 2042 if (checkcfg(CFG_PRIVATE_SRV)) {
1979 if (*(argv[i] + 14) == '\0') { 2043 // extract private srv list
1980 fprintf(stderr, "Error: invalid private-srv option\n"); 2044 if (*(argv[i] + 14) == '\0') {
1981 exit(1); 2045 fprintf(stderr, "Error: invalid private-srv option\n");
2046 exit(1);
2047 }
2048 if (cfg.srv_private_keep) {
2049 if ( asprintf(&cfg.srv_private_keep, "%s,%s", cfg.srv_private_keep, argv[i] + 14) < 0 )
2050 errExit("asprintf");
2051 } else
2052 cfg.srv_private_keep = argv[i] + 14;
2053 arg_private_srv = 1;
1982 } 2054 }
1983 if (cfg.srv_private_keep) { 2055 else
1984 if ( asprintf(&cfg.srv_private_keep, "%s,%s", cfg.srv_private_keep, argv[i] + 14) < 0 ) 2056 exit_err_feature("private-srv");
1985 errExit("asprintf");
1986 } else
1987 cfg.srv_private_keep = argv[i] + 14;
1988 arg_private_srv = 1;
1989 } 2057 }
1990 else if (strncmp(argv[i], "--private-bin=", 14) == 0) { 2058 else if (strncmp(argv[i], "--private-bin=", 14) == 0) {
1991 // extract private bin list 2059 if (checkcfg(CFG_PRIVATE_BIN)) {
1992 if (*(argv[i] + 14) == '\0') { 2060 // extract private bin list
1993 fprintf(stderr, "Error: invalid private-bin option\n"); 2061 if (*(argv[i] + 14) == '\0') {
1994 exit(1); 2062 fprintf(stderr, "Error: invalid private-bin option\n");
2063 exit(1);
2064 }
2065 if (cfg.bin_private_keep) {
2066 if ( asprintf(&cfg.bin_private_keep, "%s,%s", cfg.bin_private_keep, argv[i] + 14) < 0 )
2067 errExit("asprintf");
2068 } else
2069 cfg.bin_private_keep = argv[i] + 14;
2070 arg_private_bin = 1;
1995 } 2071 }
1996 if (cfg.bin_private_keep) { 2072 else
1997 if ( asprintf(&cfg.bin_private_keep, "%s,%s", cfg.bin_private_keep, argv[i] + 14) < 0 ) 2073 exit_err_feature("private-bin");
1998 errExit("asprintf");
1999 } else
2000 cfg.bin_private_keep = argv[i] + 14;
2001 arg_private_bin = 1;
2002 } 2074 }
2003 else if (strncmp(argv[i], "--private-lib", 13) == 0) { 2075 else if (strncmp(argv[i], "--private-lib", 13) == 0) {
2004 if (checkcfg(CFG_PRIVATE_LIB)) { 2076 if (checkcfg(CFG_PRIVATE_LIB)) {
@@ -2076,11 +2148,16 @@ int main(int argc, char **argv, char **envp) {
2076 else if (strcmp(argv[i], "--nosound") == 0) 2148 else if (strcmp(argv[i], "--nosound") == 0)
2077 arg_nosound = 1; 2149 arg_nosound = 1;
2078 else if (strcmp(argv[i], "--noautopulse") == 0) 2150 else if (strcmp(argv[i], "--noautopulse") == 0)
2079 arg_noautopulse = 1; 2151 arg_keep_config_pulse = 1;
2080 else if (strcmp(argv[i], "--novideo") == 0) 2152 else if (strcmp(argv[i], "--novideo") == 0)
2081 arg_novideo = 1; 2153 arg_novideo = 1;
2082 else if (strcmp(argv[i], "--no3d") == 0) 2154 else if (strcmp(argv[i], "--no3d") == 0)
2083 arg_no3d = 1; 2155 arg_no3d = 1;
2156 else if (strcmp(argv[i], "--noprinters") == 0) {
2157 arg_noprinters = 1;
2158 profile_add("blacklist /dev/lp*");
2159 profile_add("blacklist /run/cups/cups.sock");
2160 }
2084 else if (strcmp(argv[i], "--notv") == 0) 2161 else if (strcmp(argv[i], "--notv") == 0)
2085 arg_notv = 1; 2162 arg_notv = 1;
2086 else if (strcmp(argv[i], "--nodvd") == 0) 2163 else if (strcmp(argv[i], "--nodvd") == 0)
@@ -2253,6 +2330,21 @@ int main(int argc, char **argv, char **envp) {
2253 continue; 2330 continue;
2254 } 2331 }
2255#ifdef HAVE_NETWORK 2332#ifdef HAVE_NETWORK
2333 else if (strcmp(argv[i], "--netlock") == 0) {
2334 if (checkcfg(CFG_NETWORK))
2335 arg_netlock = 1;
2336 else
2337 exit_err_feature("networking");
2338 }
2339 else if (strncmp(argv[i], "--netlock=", 10) == 0) {
2340 if (checkcfg(CFG_NETWORK)) {
2341 pid_t pid = require_pid(argv[i] + 10);
2342 netfilter_netlock(pid);
2343 }
2344 else
2345 exit_err_feature("networking");
2346 exit(0);
2347 }
2256 else if (strncmp(argv[i], "--interface=", 12) == 0) { 2348 else if (strncmp(argv[i], "--interface=", 12) == 0) {
2257 if (checkcfg(CFG_NETWORK)) { 2349 if (checkcfg(CFG_NETWORK)) {
2258 // checks 2350 // checks
@@ -2558,7 +2650,7 @@ int main(int argc, char **argv, char **envp) {
2558 else if (cfg.dns4 == NULL) 2650 else if (cfg.dns4 == NULL)
2559 cfg.dns4 = dns; 2651 cfg.dns4 = dns;
2560 else { 2652 else {
2561 fwarning("Warning: up to 4 DNS servers can be specified, %s ignored\n", dns); 2653 fwarning("up to 4 DNS servers can be specified, %s ignored\n", dns);
2562 free(dns); 2654 free(dns);
2563 } 2655 }
2564 } 2656 }
@@ -2579,6 +2671,15 @@ int main(int argc, char **argv, char **envp) {
2579 if (checkcfg(CFG_NETWORK)) { 2671 if (checkcfg(CFG_NETWORK)) {
2580 arg_netfilter = 1; 2672 arg_netfilter = 1;
2581 arg_netfilter_file = argv[i] + 12; 2673 arg_netfilter_file = argv[i] + 12;
2674
2675 // expand tilde
2676 if (*arg_netfilter_file == '~') {
2677 char *tmp;
2678 if (asprintf(&tmp, "%s%s", cfg.homedir, arg_netfilter_file + 1) == -1)
2679 errExit("asprintf");
2680 arg_netfilter_file = tmp;
2681 }
2682
2582 check_netfilter_file(arg_netfilter_file); 2683 check_netfilter_file(arg_netfilter_file);
2583 } 2684 }
2584 else 2685 else
@@ -2589,6 +2690,15 @@ int main(int argc, char **argv, char **envp) {
2589 if (checkcfg(CFG_NETWORK)) { 2690 if (checkcfg(CFG_NETWORK)) {
2590 arg_netfilter6 = 1; 2691 arg_netfilter6 = 1;
2591 arg_netfilter6_file = argv[i] + 13; 2692 arg_netfilter6_file = argv[i] + 13;
2693
2694 // expand tilde
2695 if (*arg_netfilter6_file == '~') {
2696 char *tmp;
2697 if (asprintf(&tmp, "%s%s", cfg.homedir, arg_netfilter6_file + 1) == -1)
2698 errExit("asprintf");
2699 arg_netfilter6_file = tmp;
2700 }
2701
2592 check_netfilter_file(arg_netfilter6_file); 2702 check_netfilter_file(arg_netfilter6_file);
2593 } 2703 }
2594 else 2704 else
@@ -2609,8 +2719,9 @@ int main(int argc, char **argv, char **envp) {
2609 //************************************* 2719 //*************************************
2610 else if (strncmp(argv[i], "--timeout=", 10) == 0) 2720 else if (strncmp(argv[i], "--timeout=", 10) == 0)
2611 cfg.timeout = extract_timeout(argv[i] + 10); 2721 cfg.timeout = extract_timeout(argv[i] + 10);
2612 else if (strcmp(argv[i], "--appimage") == 0) 2722 else if (strcmp(argv[i], "--appimage") == 0) {
2613 arg_appimage = 1; 2723 // already handled
2724 }
2614 else if (strcmp(argv[i], "--shell=none") == 0) { 2725 else if (strcmp(argv[i], "--shell=none") == 0) {
2615 arg_shell_none = 1; 2726 arg_shell_none = 1;
2616 if (cfg.shell) { 2727 if (cfg.shell) {
@@ -2685,6 +2796,11 @@ int main(int argc, char **argv, char **envp) {
2685 else if (strcmp(argv[i], "--deterministic-exit-code") == 0) { 2796 else if (strcmp(argv[i], "--deterministic-exit-code") == 0) {
2686 arg_deterministic_exit_code = 1; 2797 arg_deterministic_exit_code = 1;
2687 } 2798 }
2799 else if (strcmp(argv[i], "--deterministic-shutdown") == 0) {
2800 arg_deterministic_shutdown = 1;
2801 }
2802 else if (strcmp(argv[i], "--tab") == 0)
2803 arg_tab = 1;
2688 else { 2804 else {
2689 // double dash - positional params to follow 2805 // double dash - positional params to follow
2690 if (strcmp(argv[i], "--") == 0) { 2806 if (strcmp(argv[i], "--") == 0) {
@@ -2786,6 +2902,11 @@ int main(int argc, char **argv, char **envp) {
2786 // build the sandbox command 2902 // build the sandbox command
2787 if (prog_index == -1 && cfg.shell) { 2903 if (prog_index == -1 && cfg.shell) {
2788 assert(cfg.command_line == NULL); // runs cfg.shell 2904 assert(cfg.command_line == NULL); // runs cfg.shell
2905 if (arg_appimage) {
2906 fprintf(stderr, "Error: no appimage archive specified\n");
2907 exit(1);
2908 }
2909
2789 cfg.window_title = cfg.shell; 2910 cfg.window_title = cfg.shell;
2790 cfg.command_name = cfg.shell; 2911 cfg.command_name = cfg.shell;
2791 } 2912 }
@@ -2793,10 +2914,11 @@ int main(int argc, char **argv, char **envp) {
2793 if (arg_debug) 2914 if (arg_debug)
2794 printf("Configuring appimage environment\n"); 2915 printf("Configuring appimage environment\n");
2795 appimage_set(cfg.command_name); 2916 appimage_set(cfg.command_name);
2796 build_appimage_cmdline(&cfg.command_line, &cfg.window_title, argc, argv, prog_index); 2917 build_appimage_cmdline(&cfg.command_line, &cfg.window_title, argc, argv, prog_index, true);
2797 } 2918 }
2798 else { 2919 else {
2799 build_cmdline(&cfg.command_line, &cfg.window_title, argc, argv, prog_index); 2920 // Only add extra quotes if we were not launched by sshd.
2921 build_cmdline(&cfg.command_line, &cfg.window_title, argc, argv, prog_index, !parent_sshd);
2800 } 2922 }
2801/* else { 2923/* else {
2802 fprintf(stderr, "Error: command must be specified when --shell=none used.\n"); 2924 fprintf(stderr, "Error: command must be specified when --shell=none used.\n");
@@ -2810,7 +2932,13 @@ int main(int argc, char **argv, char **envp) {
2810 2932
2811 // load the profile 2933 // load the profile
2812 if (!arg_noprofile && !custom_profile) { 2934 if (!arg_noprofile && !custom_profile) {
2813 custom_profile = profile_find_firejail(cfg.command_name, 1); 2935 if (arg_appimage) {
2936 custom_profile = appimage_find_profile(cfg.command_name);
2937 // disable shell=* for appimages
2938 arg_shell_none = 0;
2939 }
2940 else
2941 custom_profile = profile_find_firejail(cfg.command_name, 1);
2814 } 2942 }
2815 2943
2816 // use default.profile as the default 2944 // use default.profile as the default
@@ -2824,7 +2952,7 @@ int main(int argc, char **argv, char **envp) {
2824 custom_profile = profile_find_firejail(profile_name, 1); 2952 custom_profile = profile_find_firejail(profile_name, 1);
2825 2953
2826 if (!custom_profile) { 2954 if (!custom_profile) {
2827 fprintf(stderr, "Error: no default.profile installed\n"); 2955 fprintf(stderr, "Error: no %s installed\n", profile_name);
2828 exit(1); 2956 exit(1);
2829 } 2957 }
2830 2958
@@ -2840,6 +2968,15 @@ int main(int argc, char **argv, char **envp) {
2840 // check network configuration options - it will exit if anything went wrong 2968 // check network configuration options - it will exit if anything went wrong
2841 net_check_cfg(); 2969 net_check_cfg();
2842 2970
2971 // customization of default seccomp filter
2972 if (config_seccomp_filter_add) {
2973 if (arg_seccomp && !cfg.seccomp_list_keep && !cfg.seccomp_list_drop)
2974 profile_list_augment(&cfg.seccomp_list, config_seccomp_filter_add);
2975
2976 if (arg_seccomp32 && !cfg.seccomp_list_keep32 && !cfg.seccomp_list_drop32)
2977 profile_list_augment(&cfg.seccomp_list32, config_seccomp_filter_add);
2978 }
2979
2843 if (arg_seccomp) 2980 if (arg_seccomp)
2844 arg_seccomp_postexec = check_postexec(cfg.seccomp_list) || check_postexec(cfg.seccomp_list_drop); 2981 arg_seccomp_postexec = check_postexec(cfg.seccomp_list) || check_postexec(cfg.seccomp_list_drop);
2845 2982
@@ -2850,7 +2987,7 @@ int main(int argc, char **argv, char **envp) {
2850 // check and assign an IP address - for macvlan it will be done again in the sandbox! 2987 // check and assign an IP address - for macvlan it will be done again in the sandbox!
2851 if (any_bridge_configured()) { 2988 if (any_bridge_configured()) {
2852 EUID_ROOT(); 2989 EUID_ROOT();
2853 lockfd_network = open(RUN_NETWORK_LOCK_FILE, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR); 2990 lockfd_network = open(RUN_NETWORK_LOCK_FILE, O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR);
2854 if (lockfd_network != -1) { 2991 if (lockfd_network != -1) {
2855 int rv = fchown(lockfd_network, 0, 0); 2992 int rv = fchown(lockfd_network, 0, 0);
2856 (void) rv; 2993 (void) rv;
@@ -2872,12 +3009,6 @@ int main(int argc, char **argv, char **envp) {
2872 } 3009 }
2873 EUID_ASSERT(); 3010 EUID_ASSERT();
2874 3011
2875 // create the parent-child communication pipe
2876 if (pipe(parent_to_child_fds) < 0)
2877 errExit("pipe");
2878 if (pipe(child_to_parent_fds) < 0)
2879 errExit("pipe");
2880
2881 if (arg_noroot && arg_overlay) { 3012 if (arg_noroot && arg_overlay) {
2882 fwarning("--overlay and --noroot are mutually exclusive, noroot disabled\n"); 3013 fwarning("--overlay and --noroot are mutually exclusive, noroot disabled\n");
2883 arg_noroot = 0; 3014 arg_noroot = 0;
@@ -2890,7 +3021,7 @@ int main(int argc, char **argv, char **envp) {
2890 3021
2891 // set name and x11 run files 3022 // set name and x11 run files
2892 EUID_ROOT(); 3023 EUID_ROOT();
2893 lockfd_directory = open(RUN_DIRECTORY_LOCK_FILE, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR); 3024 lockfd_directory = open(RUN_DIRECTORY_LOCK_FILE, O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR);
2894 if (lockfd_directory != -1) { 3025 if (lockfd_directory != -1) {
2895 int rv = fchown(lockfd_directory, 0, 0); 3026 int rv = fchown(lockfd_directory, 0, 0);
2896 (void) rv; 3027 (void) rv;
@@ -2919,6 +3050,12 @@ int main(int argc, char **argv, char **envp) {
2919 } 3050 }
2920#endif 3051#endif
2921 3052
3053 // create the parent-child communication pipe
3054 if (pipe2(parent_to_child_fds, O_CLOEXEC) < 0)
3055 errExit("pipe");
3056 if (pipe2(child_to_parent_fds, O_CLOEXEC) < 0)
3057 errExit("pipe");
3058
2922 // clone environment 3059 // clone environment
2923 int flags = CLONE_NEWNS | CLONE_NEWPID | CLONE_NEWUTS | SIGCHLD; 3060 int flags = CLONE_NEWNS | CLONE_NEWPID | CLONE_NEWUTS | SIGCHLD;
2924 3061
@@ -2975,9 +3112,9 @@ int main(int argc, char **argv, char **envp) {
2975 network_main(child); 3112 network_main(child);
2976 if (arg_debug) 3113 if (arg_debug)
2977 printf("Host network configured\n"); 3114 printf("Host network configured\n");
2978#ifdef HAVE_GCOV 3115
2979 __gcov_flush(); 3116 __gcov_flush();
2980#endif 3117
2981 _exit(0); 3118 _exit(0);
2982 } 3119 }
2983 3120
@@ -2987,100 +3124,163 @@ int main(int argc, char **argv, char **envp) {
2987 } 3124 }
2988 EUID_ASSERT(); 3125 EUID_ASSERT();
2989 3126
2990 // close each end of the unused pipes 3127 // close each end of the unused pipes
2991 close(parent_to_child_fds[0]); 3128 close(parent_to_child_fds[0]);
2992 close(child_to_parent_fds[1]); 3129 close(child_to_parent_fds[1]);
2993 3130
2994 // notify child that base setup is complete 3131 // notify child that base setup is complete
2995 notify_other(parent_to_child_fds[1]); 3132 notify_other(parent_to_child_fds[1]);
2996 3133
2997 // wait for child to create new user namespace with CLONE_NEWUSER 3134 // wait for child to create new user namespace with CLONE_NEWUSER
2998 wait_for_other(child_to_parent_fds[0]); 3135 wait_for_other(child_to_parent_fds[0]);
2999 close(child_to_parent_fds[0]); 3136 close(child_to_parent_fds[0]);
3000 3137
3001 if (arg_noroot) { 3138 if (arg_noroot) {
3002 // update the UID and GID maps in the new child user namespace 3139 // update the UID and GID maps in the new child user namespace
3003 // uid 3140 // uid
3004 char *map_path; 3141 char *map_path;
3005 if (asprintf(&map_path, "/proc/%d/uid_map", child) == -1) 3142 if (asprintf(&map_path, "/proc/%d/uid_map", child) == -1)
3006 errExit("asprintf"); 3143 errExit("asprintf");
3007 3144
3008 char *map; 3145 char *map;
3009 uid_t uid = getuid(); 3146 uid_t uid = getuid();
3010 if (asprintf(&map, "%d %d 1", uid, uid) == -1) 3147 if (asprintf(&map, "%d %d 1", uid, uid) == -1)
3011 errExit("asprintf"); 3148 errExit("asprintf");
3012 EUID_ROOT(); 3149 EUID_ROOT();
3013 update_map(map, map_path); 3150 update_map(map, map_path);
3014 EUID_USER(); 3151 EUID_USER();
3015 free(map); 3152 free(map);
3016 free(map_path); 3153 free(map_path);
3017 3154
3018 // gid file 3155 // gid file
3019 if (asprintf(&map_path, "/proc/%d/gid_map", child) == -1) 3156 if (asprintf(&map_path, "/proc/%d/gid_map", child) == -1)
3020 errExit("asprintf"); 3157 errExit("asprintf");
3021 char gidmap[1024]; 3158 char gidmap[1024];
3022 char *ptr = gidmap; 3159 char *ptr = gidmap;
3023 *ptr = '\0'; 3160 *ptr = '\0';
3024 3161
3025 // add user group 3162 // add user group
3026 gid_t gid = getgid(); 3163 gid_t gid = getgid();
3027 sprintf(ptr, "%d %d 1\n", gid, gid); 3164 sprintf(ptr, "%d %d 1\n", gid, gid);
3028 ptr += strlen(ptr); 3165 ptr += strlen(ptr);
3029 3166
3030 if (!arg_nogroups) { 3167 gid_t g;
3031 // add firejail group 3168 if (!arg_nogroups || !check_can_drop_all_groups()) {
3032 gid_t g = get_group_id("firejail"); 3169 // add audio group
3033 if (g) { 3170 if (!arg_nosound) {
3034 sprintf(ptr, "%d %d 1\n", g, g); 3171 g = get_group_id("audio");
3035 ptr += strlen(ptr); 3172 if (g) {
3036 } 3173 sprintf(ptr, "%d %d 1\n", g, g);
3037 3174 ptr += strlen(ptr);
3038 // add tty group 3175 }
3039 g = get_group_id("tty"); 3176 }
3040 if (g) { 3177
3041 sprintf(ptr, "%d %d 1\n", g, g); 3178 // add video group
3042 ptr += strlen(ptr); 3179 if (!arg_novideo) {
3043 } 3180 g = get_group_id("video");
3044 3181 if (g) {
3045 // add audio group 3182 sprintf(ptr, "%d %d 1\n", g, g);
3046 g = get_group_id("audio"); 3183 ptr += strlen(ptr);
3047 if (g) { 3184 }
3048 sprintf(ptr, "%d %d 1\n", g, g); 3185 }
3049 ptr += strlen(ptr); 3186
3050 } 3187 // add render/vglusers group
3051 3188 if (!arg_no3d) {
3052 // add video group 3189 g = get_group_id("render");
3053 g = get_group_id("video"); 3190 if (g) {
3054 if (g) { 3191 sprintf(ptr, "%d %d 1\n", g, g);
3055 sprintf(ptr, "%d %d 1\n", g, g); 3192 ptr += strlen(ptr);
3056 ptr += strlen(ptr); 3193 }
3057 } 3194 g = get_group_id("vglusers");
3058 3195 if (g) {
3059 // add games group 3196 sprintf(ptr, "%d %d 1\n", g, g);
3060 g = get_group_id("games"); 3197 ptr += strlen(ptr);
3061 if (g) { 3198 }
3062 sprintf(ptr, "%d %d 1\n", g, g); 3199 }
3063 } 3200
3064 } 3201 // add lp group
3065 3202 if (!arg_noprinters) {
3066 EUID_ROOT(); 3203 g = get_group_id("lp");
3067 update_map(gidmap, map_path); 3204 if (g) {
3068 EUID_USER(); 3205 sprintf(ptr, "%d %d 1\n", g, g);
3069 free(map_path); 3206 ptr += strlen(ptr);
3070 } 3207 }
3208 }
3209
3210 // add cdrom/optical groups
3211 if (!arg_nodvd) {
3212 g = get_group_id("cdrom");
3213 if (g) {
3214 sprintf(ptr, "%d %d 1\n", g, g);
3215 ptr += strlen(ptr);
3216 }
3217 g = get_group_id("optical");
3218 if (g) {
3219 sprintf(ptr, "%d %d 1\n", g, g);
3220 ptr += strlen(ptr);
3221 }
3222 }
3223
3224 // add input group
3225 if (!arg_noinput) {
3226 g = get_group_id("input");
3227 if (g) {
3228 sprintf(ptr, "%d %d 1\n", g, g);
3229 ptr += strlen(ptr);
3230 }
3231 }
3232 }
3233
3234 if (!arg_nogroups) {
3235 // add firejail group
3236 g = get_group_id("firejail");
3237 if (g) {
3238 sprintf(ptr, "%d %d 1\n", g, g);
3239 ptr += strlen(ptr);
3240 }
3241
3242 // add tty group
3243 g = get_group_id("tty");
3244 if (g) {
3245 sprintf(ptr, "%d %d 1\n", g, g);
3246 ptr += strlen(ptr);
3247 }
3248
3249 // add games group
3250 g = get_group_id("games");
3251 if (g) {
3252 sprintf(ptr, "%d %d 1\n", g, g);
3253 }
3254 }
3255
3256 EUID_ROOT();
3257 update_map(gidmap, map_path);
3258 EUID_USER();
3259 free(map_path);
3260 }
3071 EUID_ASSERT(); 3261 EUID_ASSERT();
3072 3262
3073 // notify child that UID/GID mapping is complete 3263 // notify child that UID/GID mapping is complete
3074 notify_other(parent_to_child_fds[1]); 3264 notify_other(parent_to_child_fds[1]);
3075 close(parent_to_child_fds[1]); 3265 close(parent_to_child_fds[1]);
3076 3266
3077 EUID_ROOT(); 3267 EUID_ROOT();
3078 if (lockfd_network != -1) { 3268 if (lockfd_network != -1) {
3079 flock(lockfd_network, LOCK_UN); 3269 flock(lockfd_network, LOCK_UN);
3080 close(lockfd_network); 3270 close(lockfd_network);
3081 } 3271 }
3082 EUID_USER(); 3272 EUID_USER();
3083 3273
3274 // lock netfilter firewall
3275 if (arg_netlock) {
3276 char *cmd;
3277 if (asprintf(&cmd, "firejail --netlock=%d&", getpid()) == -1)
3278 errExit("asprintf");
3279 int rv = system(cmd);
3280 (void) rv;
3281 free(cmd);
3282 }
3283
3084 int status = 0; 3284 int status = 0;
3085 //***************************** 3285 //*****************************
3086 // following code is signal-safe 3286 // following code is signal-safe
@@ -3098,35 +3298,16 @@ int main(int argc, char **argv, char **envp) {
3098 // end of signal-safe code 3298 // end of signal-safe code
3099 //***************************** 3299 //*****************************
3100 3300
3101#if 0
3102// at this point the sandbox was closed and we are on our way out
3103// it would make sense to move this before waitpid above to free some memory
3104// crash for now as of issue #3662 from dhcp code
3105 // free globals
3106 if (cfg.profile) {
3107 ProfileEntry *prf = cfg.profile;
3108 while (prf != NULL) {
3109 ProfileEntry *next = prf->next;
3110printf("data #%s#\n", prf->data);
3111 if (prf->data)
3112 free(prf->data);
3113printf("link #%s#\n", prf->link);
3114 if (prf->link)
3115 free(prf->link);
3116 free(prf);
3117 prf = next;
3118 }
3119 }
3120#endif
3121 3301
3122 3302
3123 if (WIFEXITED(status)){ 3303 if (WIFEXITED(status)){
3124 myexit(WEXITSTATUS(status)); 3304 myexit(WEXITSTATUS(status));
3125 } else if (WIFSIGNALED(status)) { 3305 } else if (WIFSIGNALED(status)) {
3126 myexit(WTERMSIG(status)); 3306 // distinguish fatal signals by adding 128
3307 myexit(128 + WTERMSIG(status));
3127 } else { 3308 } else {
3128 myexit(0); 3309 myexit(1);
3129 } 3310 }
3130 3311
3131 return 0; 3312 return 1;
3132} 3313}
diff --git a/src/firejail/mountinfo.c b/src/firejail/mountinfo.c
index a700729d3..56c0bda30 100644
--- a/src/firejail/mountinfo.c
+++ b/src/firejail/mountinfo.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -19,10 +19,11 @@
19*/ 19*/
20 20
21#include "firejail.h" 21#include "firejail.h"
22#include <errno.h>
22 23
23#include <fcntl.h> 24#include <fcntl.h>
24#ifndef O_PATH 25#ifndef O_PATH
25# define O_PATH 010000000 26#define O_PATH 010000000
26#endif 27#endif
27 28
28#define MAX_BUF 4096 29#define MAX_BUF 4096
@@ -32,43 +33,38 @@ static MountData mdata;
32 33
33 34
34// Convert octal escape sequence to decimal value 35// Convert octal escape sequence to decimal value
35static int read_oct(const char *path) { 36static unsigned read_oct(char *s) {
36 int dec = 0; 37 assert(s[0] == '\\');
37 int digit, i; 38 s++;
38 // there are always exactly three octal digits 39
39 for (i = 1; i < 4; i++) { 40 int i;
40 digit = *(path + i); 41 for (i = 0; i < 3; i++)
41 if (digit < '0' || digit > '7') { 42 assert(s[i] >= '0' && s[i] <= '7');
42 fprintf(stderr, "Error: cannot read /proc/self/mountinfo\n"); 43
43 exit(1); 44 return ((s[0] - '0') << 6 |
44 } 45 (s[1] - '0') << 3 |
45 dec = (dec << 3) + (digit - '0'); 46 (s[2] - '0') << 0);
46 }
47 return dec;
48} 47}
49 48
50// Restore empty spaces in pathnames extracted from /proc/self/mountinfo 49// Restore empty spaces in pathnames extracted from /proc/self/mountinfo
51static void unmangle_path(char *path) { 50static void unmangle_path(char *path) {
52 char *p = strchr(path, '\\'); 51 char *r = strchr(path, '\\');
53 if (p && read_oct(p) == ' ') { 52 if (!r)
54 *p = ' '; 53 return;
55 int i = 3; 54
56 do { 55 char *w = r;
57 p++; 56 do {
58 if (*(p + i) == '\\' && read_oct(p + i) == ' ') { 57 while (*r == '\\') {
59 *p = ' '; 58 *w++ = read_oct(r);
60 i += 3; 59 r += 4;
61 } 60 }
62 else 61 *w++ = *r;
63 *p = *(p + i); 62 } while (*r++);
64 } while (*p);
65 }
66} 63}
67 64
68// Parse a line from /proc/self/mountinfo, 65// Parse a line from /proc/self/mountinfo,
69// the function does an exit(1) if anything goes wrong. 66// the function does an exit(1) if anything goes wrong.
70static void parse_line(char *line, MountData *output) { 67static void parse_line(char *line, MountData *output) {
71 assert(line && output);
72 memset(output, 0, sizeof(*output)); 68 memset(output, 0, sizeof(*output));
73 // extract mount id, filesystem name, directory and filesystem types 69 // extract mount id, filesystem name, directory and filesystem types
74 // examples: 70 // examples:
@@ -86,8 +82,6 @@ static void parse_line(char *line, MountData *output) {
86 char *ptr = strtok(line, " "); 82 char *ptr = strtok(line, " ");
87 if (!ptr) 83 if (!ptr)
88 goto errexit; 84 goto errexit;
89 if (ptr != line)
90 goto errexit;
91 output->mountid = atoi(ptr); 85 output->mountid = atoi(ptr);
92 int cnt = 1; 86 int cnt = 1;
93 87
@@ -108,10 +102,9 @@ static void parse_line(char *line, MountData *output) {
108 ptr = strtok(NULL, " "); 102 ptr = strtok(NULL, " ");
109 if (!ptr) 103 if (!ptr)
110 goto errexit; 104 goto errexit;
111 output->fstype = ptr++; 105 output->fstype = ptr;
112 106
113 107 if (output->mountid < 0 ||
114 if (output->mountid == 0 ||
115 output->fsname == NULL || 108 output->fsname == NULL ||
116 output->dir == NULL || 109 output->dir == NULL ||
117 output->fstype == NULL) 110 output->fstype == NULL)
@@ -151,108 +144,118 @@ MountData *get_last_mount(void) {
151 return &mdata; 144 return &mdata;
152} 145}
153 146
154// Extract the mount id from /proc/self/fdinfo and return it. 147// Returns mount id, or -1 if fd refers to a procfs or sysfs file
155int get_mount_id(const char *path) { 148static int get_mount_id_from_handle(int fd) {
156 assert(path); 149 char *proc;
150 if (asprintf(&proc, "/proc/self/fd/%d", fd) == -1)
151 errExit("asprintf");
152
153 struct file_handle *fh = malloc(sizeof *fh);
154 if (!fh)
155 errExit("malloc");
156 fh->handle_bytes = 0;
157
158 int rv = -1;
159 int tmp;
160 if (name_to_handle_at(-1, proc, fh, &tmp, AT_SYMLINK_FOLLOW) != -1) {
161 fprintf(stderr, "Error: unexpected result from name_to_handle_at\n");
162 exit(1);
163 }
164 if (errno == EOVERFLOW && fh->handle_bytes)
165 rv = tmp;
157 166
158 int fd = open(path, O_PATH|O_CLOEXEC); 167 free(proc);
159 if (fd == -1) 168 free(fh);
160 return -1; 169 return rv;
170}
161 171
162 char *fdinfo; 172// Returns mount id, or -1 on kernels < 3.15
163 if (asprintf(&fdinfo, "/proc/self/fdinfo/%d", fd) == -1) 173static int get_mount_id_from_fdinfo(int fd) {
174 char *proc;
175 if (asprintf(&proc, "/proc/self/fdinfo/%d", fd) == -1)
164 errExit("asprintf"); 176 errExit("asprintf");
165 FILE *fp = fopen(fdinfo, "re");
166 free(fdinfo);
167 if (!fp)
168 goto errexit;
169 177
170 // read the file 178 int called_as_root = 0;
179 if (geteuid() == 0)
180 called_as_root = 1;
181
182 if (called_as_root == 0)
183 EUID_ROOT();
184
185 FILE *fp = fopen(proc, "re");
186 if (!fp) {
187 fprintf(stderr, "Error: cannot read proc file\n");
188 exit(1);
189 }
190
191 if (called_as_root == 0)
192 EUID_USER();
193
194 int rv = -1;
171 char buf[MAX_BUF]; 195 char buf[MAX_BUF];
172 if (fgets(buf, MAX_BUF, fp) == NULL) 196 while (fgets(buf, MAX_BUF, fp)) {
173 goto errexit; 197 if (sscanf(buf, "mnt_id: %d", &rv) == 1)
174 do { 198 break;
175 if (strncmp(buf, "mnt_id:", 7) == 0) { 199 }
176 char *ptr = buf + 7;
177 while (*ptr != '\0' && (*ptr == ' ' || *ptr == '\t')) {
178 ptr++;
179 }
180 if (*ptr == '\0')
181 goto errexit;
182 fclose(fp);
183 close(fd);
184 return atoi(ptr);
185 }
186 } while (fgets(buf, MAX_BUF, fp));
187 200
188 // fallback, kernels older than 3.15 don't expose the mount id in this place 201 free(proc);
189 fclose(fp); 202 fclose(fp);
190 close(fd); 203 return rv;
191 return -2; 204}
192 205
193errexit: 206int get_mount_id(int fd) {
194 fprintf(stderr, "Error: cannot read proc file\n"); 207 int rv = get_mount_id_from_handle(fd);
195 exit(1); 208 if (rv < 0)
209 rv = get_mount_id_from_fdinfo(fd);
210 return rv;
196} 211}
197 212
198// Check /proc/self/mountinfo if path contains any mounts points. 213// Check /proc/self/mountinfo if path contains any mounts points.
199// Returns an array that can be iterated over for recursive remounting. 214// Returns an array that can be iterated over for recursive remounting.
200char **build_mount_array(const int mount_id, const char *path) { 215char **build_mount_array(const int mountid, const char *path) {
201 assert(path); 216 assert(path);
202 217
203 // open /proc/self/mountinfo
204 FILE *fp = fopen("/proc/self/mountinfo", "re"); 218 FILE *fp = fopen("/proc/self/mountinfo", "re");
205 if (!fp) { 219 if (!fp) {
206 fprintf(stderr, "Error: cannot read /proc/self/mountinfo\n"); 220 fprintf(stderr, "Error: cannot read /proc/self/mountinfo\n");
207 exit(1); 221 exit(1);
208 } 222 }
209 223
210 // array to be returned 224 // try to find line with mount id
211 size_t cnt = 0; 225 int found = 0;
226 MountData mntp;
227 char line[MAX_BUF];
228 while (fgets(line, MAX_BUF, fp)) {
229 parse_line(line, &mntp);
230 if (mntp.mountid == mountid) {
231 found = 1;
232 break;
233 }
234 }
235
236 if (!found) {
237 fclose(fp);
238 return NULL;
239 }
240
241 // allocate array
212 size_t size = 32; 242 size_t size = 32;
213 char **rv = malloc(size * sizeof(*rv)); 243 char **rv = malloc(size * sizeof(*rv));
214 if (!rv) 244 if (!rv)
215 errExit("malloc"); 245 errExit("malloc");
216 246
217 // read /proc/self/mountinfo 247 // add directory itself
218 size_t pathlen = strlen(path); 248 size_t cnt = 0;
219 char buf[MAX_BUF]; 249 rv[cnt] = strdup(path);
220 MountData mntp; 250 if (rv[cnt] == NULL)
221 int found = 0; 251 errExit("strdup");
222 252
223 if (fgets(buf, MAX_BUF, fp) == NULL) { 253 // and add all following mountpoints contained in this directory
224 fprintf(stderr, "Error: cannot read /proc/self/mountinfo\n"); 254 size_t pathlen = strlen(path);
225 exit(1); 255 while (fgets(line, MAX_BUF, fp)) {
226 } 256 parse_line(line, &mntp);
227 do { 257 if (strncmp(mntp.dir, path, pathlen) == 0 && mntp.dir[pathlen] == '/') {
228 parse_line(buf, &mntp); 258 if (++cnt == size) {
229 // find mount point with mount id
230 if (!found) {
231 if (mntp.mountid == mount_id) {
232 // give up if mount id has been reassigned,
233 // don't remount blacklisted path
234 if (strncmp(mntp.dir, path, strlen(mntp.dir)) ||
235 strstr(mntp.fsname, "firejail.ro.dir") ||
236 strstr(mntp.fsname, "firejail.ro.file"))
237 break;
238
239 rv[cnt] = strdup(path);
240 if (rv[cnt] == NULL)
241 errExit("strdup");
242 cnt++;
243 found = 1;
244 continue;
245 }
246 continue;
247 }
248 // from here on add all mount points below path,
249 // don't remount blacklisted paths
250 if (strncmp(mntp.dir, path, pathlen) == 0 &&
251 mntp.dir[pathlen] == '/' &&
252 strstr(mntp.fsname, "firejail.ro.dir") == NULL &&
253 strstr(mntp.fsname, "firejail.ro.file") == NULL) {
254
255 if (cnt == size) {
256 size *= 2; 259 size *= 2;
257 rv = realloc(rv, size * sizeof(*rv)); 260 rv = realloc(rv, size * sizeof(*rv));
258 if (!rv) 261 if (!rv)
@@ -261,18 +264,17 @@ char **build_mount_array(const int mount_id, const char *path) {
261 rv[cnt] = strdup(mntp.dir); 264 rv[cnt] = strdup(mntp.dir);
262 if (rv[cnt] == NULL) 265 if (rv[cnt] == NULL)
263 errExit("strdup"); 266 errExit("strdup");
264 cnt++;
265 } 267 }
266 } while (fgets(buf, MAX_BUF, fp)); 268 }
269 fclose(fp);
267 270
268 if (cnt == size) { 271 // end of array
269 size++; 272 if (++cnt == size) {
273 ++size;
270 rv = realloc(rv, size * sizeof(*rv)); 274 rv = realloc(rv, size * sizeof(*rv));
271 if (!rv) 275 if (!rv)
272 errExit("realloc"); 276 errExit("realloc");
273 } 277 }
274 rv[cnt] = NULL; // end of the array 278 rv[cnt] = NULL;
275
276 fclose(fp);
277 return rv; 279 return rv;
278} 280}
diff --git a/src/firejail/netfilter.c b/src/firejail/netfilter.c
index fc79dddec..5b49fe19a 100644
--- a/src/firejail/netfilter.c
+++ b/src/firejail/netfilter.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -24,6 +24,96 @@
24#include <sys/wait.h> 24#include <sys/wait.h>
25#include <fcntl.h> 25#include <fcntl.h>
26 26
27void netfilter_netlock(pid_t pid) {
28 EUID_ASSERT();
29
30 // give the sandbox a chance to start up before entering the network namespace
31 sleep(1);
32 enter_network_namespace(pid);
33
34 char *flog;
35 if (asprintf(&flog, "/run/firejail/network/%d-netlock", getpid()) == -1)
36 errExit("asprintf");
37 FILE *fp = fopen(flog, "w");
38 if (!fp)
39 errExit("fopen");
40 fclose(fp);
41
42 // try to find a X terminal
43 char *terminal = NULL;
44 if (access("/usr/bin/xterm", X_OK) == 0)
45 terminal = "/usr/bin/xterm";
46 else if (access("/usr/bin/lxterminal", X_OK) == 0)
47 terminal = "/usr/bin/lxterminal";
48 else if (access("/usr/bin/xfce4-terminal", X_OK) == 0)
49 terminal = "/usr/bin/xfce4-terminal";
50 else if (access("/usr/bin/konsole", X_OK) == 0)
51 terminal = "/usr/bin/konsole";
52// problem: newer gnome-terminal versions don't support -e command line option???
53// same for mate-terminal
54
55 if (isatty(STDIN_FILENO))
56 terminal = NULL;
57
58 if (terminal) {
59 pid_t p = fork();
60 if (p == -1)
61 ; // run without terminal logger
62 else if (p == 0) { // child
63 drop_privs(0);
64
65 char *cmd;
66 if (asprintf(&cmd, "%s -e \"%s/firejail/fnettrace --tail --log=%s\"", terminal, LIBDIR, flog) == -1)
67 errExit("asprintf");
68 int rv = system(cmd);
69 (void) rv;
70 exit(0);
71 }
72 }
73
74 char *cmd;
75 if (asprintf(&cmd, "%s/firejail/fnettrace --netfilter --log=%s", LIBDIR, flog) == -1)
76 errExit("asprintf");
77 free(flog);
78
79 //************************
80 // build command
81 //************************
82 char *arg[4];
83 arg[0] = "/bin/sh";
84 arg[1] = "-c";
85 arg[2] = cmd;
86 arg[3] = NULL;
87 clearenv();
88 sbox_exec_v(SBOX_ROOT | SBOX_CAPS_NETWORK | SBOX_SECCOMP, arg);
89 // it will never get here!!
90}
91
92void netfilter_trace(pid_t pid) {
93 EUID_ASSERT();
94
95 // a pid of 0 means the main system network namespace
96 if (pid)
97 enter_network_namespace(pid);
98
99 char *cmd;
100 if (asprintf(&cmd, "%s/firejail/fnettrace", LIBDIR) == -1)
101 errExit("asprintf");
102
103 //************************
104 // build command
105 //************************
106 char *arg[4];
107 arg[0] = "/bin/sh";
108 arg[1] = "-c";
109 arg[2] = cmd;
110 arg[3] = NULL;
111
112 clearenv();
113 sbox_exec_v(SBOX_ROOT | SBOX_CAPS_NETWORK | SBOX_SECCOMP, arg);
114 // it will never get here!!
115}
116
27void check_netfilter_file(const char *fname) { 117void check_netfilter_file(const char *fname) {
28 EUID_ASSERT(); 118 EUID_ASSERT();
29 119
diff --git a/src/firejail/netns.c b/src/firejail/netns.c
index b5d6fb636..c72c009ae 100644
--- a/src/firejail/netns.c
+++ b/src/firejail/netns.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2020-2021 Firejail Authors 2 * Copyright (C) 2020-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/firejail/network.c b/src/firejail/network.c
index f7142cefd..e631745fb 100644
--- a/src/firejail/network.c
+++ b/src/firejail/network.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -217,7 +217,7 @@ int net_add_route(uint32_t ip, uint32_t mask, uint32_t gw) {
217 217
218#define BUFSIZE 1024 218#define BUFSIZE 1024
219uint32_t network_get_defaultgw(void) { 219uint32_t network_get_defaultgw(void) {
220 FILE *fp = fopen("/proc/self/net/route", "r"); 220 FILE *fp = fopen("/proc/self/net/route", "re");
221 if (!fp) 221 if (!fp)
222 errExit("fopen"); 222 errExit("fopen");
223 223
diff --git a/src/firejail/network_main.c b/src/firejail/network_main.c
index ee3c00872..dd66ecc55 100644
--- a/src/firejail/network_main.c
+++ b/src/firejail/network_main.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -292,7 +292,7 @@ void net_dns_print(pid_t pid) {
292 errExit("chdir"); 292 errExit("chdir");
293 293
294 // access /etc/resolv.conf 294 // access /etc/resolv.conf
295 FILE *fp = fopen("/etc/resolv.conf", "r"); 295 FILE *fp = fopen("/etc/resolv.conf", "re");
296 if (!fp) { 296 if (!fp) {
297 fprintf(stderr, "Error: cannot access /etc/resolv.conf\n"); 297 fprintf(stderr, "Error: cannot access /etc/resolv.conf\n");
298 exit(1); 298 exit(1);
diff --git a/src/firejail/no_sandbox.c b/src/firejail/no_sandbox.c
index 60a82821e..c57d397ef 100644
--- a/src/firejail/no_sandbox.c
+++ b/src/firejail/no_sandbox.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -20,6 +20,7 @@
20#include "firejail.h" 20#include "firejail.h"
21#include <sys/types.h> 21#include <sys/types.h>
22#include <sys/stat.h> 22#include <sys/stat.h>
23#include <errno.h>
23#include <unistd.h> 24#include <unistd.h>
24#include <grp.h> 25#include <grp.h>
25 26
@@ -47,7 +48,8 @@ int check_namespace_virt(void) {
47 48
48 // check PID 1 container environment variable 49 // check PID 1 container environment variable
49 EUID_ROOT(); 50 EUID_ROOT();
50 FILE *fp = fopen("/proc/1/environ", "r"); 51 FILE *fp = fopen("/proc/1/environ", "re");
52 EUID_USER();
51 if (fp) { 53 if (fp) {
52 int c = 0; 54 int c = 0;
53 while (c != EOF) { 55 while (c != EOF) {
@@ -68,7 +70,6 @@ int check_namespace_virt(void) {
68 // found it 70 // found it
69 if (is_container(buf + 10)) { 71 if (is_container(buf + 10)) {
70 fclose(fp); 72 fclose(fp);
71 EUID_USER();
72 return 1; 73 return 1;
73 } 74 }
74 } 75 }
@@ -78,7 +79,6 @@ int check_namespace_virt(void) {
78 fclose(fp); 79 fclose(fp);
79 } 80 }
80 81
81 EUID_USER();
82 return 0; 82 return 0;
83} 83}
84 84
@@ -105,20 +105,15 @@ int check_kernel_procs(void) {
105 // look at the first 10 processes 105 // look at the first 10 processes
106 // if a kernel process is found, return 1 106 // if a kernel process is found, return 1
107 for (i = 1; i <= 10; i++) { 107 for (i = 1; i <= 10; i++) {
108 struct stat s;
109 char *fname; 108 char *fname;
110 if (asprintf(&fname, "/proc/%d/comm", i) == -1) 109 if (asprintf(&fname, "/proc/%d/comm", i) == -1)
111 errExit("asprintf"); 110 errExit("asprintf");
112 if (stat(fname, &s) == -1) {
113 free(fname);
114 continue;
115 }
116 111
117 // open file 112 // open file
118 /* coverity[toctou] */ 113 FILE *fp = fopen(fname, "re");
119 FILE *fp = fopen(fname, "r");
120 if (!fp) { 114 if (!fp) {
121 fwarning("cannot open %s\n", fname); 115 if (errno != ENOENT)
116 fwarning("cannot open %s\n", fname);
122 free(fname); 117 free(fname);
123 continue; 118 continue;
124 } 119 }
@@ -208,7 +203,7 @@ void run_no_sandbox(int argc, char **argv) {
208 // force --shell=none in order to not break firecfg symbolic links 203 // force --shell=none in order to not break firecfg symbolic links
209 arg_shell_none = 1; 204 arg_shell_none = 1;
210 205
211 build_cmdline(&cfg.command_line, &cfg.window_title, argc, argv, prog_index); 206 build_cmdline(&cfg.command_line, &cfg.window_title, argc, argv, prog_index, true);
212 } 207 }
213 208
214 fwarning("an existing sandbox was detected. " 209 fwarning("an existing sandbox was detected. "
diff --git a/src/firejail/output.c b/src/firejail/output.c
index 835dff2db..f9df9f3d4 100644
--- a/src/firejail/output.c
+++ b/src/firejail/output.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -50,13 +50,21 @@ void check_output(int argc, char **argv) {
50 if (!outindex) 50 if (!outindex)
51 return; 51 return;
52 52
53
54 // check filename
55 drop_privs(0); 53 drop_privs(0);
56 char *outfile = argv[outindex]; 54 char *outfile = argv[outindex];
57 outfile += (enable_stderr)? 16:9; 55 outfile += (enable_stderr)? 16:9;
56
57 // check filename
58 invalid_filename(outfile, 0); // no globbing 58 invalid_filename(outfile, 0); // no globbing
59 59
60 // expand user home directory
61 if (outfile[0] == '~') {
62 char *full;
63 if (asprintf(&full, "%s%s", cfg.homedir, outfile + 1) == -1)
64 errExit("asprintf");
65 outfile = full;
66 }
67
60 // do not accept directories, links, and files with ".." 68 // do not accept directories, links, and files with ".."
61 if (strstr(outfile, "..") || is_link(outfile) || is_dir(outfile)) { 69 if (strstr(outfile, "..") || is_link(outfile) || is_dir(outfile)) {
62 fprintf(stderr, "Error: invalid output file. Links, directories and files with \"..\" are not allowed.\n"); 70 fprintf(stderr, "Error: invalid output file. Links, directories and files with \"..\" are not allowed.\n");
diff --git a/src/firejail/paths.c b/src/firejail/paths.c
index b800fa944..6d62c9004 100644
--- a/src/firejail/paths.c
+++ b/src/firejail/paths.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -136,7 +136,7 @@ int program_in_path(const char *program) {
136 // ('x' permission means something different for directories). 136 // ('x' permission means something different for directories).
137 // exec follows symlinks, so use stat, not lstat. 137 // exec follows symlinks, so use stat, not lstat.
138 struct stat st; 138 struct stat st;
139 if (stat(scratch, &st)) { 139 if (stat_as_user(scratch, &st)) {
140 perror(scratch); 140 perror(scratch);
141 exit(1); 141 exit(1);
142 } 142 }
diff --git a/src/firejail/preproc.c b/src/firejail/preproc.c
index 7f602545d..da50e9a82 100644
--- a/src/firejail/preproc.c
+++ b/src/firejail/preproc.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -164,7 +164,7 @@ void preproc_clean_run(void) {
164 int max_pids=32769; 164 int max_pids=32769;
165 int start_pid = 100; 165 int start_pid = 100;
166 // extract real max_pids 166 // extract real max_pids
167 FILE *fp = fopen("/proc/sys/kernel/pid_max", "r"); 167 FILE *fp = fopen("/proc/sys/kernel/pid_max", "re");
168 if (fp) { 168 if (fp) {
169 int val; 169 int val;
170 if (fscanf(fp, "%d", &val) == 1) { 170 if (fscanf(fp, "%d", &val) == 1) {
diff --git a/src/firejail/profile.c b/src/firejail/profile.c
index 2ea32b665..5bc77263a 100644
--- a/src/firejail/profile.c
+++ b/src/firejail/profile.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -18,10 +18,12 @@
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include "firejail.h" 20#include "firejail.h"
21#include "../include/gcov_wrapper.h"
21#include "../include/seccomp.h" 22#include "../include/seccomp.h"
22#include "../include/syscall.h" 23#include "../include/syscall.h"
23#include <dirent.h> 24#include <dirent.h>
24#include <sys/stat.h> 25#include <sys/stat.h>
26
25extern char *xephyr_screen; 27extern char *xephyr_screen;
26 28
27#define MAX_READ 8192 // line buffer for profile files 29#define MAX_READ 8192 // line buffer for profile files
@@ -70,6 +72,7 @@ static int profile_find(const char *name, const char *dir, int add_ext) {
70// search and read the profile specified by name from firejail directories 72// search and read the profile specified by name from firejail directories
71// return 1 if a profile was found 73// return 1 if a profile was found
72int profile_find_firejail(const char *name, int add_ext) { 74int profile_find_firejail(const char *name, int add_ext) {
75#ifndef HAVE_ONLY_SYSCFG_PROFILES
73 // look for a profile in ~/.config/firejail directory 76 // look for a profile in ~/.config/firejail directory
74 char *usercfgdir; 77 char *usercfgdir;
75 if (asprintf(&usercfgdir, "%s/.config/firejail", cfg.homedir) == -1) 78 if (asprintf(&usercfgdir, "%s/.config/firejail", cfg.homedir) == -1)
@@ -82,6 +85,9 @@ int profile_find_firejail(const char *name, int add_ext) {
82 rv = profile_find(name, SYSCONFDIR, add_ext); 85 rv = profile_find(name, SYSCONFDIR, add_ext);
83 86
84 return rv; 87 return rv;
88#else
89 return profile_find(name, SYSCONFDIR, add_ext);
90#endif
85} 91}
86 92
87//*************************************************** 93//***************************************************
@@ -173,6 +179,10 @@ static int check_allow_drm(void) {
173 return checkcfg(CFG_BROWSER_ALLOW_DRM) != 0; 179 return checkcfg(CFG_BROWSER_ALLOW_DRM) != 0;
174} 180}
175 181
182static int check_allow_tray(void) {
183 return checkcfg(CFG_ALLOW_TRAY) != 0;
184}
185
176Cond conditionals[] = { 186Cond conditionals[] = {
177 {"HAS_APPIMAGE", check_appimage}, 187 {"HAS_APPIMAGE", check_appimage},
178 {"HAS_NET", check_netoptions}, 188 {"HAS_NET", check_netoptions},
@@ -182,6 +192,7 @@ Cond conditionals[] = {
182 {"HAS_X11", check_x11}, 192 {"HAS_X11", check_x11},
183 {"BROWSER_DISABLE_U2F", check_disable_u2f}, 193 {"BROWSER_DISABLE_U2F", check_disable_u2f},
184 {"BROWSER_ALLOW_DRM", check_allow_drm}, 194 {"BROWSER_ALLOW_DRM", check_allow_drm},
195 {"ALLOW_TRAY", check_allow_tray},
185 { NULL, NULL } 196 { NULL, NULL }
186}; 197};
187 198
@@ -283,6 +294,15 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
283 return 0; 294 return 0;
284 } 295 }
285 296
297 if (strncmp(ptr, "keep-fd ", 8) == 0) {
298 if (strcmp(ptr + 8, "all") == 0)
299 arg_keep_fd_all = 1;
300 else {
301 const char *add = ptr + 8;
302 profile_list_augment(&cfg.keep_fd, add);
303 }
304 return 0;
305 }
286 if (strncmp(ptr, "xephyr-screen ", 14) == 0) { 306 if (strncmp(ptr, "xephyr-screen ", 14) == 0) {
287#ifdef HAVE_X11 307#ifdef HAVE_X11
288 if (checkcfg(CFG_X11)) { 308 if (checkcfg(CFG_X11)) {
@@ -373,6 +393,10 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
373#endif 393#endif
374 return 0; 394 return 0;
375 } 395 }
396 else if (strcmp(ptr, "tab") == 0) {
397 arg_tab = 1;
398 return 0;
399 }
376 else if (strcmp(ptr, "private-cwd") == 0) { 400 else if (strcmp(ptr, "private-cwd") == 0) {
377 cfg.cwd = NULL; 401 cfg.cwd = NULL;
378 arg_private_cwd = 1; 402 arg_private_cwd = 1;
@@ -409,13 +433,7 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
409 return 0; 433 return 0;
410 } 434 }
411 else if (strcmp(ptr, "nogroups") == 0) { 435 else if (strcmp(ptr, "nogroups") == 0) {
412 // nvidia cards require video group; disable nogroups 436 arg_nogroups = 1;
413 if (access("/dev/nvidiactl", R_OK) == 0 && arg_no3d == 0) {
414 fwarning("Warning: NVIDIA card detected, nogroups command disabled\n");
415 arg_nogroups = 0;
416 }
417 else
418 arg_nogroups = 1;
419 return 0; 437 return 0;
420 } 438 }
421 else if (strcmp(ptr, "nosound") == 0) { 439 else if (strcmp(ptr, "nosound") == 0) {
@@ -423,7 +441,7 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
423 return 0; 441 return 0;
424 } 442 }
425 else if (strcmp(ptr, "noautopulse") == 0) { 443 else if (strcmp(ptr, "noautopulse") == 0) {
426 arg_noautopulse = 1; 444 arg_keep_config_pulse = 1;
427 return 0; 445 return 0;
428 } 446 }
429 else if (strcmp(ptr, "notv") == 0) { 447 else if (strcmp(ptr, "notv") == 0) {
@@ -442,6 +460,12 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
442 arg_no3d = 1; 460 arg_no3d = 1;
443 return 0; 461 return 0;
444 } 462 }
463 else if (strcmp(ptr, "noprinters") == 0) {
464 arg_noprinters = 1;
465 profile_add("blacklist /dev/lp*");
466 profile_add("blacklist /run/cups/cups.sock");
467 return 0;
468 }
445 else if (strcmp(ptr, "noinput") == 0) { 469 else if (strcmp(ptr, "noinput") == 0) {
446 arg_noinput = 1; 470 arg_noinput = 1;
447 return 0; 471 return 0;
@@ -628,7 +652,7 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
628#endif 652#endif
629 return 0; 653 return 0;
630 } 654 }
631 else if (strncmp(ptr, "netns ", 6) == 0) { 655 else if (strncmp(ptr, "netns ", 6) == 0) {
632#ifdef HAVE_NETWORK 656#ifdef HAVE_NETWORK
633 if (checkcfg(CFG_NETWORK)) { 657 if (checkcfg(CFG_NETWORK)) {
634 arg_netns = ptr + 6; 658 arg_netns = ptr + 6;
@@ -979,10 +1003,10 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
979 warning_feature_disabled("seccomp"); 1003 warning_feature_disabled("seccomp");
980 return 0; 1004 return 0;
981 } 1005 }
982 if (strncmp(ptr, "seccomp.32.drop ", 13) == 0) { 1006 if (strncmp(ptr, "seccomp.32.drop ", 16) == 0) {
983 if (checkcfg(CFG_SECCOMP)) { 1007 if (checkcfg(CFG_SECCOMP)) {
984 arg_seccomp32 = 1; 1008 arg_seccomp32 = 1;
985 cfg.seccomp_list_drop32 = seccomp_check_list(ptr + 13); 1009 cfg.seccomp_list_drop32 = seccomp_check_list(ptr + 16);
986 } 1010 }
987 else 1011 else
988 warning_feature_disabled("seccomp"); 1012 warning_feature_disabled("seccomp");
@@ -999,10 +1023,10 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
999 warning_feature_disabled("seccomp"); 1023 warning_feature_disabled("seccomp");
1000 return 0; 1024 return 0;
1001 } 1025 }
1002 if (strncmp(ptr, "seccomp.32.keep ", 13) == 0) { 1026 if (strncmp(ptr, "seccomp.32.keep ", 16) == 0) {
1003 if (checkcfg(CFG_SECCOMP)) { 1027 if (checkcfg(CFG_SECCOMP)) {
1004 arg_seccomp32 = 1; 1028 arg_seccomp32 = 1;
1005 cfg.seccomp_list_keep32 = seccomp_check_list(ptr + 13); 1029 cfg.seccomp_list_keep32 = seccomp_check_list(ptr + 16);
1006 } 1030 }
1007 else 1031 else
1008 warning_feature_disabled("seccomp"); 1032 warning_feature_disabled("seccomp");
@@ -1099,7 +1123,7 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
1099 else if (cfg.dns4 == NULL) 1123 else if (cfg.dns4 == NULL)
1100 cfg.dns4 = dns; 1124 cfg.dns4 = dns;
1101 else { 1125 else {
1102 fwarning("Warning: up to 4 DNS servers can be specified, %s ignored\n", dns); 1126 fwarning("up to 4 DNS servers can be specified, %s ignored\n", dns);
1103 free(dns); 1127 free(dns);
1104 } 1128 }
1105 return 0; 1129 return 0;
@@ -1122,8 +1146,14 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
1122 1146
1123 // cgroup 1147 // cgroup
1124 if (strncmp(ptr, "cgroup ", 7) == 0) { 1148 if (strncmp(ptr, "cgroup ", 7) == 0) {
1125 if (checkcfg(CFG_CGROUP)) 1149 if (checkcfg(CFG_CGROUP)) {
1126 set_cgroup(ptr + 7); 1150 cfg.cgroup = strdup(ptr + 7);
1151 if (!cfg.cgroup)
1152 errExit("strdup");
1153
1154 check_cgroup_file(cfg.cgroup);
1155 set_cgroup(cfg.cgroup, getpid());
1156 }
1127 else 1157 else
1128 warning_feature_disabled("cgroup"); 1158 warning_feature_disabled("cgroup");
1129 return 0; 1159 return 0;
@@ -1143,6 +1173,12 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
1143 arg_machineid = 1; 1173 arg_machineid = 1;
1144 return 0; 1174 return 0;
1145 } 1175 }
1176
1177 if (strcmp(ptr, "keep-config-pulse") == 0) {
1178 arg_keep_config_pulse = 1;
1179 return 0;
1180 }
1181
1146 // writable-var 1182 // writable-var
1147 if (strcmp(ptr, "writable-var") == 0) { 1183 if (strcmp(ptr, "writable-var") == 0) {
1148 arg_writable_var = 1; 1184 arg_writable_var = 1;
@@ -1269,56 +1305,69 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
1269 1305
1270 // private /etc list of files and directories 1306 // private /etc list of files and directories
1271 if (strncmp(ptr, "private-etc ", 12) == 0) { 1307 if (strncmp(ptr, "private-etc ", 12) == 0) {
1272 if (arg_writable_etc) { 1308 if (checkcfg(CFG_PRIVATE_ETC)) {
1273 fprintf(stderr, "Error: --private-etc and --writable-etc are mutually exclusive\n"); 1309 if (arg_writable_etc) {
1274 exit(1); 1310 fprintf(stderr, "Error: --private-etc and --writable-etc are mutually exclusive\n");
1275 } 1311 exit(1);
1276 if (cfg.etc_private_keep) { 1312 }
1277 if ( asprintf(&cfg.etc_private_keep, "%s,%s", cfg.etc_private_keep, ptr + 12) < 0 ) 1313 if (cfg.etc_private_keep) {
1278 errExit("asprintf"); 1314 if ( asprintf(&cfg.etc_private_keep, "%s,%s", cfg.etc_private_keep, ptr + 12) < 0 )
1279 } else { 1315 errExit("asprintf");
1280 cfg.etc_private_keep = ptr + 12; 1316 } else {
1317 cfg.etc_private_keep = ptr + 12;
1318 }
1319 arg_private_etc = 1;
1281 } 1320 }
1282 arg_private_etc = 1; 1321 else
1283 1322 warning_feature_disabled("private-etc");
1284 return 0; 1323 return 0;
1285 } 1324 }
1286 1325
1287 // private /opt list of files and directories 1326 // private /opt list of files and directories
1288 if (strncmp(ptr, "private-opt ", 12) == 0) { 1327 if (strncmp(ptr, "private-opt ", 12) == 0) {
1289 if (cfg.opt_private_keep) { 1328 if (checkcfg(CFG_PRIVATE_OPT)) {
1290 if ( asprintf(&cfg.opt_private_keep, "%s,%s", cfg.opt_private_keep, ptr + 12) < 0 ) 1329 if (cfg.opt_private_keep) {
1291 errExit("asprintf"); 1330 if ( asprintf(&cfg.opt_private_keep, "%s,%s", cfg.opt_private_keep, ptr + 12) < 0 )
1292 } else { 1331 errExit("asprintf");
1293 cfg.opt_private_keep = ptr + 12; 1332 } else {
1333 cfg.opt_private_keep = ptr + 12;
1334 }
1335 arg_private_opt = 1;
1294 } 1336 }
1295 arg_private_opt = 1; 1337 else
1296 1338 warning_feature_disabled("private-opt");
1297 return 0; 1339 return 0;
1298 } 1340 }
1299 1341
1300 // private /srv list of files and directories 1342 // private /srv list of files and directories
1301 if (strncmp(ptr, "private-srv ", 12) == 0) { 1343 if (strncmp(ptr, "private-srv ", 12) == 0) {
1302 if (cfg.srv_private_keep) { 1344 if (checkcfg(CFG_PRIVATE_SRV)) {
1303 if ( asprintf(&cfg.srv_private_keep, "%s,%s", cfg.srv_private_keep, ptr + 12) < 0 ) 1345 if (cfg.srv_private_keep) {
1304 errExit("asprintf"); 1346 if ( asprintf(&cfg.srv_private_keep, "%s,%s", cfg.srv_private_keep, ptr + 12) < 0 )
1305 } else { 1347 errExit("asprintf");
1306 cfg.srv_private_keep = ptr + 12; 1348 } else {
1349 cfg.srv_private_keep = ptr + 12;
1350 }
1351 arg_private_srv = 1;
1307 } 1352 }
1308 arg_private_srv = 1; 1353 else
1309 1354 warning_feature_disabled("private-srv");
1310 return 0; 1355 return 0;
1311 } 1356 }
1312 1357
1313 // private /bin list of files 1358 // private /bin list of files
1314 if (strncmp(ptr, "private-bin ", 12) == 0) { 1359 if (strncmp(ptr, "private-bin ", 12) == 0) {
1315 if (cfg.bin_private_keep) { 1360 if (checkcfg(CFG_PRIVATE_BIN)) {
1316 if ( asprintf(&cfg.bin_private_keep, "%s,%s", cfg.bin_private_keep, ptr + 12) < 0 ) 1361 if (cfg.bin_private_keep) {
1317 errExit("asprintf"); 1362 if ( asprintf(&cfg.bin_private_keep, "%s,%s", cfg.bin_private_keep, ptr + 12) < 0 )
1318 } else { 1363 errExit("asprintf");
1319 cfg.bin_private_keep = ptr + 12; 1364 } else {
1365 cfg.bin_private_keep = ptr + 12;
1366 }
1367 arg_private_bin = 1;
1320 } 1368 }
1321 arg_private_bin = 1; 1369 else
1370 warning_feature_disabled("private-bin");
1322 return 0; 1371 return 0;
1323 } 1372 }
1324 1373
@@ -1486,8 +1535,11 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
1486 arg_rlimit_nproc = 1; 1535 arg_rlimit_nproc = 1;
1487 } 1536 }
1488 else if (strncmp(ptr, "rlimit-fsize ", 13) == 0) { 1537 else if (strncmp(ptr, "rlimit-fsize ", 13) == 0) {
1489 check_unsigned(ptr + 13, "Error: invalid rlimit in profile file: "); 1538 cfg.rlimit_fsize = parse_arg_size(ptr + 13);
1490 sscanf(ptr + 13, "%llu", &cfg.rlimit_fsize); 1539 if (cfg.rlimit_fsize == 0) {
1540 perror("Error: invalid rlimit-fsize in profile file. Only use positive numbers and k, m or g suffix.");
1541 exit(1);
1542 }
1491 arg_rlimit_fsize = 1; 1543 arg_rlimit_fsize = 1;
1492 } 1544 }
1493 else if (strncmp(ptr, "rlimit-sigpending ", 18) == 0) { 1545 else if (strncmp(ptr, "rlimit-sigpending ", 18) == 0) {
@@ -1496,8 +1548,11 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
1496 arg_rlimit_sigpending = 1; 1548 arg_rlimit_sigpending = 1;
1497 } 1549 }
1498 else if (strncmp(ptr, "rlimit-as ", 10) == 0) { 1550 else if (strncmp(ptr, "rlimit-as ", 10) == 0) {
1499 check_unsigned(ptr + 10, "Error: invalid rlimit in profile file: "); 1551 cfg.rlimit_as = parse_arg_size(ptr + 10);
1500 sscanf(ptr + 10, "%llu", &cfg.rlimit_as); 1552 if (cfg.rlimit_as == 0) {
1553 perror("Error: invalid rlimit-as in profile file. Only use positive numbers and k, m or g suffix.");
1554 exit(1);
1555 }
1501 arg_rlimit_as = 1; 1556 arg_rlimit_as = 1;
1502 } 1557 }
1503 else { 1558 else {
@@ -1554,6 +1609,11 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
1554 return 0; 1609 return 0;
1555 } 1610 }
1556 1611
1612 if (strcmp(ptr, "deterministic-shutdown") == 0) {
1613 arg_deterministic_shutdown = 1;
1614 return 0;
1615 }
1616
1557 // rest of filesystem 1617 // rest of filesystem
1558 if (strncmp(ptr, "blacklist ", 10) == 0) 1618 if (strncmp(ptr, "blacklist ", 10) == 0)
1559 ptr += 10; 1619 ptr += 10;
@@ -1562,22 +1622,8 @@ int profile_check_line(char *ptr, int lineno, const char *fname) {
1562 else if (strncmp(ptr, "noblacklist ", 12) == 0) 1622 else if (strncmp(ptr, "noblacklist ", 12) == 0)
1563 ptr += 12; 1623 ptr += 12;
1564 else if (strncmp(ptr, "whitelist ", 10) == 0) { 1624 else if (strncmp(ptr, "whitelist ", 10) == 0) {
1565#ifdef HAVE_WHITELIST 1625 arg_whitelist = 1;
1566 if (checkcfg(CFG_WHITELIST)) { 1626 ptr += 10;
1567 arg_whitelist = 1;
1568 ptr += 10;
1569 }
1570 else {
1571 static int whitelist_warning_printed = 0;
1572 if (!whitelist_warning_printed) {
1573 warning_feature_disabled("whitelist");
1574 whitelist_warning_printed = 1;
1575 }
1576 return 0;
1577 }
1578#else
1579 return 0;
1580#endif
1581 } 1627 }
1582 else if (strncmp(ptr, "nowhitelist ", 12) == 0) 1628 else if (strncmp(ptr, "nowhitelist ", 12) == 0)
1583 ptr += 12; 1629 ptr += 12;
@@ -1691,7 +1737,7 @@ void profile_read(const char *fname) {
1691 } 1737 }
1692 1738
1693 // open profile file: 1739 // open profile file:
1694 FILE *fp = fopen(fname, "r"); 1740 FILE *fp = fopen(fname, "re");
1695 if (fp == NULL) { 1741 if (fp == NULL) {
1696 fprintf(stderr, "Error: cannot open profile file %s\n", fname); 1742 fprintf(stderr, "Error: cannot open profile file %s\n", fname);
1697 exit(1); 1743 exit(1);
@@ -1708,13 +1754,29 @@ void profile_read(const char *fname) {
1708 int lineno = 0; 1754 int lineno = 0;
1709 while (fgets(buf, MAX_READ, fp)) { 1755 while (fgets(buf, MAX_READ, fp)) {
1710 ++lineno; 1756 ++lineno;
1757
1758 // remove comments
1759 char *ptr = strchr(buf, '#');
1760 if (ptr)
1761 *ptr = '\0';
1762
1711 // remove empty space - ptr in allocated memory 1763 // remove empty space - ptr in allocated memory
1712 char *ptr = line_remove_spaces(buf); 1764 ptr = line_remove_spaces(buf);
1713 if (ptr == NULL) 1765 if (ptr == NULL)
1714 continue; 1766 continue;
1767 if (*ptr == '\0') {
1768 free(ptr);
1769 continue;
1770 }
1715 1771
1716 // comments 1772 if (strncmp(ptr, "whitelist-ro ", 13) == 0) {
1717 if (*ptr == '#' || *ptr == '\0') { 1773 char *whitelist, *readonly;
1774 if (asprintf(&whitelist, "whitelist %s", ptr + 13) == -1)
1775 errExit("asprintf");
1776 profile_add(whitelist);
1777 if (asprintf(&readonly, "read-only %s", ptr + 13) == -1)
1778 errExit("asprintf");
1779 profile_add(readonly);
1718 free(ptr); 1780 free(ptr);
1719 continue; 1781 continue;
1720 } 1782 }
@@ -1724,7 +1786,7 @@ void profile_read(const char *fname) {
1724 if (strcmp(ptr, "quiet") == 0) { 1786 if (strcmp(ptr, "quiet") == 0) {
1725 if (is_in_ignore_list(ptr)) 1787 if (is_in_ignore_list(ptr))
1726 arg_quiet = 0; 1788 arg_quiet = 0;
1727 else 1789 else if (!arg_debug)
1728 arg_quiet = 1; 1790 arg_quiet = 1;
1729 free(ptr); 1791 free(ptr);
1730 continue; 1792 continue;
@@ -1771,9 +1833,8 @@ void profile_read(const char *fname) {
1771// else { 1833// else {
1772// free(ptr); 1834// free(ptr);
1773// } 1835// }
1774#ifdef HAVE_GCOV 1836
1775 __gcov_flush(); 1837 __gcov_flush();
1776#endif
1777 } 1838 }
1778 fclose(fp); 1839 fclose(fp);
1779} 1840}
@@ -1884,7 +1945,7 @@ char *profile_list_compress(char *list)
1884 /* Include non-empty item */ 1945 /* Include non-empty item */
1885 if (!*item) 1946 if (!*item)
1886 in[i] = 0; 1947 in[i] = 0;
1887 /* Remove all allready included items */ 1948 /* Remove all already included items */
1888 for (k = 0; k < i; ++k) 1949 for (k = 0; k < i; ++k)
1889 in[k] = 0; 1950 in[k] = 0;
1890 break; 1951 break;
diff --git a/src/firejail/protocol.c b/src/firejail/protocol.c
index 926af7967..37e541f50 100644
--- a/src/firejail/protocol.c
+++ b/src/firejail/protocol.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -23,7 +23,7 @@
23 23
24void protocol_filter_save(void) { 24void protocol_filter_save(void) {
25 // save protocol filter configuration in PROTOCOL_CFG 25 // save protocol filter configuration in PROTOCOL_CFG
26 FILE *fp = fopen(RUN_PROTOCOL_CFG, "w"); 26 FILE *fp = fopen(RUN_PROTOCOL_CFG, "wxe");
27 if (!fp) 27 if (!fp)
28 errExit("fopen"); 28 errExit("fopen");
29 fprintf(fp, "%s\n", cfg.protocol); 29 fprintf(fp, "%s\n", cfg.protocol);
@@ -35,7 +35,7 @@ void protocol_filter_load(const char *fname) {
35 assert(fname); 35 assert(fname);
36 36
37 // read protocol filter configuration from PROTOCOL_CFG 37 // read protocol filter configuration from PROTOCOL_CFG
38 FILE *fp = fopen(fname, "r"); 38 FILE *fp = fopen(fname, "re");
39 if (!fp) 39 if (!fp)
40 return; 40 return;
41 41
diff --git a/src/firejail/pulseaudio.c b/src/firejail/pulseaudio.c
index 4b9203c36..320668bf9 100644
--- a/src/firejail/pulseaudio.c
+++ b/src/firejail/pulseaudio.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -25,6 +25,7 @@
25#include <dirent.h> 25#include <dirent.h>
26#include <errno.h> 26#include <errno.h>
27#include <sys/wait.h> 27#include <sys/wait.h>
28#include <glob.h>
28 29
29#include <fcntl.h> 30#include <fcntl.h>
30#ifndef O_PATH 31#ifndef O_PATH
@@ -33,6 +34,59 @@
33 34
34#define PULSE_CLIENT_SYSCONF "/etc/pulse/client.conf" 35#define PULSE_CLIENT_SYSCONF "/etc/pulse/client.conf"
35 36
37
38
39static void disable_rundir_pipewire(const char *path) {
40 assert(path);
41
42 // globbing for path/pipewire-*
43 char *pattern;
44 if (asprintf(&pattern, "%s/pipewire-*", path) == -1)
45 errExit("asprintf");
46
47 glob_t globbuf;
48 int globerr = glob(pattern, GLOB_NOCHECK | GLOB_NOSORT, NULL, &globbuf);
49 if (globerr) {
50 fprintf(stderr, "Error: failed to glob pattern %s\n", pattern);
51 exit(1);
52 }
53
54 size_t i;
55 for (i = 0; i < globbuf.gl_pathc; i++) {
56 char *dir = globbuf.gl_pathv[i];
57 assert(dir);
58
59 // don't disable symlinks - disable_file_or_dir will bind-mount an empty directory on top of it!
60 if (is_link(dir))
61 continue;
62 disable_file_or_dir(dir);
63 }
64 globfree(&globbuf);
65 free(pattern);
66}
67
68
69
70// disable pipewire socket
71void pipewire_disable(void) {
72 if (arg_debug)
73 printf("disable pipewire\n");
74 // blacklist user config directory
75 disable_file_path(cfg.homedir, ".config/pipewire");
76
77 // blacklist pipewire in XDG_RUNTIME_DIR
78 const char *name = env_get("XDG_RUNTIME_DIR");
79 if (name)
80 disable_rundir_pipewire(name);
81
82 // try the default location anyway
83 char *path;
84 if (asprintf(&path, "/run/user/%d", getuid()) == -1)
85 errExit("asprintf");
86 disable_rundir_pipewire(path);
87 free(path);
88}
89
36// disable pulseaudio socket 90// disable pulseaudio socket
37void pulseaudio_disable(void) { 91void pulseaudio_disable(void) {
38 if (arg_debug) 92 if (arg_debug)
@@ -75,38 +129,41 @@ void pulseaudio_disable(void) {
75 closedir(dir); 129 closedir(dir);
76} 130}
77 131
78static void pulseaudio_fallback(const char *path) {
79 assert(path);
80
81 fmessage("Cannot mount tmpfs on %s/.config/pulse\n", cfg.homedir);
82 env_store_name_val("PULSE_CLIENTCONFIG", path, SETENV);
83}
84
85// disable shm in pulseaudio (issue #69) 132// disable shm in pulseaudio (issue #69)
86void pulseaudio_init(void) { 133void pulseaudio_init(void) {
87 struct stat s;
88
89 // do we have pulseaudio in the system? 134 // do we have pulseaudio in the system?
90 if (stat(PULSE_CLIENT_SYSCONF, &s) == -1) { 135 if (access(PULSE_CLIENT_SYSCONF, R_OK)) {
91 if (arg_debug) 136 if (arg_debug)
92 printf("%s not found\n", PULSE_CLIENT_SYSCONF); 137 printf("Cannot read %s\n", PULSE_CLIENT_SYSCONF);
93 return; 138 return;
94 } 139 }
95 140
141 // create ~/.config/pulse directory if not present
142 char *homeusercfg = NULL;
143 if (asprintf(&homeusercfg, "%s/.config", cfg.homedir) == -1)
144 errExit("asprintf");
145 if (create_empty_dir_as_user(homeusercfg, 0700))
146 fs_logger2("create", homeusercfg);
147
148 free(homeusercfg);
149 if (asprintf(&homeusercfg, "%s/.config/pulse", cfg.homedir) == -1)
150 errExit("asprintf");
151 if (create_empty_dir_as_user(homeusercfg, 0700))
152 fs_logger2("create", homeusercfg);
153
96 // create the new user pulseaudio directory 154 // create the new user pulseaudio directory
155 // that will be mounted over ~/.config/pulse
97 if (mkdir(RUN_PULSE_DIR, 0700) == -1) 156 if (mkdir(RUN_PULSE_DIR, 0700) == -1)
98 errExit("mkdir"); 157 errExit("mkdir");
99 selinux_relabel_path(RUN_PULSE_DIR, RUN_PULSE_DIR); 158 selinux_relabel_path(RUN_PULSE_DIR, homeusercfg);
100 // mount it nosuid, noexec, nodev
101 fs_remount(RUN_PULSE_DIR, MOUNT_NOEXEC, 0); 159 fs_remount(RUN_PULSE_DIR, MOUNT_NOEXEC, 0);
102
103 // create the new client.conf file 160 // create the new client.conf file
104 char *pulsecfg = NULL; 161 char *pulsecfg = NULL;
105 if (asprintf(&pulsecfg, "%s/client.conf", RUN_PULSE_DIR) == -1) 162 if (asprintf(&pulsecfg, "%s/client.conf", RUN_PULSE_DIR) == -1)
106 errExit("asprintf"); 163 errExit("asprintf");
107 if (copy_file(PULSE_CLIENT_SYSCONF, pulsecfg, -1, -1, 0644)) // root needed 164 if (copy_file(PULSE_CLIENT_SYSCONF, pulsecfg, -1, -1, 0644)) // root needed
108 errExit("copy_file"); 165 errExit("copy_file");
109 FILE *fp = fopen(pulsecfg, "a"); 166 FILE *fp = fopen(pulsecfg, "ae");
110 if (!fp) 167 if (!fp)
111 errExit("fopen"); 168 errExit("fopen");
112 fprintf(fp, "%s", "\nenable-shm = no\n"); 169 fprintf(fp, "%s", "\nenable-shm = no\n");
@@ -116,37 +173,14 @@ void pulseaudio_init(void) {
116 if (set_perms(RUN_PULSE_DIR, getuid(), getgid(), 0700)) 173 if (set_perms(RUN_PULSE_DIR, getuid(), getgid(), 0700))
117 errExit("set_perms"); 174 errExit("set_perms");
118 175
119 // create ~/.config/pulse directory if not present
120 char *homeusercfg = NULL;
121 if (asprintf(&homeusercfg, "%s/.config", cfg.homedir) == -1)
122 errExit("asprintf");
123 if (create_empty_dir_as_user(homeusercfg, 0700))
124 fs_logger2("create", homeusercfg);
125
126 free(homeusercfg);
127 if (asprintf(&homeusercfg, "%s/.config/pulse", cfg.homedir) == -1)
128 errExit("asprintf");
129 if (create_empty_dir_as_user(homeusercfg, 0700))
130 fs_logger2("create", homeusercfg);
131
132 // if ~/.config/pulse exists and there are no symbolic links, mount the new directory 176 // if ~/.config/pulse exists and there are no symbolic links, mount the new directory
133 // else set environment variable 177 // else set environment variable
134 int fd = safe_fd(homeusercfg, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC); 178 EUID_USER();
179 int fd = safer_openat(-1, homeusercfg, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
180 EUID_ROOT();
135 if (fd == -1) { 181 if (fd == -1) {
136 pulseaudio_fallback(pulsecfg); 182 fwarning("not mounting tmpfs on %s\n", homeusercfg);
137 goto out; 183 env_store_name_val("PULSE_CLIENTCONFIG", pulsecfg, SETENV);
138 }
139 // confirm the actual mount destination is owned by the user
140 if (fstat(fd, &s) == -1) { // FUSE
141 if (errno != EACCES)
142 errExit("fstat");
143 close(fd);
144 pulseaudio_fallback(pulsecfg);
145 goto out;
146 }
147 if (s.st_uid != getuid()) {
148 close(fd);
149 pulseaudio_fallback(pulsecfg);
150 goto out; 184 goto out;
151 } 185 }
152 // preserve a read-only mount 186 // preserve a read-only mount
@@ -158,17 +192,13 @@ void pulseaudio_init(void) {
158 // mount via the link in /proc/self/fd 192 // mount via the link in /proc/self/fd
159 if (arg_debug) 193 if (arg_debug)
160 printf("Mounting %s on %s\n", RUN_PULSE_DIR, homeusercfg); 194 printf("Mounting %s on %s\n", RUN_PULSE_DIR, homeusercfg);
161 char *proc; 195 if (bind_mount_path_to_fd(RUN_PULSE_DIR, fd))
162 if (asprintf(&proc, "/proc/self/fd/%d", fd) == -1)
163 errExit("asprintf");
164 if (mount(RUN_PULSE_DIR, proc, "none", MS_BIND, NULL) < 0)
165 errExit("mount pulseaudio"); 196 errExit("mount pulseaudio");
166 // check /proc/self/mountinfo to confirm the mount is ok 197 // check /proc/self/mountinfo to confirm the mount is ok
167 MountData *mptr = get_last_mount(); 198 MountData *mptr = get_last_mount();
168 if (strcmp(mptr->dir, homeusercfg) != 0 || strcmp(mptr->fstype, "tmpfs") != 0) 199 if (strcmp(mptr->dir, homeusercfg) != 0 || strcmp(mptr->fstype, "tmpfs") != 0)
169 errLogExit("invalid pulseaudio mount"); 200 errLogExit("invalid pulseaudio mount");
170 fs_logger2("tmpfs", homeusercfg); 201 fs_logger2("tmpfs", homeusercfg);
171 free(proc);
172 close(fd); 202 close(fd);
173 203
174 char *p; 204 char *p;
diff --git a/src/firejail/restrict_users.c b/src/firejail/restrict_users.c
index a0ca4c02c..447d7b663 100644
--- a/src/firejail/restrict_users.c
+++ b/src/firejail/restrict_users.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -21,7 +21,6 @@
21#include "../include/firejail_user.h" 21#include "../include/firejail_user.h"
22#include <sys/mount.h> 22#include <sys/mount.h>
23#include <sys/stat.h> 23#include <sys/stat.h>
24#include <linux/limits.h>
25#include <fnmatch.h> 24#include <fnmatch.h>
26#include <glob.h> 25#include <glob.h>
27#include <dirent.h> 26#include <dirent.h>
@@ -73,7 +72,7 @@ static void sanitize_home(void) {
73 if (arg_debug) 72 if (arg_debug)
74 printf("Cleaning /home directory\n"); 73 printf("Cleaning /home directory\n");
75 // open user home directory in order to keep it around 74 // open user home directory in order to keep it around
76 int fd = safe_fd(cfg.homedir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC); 75 int fd = safer_openat(-1, cfg.homedir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
77 if (fd == -1) 76 if (fd == -1)
78 goto errout; 77 goto errout;
79 if (fstat(fd, &s) == -1) { // FUSE 78 if (fstat(fd, &s) == -1) { // FUSE
@@ -104,12 +103,8 @@ static void sanitize_home(void) {
104 selinux_relabel_path(cfg.homedir, cfg.homedir); 103 selinux_relabel_path(cfg.homedir, cfg.homedir);
105 104
106 // bring back real user home directory 105 // bring back real user home directory
107 char *proc; 106 if (bind_mount_fd_to_path(fd, cfg.homedir))
108 if (asprintf(&proc, "/proc/self/fd/%d", fd) == -1)
109 errExit("asprintf");
110 if (mount(proc, cfg.homedir, NULL, MS_BIND|MS_REC, NULL) < 0)
111 errExit("mount bind"); 107 errExit("mount bind");
112 free(proc);
113 close(fd); 108 close(fd);
114 109
115 if (!arg_private) 110 if (!arg_private)
@@ -154,12 +149,8 @@ static void sanitize_run(void) {
154 selinux_relabel_path(runuser, runuser); 149 selinux_relabel_path(runuser, runuser);
155 150
156 // bring back real run/user/$UID directory 151 // bring back real run/user/$UID directory
157 char *proc; 152 if (bind_mount_fd_to_path(fd, runuser))
158 if (asprintf(&proc, "/proc/self/fd/%d", fd) == -1)
159 errExit("asprintf");
160 if (mount(proc, runuser, NULL, MS_BIND|MS_REC, NULL) < 0)
161 errExit("mount bind"); 153 errExit("mount bind");
162 free(proc);
163 close(fd); 154 close(fd);
164 155
165 fs_logger2("whitelist", runuser); 156 fs_logger2("whitelist", runuser);
@@ -183,10 +174,10 @@ static void sanitize_passwd(void) {
183 174
184 // open files 175 // open files
185 /* coverity[toctou] */ 176 /* coverity[toctou] */
186 fpin = fopen("/etc/passwd", "r"); 177 fpin = fopen("/etc/passwd", "re");
187 if (!fpin) 178 if (!fpin)
188 goto errout; 179 goto errout;
189 fpout = fopen(RUN_PASSWD_FILE, "w"); 180 fpout = fopen(RUN_PASSWD_FILE, "we");
190 if (!fpout) 181 if (!fpout)
191 goto errout; 182 goto errout;
192 183
@@ -246,6 +237,11 @@ static void sanitize_passwd(void) {
246 // mount-bind tne new password file 237 // mount-bind tne new password file
247 if (mount(RUN_PASSWD_FILE, "/etc/passwd", "none", MS_BIND, "mode=400,gid=0") < 0) 238 if (mount(RUN_PASSWD_FILE, "/etc/passwd", "none", MS_BIND, "mode=400,gid=0") < 0)
248 errExit("mount"); 239 errExit("mount");
240
241 // blacklist RUN_PASSWD_FILE
242 if (mount(RUN_RO_FILE, RUN_PASSWD_FILE, "none", MS_BIND, "mode=400,gid=0") < 0)
243 errExit("mount");
244
249 fs_logger("create /etc/passwd"); 245 fs_logger("create /etc/passwd");
250 246
251 return; 247 return;
@@ -318,10 +314,10 @@ static void sanitize_group(void) {
318 314
319 // open files 315 // open files
320 /* coverity[toctou] */ 316 /* coverity[toctou] */
321 fpin = fopen("/etc/group", "r"); 317 fpin = fopen("/etc/group", "re");
322 if (!fpin) 318 if (!fpin)
323 goto errout; 319 goto errout;
324 fpout = fopen(RUN_GROUP_FILE, "w"); 320 fpout = fopen(RUN_GROUP_FILE, "we");
325 if (!fpout) 321 if (!fpout)
326 goto errout; 322 goto errout;
327 323
@@ -376,6 +372,11 @@ static void sanitize_group(void) {
376 // mount-bind tne new group file 372 // mount-bind tne new group file
377 if (mount(RUN_GROUP_FILE, "/etc/group", "none", MS_BIND, "mode=400,gid=0") < 0) 373 if (mount(RUN_GROUP_FILE, "/etc/group", "none", MS_BIND, "mode=400,gid=0") < 0)
378 errExit("mount"); 374 errExit("mount");
375
376 // blacklist RUN_GROUP_FILE
377 if (mount(RUN_RO_FILE, RUN_GROUP_FILE, "none", MS_BIND, "mode=400,gid=0") < 0)
378 errExit("mount");
379
379 fs_logger("create /etc/group"); 380 fs_logger("create /etc/group");
380 381
381 return; 382 return;
diff --git a/src/firejail/restricted_shell.c b/src/firejail/restricted_shell.c
index ae453f4f1..c1340cae1 100644
--- a/src/firejail/restricted_shell.c
+++ b/src/firejail/restricted_shell.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -32,7 +32,7 @@ int restricted_shell(const char *user) {
32 char *fname; 32 char *fname;
33 if (asprintf(&fname, "%s/login.users", SYSCONFDIR) == -1) 33 if (asprintf(&fname, "%s/login.users", SYSCONFDIR) == -1)
34 errExit("asprintf"); 34 errExit("asprintf");
35 FILE *fp = fopen(fname, "r"); 35 FILE *fp = fopen(fname, "re");
36 free(fname); 36 free(fname);
37 if (fp == NULL) 37 if (fp == NULL)
38 return 0; 38 return 0;
@@ -96,7 +96,7 @@ int restricted_shell(const char *user) {
96 fullargv[i] = ptr; 96 fullargv[i] = ptr;
97#ifdef DEBUG_RESTRICTED_SHELL 97#ifdef DEBUG_RESTRICTED_SHELL
98 {EUID_ROOT(); 98 {EUID_ROOT();
99 FILE *fp = fopen("/firelog", "a"); 99 FILE *fp = fopen("/firelog", "ae");
100 if (fp) { 100 if (fp) {
101 fprintf(fp, "i %d ptr #%s#\n", i, fullargv[i]); 101 fprintf(fp, "i %d ptr #%s#\n", i, fullargv[i]);
102 fclose(fp); 102 fclose(fp);
diff --git a/src/firejail/rlimit.c b/src/firejail/rlimit.c
index 78f00bc63..b10d2c528 100644
--- a/src/firejail/rlimit.c
+++ b/src/firejail/rlimit.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -18,6 +18,7 @@
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include "firejail.h" 20#include "firejail.h"
21#include "../include/gcov_wrapper.h"
21#include <sys/time.h> 22#include <sys/time.h>
22#include <sys/resource.h> 23#include <sys/resource.h>
23 24
@@ -33,9 +34,9 @@ void set_rlimits(void) {
33 // set the new limit 34 // set the new limit
34 rl.rlim_cur = (rlim_t) cfg.rlimit_cpu; 35 rl.rlim_cur = (rlim_t) cfg.rlimit_cpu;
35 rl.rlim_max = (rlim_t) cfg.rlimit_cpu; 36 rl.rlim_max = (rlim_t) cfg.rlimit_cpu;
36#ifdef HAVE_GCOV 37
37 __gcov_dump(); 38 __gcov_dump();
38#endif 39
39 if (setrlimit(RLIMIT_CPU, &rl) == -1) 40 if (setrlimit(RLIMIT_CPU, &rl) == -1)
40 errExit("setrlimit"); 41 errExit("setrlimit");
41 if (arg_debug) 42 if (arg_debug)
@@ -50,9 +51,10 @@ void set_rlimits(void) {
50 // set the new limit 51 // set the new limit
51 rl.rlim_cur = (rlim_t) cfg.rlimit_nofile; 52 rl.rlim_cur = (rlim_t) cfg.rlimit_nofile;
52 rl.rlim_max = (rlim_t) cfg.rlimit_nofile; 53 rl.rlim_max = (rlim_t) cfg.rlimit_nofile;
53#ifdef HAVE_GCOV // gcov-instrumented programs might crash at this point 54
55 // gcov-instrumented programs might crash at this point
54 __gcov_dump(); 56 __gcov_dump();
55#endif 57
56 if (setrlimit(RLIMIT_NOFILE, &rl) == -1) 58 if (setrlimit(RLIMIT_NOFILE, &rl) == -1)
57 errExit("setrlimit"); 59 errExit("setrlimit");
58 if (arg_debug) 60 if (arg_debug)
@@ -67,9 +69,9 @@ void set_rlimits(void) {
67 // set the new limit 69 // set the new limit
68 rl.rlim_cur = (rlim_t) cfg.rlimit_nproc; 70 rl.rlim_cur = (rlim_t) cfg.rlimit_nproc;
69 rl.rlim_max = (rlim_t) cfg.rlimit_nproc; 71 rl.rlim_max = (rlim_t) cfg.rlimit_nproc;
70#ifdef HAVE_GCOV 72
71 __gcov_dump(); 73 __gcov_dump();
72#endif 74
73 if (setrlimit(RLIMIT_NPROC, &rl) == -1) 75 if (setrlimit(RLIMIT_NPROC, &rl) == -1)
74 errExit("setrlimit"); 76 errExit("setrlimit");
75 if (arg_debug) 77 if (arg_debug)
@@ -84,9 +86,9 @@ void set_rlimits(void) {
84 // set the new limit 86 // set the new limit
85 rl.rlim_cur = (rlim_t) cfg.rlimit_fsize; 87 rl.rlim_cur = (rlim_t) cfg.rlimit_fsize;
86 rl.rlim_max = (rlim_t) cfg.rlimit_fsize; 88 rl.rlim_max = (rlim_t) cfg.rlimit_fsize;
87#ifdef HAVE_GCOV 89
88 __gcov_dump(); 90 __gcov_dump();
89#endif 91
90 if (setrlimit(RLIMIT_FSIZE, &rl) == -1) 92 if (setrlimit(RLIMIT_FSIZE, &rl) == -1)
91 errExit("setrlimit"); 93 errExit("setrlimit");
92 if (arg_debug) 94 if (arg_debug)
@@ -101,9 +103,9 @@ void set_rlimits(void) {
101 // set the new limit 103 // set the new limit
102 rl.rlim_cur = (rlim_t) cfg.rlimit_sigpending; 104 rl.rlim_cur = (rlim_t) cfg.rlimit_sigpending;
103 rl.rlim_max = (rlim_t) cfg.rlimit_sigpending; 105 rl.rlim_max = (rlim_t) cfg.rlimit_sigpending;
104#ifdef HAVE_GCOV 106
105 __gcov_dump(); 107 __gcov_dump();
106#endif 108
107 if (setrlimit(RLIMIT_SIGPENDING, &rl) == -1) 109 if (setrlimit(RLIMIT_SIGPENDING, &rl) == -1)
108 errExit("setrlimit"); 110 errExit("setrlimit");
109 if (arg_debug) 111 if (arg_debug)
@@ -118,9 +120,9 @@ void set_rlimits(void) {
118 // set the new limit 120 // set the new limit
119 rl.rlim_cur = (rlim_t) cfg.rlimit_as; 121 rl.rlim_cur = (rlim_t) cfg.rlimit_as;
120 rl.rlim_max = (rlim_t) cfg.rlimit_as; 122 rl.rlim_max = (rlim_t) cfg.rlimit_as;
121#ifdef HAVE_GCOV 123
122 __gcov_dump(); 124 __gcov_dump();
123#endif 125
124 if (setrlimit(RLIMIT_AS, &rl) == -1) 126 if (setrlimit(RLIMIT_AS, &rl) == -1)
125 errExit("setrlimit"); 127 errExit("setrlimit");
126 if (arg_debug) 128 if (arg_debug)
diff --git a/src/firejail/run_files.c b/src/firejail/run_files.c
index cd44f745f..c971a4f53 100644
--- a/src/firejail/run_files.c
+++ b/src/firejail/run_files.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -101,7 +101,7 @@ void set_name_run_file(pid_t pid) {
101 errExit("asprintf"); 101 errExit("asprintf");
102 102
103 // the file is deleted first 103 // the file is deleted first
104 FILE *fp = fopen(fname, "w"); 104 FILE *fp = fopen(fname, "we");
105 if (!fp) { 105 if (!fp) {
106 fprintf(stderr, "Error: cannot create %s\n", fname); 106 fprintf(stderr, "Error: cannot create %s\n", fname);
107 exit(1); 107 exit(1);
@@ -120,7 +120,7 @@ void set_x11_run_file(pid_t pid, int display) {
120 errExit("asprintf"); 120 errExit("asprintf");
121 121
122 // the file is deleted first 122 // the file is deleted first
123 FILE *fp = fopen(fname, "w"); 123 FILE *fp = fopen(fname, "we");
124 if (!fp) { 124 if (!fp) {
125 fprintf(stderr, "Error: cannot create %s\n", fname); 125 fprintf(stderr, "Error: cannot create %s\n", fname);
126 exit(1); 126 exit(1);
@@ -139,7 +139,7 @@ void set_profile_run_file(pid_t pid, const char *fname) {
139 139
140 EUID_ROOT(); 140 EUID_ROOT();
141 // the file is deleted first 141 // the file is deleted first
142 FILE *fp = fopen(runfile, "w"); 142 FILE *fp = fopen(runfile, "we");
143 if (!fp) { 143 if (!fp) {
144 fprintf(stderr, "Error: cannot create %s\n", runfile); 144 fprintf(stderr, "Error: cannot create %s\n", runfile);
145 exit(1); 145 exit(1);
diff --git a/src/firejail/run_symlink.c b/src/firejail/run_symlink.c
index 77fac5438..e2847aea6 100644
--- a/src/firejail/run_symlink.c
+++ b/src/firejail/run_symlink.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -22,7 +22,6 @@
22#include <sys/stat.h> 22#include <sys/stat.h>
23#include <unistd.h> 23#include <unistd.h>
24 24
25extern char *find_in_path(const char *program);
26 25
27void run_symlink(int argc, char **argv, int run_as_is) { 26void run_symlink(int argc, char **argv, int run_as_is) {
28 EUID_ASSERT(); 27 EUID_ASSERT();
@@ -77,6 +76,8 @@ void run_symlink(int argc, char **argv, int run_as_is) {
77 a[i + 2] = argv[i + 1]; 76 a[i + 2] = argv[i + 1];
78 } 77 }
79 a[i + 2] = NULL; 78 a[i + 2] = NULL;
79 if (env_get("LD_PRELOAD") != NULL)
80 fprintf(stderr, "run_symlink: LD_PRELOAD is: '%s'\n", env_get("LD_PRELOAD"));
80 assert(env_get("LD_PRELOAD") == NULL); 81 assert(env_get("LD_PRELOAD") == NULL);
81 assert(getenv("LD_PRELOAD") == NULL); 82 assert(getenv("LD_PRELOAD") == NULL);
82 execvp(a[0], a); 83 execvp(a[0], a);
diff --git a/src/firejail/sandbox.c b/src/firejail/sandbox.c
index 3af828ede..96407d081 100644
--- a/src/firejail/sandbox.c
+++ b/src/firejail/sandbox.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -19,6 +19,7 @@
19*/ 19*/
20 20
21#include "firejail.h" 21#include "firejail.h"
22#include "../include/gcov_wrapper.h"
22#include "../include/seccomp.h" 23#include "../include/seccomp.h"
23#include <sys/mman.h> 24#include <sys/mman.h>
24#include <sys/mount.h> 25#include <sys/mount.h>
@@ -49,7 +50,6 @@
49#include <sys/apparmor.h> 50#include <sys/apparmor.h>
50#endif 51#endif
51 52
52
53static int force_nonewprivs = 0; 53static int force_nonewprivs = 0;
54 54
55static int monitored_pid = 0; 55static int monitored_pid = 0;
@@ -67,7 +67,7 @@ static void sandbox_handler(int sig){
67 if (asprintf(&monfile, "/proc/%d/cmdline", monitored_pid) == -1) 67 if (asprintf(&monfile, "/proc/%d/cmdline", monitored_pid) == -1)
68 errExit("asprintf"); 68 errExit("asprintf");
69 while (monsec) { 69 while (monsec) {
70 FILE *fp = fopen(monfile, "r"); 70 FILE *fp = fopen(monfile, "re");
71 if (!fp) 71 if (!fp)
72 break; 72 break;
73 73
@@ -87,9 +87,9 @@ static void sandbox_handler(int sig){
87 87
88 // broadcast a SIGKILL 88 // broadcast a SIGKILL
89 kill(-1, SIGKILL); 89 kill(-1, SIGKILL);
90 flush_stdin();
91 90
92 exit(sig); 91 flush_stdin();
92 exit(128 + sig);
93} 93}
94 94
95static void install_handler(void) { 95static void install_handler(void) {
@@ -162,7 +162,7 @@ static void save_nogroups(void) {
162 if (arg_nogroups == 0) 162 if (arg_nogroups == 0)
163 return; 163 return;
164 164
165 FILE *fp = fopen(RUN_GROUPS_CFG, "w"); 165 FILE *fp = fopen(RUN_GROUPS_CFG, "wxe");
166 if (fp) { 166 if (fp) {
167 fprintf(fp, "\n"); 167 fprintf(fp, "\n");
168 SET_PERMS_STREAM(fp, 0, 0, 0644); // assume mode 0644 168 SET_PERMS_STREAM(fp, 0, 0, 0644); // assume mode 0644
@@ -204,7 +204,7 @@ static void save_umask(void) {
204} 204}
205 205
206static char *create_join_file(void) { 206static char *create_join_file(void) {
207 int fd = open(RUN_JOIN_FILE, O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, S_IRUSR | S_IWRITE | S_IRGRP | S_IROTH); 207 int fd = open(RUN_JOIN_FILE, O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
208 if (fd == -1) 208 if (fd == -1)
209 errExit("open"); 209 errExit("open");
210 if (ftruncate(fd, 1) == -1) 210 if (ftruncate(fd, 1) == -1)
@@ -227,7 +227,7 @@ static void sandbox_if_up(Bridge *br) {
227 if (br->arg_ip_none == 1); // do nothing 227 if (br->arg_ip_none == 1); // do nothing
228 else if (br->arg_ip_none == 0 && br->macvlan == 0) { 228 else if (br->arg_ip_none == 0 && br->macvlan == 0) {
229 if (br->ipsandbox == br->ip) { 229 if (br->ipsandbox == br->ip) {
230 fprintf(stderr, "Error: %d.%d.%d.%d is interface %s address.\n", PRINT_IP(br->ipsandbox), br->dev); 230 fprintf(stderr, "Error: %d.%d.%d.%d is interface %s address, exiting...\n", PRINT_IP(br->ipsandbox), br->dev);
231 exit(1); 231 exit(1);
232 } 232 }
233 233
@@ -245,13 +245,17 @@ static void sandbox_if_up(Bridge *br) {
245 br->ipsandbox = arp_assign(dev, br); //br->ip, br->mask); 245 br->ipsandbox = arp_assign(dev, br); //br->ip, br->mask);
246 else { 246 else {
247 if (br->ipsandbox == br->ip) { 247 if (br->ipsandbox == br->ip) {
248 fprintf(stderr, "Error: %d.%d.%d.%d is interface %s address.\n", PRINT_IP(br->ipsandbox), br->dev); 248 fprintf(stderr, "Error: %d.%d.%d.%d is interface %s address, exiting...\n", PRINT_IP(br->ipsandbox), br->dev);
249 exit(1);
250 }
251 if (br->ipsandbox == cfg.defaultgw) {
252 fprintf(stderr, "Error: %d.%d.%d.%d is the default gateway, exiting...\n", PRINT_IP(br->ipsandbox));
249 exit(1); 253 exit(1);
250 } 254 }
251 255
252 uint32_t rv = arp_check(dev, br->ipsandbox); 256 uint32_t rv = arp_check(dev, br->ipsandbox);
253 if (rv) { 257 if (rv) {
254 fprintf(stderr, "Error: the address %d.%d.%d.%d is already in use.\n", PRINT_IP(br->ipsandbox)); 258 fprintf(stderr, "Error: the address %d.%d.%d.%d is already in use, exiting...\n", PRINT_IP(br->ipsandbox));
255 exit(1); 259 exit(1);
256 } 260 }
257 } 261 }
@@ -352,6 +356,15 @@ static int monitor_application(pid_t app_pid) {
352 if (arg_debug) 356 if (arg_debug)
353 printf("Sandbox monitor: waitpid %d retval %d status %d\n", monitored_pid, rv, status); 357 printf("Sandbox monitor: waitpid %d retval %d status %d\n", monitored_pid, rv, status);
354 358
359 if (arg_deterministic_shutdown) {
360 if (arg_debug)
361 printf("Sandbox monitor: monitored process died, shut down the sandbox\n");
362 kill(-1, SIGTERM);
363 usleep(100000);
364 kill(-1, SIGKILL);
365 break;
366 }
367
355 DIR *dir; 368 DIR *dir;
356 if (!(dir = opendir("/proc"))) { 369 if (!(dir = opendir("/proc"))) {
357 // sleep 2 seconds and try again 370 // sleep 2 seconds and try again
@@ -373,18 +386,6 @@ static int monitor_application(pid_t app_pid) {
373 if ((pid_t) pid == dhclient4_pid || (pid_t) pid == dhclient6_pid) 386 if ((pid_t) pid == dhclient4_pid || (pid_t) pid == dhclient6_pid)
374 continue; 387 continue;
375 388
376 // todo: make this generic
377 // Dillo browser leaves a dpid process running, we need to shut it down
378 int found = 0;
379 if (strcmp(cfg.command_name, "dillo") == 0) {
380 char *pidname = pid_proc_comm(pid);
381 if (pidname && strcmp(pidname, "dpid") == 0)
382 found = 1;
383 free(pidname);
384 }
385 if (found)
386 break;
387
388 monitored_pid = pid; 389 monitored_pid = pid;
389 break; 390 break;
390 } 391 }
@@ -403,7 +404,6 @@ static void print_time(void) {
403 fmessage("Child process initialized in %.02f ms\n", delta); 404 fmessage("Child process initialized in %.02f ms\n", delta);
404} 405}
405 406
406
407// check execute permissions for the program 407// check execute permissions for the program
408// this is done typically by the shell 408// this is done typically by the shell
409// we are here because of --shell=none 409// we are here because of --shell=none
@@ -460,10 +460,42 @@ static int ok_to_run(const char *program) {
460 return 0; 460 return 0;
461} 461}
462 462
463static void close_file_descriptors(void) {
464 if (arg_keep_fd_all)
465 return;
466
467 if (arg_debug)
468 printf("Closing non-standard file descriptors\n");
469
470 if (!cfg.keep_fd) {
471 close_all(NULL, 0);
472 return;
473 }
474
475 size_t sz = 0;
476 int *keep = str_to_int_array(cfg.keep_fd, &sz);
477 if (!keep) {
478 fprintf(stderr, "Error: invalid keep-fd option\n");
479 exit(1);
480 }
481 close_all(keep, sz);
482 free(keep);
483}
484
485
463void start_application(int no_sandbox, int fd, char *set_sandbox_status) { 486void start_application(int no_sandbox, int fd, char *set_sandbox_status) {
464 // set environment 487 if (no_sandbox == 0) {
465 if (no_sandbox == 0) 488 close_file_descriptors();
489
490 // set nice and rlimits
491 if (arg_nice)
492 set_nice(cfg.nice);
493 set_rlimits();
494
466 env_defaults(); 495 env_defaults();
496 }
497
498 // set environment
467 env_apply_all(); 499 env_apply_all();
468 500
469 // restore original umask 501 // restore original umask
@@ -500,9 +532,8 @@ void start_application(int no_sandbox, int fd, char *set_sandbox_status) {
500 exit(1); 532 exit(1);
501 } 533 }
502 534
503#ifdef HAVE_GCOV
504 __gcov_dump(); 535 __gcov_dump();
505#endif 536
506 seccomp_install_filters(); 537 seccomp_install_filters();
507 538
508 if (set_sandbox_status) 539 if (set_sandbox_status)
@@ -556,9 +587,8 @@ void start_application(int no_sandbox, int fd, char *set_sandbox_status) {
556 if (!arg_command && !arg_quiet) 587 if (!arg_command && !arg_quiet)
557 print_time(); 588 print_time();
558 589
559#ifdef HAVE_GCOV
560 __gcov_dump(); 590 __gcov_dump();
561#endif 591
562 seccomp_install_filters(); 592 seccomp_install_filters();
563 593
564 if (set_sandbox_status) 594 if (set_sandbox_status)
@@ -796,7 +826,7 @@ int sandbox(void* sandbox_arg) {
796 826
797 // trace pre-install 827 // trace pre-install
798 if (need_preload) 828 if (need_preload)
799 fs_trace_preload(); 829 fs_trace_touch_or_store_preload();
800 830
801 // store hosts file 831 // store hosts file
802 if (cfg.hosts_file) 832 if (cfg.hosts_file)
@@ -812,8 +842,11 @@ int sandbox(void* sandbox_arg) {
812 //**************************** 842 //****************************
813 // trace pre-install, this time inside chroot 843 // trace pre-install, this time inside chroot
814 //**************************** 844 //****************************
815 if (need_preload) 845 if (need_preload) {
816 fs_trace_preload(); 846 int rv = unlink(RUN_LDPRELOAD_FILE);
847 (void) rv;
848 fs_trace_touch_or_store_preload();
849 }
817 } 850 }
818 else 851 else
819#endif 852#endif
@@ -833,6 +866,7 @@ int sandbox(void* sandbox_arg) {
833 // private mode 866 // private mode
834 //**************************** 867 //****************************
835 if (arg_private) { 868 if (arg_private) {
869 EUID_USER();
836 if (cfg.home_private) { // --private= 870 if (cfg.home_private) { // --private=
837 if (cfg.chrootdir) 871 if (cfg.chrootdir)
838 fwarning("private=directory feature is disabled in chroot\n"); 872 fwarning("private=directory feature is disabled in chroot\n");
@@ -851,6 +885,7 @@ int sandbox(void* sandbox_arg) {
851 } 885 }
852 else // --private 886 else // --private
853 fs_private(); 887 fs_private();
888 EUID_ROOT();
854 } 889 }
855 890
856 if (arg_private_dev) 891 if (arg_private_dev)
@@ -883,16 +918,16 @@ int sandbox(void* sandbox_arg) {
883 else if (arg_overlay) 918 else if (arg_overlay)
884 fwarning("private-bin feature is disabled in overlay\n"); 919 fwarning("private-bin feature is disabled in overlay\n");
885 else { 920 else {
921 EUID_USER();
886 // for --x11=xorg we need to add xauth command 922 // for --x11=xorg we need to add xauth command
887 if (arg_x11_xorg) { 923 if (arg_x11_xorg) {
888 EUID_USER();
889 char *tmp; 924 char *tmp;
890 if (asprintf(&tmp, "%s,xauth", cfg.bin_private_keep) == -1) 925 if (asprintf(&tmp, "%s,xauth", cfg.bin_private_keep) == -1)
891 errExit("asprintf"); 926 errExit("asprintf");
892 cfg.bin_private_keep = tmp; 927 cfg.bin_private_keep = tmp;
893 EUID_ROOT();
894 } 928 }
895 fs_private_bin_list(); 929 fs_private_bin_list();
930 EUID_ROOT();
896 } 931 }
897 } 932 }
898 933
@@ -988,7 +1023,7 @@ int sandbox(void* sandbox_arg) {
988 1023
989 // create /etc/ld.so.preload file again 1024 // create /etc/ld.so.preload file again
990 if (need_preload) 1025 if (need_preload)
991 fs_trace_preload(); 1026 fs_trace_touch_preload();
992 1027
993 // openSUSE configuration is split between /etc and /usr/etc 1028 // openSUSE configuration is split between /etc and /usr/etc
994 // process private-etc a second time 1029 // process private-etc a second time
@@ -1000,10 +1035,12 @@ int sandbox(void* sandbox_arg) {
1000 // apply the profile file 1035 // apply the profile file
1001 //**************************** 1036 //****************************
1002 // apply all whitelist commands ... 1037 // apply all whitelist commands ...
1038 EUID_USER();
1003 fs_whitelist(); 1039 fs_whitelist();
1004 1040
1005 // ... followed by blacklist commands 1041 // ... followed by blacklist commands
1006 fs_blacklist(); // mkdir and mkfile are processed all over again 1042 fs_blacklist(); // mkdir and mkfile are processed all over again
1043 EUID_ROOT();
1007 1044
1008 //**************************** 1045 //****************************
1009 // nosound/no3d/notv/novideo and fix for pulseaudio 7.0 1046 // nosound/no3d/notv/novideo and fix for pulseaudio 7.0
@@ -1012,10 +1049,13 @@ int sandbox(void* sandbox_arg) {
1012 // disable pulseaudio 1049 // disable pulseaudio
1013 pulseaudio_disable(); 1050 pulseaudio_disable();
1014 1051
1052 // disable pipewire
1053 pipewire_disable();
1054
1015 // disable /dev/snd 1055 // disable /dev/snd
1016 fs_dev_disable_sound(); 1056 fs_dev_disable_sound();
1017 } 1057 }
1018 else if (!arg_noautopulse) 1058 else if (!arg_keep_config_pulse)
1019 pulseaudio_init(); 1059 pulseaudio_init();
1020 1060
1021 if (arg_no3d) 1061 if (arg_no3d)
@@ -1039,7 +1079,7 @@ int sandbox(void* sandbox_arg) {
1039 //**************************** 1079 //****************************
1040 // set dns 1080 // set dns
1041 //**************************** 1081 //****************************
1042 fs_resolvconf(); 1082 fs_rebuild_etc();
1043 1083
1044 //**************************** 1084 //****************************
1045 // start dhcp client 1085 // start dhcp client
@@ -1052,6 +1092,11 @@ int sandbox(void* sandbox_arg) {
1052 EUID_USER(); 1092 EUID_USER();
1053 int cwd = 0; 1093 int cwd = 0;
1054 if (cfg.cwd) { 1094 if (cfg.cwd) {
1095 if (is_link(cfg.cwd)) {
1096 fprintf(stderr, "Error: unable to enter private working directory: %s\n", cfg.cwd);
1097 exit(1);
1098 }
1099
1055 if (chdir(cfg.cwd) == 0) 1100 if (chdir(cfg.cwd) == 0)
1056 cwd = 1; 1101 cwd = 1;
1057 else if (arg_private_cwd) { 1102 else if (arg_private_cwd) {
@@ -1219,7 +1264,7 @@ int sandbox(void* sandbox_arg) {
1219 //**************************************** 1264 //****************************************
1220 // drop privileges 1265 // drop privileges
1221 //**************************************** 1266 //****************************************
1222 drop_privs(arg_nogroups); 1267 drop_privs(0);
1223 1268
1224 // kill the sandbox in case the parent died 1269 // kill the sandbox in case the parent died
1225 prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); 1270 prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
@@ -1239,28 +1284,25 @@ int sandbox(void* sandbox_arg) {
1239 1284
1240 if (app_pid == 0) { 1285 if (app_pid == 0) {
1241#ifdef HAVE_APPARMOR 1286#ifdef HAVE_APPARMOR
1242 // add apparmor confinement after the execve
1243 set_apparmor(); 1287 set_apparmor();
1244#endif 1288#endif
1245
1246 // set nice and rlimits
1247 if (arg_nice)
1248 set_nice(cfg.nice);
1249 set_rlimits();
1250
1251 start_application(0, -1, set_sandbox_status); 1289 start_application(0, -1, set_sandbox_status);
1252 } 1290 }
1253 1291
1254 munmap(set_sandbox_status, 1); 1292 munmap(set_sandbox_status, 1);
1255 1293
1256 int status = monitor_application(app_pid); // monitor application 1294 int status = monitor_application(app_pid); // monitor application
1257 flush_stdin();
1258 1295
1259 if (WIFEXITED(status)) { 1296 if (WIFEXITED(status)) {
1260 // if we had a proper exit, return that exit status 1297 // if we had a proper exit, return that exit status
1261 return WEXITSTATUS(status); 1298 status = WEXITSTATUS(status);
1299 } else if (WIFSIGNALED(status)) {
1300 // distinguish fatal signals by adding 128
1301 status = 128 + WTERMSIG(status);
1262 } else { 1302 } else {
1263 // something else went wrong! 1303 status = -1;
1264 return -1;
1265 } 1304 }
1305
1306 flush_stdin();
1307 return status;
1266} 1308}
diff --git a/src/firejail/sbox.c b/src/firejail/sbox.c
index f9c41f661..a37943940 100644
--- a/src/firejail/sbox.c
+++ b/src/firejail/sbox.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -23,6 +23,7 @@
23#include <unistd.h> 23#include <unistd.h>
24#include <net/if.h> 24#include <net/if.h>
25#include <stdarg.h> 25#include <stdarg.h>
26#include <sys/resource.h>
26#include <sys/wait.h> 27#include <sys/wait.h>
27#include "../include/seccomp.h" 28#include "../include/seccomp.h"
28 29
@@ -72,11 +73,8 @@ static int __attribute__((noreturn)) sbox_do_exec_v(unsigned filtermask, char *
72 } 73 }
73 74
74 // close all other file descriptors 75 // close all other file descriptors
75 if ((filtermask & SBOX_KEEP_FDS) == 0) { 76 if ((filtermask & SBOX_KEEP_FDS) == 0)
76 int i; 77 close_all(NULL, 0);
77 for (i = 3; i < FIREJAIL_MAX_FD; i++)
78 close(i); // close open files
79 }
80 78
81 umask(027); 79 umask(027);
82 80
@@ -206,6 +204,11 @@ static int __attribute__((noreturn)) sbox_do_exec_v(unsigned filtermask, char *
206 if (filtermask & SBOX_USER) 204 if (filtermask & SBOX_USER)
207 drop_privs(1); 205 drop_privs(1);
208 else if (filtermask & SBOX_ROOT) { 206 else if (filtermask & SBOX_ROOT) {
207 // https://seclists.org/oss-sec/2021/q4/43
208 struct rlimit tozero = { .rlim_cur = 0, .rlim_max = 0 };
209 if (setrlimit(RLIMIT_CORE, &tozero))
210 errExit("setrlimit");
211
209 // elevate privileges in order to get grsecurity working 212 // elevate privileges in order to get grsecurity working
210 if (setreuid(0, 0)) 213 if (setreuid(0, 0))
211 errExit("setreuid"); 214 errExit("setreuid");
@@ -248,7 +251,9 @@ int sbox_run(unsigned filtermask, int num, ...) {
248 va_start(valist, num); 251 va_start(valist, num);
249 252
250 // build argument list 253 // build argument list
251 char **arg = malloc((num + 1) * sizeof(char *)); 254 char **arg = calloc(num + 1, sizeof(char *));
255 if (!arg)
256 errExit("calloc");
252 int i; 257 int i;
253 for (i = 0; i < num; i++) 258 for (i = 0; i < num; i++)
254 arg[i] = va_arg(valist, char *); 259 arg[i] = va_arg(valist, char *);
@@ -263,7 +268,6 @@ int sbox_run(unsigned filtermask, int num, ...) {
263} 268}
264 269
265int sbox_run_v(unsigned filtermask, char * const arg[]) { 270int sbox_run_v(unsigned filtermask, char * const arg[]) {
266 EUID_ROOT();
267 assert(arg); 271 assert(arg);
268 272
269 if (arg_debug) { 273 if (arg_debug) {
@@ -283,6 +287,7 @@ int sbox_run_v(unsigned filtermask, char * const arg[]) {
283 if (child < 0) 287 if (child < 0)
284 errExit("fork"); 288 errExit("fork");
285 if (child == 0) { 289 if (child == 0) {
290 EUID_ROOT();
286 sbox_do_exec_v(filtermask, arg); 291 sbox_do_exec_v(filtermask, arg);
287 } 292 }
288 293
@@ -290,8 +295,9 @@ int sbox_run_v(unsigned filtermask, char * const arg[]) {
290 if (waitpid(child, &status, 0) == -1 ) { 295 if (waitpid(child, &status, 0) == -1 ) {
291 errExit("waitpid"); 296 errExit("waitpid");
292 } 297 }
293 if (WIFEXITED(status) && WEXITSTATUS(status) != 0) { 298 if (WIFSIGNALED(status) ||
294 fprintf(stderr, "Error: failed to run %s\n", arg[0]); 299 (WIFEXITED(status) && WEXITSTATUS(status) != 0)) {
300 fprintf(stderr, "Error: failed to run %s, exiting...\n", arg[0]);
295 exit(1); 301 exit(1);
296 } 302 }
297 303
diff --git a/src/firejail/seccomp.c b/src/firejail/seccomp.c
index 785c29517..0cd6ac7ec 100644
--- a/src/firejail/seccomp.c
+++ b/src/firejail/seccomp.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -86,7 +86,7 @@ int seccomp_install_filters(void) {
86static void seccomp_save_file_list(const char *fname) { 86static void seccomp_save_file_list(const char *fname) {
87 assert(fname); 87 assert(fname);
88 88
89 FILE *fp = fopen(RUN_SECCOMP_LIST, "a+"); 89 FILE *fp = fopen(RUN_SECCOMP_LIST, "ae");
90 if (!fp) 90 if (!fp)
91 errExit("fopen"); 91 errExit("fopen");
92 92
@@ -99,7 +99,7 @@ static void seccomp_save_file_list(const char *fname) {
99#define MAXBUF 4096 99#define MAXBUF 4096
100static int load_file_list_flag = 0; 100static int load_file_list_flag = 0;
101void seccomp_load_file_list(void) { 101void seccomp_load_file_list(void) {
102 FILE *fp = fopen(RUN_SECCOMP_LIST, "r"); 102 FILE *fp = fopen(RUN_SECCOMP_LIST, "re");
103 if (!fp) 103 if (!fp)
104 return; // no seccomp configuration whatsoever 104 return; // no seccomp configuration whatsoever
105 105
@@ -122,7 +122,7 @@ int seccomp_load(const char *fname) {
122 assert(fname); 122 assert(fname);
123 123
124 // open filter file 124 // open filter file
125 int fd = open(fname, O_RDONLY); 125 int fd = open(fname, O_RDONLY|O_CLOEXEC);
126 if (fd == -1) 126 if (fd == -1)
127 goto errexit; 127 goto errexit;
128 128
@@ -208,7 +208,8 @@ int seccomp_filter_drop(bool native) {
208 // - seccomp 208 // - seccomp
209 if (cfg.seccomp_list_drop == NULL) { 209 if (cfg.seccomp_list_drop == NULL) {
210 // default seccomp if error action is not changed 210 // default seccomp if error action is not changed
211 if (cfg.seccomp_list == NULL && arg_seccomp_error_action == DEFAULT_SECCOMP_ERROR_ACTION) { 211 if ((cfg.seccomp_list == NULL || cfg.seccomp_list[0] == '\0')
212 && arg_seccomp_error_action == DEFAULT_SECCOMP_ERROR_ACTION) {
212 if (arg_seccomp_block_secondary) 213 if (arg_seccomp_block_secondary)
213 seccomp_filter_block_secondary(); 214 seccomp_filter_block_secondary();
214 else { 215 else {
@@ -261,7 +262,7 @@ int seccomp_filter_drop(bool native) {
261 } 262 }
262 263
263 // build the seccomp filter as a regular user 264 // build the seccomp filter as a regular user
264 if (list) 265 if (list && list[0])
265 if (arg_allow_debuggers) 266 if (arg_allow_debuggers)
266 rv = sbox_run(SBOX_USER | SBOX_CAPS_NONE | SBOX_SECCOMP, 7, 267 rv = sbox_run(SBOX_USER | SBOX_CAPS_NONE | SBOX_SECCOMP, 7,
267 PATH_FSECCOMP, command, "drop", filter, postexec_filter, list, "allow-debuggers"); 268 PATH_FSECCOMP, command, "drop", filter, postexec_filter, list, "allow-debuggers");
@@ -434,11 +435,11 @@ void seccomp_print_filter(pid_t pid) {
434 if (asprintf(&fname, "/proc/%d/root%s", pid, RUN_SECCOMP_LIST) == -1) 435 if (asprintf(&fname, "/proc/%d/root%s", pid, RUN_SECCOMP_LIST) == -1)
435 errExit("asprintf"); 436 errExit("asprintf");
436 437
437 struct stat s; 438 int fd = open(fname, O_RDONLY|O_CLOEXEC);
438 if (stat(fname, &s) == -1) 439 if (fd < 0)
439 goto errexit; 440 goto errexit;
440 441
441 FILE *fp = fopen(fname, "r"); 442 FILE *fp = fdopen(fd, "r");
442 if (!fp) 443 if (!fp)
443 goto errexit; 444 goto errexit;
444 free(fname); 445 free(fname);
diff --git a/src/firejail/selinux.c b/src/firejail/selinux.c
index 06189d7f6..0348cef4b 100644
--- a/src/firejail/selinux.c
+++ b/src/firejail/selinux.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2020-2021 Firejail and systemd authors 2 * Copyright (C) 2020-2022 Firejail and systemd authors
3 * 3 *
4 * This file is part of firejail project, from systemd selinux-util.c 4 * This file is part of firejail project, from systemd selinux-util.c
5 * 5 *
@@ -19,10 +19,14 @@
19*/ 19*/
20#if HAVE_SELINUX 20#if HAVE_SELINUX
21#include "firejail.h" 21#include "firejail.h"
22
23#include <sys/types.h> 22#include <sys/types.h>
24#include <sys/stat.h> 23#include <sys/stat.h>
24#include <errno.h>
25
25#include <fcntl.h> 26#include <fcntl.h>
27#ifndef O_PATH
28#define O_PATH 010000000
29#endif
26 30
27#include <selinux/context.h> 31#include <selinux/context.h>
28#include <selinux/label.h> 32#include <selinux/label.h>
@@ -52,8 +56,19 @@ void selinux_relabel_path(const char *path, const char *inside_path)
52 if (!label_hnd) 56 if (!label_hnd)
53 errExit("selabel_open"); 57 errExit("selabel_open");
54 58
55 /* Open the file as O_PATH, to pin it while we determine and adjust the label */ 59 /* Open the file as O_PATH, to pin it while we determine and adjust the label
56 fd = open(path, O_NOFOLLOW|O_CLOEXEC|O_PATH); 60 * Defeat symlink races by not allowing symbolic links */
61 int called_as_root = 0;
62 if (geteuid() == 0)
63 called_as_root = 1;
64 if (called_as_root)
65 EUID_USER();
66
67 fd = safer_openat(-1, path, O_NOFOLLOW|O_CLOEXEC|O_PATH);
68
69 if (called_as_root)
70 EUID_ROOT();
71
57 if (fd < 0) 72 if (fd < 0)
58 return; 73 return;
59 if (fstat(fd, &st) < 0) 74 if (fstat(fd, &st) < 0)
@@ -64,8 +79,16 @@ void selinux_relabel_path(const char *path, const char *inside_path)
64 if (arg_debug) 79 if (arg_debug)
65 printf("Relabeling %s as %s (%s)\n", path, inside_path, fcon); 80 printf("Relabeling %s as %s (%s)\n", path, inside_path, fcon);
66 81
67 setfilecon_raw(procfs_path, fcon); 82 if (!called_as_root)
83 EUID_ROOT();
84
85 if (setfilecon_raw(procfs_path, fcon) != 0 && arg_debug)
86 printf("Cannot relabel %s: %s\n", path, strerror(errno));
87
88 if (!called_as_root)
89 EUID_USER();
68 } 90 }
91
69 freecon(fcon); 92 freecon(fcon);
70 close: 93 close:
71 close(fd); 94 close(fd);
diff --git a/src/firejail/shutdown.c b/src/firejail/shutdown.c
index 8fb03d0a6..44fdd58ab 100644
--- a/src/firejail/shutdown.c
+++ b/src/firejail/shutdown.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -36,8 +36,10 @@ void shut(pid_t pid) {
36 } 36 }
37 free(comm); 37 free(comm);
38 } 38 }
39 else 39 else {
40 errExit("/proc/PID/comm"); 40 fprintf(stderr, "Error: cannot find process %d\n", pid);
41 exit(1);
42 }
41 43
42 // check privileges for non-root users 44 // check privileges for non-root users
43 uid_t uid = getuid(); 45 uid_t uid = getuid();
@@ -64,7 +66,7 @@ void shut(pid_t pid) {
64 monsec--; 66 monsec--;
65 67
66 EUID_ROOT(); 68 EUID_ROOT();
67 FILE *fp = fopen(monfile, "r"); 69 FILE *fp = fopen(monfile, "re");
68 EUID_USER(); 70 EUID_USER();
69 if (!fp) { 71 if (!fp) {
70 killdone = 1; 72 killdone = 1;
diff --git a/src/firejail/usage.c b/src/firejail/usage.c
index 397150158..2dd913b5e 100644
--- a/src/firejail/usage.c
+++ b/src/firejail/usage.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -58,16 +58,18 @@ static char *usage_str =
58#ifdef HAVE_DBUSPROXY 58#ifdef HAVE_DBUSPROXY
59 " --dbus-log=file - set DBus log file location.\n" 59 " --dbus-log=file - set DBus log file location.\n"
60 " --dbus-system=filter|none - set system DBus access policy.\n" 60 " --dbus-system=filter|none - set system DBus access policy.\n"
61 " --dbus-system.broadcast=rule - allow signals on the system DBus according to rule.\n" 61 " --dbus-system.broadcast=rule - allow signals on the system DBus according\n"
62 "\tto rule.\n"
62 " --dbus-system.call=rule - allow calls on the system DBus according to rule.\n" 63 " --dbus-system.call=rule - allow calls on the system DBus according to rule.\n"
63 " --dbus-system.log - turn on logging for the system DBus." 64 " --dbus-system.log - turn on logging for the system DBus.\n"
64 " --dbus-system.own=name - allow ownership of name on the system DBus.\n" 65 " --dbus-system.own=name - allow ownership of name on the system DBus.\n"
65 " --dbus-system.see=name - allow seeing name on the system DBus.\n" 66 " --dbus-system.see=name - allow seeing name on the system DBus.\n"
66 " --dbus-system.talk=name - allow talking to name on the system DBus.\n" 67 " --dbus-system.talk=name - allow talking to name on the system DBus.\n"
67 " --dbus-user=filter|none - set session DBus access policy.\n" 68 " --dbus-user=filter|none - set session DBus access policy.\n"
68 " --dbus-user.broadcast=rule - allow signals on the session DBus according to rule.\n" 69 " --dbus-user.broadcast=rule - allow signals on the session DBus according\n"
70 "\tto rule.\n"
69 " --dbus-user.call=rule - allow calls on the session DBus according to rule.\n" 71 " --dbus-user.call=rule - allow calls on the session DBus according to rule.\n"
70 " --dbus-user.log - turn on logging for the user DBus." 72 " --dbus-user.log - turn on logging for the user DBus.\n"
71 " --dbus-user.own=name - allow ownership of name on the session DBus.\n" 73 " --dbus-user.own=name - allow ownership of name on the session DBus.\n"
72 " --dbus-user.see=name - allow seeing name on the session DBus.\n" 74 " --dbus-user.see=name - allow seeing name on the session DBus.\n"
73 " --dbus-user.talk=name - allow talking to name on the session DBus.\n" 75 " --dbus-user.talk=name - allow talking to name on the session DBus.\n"
@@ -80,13 +82,12 @@ static char *usage_str =
80 " --debug-protocols - print all recognized protocols.\n" 82 " --debug-protocols - print all recognized protocols.\n"
81 " --debug-syscalls - print all recognized system calls.\n" 83 " --debug-syscalls - print all recognized system calls.\n"
82 " --debug-syscalls32 - print all recognized 32 bit system calls.\n" 84 " --debug-syscalls32 - print all recognized 32 bit system calls.\n"
83#ifdef HAVE_WHITELIST
84 " --debug-whitelists - debug whitelisting.\n" 85 " --debug-whitelists - debug whitelisting.\n"
85#endif
86#ifdef HAVE_NETWORK 86#ifdef HAVE_NETWORK
87 " --defaultgw=address - configure default gateway.\n" 87 " --defaultgw=address - configure default gateway.\n"
88#endif 88#endif
89 " --deterministic-exit-code - always exit with first child's status code.\n" 89 " --deterministic-exit-code - always exit with first child's status code.\n"
90 " --deterministic-shutdown - terminate orphan processes.\n"
90 " --dns=address - set DNS server.\n" 91 " --dns=address - set DNS server.\n"
91 " --dns.print=name|pid - print DNS configuration.\n" 92 " --dns.print=name|pid - print DNS configuration.\n"
92 " --env=name=value - set environment variable.\n" 93 " --env=name=value - set environment variable.\n"
@@ -97,6 +98,8 @@ static char *usage_str =
97 " --help, -? - this help screen.\n" 98 " --help, -? - this help screen.\n"
98 " --hostname=name - set sandbox hostname.\n" 99 " --hostname=name - set sandbox hostname.\n"
99 " --hosts-file=file - use file as /etc/hosts.\n" 100 " --hosts-file=file - use file as /etc/hosts.\n"
101 " --ids-check - verify file system.\n"
102 " --ids-init - initialize IDS database.\n"
100 " --ignore=command - ignore command in profile files.\n" 103 " --ignore=command - ignore command in profile files.\n"
101#ifdef HAVE_NETWORK 104#ifdef HAVE_NETWORK
102 " --interface=name - move interface in sandbox.\n" 105 " --interface=name - move interface in sandbox.\n"
@@ -114,7 +117,9 @@ static char *usage_str =
114 " --join-network=name|pid - join the network namespace.\n" 117 " --join-network=name|pid - join the network namespace.\n"
115#endif 118#endif
116 " --join-or-start=name|pid - join the sandbox or start a new one.\n" 119 " --join-or-start=name|pid - join the sandbox or start a new one.\n"
117 " --keep-dev-shm - /dev/shm directory is untouched (even with --private-dev).\n" 120 " --keep-config-pulse - disable automatic ~/.config/pulse init.\n"
121 " --keep-dev-shm - /dev/shm directory is untouched (even with --private-dev).\n"
122 " --keep-fd - inherit open file descriptors to sandbox.\n"
118 " --keep-var-tmp - /var/tmp directory is untouched.\n" 123 " --keep-var-tmp - /var/tmp directory is untouched.\n"
119 " --list - list all sandboxes.\n" 124 " --list - list all sandboxes.\n"
120#ifdef HAVE_FILE_TRANSFER 125#ifdef HAVE_FILE_TRANSFER
@@ -123,7 +128,7 @@ static char *usage_str =
123#ifdef HAVE_NETWORK 128#ifdef HAVE_NETWORK
124 " --mac=xx:xx:xx:xx:xx:xx - set interface MAC address.\n" 129 " --mac=xx:xx:xx:xx:xx:xx - set interface MAC address.\n"
125#endif 130#endif
126 " --machine-id - preserve /etc/machine-id\n" 131 " --machine-id - spoof /etc/machine-id with a random id\n"
127 " --memory-deny-write-execute - seccomp filter to block attempts to create\n" 132 " --memory-deny-write-execute - seccomp filter to block attempts to create\n"
128 "\tmemory mappings that are both writable and executable.\n" 133 "\tmemory mappings that are both writable and executable.\n"
129 " --mkdir=dirname - create a directory.\n" 134 " --mkdir=dirname - create a directory.\n"
@@ -142,10 +147,12 @@ static char *usage_str =
142 " --netfilter.print=name|pid - print the firewall.\n" 147 " --netfilter.print=name|pid - print the firewall.\n"
143 " --netfilter6=filename - enable IPv6 firewall.\n" 148 " --netfilter6=filename - enable IPv6 firewall.\n"
144 " --netfilter6.print=name|pid - print the IPv6 firewall.\n" 149 " --netfilter6.print=name|pid - print the IPv6 firewall.\n"
145 " --netmask=address - define a network mask when dealing with unconfigured" 150 " --netlock - enable the network locking feature\n"
146 "\tparrent interfaces.\n" 151 " --netmask=address - define a network mask when dealing with unconfigured\n"
152 "\tparent interfaces.\n"
147 " --netns=name - Run the program in a named, persistent network namespace.\n" 153 " --netns=name - Run the program in a named, persistent network namespace.\n"
148 " --netstats - monitor network statistics.\n" 154 " --netstats - monitor network statistics.\n"
155 " --nettrace - monitor TCP and UDP traffic coming into the sandbox.\n"
149#endif 156#endif
150 " --nice=value - set nice value.\n" 157 " --nice=value - set nice value.\n"
151 " --no3d - disable 3D hardware acceleration.\n" 158 " --no3d - disable 3D hardware acceleration.\n"
@@ -154,7 +161,9 @@ static char *usage_str =
154 " --nodvd - disable DVD and audio CD devices.\n" 161 " --nodvd - disable DVD and audio CD devices.\n"
155 " --noexec=filename - remount the file or directory noexec nosuid and nodev.\n" 162 " --noexec=filename - remount the file or directory noexec nosuid and nodev.\n"
156 " --nogroups - disable supplementary groups.\n" 163 " --nogroups - disable supplementary groups.\n"
164 " --noinput - disable input devices.\n"
157 " --nonewprivs - sets the NO_NEW_PRIVS prctl.\n" 165 " --nonewprivs - sets the NO_NEW_PRIVS prctl.\n"
166 " --noprinters - disable printers.\n"
158 " --noprofile - do not use a security profile.\n" 167 " --noprofile - do not use a security profile.\n"
159#ifdef HAVE_USERNS 168#ifdef HAVE_USERNS
160 " --noroot - install a user namespace with only the current user.\n" 169 " --noroot - install a user namespace with only the current user.\n"
@@ -236,6 +245,8 @@ static char *usage_str =
236 " --shell=none - run the program directly without a user shell.\n" 245 " --shell=none - run the program directly without a user shell.\n"
237 " --shell=program - set default user shell.\n" 246 " --shell=program - set default user shell.\n"
238 " --shutdown=name|pid - shutdown the sandbox identified by name or PID.\n" 247 " --shutdown=name|pid - shutdown the sandbox identified by name or PID.\n"
248 " --tab - enable shell tab completion in sandboxes using private or\n"
249 "\twhitelisted home directories.\n"
239 " --timeout=hh:mm:ss - kill the sandbox automatically after the time\n" 250 " --timeout=hh:mm:ss - kill the sandbox automatically after the time\n"
240 "\thas elapsed.\n" 251 "\thas elapsed.\n"
241 " --tmpfs=dirname - mount a tmpfs filesystem on directory dirname.\n" 252 " --tmpfs=dirname - mount a tmpfs filesystem on directory dirname.\n"
@@ -250,9 +261,7 @@ static char *usage_str =
250#ifdef HAVE_NETWORK 261#ifdef HAVE_NETWORK
251 " --veth-name=name - use this name for the interface connected to the bridge.\n" 262 " --veth-name=name - use this name for the interface connected to the bridge.\n"
252#endif 263#endif
253#ifdef HAVE_WHITELIST
254 " --whitelist=filename - whitelist directory or file.\n" 264 " --whitelist=filename - whitelist directory or file.\n"
255#endif
256 " --writable-etc - /etc directory is mounted read-write.\n" 265 " --writable-etc - /etc directory is mounted read-write.\n"
257 " --writable-run-user - allow access to /run/user/$UID/systemd and\n" 266 " --writable-run-user - allow access to /run/user/$UID/systemd and\n"
258 "\t/run/user/$UID/gnupg.\n" 267 "\t/run/user/$UID/gnupg.\n"
diff --git a/src/firejail/util.c b/src/firejail/util.c
index 2ad85acd6..109105630 100644
--- a/src/firejail/util.c
+++ b/src/firejail/util.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -19,8 +19,7 @@
19 */ 19 */
20#define _XOPEN_SOURCE 500 20#define _XOPEN_SOURCE 500
21#include "firejail.h" 21#include "firejail.h"
22#include <ftw.h> 22#include "../include/gcov_wrapper.h"
23#include <sys/stat.h>
24#include <sys/mount.h> 23#include <sys/mount.h>
25#include <syslog.h> 24#include <syslog.h>
26#include <errno.h> 25#include <errno.h>
@@ -46,6 +45,44 @@
46#define EMPTY_STRING ("") 45#define EMPTY_STRING ("")
47 46
48 47
48long long unsigned parse_arg_size(char *str) {
49 long long unsigned result = 0;
50 int len = strlen(str);
51 sscanf(str, "%llu", &result);
52
53 char suffix = *(str + len - 1);
54 if (!isdigit(suffix) && (suffix == 'k' || suffix == 'm' || suffix == 'g')) {
55 len -= 1;
56 }
57
58 /* checks for is value valid positive number */
59 for (int i = 0; i < len; i++) {
60 if (!isdigit(*(str+i))) {
61 return 0;
62 }
63 }
64
65 if (isdigit(suffix))
66 return result;
67
68 switch (suffix) {
69 case 'k':
70 result *= 1024;
71 break;
72 case 'm':
73 result *= 1024 * 1024;
74 break;
75 case 'g':
76 result *= 1024 * 1024 * 1024;
77 break;
78 default:
79 result = 0;
80 break;
81 }
82
83 return result;
84}
85
49// send the error to /var/log/auth.log and exit after a small delay 86// send the error to /var/log/auth.log and exit after a small delay
50void errLogExit(char* fmt, ...) { 87void errLogExit(char* fmt, ...) {
51 va_list args; 88 va_list args;
@@ -66,6 +103,72 @@ void errLogExit(char* fmt, ...) {
66 exit(1); 103 exit(1);
67} 104}
68 105
106// Returns whether all supplementary groups can be safely dropped
107int check_can_drop_all_groups() {
108 static int can_drop_all_groups = -1;
109
110 // Avoid needlessly checking (and printing) things twice
111 if (can_drop_all_groups != -1)
112 goto out;
113
114 // nvidia cards require video group; ignore nogroups
115 if (access("/dev/nvidiactl", R_OK) == 0 && arg_no3d == 0) {
116 fwarning("NVIDIA card detected, nogroups command ignored\n");
117 can_drop_all_groups = 0;
118 goto out;
119 }
120
121 /* When we are not sure that the system has working seat-based ACLs
122 * (e.g.: probably yes on (e)udev + (e)logind, probably not on eudev +
123 * seatd), supplementary groups (e.g.: audio and input) might be needed
124 * to avoid breakage (e.g.: audio or gamepads not working). See #4600
125 * and #4603.
126 */
127 if (access("/run/systemd/seats/", F_OK) != 0) {
128 // TODO: wrc causes this to be printed even with (e)logind (see #4930)
129 //fwarning("logind not detected, nogroups command ignored\n");
130 can_drop_all_groups = 0;
131 goto out;
132 }
133
134 if (arg_debug)
135 fprintf(stderr, "nogroups command not ignored\n");
136 can_drop_all_groups = 1;
137
138out:
139 return can_drop_all_groups;
140}
141
142static int find_group(gid_t group, const gid_t *groups, int ngroups) {
143 int i;
144 for (i = 0; i < ngroups; i++) {
145 if (group == groups[i])
146 return i;
147 }
148
149 return -1;
150}
151
152// Gets group from "groupname" and adds it to "new_groups" if it exists on
153// "groups". Always returns the current value of new_ngroups.
154static int copy_group_ifcont(const char *groupname,
155 const gid_t *groups, int ngroups,
156 gid_t *new_groups, int *new_ngroups, int new_sz) {
157 if (*new_ngroups >= new_sz) {
158 errno = ERANGE;
159 goto out;
160 }
161
162 gid_t g = get_group_id(groupname);
163 if (g && find_group(g, groups, ngroups) >= 0) {
164 new_groups[*new_ngroups] = g;
165 (*new_ngroups)++;
166 }
167
168out:
169 return *new_ngroups;
170}
171
69static void clean_supplementary_groups(gid_t gid) { 172static void clean_supplementary_groups(gid_t gid) {
70 assert(cfg.username); 173 assert(cfg.username);
71 gid_t groups[MAX_GROUPS]; 174 gid_t groups[MAX_GROUPS];
@@ -74,35 +177,60 @@ static void clean_supplementary_groups(gid_t gid) {
74 if (rv == -1) 177 if (rv == -1)
75 goto clean_all; 178 goto clean_all;
76 179
180 if (arg_nogroups && check_can_drop_all_groups())
181 goto clean_all;
182
77 // clean supplementary group list 183 // clean supplementary group list
78 // allow only firejail, tty, audio, video, games
79 gid_t new_groups[MAX_GROUPS]; 184 gid_t new_groups[MAX_GROUPS];
80 int new_ngroups = 0; 185 int new_ngroups = 0;
81 char *allowed[] = { 186 char *allowed[] = {
82 "firejail", 187 "firejail",
83 "tty", 188 "tty",
84 "audio",
85 "video",
86 "games", 189 "games",
87 NULL 190 NULL
88 }; 191 };
89 192
90 int i = 0; 193 int i = 0;
91 while (allowed[i]) { 194 while (allowed[i]) {
92 gid_t g = get_group_id(allowed[i]); 195 copy_group_ifcont(allowed[i], groups, ngroups,
93 if (g) { 196 new_groups, &new_ngroups, MAX_GROUPS);
94 int j;
95 for (j = 0; j < ngroups; j++) {
96 if (g == groups[j]) {
97 new_groups[new_ngroups] = g;
98 new_ngroups++;
99 break;
100 }
101 }
102 }
103 i++; 197 i++;
104 } 198 }
105 199
200 if (!arg_nosound) {
201 copy_group_ifcont("audio", groups, ngroups,
202 new_groups, &new_ngroups, MAX_GROUPS);
203 }
204
205 if (!arg_novideo) {
206 copy_group_ifcont("video", groups, ngroups,
207 new_groups, &new_ngroups, MAX_GROUPS);
208 }
209
210 if (!arg_no3d) {
211 copy_group_ifcont("render", groups, ngroups,
212 new_groups, &new_ngroups, MAX_GROUPS);
213 copy_group_ifcont("vglusers", groups, ngroups,
214 new_groups, &new_ngroups, MAX_GROUPS);
215 }
216
217 if (!arg_noprinters) {
218 copy_group_ifcont("lp", groups, ngroups,
219 new_groups, &new_ngroups, MAX_GROUPS);
220 }
221
222 if (!arg_nodvd) {
223 copy_group_ifcont("cdrom", groups, ngroups,
224 new_groups, &new_ngroups, MAX_GROUPS);
225 copy_group_ifcont("optical", groups, ngroups,
226 new_groups, &new_ngroups, MAX_GROUPS);
227 }
228
229 if (!arg_noinput) {
230 copy_group_ifcont("input", groups, ngroups,
231 new_groups, &new_ngroups, MAX_GROUPS);
232 }
233
106 if (new_ngroups) { 234 if (new_ngroups) {
107 rv = setgroups(new_ngroups, new_groups); 235 rv = setgroups(new_ngroups, new_groups);
108 if (rv) 236 if (rv)
@@ -128,21 +256,22 @@ clean_all:
128 256
129 257
130// drop privileges 258// drop privileges
131// - for root group or if nogroups is set, supplementary groups are not configured 259// - for root group or if force_nogroups is set, supplementary groups are not configured
132void drop_privs(int nogroups) { 260void drop_privs(int force_nogroups) {
133 gid_t gid = getgid(); 261 gid_t gid = getgid();
134 if (arg_debug) 262 if (arg_debug)
135 printf("Drop privileges: pid %d, uid %d, gid %d, nogroups %d\n", getpid(), getuid(), gid, nogroups); 263 printf("Drop privileges: pid %d, uid %d, gid %d, force_nogroups %d\n",
264 getpid(), getuid(), gid, force_nogroups);
136 265
137 // configure supplementary groups 266 // configure supplementary groups
138 EUID_ROOT(); 267 EUID_ROOT();
139 if (gid == 0 || nogroups) { 268 if (gid == 0 || force_nogroups) {
140 if (setgroups(0, NULL) < 0) 269 if (setgroups(0, NULL) < 0)
141 errExit("setgroups"); 270 errExit("setgroups");
142 if (arg_debug) 271 if (arg_debug)
143 printf("No supplementary groups\n"); 272 printf("No supplementary groups\n");
144 } 273 }
145 else if (arg_noroot) 274 else if (arg_noroot || arg_nogroups)
146 clean_supplementary_groups(gid); 275 clean_supplementary_groups(gid);
147 276
148 // set uid/gid 277 // set uid/gid
@@ -298,14 +427,14 @@ int copy_file(const char *srcname, const char *destname, uid_t uid, gid_t gid, m
298 assert(destname); 427 assert(destname);
299 428
300 // open source 429 // open source
301 int src = open(srcname, O_RDONLY); 430 int src = open(srcname, O_RDONLY|O_CLOEXEC);
302 if (src < 0) { 431 if (src < 0) {
303 fwarning("cannot open source file %s, file not copied\n", srcname); 432 fwarning("cannot open source file %s, file not copied\n", srcname);
304 return -1; 433 return -1;
305 } 434 }
306 435
307 // open destination 436 // open destination
308 int dst = open(destname, O_CREAT|O_WRONLY|O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); 437 int dst = open(destname, O_CREAT|O_WRONLY|O_TRUNC|O_CLOEXEC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
309 if (dst < 0) { 438 if (dst < 0) {
310 fwarning("cannot open destination file %s, file not copied\n", destname); 439 fwarning("cannot open destination file %s, file not copied\n", destname);
311 close(src); 440 close(src);
@@ -325,7 +454,7 @@ int copy_file(const char *srcname, const char *destname, uid_t uid, gid_t gid, m
325} 454}
326 455
327// return -1 if error, 0 if no error 456// return -1 if error, 0 if no error
328void copy_file_as_user(const char *srcname, const char *destname, uid_t uid, gid_t gid, mode_t mode) { 457void copy_file_as_user(const char *srcname, const char *destname, mode_t mode) {
329 pid_t child = fork(); 458 pid_t child = fork();
330 if (child < 0) 459 if (child < 0)
331 errExit("fork"); 460 errExit("fork");
@@ -333,13 +462,13 @@ void copy_file_as_user(const char *srcname, const char *destname, uid_t uid, gid
333 // drop privileges 462 // drop privileges
334 drop_privs(0); 463 drop_privs(0);
335 464
336 // copy, set permissions and ownership 465 // copy, set permissions
337 int rv = copy_file(srcname, destname, uid, gid, mode); // already a regular user 466 int rv = copy_file(srcname, destname, -1, -1, mode); // already a regular user
338 if (rv) 467 if (rv)
339 fwarning("cannot copy %s\n", srcname); 468 fwarning("cannot copy %s\n", srcname);
340#ifdef HAVE_GCOV 469
341 __gcov_flush(); 470 __gcov_flush();
342#endif 471
343 _exit(0); 472 _exit(0);
344 } 473 }
345 // wait for the child to finish 474 // wait for the child to finish
@@ -348,7 +477,7 @@ void copy_file_as_user(const char *srcname, const char *destname, uid_t uid, gid
348 477
349void copy_file_from_user_to_root(const char *srcname, const char *destname, uid_t uid, gid_t gid, mode_t mode) { 478void copy_file_from_user_to_root(const char *srcname, const char *destname, uid_t uid, gid_t gid, mode_t mode) {
350 // open destination 479 // open destination
351 int dst = open(destname, O_CREAT|O_WRONLY|O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); 480 int dst = open(destname, O_CREAT|O_WRONLY|O_TRUNC|O_CLOEXEC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
352 if (dst < 0) { 481 if (dst < 0) {
353 fwarning("cannot open destination file %s, file not copied\n", destname); 482 fwarning("cannot open destination file %s, file not copied\n", destname);
354 return; 483 return;
@@ -361,7 +490,7 @@ void copy_file_from_user_to_root(const char *srcname, const char *destname, uid_
361 // drop privileges 490 // drop privileges
362 drop_privs(0); 491 drop_privs(0);
363 492
364 int src = open(srcname, O_RDONLY); 493 int src = open(srcname, O_RDONLY|O_CLOEXEC);
365 if (src < 0) { 494 if (src < 0) {
366 fwarning("cannot open source file %s, file not copied\n", srcname); 495 fwarning("cannot open source file %s, file not copied\n", srcname);
367 } else { 496 } else {
@@ -371,9 +500,9 @@ void copy_file_from_user_to_root(const char *srcname, const char *destname, uid_
371 close(src); 500 close(src);
372 } 501 }
373 close(dst); 502 close(dst);
374#ifdef HAVE_GCOV 503
375 __gcov_flush(); 504 __gcov_flush();
376#endif 505
377 _exit(0); 506 _exit(0);
378 } 507 }
379 // wait for the child to finish 508 // wait for the child to finish
@@ -394,17 +523,17 @@ void touch_file_as_user(const char *fname, mode_t mode) {
394 // drop privileges 523 // drop privileges
395 drop_privs(0); 524 drop_privs(0);
396 525
397 FILE *fp = fopen(fname, "wx"); 526 int fd = open(fname, O_RDONLY|O_CREAT|O_EXCL|O_CLOEXEC, S_IRUSR | S_IWUSR);
398 if (fp) { 527 if (fd > -1) {
399 fprintf(fp, "\n"); 528 int err = fchmod(fd, mode);
400 SET_PERMS_STREAM(fp, -1, -1, mode); 529 (void) err;
401 fclose(fp); 530 close(fd);
402 } 531 }
403 else 532 else
404 fwarning("cannot create %s\n", fname); 533 fwarning("cannot create %s\n", fname);
405#ifdef HAVE_GCOV 534
406 __gcov_flush(); 535 __gcov_flush();
407#endif 536
408 _exit(0); 537 _exit(0);
409 } 538 }
410 // wait for the child to finish 539 // wait for the child to finish
@@ -421,14 +550,14 @@ int is_dir(const char *fname) {
421 int rv; 550 int rv;
422 struct stat s; 551 struct stat s;
423 if (fname[strlen(fname) - 1] == '/') 552 if (fname[strlen(fname) - 1] == '/')
424 rv = stat(fname, &s); 553 rv = stat_as_user(fname, &s);
425 else { 554 else {
426 char *tmp; 555 char *tmp;
427 if (asprintf(&tmp, "%s/", fname) == -1) { 556 if (asprintf(&tmp, "%s/", fname) == -1) {
428 fprintf(stderr, "Error: cannot allocate memory, %s:%d\n", __FILE__, __LINE__); 557 fprintf(stderr, "Error: cannot allocate memory, %s:%d\n", __FILE__, __LINE__);
429 errExit("asprintf"); 558 errExit("asprintf");
430 } 559 }
431 rv = stat(tmp, &s); 560 rv = stat_as_user(tmp, &s);
432 free(tmp); 561 free(tmp);
433 } 562 }
434 563
@@ -447,18 +576,91 @@ int is_link(const char *fname) {
447 if (*fname == '\0') 576 if (*fname == '\0')
448 return 0; 577 return 0;
449 578
450 char *dup = strdup(fname); 579 // remove trailing '/' if any
451 if (!dup) 580 char *tmp = strdup(fname);
581 if (!tmp)
452 errExit("strdup"); 582 errExit("strdup");
453 trim_trailing_slash_or_dot(dup); 583 trim_trailing_slash_or_dot(tmp);
454 584
455 char c; 585 char c;
456 ssize_t rv = readlink(dup, &c, 1); 586 ssize_t rv = readlink_as_user(tmp, &c, 1);
587 free(tmp);
457 588
458 free(dup);
459 return (rv != -1); 589 return (rv != -1);
460} 590}
461 591
592char *realpath_as_user(const char *fname) {
593 assert(fname);
594
595 int called_as_root = 0;
596 if (geteuid() == 0)
597 called_as_root = 1;
598
599 if (called_as_root)
600 EUID_USER();
601
602 char *rv = realpath(fname, NULL);
603
604 if (called_as_root)
605 EUID_ROOT();
606
607 return rv;
608}
609
610ssize_t readlink_as_user(const char *fname, char *buf, size_t sz) {
611 assert(fname && buf && sz);
612
613 int called_as_root = 0;
614 if (geteuid() == 0)
615 called_as_root = 1;
616
617 if (called_as_root)
618 EUID_USER();
619
620 ssize_t rv = readlink(fname, buf, sz);
621
622 if (called_as_root)
623 EUID_ROOT();
624
625 return rv;
626}
627
628int stat_as_user(const char *fname, struct stat *s) {
629 assert(fname);
630
631 int called_as_root = 0;
632 if (geteuid() == 0)
633 called_as_root = 1;
634
635 if (called_as_root)
636 EUID_USER();
637
638 int rv = stat(fname, s);
639
640 if (called_as_root)
641 EUID_ROOT();
642
643 return rv;
644}
645
646int lstat_as_user(const char *fname, struct stat *s) {
647 assert(fname);
648
649 int called_as_root = 0;
650 if (geteuid() == 0)
651 called_as_root = 1;
652
653 if (called_as_root)
654 EUID_USER();
655
656 int rv = lstat(fname, s);
657
658 if (called_as_root)
659 EUID_ROOT();
660
661 return rv;
662}
663
462// remove all slashes and single dots from the end of a path 664// remove all slashes and single dots from the end of a path
463// for example /foo/bar///././. -> /foo/bar 665// for example /foo/bar///././. -> /foo/bar
464void trim_trailing_slash_or_dot(char *path) { 666void trim_trailing_slash_or_dot(char *path) {
@@ -544,11 +746,13 @@ char *split_comma(char *str) {
544} 746}
545 747
546 748
547// remove consecutive and trailing slashes 749// simplify absolute path by removing
548// and return allocated memory 750// 1) consecutive and trailing slashes, and
549// e.g. /home//user/ -> /home/user 751// 2) segments with a single dot
752// for example /foo//./bar/ -> /foo/bar
550char *clean_pathname(const char *path) { 753char *clean_pathname(const char *path) {
551 assert(path); 754 assert(path && path[0] == '/');
755
552 size_t len = strlen(path); 756 size_t len = strlen(path);
553 char *rv = malloc(len + 1); 757 char *rv = malloc(len + 1);
554 if (!rv) 758 if (!rv)
@@ -557,15 +761,23 @@ char *clean_pathname(const char *path) {
557 size_t i = 0; 761 size_t i = 0;
558 size_t j = 0; 762 size_t j = 0;
559 while (path[i]) { 763 while (path[i]) {
560 while (path[i] == '/' && path[i+1] == '/') 764 if (path[i] == '/') {
561 i++; 765 while (path[i+1] == '/' ||
766 (path[i+1] == '.' && path[i+2] == '/'))
767 i++;
768 }
769
562 rv[j++] = path[i++]; 770 rv[j++] = path[i++];
563 } 771 }
564 rv[j] = '\0'; 772 rv[j] = '\0';
565 773
774 // remove a trailing dot
775 if (j > 1 && rv[j - 1] == '.' && rv[j - 2] == '/')
776 rv[--j] = '\0';
777
566 // remove a trailing slash 778 // remove a trailing slash
567 if (j > 1 && rv[j - 1] == '/') 779 if (j > 1 && rv[j - 1] == '/')
568 rv[j - 1] = '\0'; 780 rv[--j] = '\0';
569 781
570 return rv; 782 return rv;
571} 783}
@@ -616,7 +828,7 @@ int find_child(pid_t parent, pid_t *child) {
616 perror("asprintf"); 828 perror("asprintf");
617 exit(1); 829 exit(1);
618 } 830 }
619 FILE *fp = fopen(file, "r"); 831 FILE *fp = fopen(file, "re");
620 if (!fp) { 832 if (!fp) {
621 free(file); 833 free(file);
622 continue; 834 continue;
@@ -637,9 +849,11 @@ int find_child(pid_t parent, pid_t *child) {
637 if (parent == atoi(ptr)) { 849 if (parent == atoi(ptr)) {
638 // we don't want /usr/bin/xdg-dbus-proxy! 850 // we don't want /usr/bin/xdg-dbus-proxy!
639 char *cmdline = pid_proc_cmdline(pid); 851 char *cmdline = pid_proc_cmdline(pid);
640 if (strncmp(cmdline, XDG_DBUS_PROXY_PATH, strlen(XDG_DBUS_PROXY_PATH)) != 0) 852 if (cmdline) {
641 *child = pid; 853 if (strncmp(cmdline, XDG_DBUS_PROXY_PATH, strlen(XDG_DBUS_PROXY_PATH)) != 0)
642 free(cmdline); 854 *child = pid;
855 free(cmdline);
856 }
643 } 857 }
644 break; // stop reading the file 858 break; // stop reading the file
645 } 859 }
@@ -722,7 +936,7 @@ void update_map(char *mapping, char *map_file) {
722 if (mapping[j] == ',') 936 if (mapping[j] == ',')
723 mapping[j] = '\n'; 937 mapping[j] = '\n';
724 938
725 fd = open(map_file, O_RDWR); 939 fd = open(map_file, O_RDWR|O_CLOEXEC);
726 if (fd == -1) { 940 if (fd == -1) {
727 fprintf(stderr, "Error: cannot open %s: %s\n", map_file, strerror(errno)); 941 fprintf(stderr, "Error: cannot open %s: %s\n", map_file, strerror(errno));
728 exit(EXIT_FAILURE); 942 exit(EXIT_FAILURE);
@@ -742,9 +956,9 @@ void wait_for_other(int fd) {
742 // wait for the parent to be initialized 956 // wait for the parent to be initialized
743 //**************************** 957 //****************************
744 char childstr[BUFLEN + 1]; 958 char childstr[BUFLEN + 1];
745 int newfd = dup(fd); 959 int newfd = fcntl(fd, F_DUPFD_CLOEXEC, 0);
746 if (newfd == -1) 960 if (newfd == -1)
747 errExit("dup"); 961 errExit("fcntl");
748 FILE* stream; 962 FILE* stream;
749 stream = fdopen(newfd, "r"); 963 stream = fdopen(newfd, "r");
750 *childstr = '\0'; 964 *childstr = '\0';
@@ -791,9 +1005,9 @@ void wait_for_other(int fd) {
791 1005
792void notify_other(int fd) { 1006void notify_other(int fd) {
793 FILE* stream; 1007 FILE* stream;
794 int newfd = dup(fd); 1008 int newfd = fcntl(fd, F_DUPFD_CLOEXEC, 0);
795 if (newfd == -1) 1009 if (newfd == -1)
796 errExit("dup"); 1010 errExit("fcntl");
797 stream = fdopen(newfd, "w"); 1011 stream = fdopen(newfd, "w");
798 fprintf(stream, "arg_noroot=%d\n", arg_noroot); 1012 fprintf(stream, "arg_noroot=%d\n", arg_noroot);
799 fflush(stream); 1013 fflush(stream);
@@ -811,7 +1025,7 @@ uid_t pid_get_uid(pid_t pid) {
811 exit(1); 1025 exit(1);
812 } 1026 }
813 EUID_ROOT(); // grsecurity fix 1027 EUID_ROOT(); // grsecurity fix
814 FILE *fp = fopen(file, "r"); 1028 FILE *fp = fopen(file, "re");
815 if (!fp) { 1029 if (!fp) {
816 free(file); 1030 free(file);
817 fprintf(stderr, "Error: cannot open /proc file\n"); 1031 fprintf(stderr, "Error: cannot open /proc file\n");
@@ -845,12 +1059,9 @@ uid_t pid_get_uid(pid_t pid) {
845} 1059}
846 1060
847 1061
848 1062gid_t get_group_id(const char *groupname) {
849
850uid_t get_group_id(const char *group) {
851 // find tty group id
852 gid_t gid = 0; 1063 gid_t gid = 0;
853 struct group *g = getgrnam(group); 1064 struct group *g = getgrnam(groupname);
854 if (g) 1065 if (g)
855 gid = g->gr_gid; 1066 gid = g->gr_gid;
856 1067
@@ -858,84 +1069,6 @@ uid_t get_group_id(const char *group) {
858} 1069}
859 1070
860 1071
861static int remove_callback(const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf) {
862 (void) sb;
863 (void) typeflag;
864 (void) ftwbuf;
865 assert(fpath);
866
867 if (strcmp(fpath, ".") == 0)
868 return 0;
869
870 if (remove(fpath)) { // removes the link not the actual file
871 perror("remove");
872 fprintf(stderr, "Error: cannot remove file from user .firejail directory: %s\n", fpath);
873 exit(1);
874 }
875
876 return 0;
877}
878
879
880int remove_overlay_directory(void) {
881 EUID_ASSERT();
882 struct stat s;
883 sleep(1);
884
885 char *path;
886 if (asprintf(&path, "%s/.firejail", cfg.homedir) == -1)
887 errExit("asprintf");
888
889 if (lstat(path, &s) == 0) {
890 // deal with obvious problems such as symlinks and root ownership
891 if (!S_ISDIR(s.st_mode)) {
892 if (S_ISLNK(s.st_mode))
893 fprintf(stderr, "Error: %s is a symbolic link\n", path);
894 else
895 fprintf(stderr, "Error: %s is not a directory\n", path);
896 exit(1);
897 }
898 if (s.st_uid != getuid()) {
899 fprintf(stderr, "Error: %s is not owned by the current user\n", path);
900 exit(1);
901 }
902
903 pid_t child = fork();
904 if (child < 0)
905 errExit("fork");
906 if (child == 0) {
907 // open ~/.firejail, fails if there is any symlink
908 int fd = safe_fd(path, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
909 if (fd == -1)
910 errExit("safe_fd");
911 // chdir to ~/.firejail
912 if (fchdir(fd) == -1)
913 errExit("fchdir");
914 close(fd);
915
916 EUID_ROOT();
917 // FTW_PHYS - do not follow symbolic links
918 if (nftw(".", remove_callback, 64, FTW_DEPTH | FTW_PHYS) == -1)
919 errExit("nftw");
920
921 EUID_USER();
922 // remove ~/.firejail
923 if (rmdir(path) == -1)
924 errExit("rmdir");
925#ifdef HAVE_GCOV
926 __gcov_flush();
927#endif
928 _exit(0);
929 }
930 // wait for the child to finish
931 waitpid(child, NULL, 0);
932 // check if ~/.firejail was deleted
933 if (stat(path, &s) == 0)
934 return 1;
935 }
936 return 0;
937}
938
939// flush stdin if it is connected to a tty and has input 1072// flush stdin if it is connected to a tty and has input
940void flush_stdin(void) { 1073void flush_stdin(void) {
941 if (!isatty(STDIN_FILENO)) 1074 if (!isatty(STDIN_FILENO))
@@ -963,33 +1096,34 @@ void flush_stdin(void) {
963int create_empty_dir_as_user(const char *dir, mode_t mode) { 1096int create_empty_dir_as_user(const char *dir, mode_t mode) {
964 assert(dir); 1097 assert(dir);
965 mode &= 07777; 1098 mode &= 07777;
966 struct stat s;
967 1099
968 if (stat(dir, &s)) { 1100 if (access(dir, F_OK) == 0)
1101 return 0;
1102
1103 pid_t child = fork();
1104 if (child < 0)
1105 errExit("fork");
1106 if (child == 0) {
1107 // drop privileges
1108 drop_privs(0);
1109
969 if (arg_debug) 1110 if (arg_debug)
970 printf("Creating empty %s directory\n", dir); 1111 printf("Creating empty %s directory\n", dir);
971 pid_t child = fork(); 1112 if (mkdir(dir, mode) == 0) {
972 if (child < 0) 1113 int err = chmod(dir, mode);
973 errExit("fork"); 1114 (void) err;
974 if (child == 0) {
975 // drop privileges
976 drop_privs(0);
977
978 if (mkdir(dir, mode) == 0) {
979 if (chmod(dir, mode) == -1)
980 {;} // do nothing
981 }
982 else if (arg_debug)
983 printf("Directory %s not created: %s\n", dir, strerror(errno));
984#ifdef HAVE_GCOV
985 __gcov_flush();
986#endif
987 _exit(0);
988 } 1115 }
989 waitpid(child, NULL, 0); 1116 else if (arg_debug)
990 if (stat(dir, &s) == 0) 1117 printf("Directory %s not created: %s\n", dir, strerror(errno));
991 return 1; 1118
1119 __gcov_flush();
1120
1121 _exit(0);
992 } 1122 }
1123 waitpid(child, NULL, 0);
1124
1125 if (access(dir, F_OK) == 0)
1126 return 1;
993 return 0; 1127 return 0;
994} 1128}
995 1129
@@ -1020,9 +1154,10 @@ void create_empty_file_as_root(const char *fname, mode_t mode) {
1020 if (stat(fname, &s)) { 1154 if (stat(fname, &s)) {
1021 if (arg_debug) 1155 if (arg_debug)
1022 printf("Creating empty %s file\n", fname); 1156 printf("Creating empty %s file\n", fname);
1023
1024 /* coverity[toctou] */ 1157 /* coverity[toctou] */
1025 FILE *fp = fopen(fname, "w"); 1158 // don't fail if file already exists. This can be the case in a race
1159 // condition, when two jails launch at the same time. Compare to #1013
1160 FILE *fp = fopen(fname, "we");
1026 if (!fp) 1161 if (!fp)
1027 errExit("fopen"); 1162 errExit("fopen");
1028 SET_PERMS_STREAM(fp, 0, 0, mode); 1163 SET_PERMS_STREAM(fp, 0, 0, mode);
@@ -1097,20 +1232,35 @@ unsigned extract_timeout(const char *str) {
1097} 1232}
1098 1233
1099void disable_file_or_dir(const char *fname) { 1234void disable_file_or_dir(const char *fname) {
1235 assert(geteuid() == 0);
1236 assert(fname);
1237
1238 EUID_USER();
1239 int fd = open(fname, O_PATH|O_CLOEXEC);
1240 EUID_ROOT();
1241 if (fd < 0)
1242 return;
1243
1100 struct stat s; 1244 struct stat s;
1101 if (stat(fname, &s) != -1) { 1245 if (fstat(fd, &s) < 0) { // FUSE
1102 if (arg_debug) 1246 if (errno != EACCES)
1103 printf("blacklist %s\n", fname); 1247 errExit("fstat");
1104 if (is_dir(fname)) { 1248 close(fd);
1105 if (mount(RUN_RO_DIR, fname, "none", MS_BIND, "mode=400,gid=0") < 0) 1249 return;
1106 errExit("disable directory"); 1250 }
1107 } 1251
1108 else { 1252 if (arg_debug)
1109 if (mount(RUN_RO_FILE, fname, "none", MS_BIND, "mode=400,gid=0") < 0) 1253 printf("blacklist %s\n", fname);
1110 errExit("disable file"); 1254 if (S_ISDIR(s.st_mode)) {
1111 } 1255 if (bind_mount_path_to_fd(RUN_RO_DIR, fd) < 0)
1112 fs_logger2("blacklist", fname); 1256 errExit("disable directory");
1113 } 1257 }
1258 else {
1259 if (bind_mount_path_to_fd(RUN_RO_FILE, fd) < 0)
1260 errExit("disable file");
1261 }
1262 close(fd);
1263 fs_logger2("blacklist", fname);
1114} 1264}
1115 1265
1116void disable_file_path(const char *path, const char *file) { 1266void disable_file_path(const char *path, const char *file) {
@@ -1126,13 +1276,13 @@ void disable_file_path(const char *path, const char *file) {
1126} 1276}
1127 1277
1128// open an existing file without following any symbolic link 1278// open an existing file without following any symbolic link
1129int safe_fd(const char *path, int flags) { 1279// relative paths are interpreted relative to dirfd
1280// ignore dirfd if path is absolute
1281// https://web.archive.org/web/20180419120236/https://blogs.gnome.org/jamesh/2018/04/19/secure-mounts
1282int safer_openat(int dirfd, const char *path, int flags) {
1283 assert(path && path[0]);
1130 flags |= O_NOFOLLOW; 1284 flags |= O_NOFOLLOW;
1131 assert(path); 1285
1132 if (*path != '/' || strstr(path, "..")) {
1133 fprintf(stderr, "Error: invalid path %s\n", path);
1134 exit(1);
1135 }
1136 int fd = -1; 1286 int fd = -1;
1137 1287
1138#ifdef __NR_openat2 // kernel 5.6 or better 1288#ifdef __NR_openat2 // kernel 5.6 or better
@@ -1140,7 +1290,7 @@ int safe_fd(const char *path, int flags) {
1140 memset(&oh, 0, sizeof(oh)); 1290 memset(&oh, 0, sizeof(oh));
1141 oh.flags = flags; 1291 oh.flags = flags;
1142 oh.resolve = RESOLVE_NO_SYMLINKS; 1292 oh.resolve = RESOLVE_NO_SYMLINKS;
1143 fd = syscall(__NR_openat2, -1, path, &oh, sizeof(struct open_how)); 1293 fd = syscall(__NR_openat2, dirfd, path, &oh, sizeof(struct open_how));
1144 if (fd != -1 || errno != ENOSYS) 1294 if (fd != -1 || errno != ENOSYS)
1145 return fd; 1295 return fd;
1146#endif 1296#endif
@@ -1151,18 +1301,23 @@ int safe_fd(const char *path, int flags) {
1151 if (!dup) 1301 if (!dup)
1152 errExit("strdup"); 1302 errExit("strdup");
1153 char *tok = strtok(dup, "/"); 1303 char *tok = strtok(dup, "/");
1154 if (!tok) { // root directory 1304 if (!tok) { // nothing to do, path is the root directory
1155 free(dup); 1305 free(dup);
1156 return open("/", flags); 1306 return openat(dirfd, path, flags);
1157 } 1307 }
1158 char *last_tok = EMPTY_STRING; 1308 char *last_tok = EMPTY_STRING;
1159 int parentfd = open("/", O_PATH|O_CLOEXEC); 1309
1310 int parentfd;
1311 if (path[0] == '/')
1312 parentfd = open("/", O_PATH|O_CLOEXEC);
1313 else
1314 parentfd = fcntl(dirfd, F_DUPFD_CLOEXEC, 0);
1160 if (parentfd == -1) 1315 if (parentfd == -1)
1161 errExit("open"); 1316 errExit("open/fcntl");
1162 1317
1163 while(1) { 1318 while (1) {
1164 // open path component, assuming it is a directory; this fails with ENOTDIR if it is a symbolic link 1319 // open path component, assuming it is a directory; this fails with ENOTDIR if it is a symbolic link
1165 // if token is a single dot, the previous directory is reopened 1320 // if token is a single dot, the directory referred to by parentfd is reopened
1166 fd = openat(parentfd, tok, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC); 1321 fd = openat(parentfd, tok, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
1167 if (fd == -1) { 1322 if (fd == -1) {
1168 // if the following token is NULL, the current token is the final path component 1323 // if the following token is NULL, the current token is the final path component
@@ -1192,6 +1347,106 @@ int safe_fd(const char *path, int flags) {
1192 return fd; 1347 return fd;
1193} 1348}
1194 1349
1350int remount_by_fd(int dst, unsigned long mountflags) {
1351 char *proc;
1352 if (asprintf(&proc, "/proc/self/fd/%d", dst) < 0)
1353 errExit("asprintf");
1354
1355 int rv = mount(NULL, proc, NULL, mountflags|MS_BIND|MS_REMOUNT, NULL);
1356 if (rv < 0 && arg_debug)
1357 printf("Failed mount: %s\n", strerror(errno));
1358
1359 free(proc);
1360 return rv;
1361}
1362
1363int bind_mount_by_fd(int src, int dst) {
1364 char *proc_src, *proc_dst;
1365 if (asprintf(&proc_src, "/proc/self/fd/%d", src) < 0 ||
1366 asprintf(&proc_dst, "/proc/self/fd/%d", dst) < 0)
1367 errExit("asprintf");
1368
1369 int rv = mount(proc_src, proc_dst, NULL, MS_BIND|MS_REC, NULL);
1370 if (rv < 0 && arg_debug)
1371 printf("Failed mount: %s\n", strerror(errno));
1372
1373 free(proc_src);
1374 free(proc_dst);
1375 return rv;
1376}
1377
1378int bind_mount_fd_to_path(int src, const char *destname) {
1379 char *proc;
1380 if (asprintf(&proc, "/proc/self/fd/%d", src) < 0)
1381 errExit("asprintf");
1382
1383 int rv = mount(proc, destname, NULL, MS_BIND|MS_REC, NULL);
1384 if (rv < 0 && arg_debug)
1385 printf("Failed mount: %s\n", strerror(errno));
1386
1387 free(proc);
1388 return rv;
1389}
1390
1391int bind_mount_path_to_fd(const char *srcname, int dst) {
1392 char *proc;
1393 if (asprintf(&proc, "/proc/self/fd/%d", dst) < 0)
1394 errExit("asprintf");
1395
1396 int rv = mount(srcname, proc, NULL, MS_BIND|MS_REC, NULL);
1397 if (rv < 0 && arg_debug)
1398 printf("Failed mount: %s\n", strerror(errno));
1399
1400 free(proc);
1401 return rv;
1402}
1403
1404void close_all(int *keep_list, size_t sz) {
1405 DIR *dir;
1406 if (!(dir = opendir("/proc/self/fd"))) {
1407 // sleep 2 seconds and try again
1408 sleep(2);
1409 if (!(dir = opendir("/proc/self/fd"))) {
1410 fprintf(stderr, "Error: cannot open /proc/self/fd directory\n");
1411 exit(1);
1412 }
1413 }
1414 struct dirent *entry;
1415 while ((entry = readdir(dir)) != NULL) {
1416 if (strcmp(entry->d_name, ".") == 0 ||
1417 strcmp(entry->d_name, "..") == 0)
1418 continue;
1419
1420 int fd = atoi(entry->d_name);
1421
1422 // don't close standard streams
1423 if (fd == STDIN_FILENO ||
1424 fd == STDOUT_FILENO ||
1425 fd == STDERR_FILENO)
1426 continue;
1427
1428 if (fd == dirfd(dir))
1429 continue; // just postponed
1430
1431 // dont't close file descriptors in keep list
1432 int keep = 0;
1433 if (keep_list) {
1434 size_t i;
1435 for (i = 0; i < sz; i++) {
1436 if (keep_list[i] == fd) {
1437 keep = 1;
1438 break;
1439 }
1440 }
1441 }
1442 if (keep)
1443 continue;
1444
1445 close(fd);
1446 }
1447 closedir(dir);
1448}
1449
1195int has_handler(pid_t pid, int signal) { 1450int has_handler(pid_t pid, int signal) {
1196 if (signal > 0 && signal <= SIGRTMAX) { 1451 if (signal > 0 && signal <= SIGRTMAX) {
1197 char *fname; 1452 char *fname;
@@ -1293,25 +1548,22 @@ pid_t require_pid(const char *name) {
1293// return 1 if there is a link somewhere in path of directory 1548// return 1 if there is a link somewhere in path of directory
1294static int has_link(const char *dir) { 1549static int has_link(const char *dir) {
1295 assert(dir); 1550 assert(dir);
1296 int fd = safe_fd(dir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC); 1551 int fd = safer_openat(-1, dir, O_PATH|O_DIRECTORY|O_NOFOLLOW|O_CLOEXEC);
1297 if (fd == -1) { 1552 if (fd != -1)
1298 if ((errno == ELOOP || errno == ENOTDIR) && is_dir(dir))
1299 return 1;
1300 }
1301 else
1302 close(fd); 1553 close(fd);
1554 else if (errno == ELOOP || (errno == ENOTDIR && is_dir(dir)))
1555 return 1;
1303 return 0; 1556 return 0;
1304} 1557}
1305 1558
1306void check_homedir(void) { 1559void check_homedir(const char *dir) {
1307 assert(cfg.homedir); 1560 assert(dir);
1308 if (cfg.homedir[0] != '/') { 1561 if (dir[0] != '/') {
1309 fprintf(stderr, "Error: invalid user directory \"%s\"\n", cfg.homedir); 1562 fprintf(stderr, "Error: invalid user directory \"%s\"\n", dir);
1310 exit(1); 1563 exit(1);
1311 } 1564 }
1312 // symlinks are rejected in many places 1565 // symlinks are rejected in many places
1313 if (has_link(cfg.homedir)) { 1566 if (has_link(dir))
1314 fprintf(stderr, "No full support for symbolic links in path of user directory.\n" 1567 fmessage("No full support for symbolic links in path of user directory.\n"
1315 "Please provide resolved path in password database (/etc/passwd).\n\n"); 1568 "Please provide resolved path in password database (/etc/passwd).\n\n");
1316 }
1317} 1569}
diff --git a/src/firejail/x11.c b/src/firejail/x11.c
index 1dabf272e..f173b6672 100644
--- a/src/firejail/x11.c
+++ b/src/firejail/x11.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -84,7 +84,7 @@ int x11_display(void) {
84static int x11_abstract_sockets_present(void) { 84static int x11_abstract_sockets_present(void) {
85 85
86 EUID_ROOT(); // grsecurity fix 86 EUID_ROOT(); // grsecurity fix
87 FILE *fp = fopen("/proc/net/unix", "r"); 87 FILE *fp = fopen("/proc/net/unix", "re");
88 if (!fp) 88 if (!fp)
89 errExit("fopen"); 89 errExit("fopen");
90 EUID_USER(); 90 EUID_USER();
@@ -204,7 +204,6 @@ static int random_display_number(void) {
204void x11_start_xvfb(int argc, char **argv) { 204void x11_start_xvfb(int argc, char **argv) {
205 EUID_ASSERT(); 205 EUID_ASSERT();
206 int i; 206 int i;
207 struct stat s;
208 pid_t jail = 0; 207 pid_t jail = 0;
209 pid_t server = 0; 208 pid_t server = 0;
210 209
@@ -348,7 +347,7 @@ void x11_start_xvfb(int argc, char **argv) {
348 // wait for x11 server to start 347 // wait for x11 server to start
349 while (++n < 10) { 348 while (++n < 10) {
350 sleep(1); 349 sleep(1);
351 if (stat(fname, &s) == 0) 350 if (access(fname, F_OK) == 0)
352 break; 351 break;
353 }; 352 };
354 353
@@ -427,7 +426,6 @@ static char *extract_setting(int argc, char **argv, const char *argument) {
427void x11_start_xephyr(int argc, char **argv) { 426void x11_start_xephyr(int argc, char **argv) {
428 EUID_ASSERT(); 427 EUID_ASSERT();
429 int i; 428 int i;
430 struct stat s;
431 pid_t jail = 0; 429 pid_t jail = 0;
432 pid_t server = 0; 430 pid_t server = 0;
433 431
@@ -586,7 +584,7 @@ void x11_start_xephyr(int argc, char **argv) {
586 // wait for x11 server to start 584 // wait for x11 server to start
587 while (++n < 10) { 585 while (++n < 10) {
588 sleep(1); 586 sleep(1);
589 if (stat(fname, &s) == 0) 587 if (access(fname, F_OK) == 0)
590 break; 588 break;
591 }; 589 };
592 590
@@ -701,7 +699,6 @@ static char * get_title_arg_str() {
701static void __attribute__((noreturn)) x11_start_xpra_old(int argc, char **argv, int display, char *display_str) { 699static void __attribute__((noreturn)) x11_start_xpra_old(int argc, char **argv, int display, char *display_str) {
702 EUID_ASSERT(); 700 EUID_ASSERT();
703 int i; 701 int i;
704 struct stat s;
705 pid_t client = 0; 702 pid_t client = 0;
706 pid_t server = 0; 703 pid_t server = 0;
707 704
@@ -818,7 +815,7 @@ static void __attribute__((noreturn)) x11_start_xpra_old(int argc, char **argv,
818 // wait for x11 server to start 815 // wait for x11 server to start
819 while (++n < 10) { 816 while (++n < 10) {
820 sleep(1); 817 sleep(1);
821 if (stat(fname, &s) == 0) 818 if (access(fname, F_OK) == 0)
822 break; 819 break;
823 } 820 }
824 821
@@ -1207,14 +1204,13 @@ void x11_xorg(void) {
1207 fmessage("Generating a new .Xauthority file\n"); 1204 fmessage("Generating a new .Xauthority file\n");
1208 mkdir_attr(RUN_XAUTHORITY_SEC_DIR, 0700, getuid(), getgid()); 1205 mkdir_attr(RUN_XAUTHORITY_SEC_DIR, 0700, getuid(), getgid());
1209 // create new Xauthority file in RUN_XAUTHORITY_SEC_DIR 1206 // create new Xauthority file in RUN_XAUTHORITY_SEC_DIR
1207 EUID_USER();
1210 char tmpfname[] = RUN_XAUTHORITY_SEC_DIR "/.Xauth-XXXXXX"; 1208 char tmpfname[] = RUN_XAUTHORITY_SEC_DIR "/.Xauth-XXXXXX";
1211 int fd = mkstemp(tmpfname); 1209 int fd = mkstemp(tmpfname);
1212 if (fd == -1) { 1210 if (fd == -1) {
1213 fprintf(stderr, "Error: cannot create .Xauthority file\n"); 1211 fprintf(stderr, "Error: cannot create .Xauthority file\n");
1214 exit(1); 1212 exit(1);
1215 } 1213 }
1216 if (fchown(fd, getuid(), getgid()) == -1)
1217 errExit("chown");
1218 close(fd); 1214 close(fd);
1219 1215
1220 // run xauth 1216 // run xauth
@@ -1224,24 +1220,22 @@ void x11_xorg(void) {
1224 else 1220 else
1225 sbox_run(SBOX_USER | SBOX_CAPS_NONE | SBOX_SECCOMP, 7, RUN_XAUTH_FILE, "-f", tmpfname, 1221 sbox_run(SBOX_USER | SBOX_CAPS_NONE | SBOX_SECCOMP, 7, RUN_XAUTH_FILE, "-f", tmpfname,
1226 "generate", display, "MIT-MAGIC-COOKIE-1", "untrusted"); 1222 "generate", display, "MIT-MAGIC-COOKIE-1", "untrusted");
1227 // remove xauth copy
1228 unlink(RUN_XAUTH_FILE);
1229 1223
1230 // ensure there is already a file ~/.Xauthority, so that bind-mount below will work. 1224 // ensure there is already a file ~/.Xauthority, so that bind-mount below will work.
1231 char *dest; 1225 char *dest;
1232 if (asprintf(&dest, "%s/.Xauthority", cfg.homedir) == -1) 1226 if (asprintf(&dest, "%s/.Xauthority", cfg.homedir) == -1)
1233 errExit("asprintf"); 1227 errExit("asprintf");
1234 if (lstat(dest, &s) == -1) { 1228 if (access(dest, F_OK) == -1) {
1235 touch_file_as_user(dest, 0600); 1229 touch_file_as_user(dest, 0600);
1236 if (stat(dest, &s) == -1) { 1230 if (access(dest, F_OK) == -1) {
1237 fprintf(stderr, "Error: cannot create %s\n", dest); 1231 fprintf(stderr, "Error: cannot create %s\n", dest);
1238 exit(1); 1232 exit(1);
1239 } 1233 }
1240 } 1234 }
1241 // get a file descriptor for ~/.Xauthority 1235 // get a file descriptor for ~/.Xauthority
1242 int dst = safe_fd(dest, O_PATH|O_NOFOLLOW|O_CLOEXEC); 1236 int dst = safer_openat(-1, dest, O_PATH|O_NOFOLLOW|O_CLOEXEC);
1243 if (dst == -1) 1237 if (dst == -1)
1244 errExit("safe_fd"); 1238 errExit("safer_openat");
1245 // check if the actual mount destination is a user owned regular file 1239 // check if the actual mount destination is a user owned regular file
1246 if (fstat(dst, &s) == -1) 1240 if (fstat(dst, &s) == -1)
1247 errExit("fstat"); 1241 errExit("fstat");
@@ -1263,9 +1257,9 @@ void x11_xorg(void) {
1263 fs_remount(RUN_XAUTHORITY_SEC_DIR, MOUNT_NOEXEC, 0); 1257 fs_remount(RUN_XAUTHORITY_SEC_DIR, MOUNT_NOEXEC, 0);
1264 1258
1265 // get a file descriptor for the new Xauthority file 1259 // get a file descriptor for the new Xauthority file
1266 int src = safe_fd(tmpfname, O_PATH|O_NOFOLLOW|O_CLOEXEC); 1260 int src = safer_openat(-1, tmpfname, O_PATH|O_NOFOLLOW|O_CLOEXEC);
1267 if (src == -1) 1261 if (src == -1)
1268 errExit("safe_fd"); 1262 errExit("safer_openat");
1269 if (fstat(src, &s) == -1) 1263 if (fstat(src, &s) == -1)
1270 errExit("fstat"); 1264 errExit("fstat");
1271 if (!S_ISREG(s.st_mode)) { 1265 if (!S_ISREG(s.st_mode)) {
@@ -1276,21 +1270,16 @@ void x11_xorg(void) {
1276 // mount via the link in /proc/self/fd 1270 // mount via the link in /proc/self/fd
1277 if (arg_debug) 1271 if (arg_debug)
1278 printf("Mounting %s on %s\n", tmpfname, dest); 1272 printf("Mounting %s on %s\n", tmpfname, dest);
1279 char *proc_src, *proc_dst; 1273 EUID_ROOT();
1280 if (asprintf(&proc_src, "/proc/self/fd/%d", src) == -1) 1274 if (bind_mount_by_fd(src, dst)) {
1281 errExit("asprintf");
1282 if (asprintf(&proc_dst, "/proc/self/fd/%d", dst) == -1)
1283 errExit("asprintf");
1284 if (mount(proc_src, proc_dst, NULL, MS_BIND, NULL) == -1) {
1285 fprintf(stderr, "Error: cannot mount the new .Xauthority file\n"); 1275 fprintf(stderr, "Error: cannot mount the new .Xauthority file\n");
1286 exit(1); 1276 exit(1);
1287 } 1277 }
1278 EUID_USER();
1288 // check /proc/self/mountinfo to confirm the mount is ok 1279 // check /proc/self/mountinfo to confirm the mount is ok
1289 MountData *mptr = get_last_mount(); 1280 MountData *mptr = get_last_mount();
1290 if (strcmp(mptr->dir, dest) != 0 || strcmp(mptr->fstype, "tmpfs") != 0) 1281 if (strcmp(mptr->dir, dest) != 0 || strcmp(mptr->fstype, "tmpfs") != 0)
1291 errLogExit("invalid .Xauthority mount"); 1282 errLogExit("invalid .Xauthority mount");
1292 free(proc_src);
1293 free(proc_dst);
1294 close(src); 1283 close(src);
1295 close(dst); 1284 close(dst);
1296 1285
@@ -1301,8 +1290,11 @@ void x11_xorg(void) {
1301 if (envar) { 1290 if (envar) {
1302 char *rp = realpath(envar, NULL); 1291 char *rp = realpath(envar, NULL);
1303 if (rp) { 1292 if (rp) {
1304 if (strcmp(rp, dest) != 0) 1293 if (strcmp(rp, dest) != 0) {
1294 EUID_ROOT();
1305 disable_file_or_dir(rp); 1295 disable_file_or_dir(rp);
1296 EUID_USER();
1297 }
1306 free(rp); 1298 free(rp);
1307 } 1299 }
1308 } 1300 }
@@ -1311,9 +1303,13 @@ void x11_xorg(void) {
1311 free(dest); 1303 free(dest);
1312 1304
1313 // mask RUN_XAUTHORITY_SEC_DIR 1305 // mask RUN_XAUTHORITY_SEC_DIR
1306 EUID_ROOT();
1314 if (mount("tmpfs", RUN_XAUTHORITY_SEC_DIR, "tmpfs", MS_NOSUID | MS_NODEV | MS_STRICTATIME, "mode=755,gid=0") < 0) 1307 if (mount("tmpfs", RUN_XAUTHORITY_SEC_DIR, "tmpfs", MS_NOSUID | MS_NODEV | MS_STRICTATIME, "mode=755,gid=0") < 0)
1315 errExit("mounting tmpfs"); 1308 errExit("mounting tmpfs");
1316 fs_logger2("tmpfs", RUN_XAUTHORITY_SEC_DIR); 1309 fs_logger2("tmpfs", RUN_XAUTHORITY_SEC_DIR);
1310
1311 // cleanup
1312 unlink(RUN_XAUTH_FILE);
1317#endif 1313#endif
1318} 1314}
1319 1315
@@ -1327,7 +1323,7 @@ void fs_x11(void) {
1327 struct stat s1, s2; 1323 struct stat s1, s2;
1328 if (stat("/tmp", &s1) != 0 || lstat("/tmp/.X11-unix", &s2) != 0) 1324 if (stat("/tmp", &s1) != 0 || lstat("/tmp/.X11-unix", &s2) != 0)
1329 return; 1325 return;
1330 if ((s1.st_mode & S_ISVTX) == 0) { 1326 if ((s1.st_mode & S_ISVTX) != S_ISVTX) {
1331 fwarning("cannot mask X11 sockets: sticky bit not set on /tmp directory\n"); 1327 fwarning("cannot mask X11 sockets: sticky bit not set on /tmp directory\n");
1332 return; 1328 return;
1333 } 1329 }
@@ -1335,68 +1331,46 @@ void fs_x11(void) {
1335 fwarning("cannot mask X11 sockets: /tmp/.X11-unix not owned by root user\n"); 1331 fwarning("cannot mask X11 sockets: /tmp/.X11-unix not owned by root user\n");
1336 return; 1332 return;
1337 } 1333 }
1334
1335 // the mount source is under control of the user, so be careful and
1336 // mount without following symbolic links, using a file descriptor
1338 char *x11file; 1337 char *x11file;
1339 if (asprintf(&x11file, "/tmp/.X11-unix/X%d", display) == -1) 1338 if (asprintf(&x11file, "/tmp/.X11-unix/X%d", display) == -1)
1340 errExit("asprintf"); 1339 errExit("asprintf");
1341 struct stat x11stat; 1340 int src = open(x11file, O_PATH|O_NOFOLLOW|O_CLOEXEC);
1342 if (lstat(x11file, &x11stat) != 0 || !S_ISSOCK(x11stat.st_mode)) { 1341 if (src < 0) {
1342 free(x11file);
1343 return;
1344 }
1345 struct stat s3;
1346 if (fstat(src, &s3) < 0)
1347 errExit("fstat");
1348 if (!S_ISSOCK(s3.st_mode)) {
1349 close(src);
1343 free(x11file); 1350 free(x11file);
1344 return; 1351 return;
1345 } 1352 }
1346 1353
1347 if (arg_debug || arg_debug_whitelists) 1354 if (arg_debug || arg_debug_whitelists)
1348 fprintf(stderr, "Masking all X11 sockets except %s\n", x11file); 1355 fprintf(stderr, "Masking all X11 sockets except %s\n", x11file);
1349
1350 // Move the real /tmp/.X11-unix to a scratch location
1351 // so we can still access x11file after we mount a
1352 // tmpfs over /tmp/.X11-unix.
1353 if (mkdir(RUN_WHITELIST_X11_DIR, 0700) == -1)
1354 errExit("mkdir");
1355 if (mount("/tmp/.X11-unix", RUN_WHITELIST_X11_DIR, 0, MS_BIND|MS_REC, 0) < 0)
1356 errExit("mount bind");
1357
1358 // This directory must be mode 1777 1356 // This directory must be mode 1777
1359 if (mount("tmpfs", "/tmp/.X11-unix", "tmpfs", 1357 if (mount("tmpfs", "/tmp/.X11-unix", "tmpfs",
1360 MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_STRICTATIME, 1358 MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_STRICTATIME,
1361 "mode=1777,uid=0,gid=0") < 0) 1359 "mode=1777,uid=0,gid=0") < 0)
1362 errExit("mounting tmpfs on /tmp/.X11-unix"); 1360 errExit("mounting tmpfs on /tmp/.X11-unix");
1361 selinux_relabel_path("/tmp/.X11-unix", "/tmp/.X11-unix");
1363 fs_logger("tmpfs /tmp/.X11-unix"); 1362 fs_logger("tmpfs /tmp/.X11-unix");
1364 1363
1365 // create an empty root-owned file which will have the desired socket bind-mounted over it 1364 // create an empty root-owned file which will have the desired socket bind-mounted over it
1366 int fd = open(x11file, O_RDONLY|O_CREAT|O_EXCL, S_IRUSR | S_IWUSR); 1365 int dst = open(x11file, O_RDONLY|O_CREAT|O_EXCL|O_CLOEXEC, S_IRUSR | S_IWUSR);
1367 if (fd < 0) 1366 if (dst < 0)
1368 errExit(x11file); 1367 errExit("open");
1369 close(fd);
1370 1368
1371 // the mount source is under control of the user, so be careful and 1369 if (bind_mount_by_fd(src, dst))
1372 // mount without following symbolic links, using a file descriptor
1373 char *wx11file;
1374 if (asprintf(&wx11file, "%s/X%d", RUN_WHITELIST_X11_DIR, display) == -1)
1375 errExit("asprintf");
1376 fd = safe_fd(wx11file, O_PATH|O_NOFOLLOW|O_CLOEXEC);
1377 if (fd == -1)
1378 errExit("opening X11 socket");
1379 // confirm once more we are mounting a socket
1380 if (fstat(fd, &x11stat) == -1)
1381 errExit("fstat");
1382 if (!S_ISSOCK(x11stat.st_mode)) {
1383 errno = ENOTSOCK;
1384 errExit("mounting X11 socket");
1385 }
1386 char *proc;
1387 if (asprintf(&proc, "/proc/self/fd/%d", fd) == -1)
1388 errExit("asprintf");
1389 if (mount(proc, x11file, NULL, MS_BIND|MS_REC, NULL) < 0)
1390 errExit("mount bind"); 1370 errExit("mount bind");
1371 close(src);
1372 close(dst);
1391 fs_logger2("whitelist", x11file); 1373 fs_logger2("whitelist", x11file);
1392 close(fd);
1393 free(proc);
1394
1395 // block access to RUN_WHITELIST_X11_DIR
1396 if (mount(RUN_RO_DIR, RUN_WHITELIST_X11_DIR, 0, MS_BIND, 0) < 0)
1397 errExit("mount");
1398 fs_logger2("blacklist", RUN_WHITELIST_X11_DIR);
1399 free(wx11file);
1400 free(x11file); 1374 free(x11file);
1401#endif 1375#endif
1402} 1376}
diff --git a/src/firemon/apparmor.c b/src/firemon/apparmor.c
index eb810a9e7..7103ab7af 100644
--- a/src/firemon/apparmor.c
+++ b/src/firemon/apparmor.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/firemon/arp.c b/src/firemon/arp.c
index 1a69a67b1..1a01da016 100644
--- a/src/firemon/arp.c
+++ b/src/firemon/arp.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/firemon/caps.c b/src/firemon/caps.c
index c0f305a5d..045cd1968 100644
--- a/src/firemon/caps.c
+++ b/src/firemon/caps.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/firemon/cgroup.c b/src/firemon/cgroup.c
index 97ba591a6..7ef76fa46 100644
--- a/src/firemon/cgroup.c
+++ b/src/firemon/cgroup.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/firemon/cpu.c b/src/firemon/cpu.c
index 91b455941..31e4eb7fd 100644
--- a/src/firemon/cpu.c
+++ b/src/firemon/cpu.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/firemon/firemon.c b/src/firemon/firemon.c
index 37870747d..91406d6a7 100644
--- a/src/firemon/firemon.c
+++ b/src/firemon/firemon.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -52,7 +52,7 @@ static void my_handler(int s){
52 52
53 if (terminal_set) 53 if (terminal_set)
54 tcsetattr(0, TCSANOW, &tlocal); 54 tcsetattr(0, TCSANOW, &tlocal);
55 exit(0); 55 _exit(0);
56} 56}
57 57
58// find the second child process for the specified pid 58// find the second child process for the specified pid
diff --git a/src/firemon/firemon.h b/src/firemon/firemon.h
index 5252ad34f..2fa294e8d 100644
--- a/src/firemon/firemon.h
+++ b/src/firemon/firemon.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/firemon/interface.c b/src/firemon/interface.c
index e04b6f431..f57616ed7 100644
--- a/src/firemon/interface.c
+++ b/src/firemon/interface.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -18,6 +18,7 @@
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include "firemon.h" 20#include "firemon.h"
21#include "../include/gcov_wrapper.h"
21#include <sys/types.h> 22#include <sys/types.h>
22#include <sys/wait.h> 23#include <sys/wait.h>
23#include <netdb.h> 24#include <netdb.h>
@@ -145,9 +146,9 @@ static void print_sandbox(pid_t pid) {
145 if (rv) 146 if (rv)
146 return; 147 return;
147 net_ifprint(); 148 net_ifprint();
148#ifdef HAVE_GCOV 149
149 __gcov_flush(); 150 __gcov_flush();
150#endif 151
151 _exit(0); 152 _exit(0);
152 } 153 }
153 154
diff --git a/src/firemon/list.c b/src/firemon/list.c
index 51099a75c..d066c7a5f 100644
--- a/src/firemon/list.c
+++ b/src/firemon/list.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/firemon/netstats.c b/src/firemon/netstats.c
index 850959eb3..0a1b7e0c4 100644
--- a/src/firemon/netstats.c
+++ b/src/firemon/netstats.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -18,6 +18,7 @@
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include "firemon.h" 20#include "firemon.h"
21#include "../include/gcov_wrapper.h"
21#include <termios.h> 22#include <termios.h>
22#include <sys/ioctl.h> 23#include <sys/ioctl.h>
23#include <sys/types.h> 24#include <sys/types.h>
@@ -242,8 +243,7 @@ void netstats(void) {
242 print_proc(i, itv, col); 243 print_proc(i, itv, col);
243 } 244 }
244 } 245 }
245#ifdef HAVE_GCOV 246
246 __gcov_flush(); 247 __gcov_flush();
247#endif
248 } 248 }
249} 249}
diff --git a/src/firemon/procevent.c b/src/firemon/procevent.c
index 8085d2d29..ccc1ba1c6 100644
--- a/src/firemon/procevent.c
+++ b/src/firemon/procevent.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -18,6 +18,7 @@
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include "firemon.h" 20#include "firemon.h"
21#include "../include/gcov_wrapper.h"
21#include <sys/socket.h> 22#include <sys/socket.h>
22#include <linux/connector.h> 23#include <linux/connector.h>
23#include <linux/netlink.h> 24#include <linux/netlink.h>
@@ -230,9 +231,7 @@ static void __attribute__((noreturn)) procevent_monitor(const int sock, pid_t my
230 tv.tv_usec = 0; 231 tv.tv_usec = 0;
231 232
232 while (1) { 233 while (1) {
233#ifdef HAVE_GCOV
234 __gcov_flush(); 234 __gcov_flush();
235#endif
236 235
237#define BUFFSIZE 4096 236#define BUFFSIZE 4096
238 char __attribute__ ((aligned(NLMSG_ALIGNTO)))buf[BUFFSIZE]; 237 char __attribute__ ((aligned(NLMSG_ALIGNTO)))buf[BUFFSIZE];
diff --git a/src/firemon/route.c b/src/firemon/route.c
index 9cf5054b2..86f4d85ae 100644
--- a/src/firemon/route.c
+++ b/src/firemon/route.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/firemon/seccomp.c b/src/firemon/seccomp.c
index 04111b6c0..ba0017eff 100644
--- a/src/firemon/seccomp.c
+++ b/src/firemon/seccomp.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/firemon/top.c b/src/firemon/top.c
index a25e3c0d8..2bfa63380 100644
--- a/src/firemon/top.c
+++ b/src/firemon/top.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -18,6 +18,7 @@
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include "firemon.h" 20#include "firemon.h"
21#include "../include/gcov_wrapper.h"
21#include <termios.h> 22#include <termios.h>
22#include <sys/ioctl.h> 23#include <sys/ioctl.h>
23#include <sys/types.h> 24#include <sys/types.h>
@@ -326,8 +327,7 @@ void top(void) {
326 } 327 }
327 } 328 }
328 head_print(col, row); 329 head_print(col, row);
329#ifdef HAVE_GCOV 330
330 __gcov_flush(); 331 __gcov_flush();
331#endif
332 } 332 }
333} 333}
diff --git a/src/firemon/tree.c b/src/firemon/tree.c
index 899214b9f..7ad413772 100644
--- a/src/firemon/tree.c
+++ b/src/firemon/tree.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/firemon/usage.c b/src/firemon/usage.c
index baaef3111..c6a664790 100644
--- a/src/firemon/usage.c
+++ b/src/firemon/usage.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -38,12 +38,12 @@ static char *help_str =
38 "\t--name=name - print information only about named sandbox.\n\n" 38 "\t--name=name - print information only about named sandbox.\n\n"
39 "\t--netstats - monitor network statistics for sandboxes creating a new\n" 39 "\t--netstats - monitor network statistics for sandboxes creating a new\n"
40 "\t\tnetwork namespace.\n\n" 40 "\t\tnetwork namespace.\n\n"
41 "\t--nowrap - enable line wrapping in terminals.\n\n"
42 "\t--route - print route table for each sandbox.\n\n" 41 "\t--route - print route table for each sandbox.\n\n"
43 "\t--seccomp - print seccomp configuration for each sandbox.\n\n" 42 "\t--seccomp - print seccomp configuration for each sandbox.\n\n"
44 "\t--tree - print a tree of all sandboxed processes.\n\n" 43 "\t--tree - print a tree of all sandboxed processes.\n\n"
45 "\t--top - monitor the most CPU-intensive sandboxes.\n\n" 44 "\t--top - monitor the most CPU-intensive sandboxes.\n\n"
46 "\t--version - print program version and exit.\n\n" 45 "\t--version - print program version and exit.\n\n"
46 "\t--wrap - enable line wrapping in terminals.\n\n"
47 "\t--x11 - print X11 display number.\n\n" 47 "\t--x11 - print X11 display number.\n\n"
48 48
49 "Without any options, firemon monitors all fork, exec, id change, and exit\n" 49 "Without any options, firemon monitors all fork, exec, id change, and exit\n"
diff --git a/src/firemon/x11.c b/src/firemon/x11.c
index 97e24b2d2..16ee0a2d6 100644
--- a/src/firemon/x11.c
+++ b/src/firemon/x11.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fldd/main.c b/src/fldd/main.c
index 9d91557c1..898e0f36a 100644
--- a/src/fldd/main.c
+++ b/src/fldd/main.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -261,12 +261,21 @@ static void walk_directory(const char *dirname) {
261 261
262 // check directory 262 // check directory
263 // entry->d_type field is supported in glibc since version 2.19 (Feb 2014) 263 // entry->d_type field is supported in glibc since version 2.19 (Feb 2014)
264 // we'll use stat to check for directories 264 // we'll use stat to check for directories using the real path
265 // (sometimes the path is a double symlink to a real file and stat would fail)
266 char *rpath = realpath(path, NULL);
267 if (!rpath) {
268 free(path);
269 continue;
270 }
271 free(path);
272
265 struct stat s; 273 struct stat s;
266 if (stat(path, &s) == -1) 274 if (stat(rpath, &s) == -1)
267 errExit("stat"); 275 errExit("stat");
268 if (S_ISDIR(s.st_mode)) 276 if (S_ISDIR(s.st_mode))
269 walk_directory(path); 277 walk_directory(rpath);
278 free(rpath);
270 } 279 }
271 closedir(dir); 280 closedir(dir);
272 } 281 }
diff --git a/src/fnet/arp.c b/src/fnet/arp.c
index 59798d32d..ed110c271 100644
--- a/src/fnet/arp.c
+++ b/src/fnet/arp.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fnet/fnet.h b/src/fnet/fnet.h
index c0154b53e..41db5aa1b 100644
--- a/src/fnet/fnet.h
+++ b/src/fnet/fnet.h
@@ -1,5 +1,5 @@
1 /* 1 /*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fnet/interface.c b/src/fnet/interface.c
index 91d91360d..072dbf381 100644
--- a/src/fnet/interface.c
+++ b/src/fnet/interface.c
@@ -1,5 +1,5 @@
1 /* 1 /*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fnet/main.c b/src/fnet/main.c
index df8f7226c..d39fcfc84 100644
--- a/src/fnet/main.c
+++ b/src/fnet/main.c
@@ -1,5 +1,5 @@
1 /* 1 /*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fnet/veth.c b/src/fnet/veth.c
index e09b1b1c5..bd6e33583 100644
--- a/src/fnet/veth.c
+++ b/src/fnet/veth.c
@@ -26,7 +26,7 @@
26 * 26 *
27 */ 27 */
28 /* 28 /*
29 * Copyright (C) 2014-2021 Firejail Authors 29 * Copyright (C) 2014-2022 Firejail Authors
30 * 30 *
31 * This file is part of firejail project 31 * This file is part of firejail project
32 * 32 *
diff --git a/src/fnetfilter/main.c b/src/fnetfilter/main.c
index 979f082d0..a89e12933 100644
--- a/src/fnetfilter/main.c
+++ b/src/fnetfilter/main.c
@@ -1,5 +1,5 @@
1 /* 1 /*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -187,10 +187,9 @@ printf("\n");
187 char *command = (argc == 3)? argv[1]: NULL; 187 char *command = (argc == 3)? argv[1]: NULL;
188//printf("command %s\n", command); 188//printf("command %s\n", command);
189//printf("destfile %s\n", destfile); 189//printf("destfile %s\n", destfile);
190
190 // destfile is a real filename 191 // destfile is a real filename
191 int len = strlen(destfile); 192 reject_meta_chars(destfile, 0);
192 if (strcspn(destfile, "\\&!?\"'<>%^(){};,*[]") != (size_t)len)
193 err_exit_cannot_open_file(destfile);
194 193
195 // handle default config (command = NULL, destfile) 194 // handle default config (command = NULL, destfile)
196 if (command == NULL) { 195 if (command == NULL) {
diff --git a/src/fnettrace/Makefile.in b/src/fnettrace/Makefile.in
new file mode 100644
index 000000000..755ddcc3a
--- /dev/null
+++ b/src/fnettrace/Makefile.in
@@ -0,0 +1,17 @@
1.PHONY: all
2all: fnettrace
3
4include ../common.mk
5
6%.o : %.c $(H_FILE_LIST)
7 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@
8
9fnettrace: $(OBJS)
10 $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS)
11
12.PHONY: clean
13clean:; rm -fr *.o fnettrace *.gcov *.gcda *.gcno *.plist
14
15.PHONY: distclean
16distclean: clean
17 rm -fr Makefile
diff --git a/src/fnettrace/fnettrace.h b/src/fnettrace/fnettrace.h
new file mode 100644
index 000000000..b30a9f10d
--- /dev/null
+++ b/src/fnettrace/fnettrace.h
@@ -0,0 +1,73 @@
1/*
2 * Copyright (C) 2014-2022 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20#ifndef FNETTRACE_H
21#define FNETTRACE_H
22
23#include "../include/common.h"
24#include <unistd.h>
25#include <sys/stat.h>
26#include <sys/types.h>
27#include <sys/socket.h>
28#include <netinet/in.h>
29#include <time.h>
30#include <stdarg.h>
31#include <fcntl.h>
32#include <sys/mman.h>
33
34
35//#define DEBUG 1
36
37#define NETLOCK_INTERVAL 60 // seconds
38#define DISPLAY_INTERVAL 2 // seconds
39#define DISPLAY_TTL 4 // display intervals (4 * 2 seconds)
40#define DISPLAY_BW_UNITS 20 // length of the bandwidth bar
41
42
43static inline void ansi_topleft(void) {
44 char str[] = {0x1b, '[', '1', ';', '1', 'H', '\0'};
45 printf("%s", str);
46 fflush(0);
47}
48
49static inline void ansi_clrscr(void) {
50 ansi_topleft();
51 char str[] = {0x1b, '[', '0', 'J', '\0'};
52 printf("%s", str);
53 fflush(0);
54}
55
56static inline uint8_t hash(uint32_t ip) {
57 uint8_t *ptr = (uint8_t *) &ip;
58 // simple byte xor
59 return *ptr ^ *(ptr + 1) ^ *(ptr + 2) ^ *(ptr + 3);
60}
61
62// main.c
63void logprintf(char* fmt, ...);
64
65// hostnames.c
66extern int geoip_calls;
67void load_hostnames(const char *fname);
68char* retrieve_hostname(uint32_t ip);
69
70// tail.c
71void tail(const char *logfile);
72
73#endif \ No newline at end of file
diff --git a/src/fnettrace/hostnames.c b/src/fnettrace/hostnames.c
new file mode 100644
index 000000000..dd92070bf
--- /dev/null
+++ b/src/fnettrace/hostnames.c
@@ -0,0 +1,124 @@
1/*
2 * Copyright (C) 2014-2022 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20#include "fnettrace.h"
21#include "radix.h"
22#define MAXBUF 1024
23
24int geoip_calls = 0;
25static int geoip_not_found = 0;
26static char buf[MAXBUF];
27
28char *retrieve_hostname(uint32_t ip) {
29 if (geoip_not_found)
30 return NULL;
31 geoip_calls++;
32
33 char *rv = NULL;
34 char *cmd;
35 if (asprintf(&cmd, "/usr/bin/geoiplookup %d.%d.%d.%d", PRINT_IP(ip)) == -1)
36 errExit("asprintf");
37
38 FILE *fp = popen(cmd, "r");
39 if (fp) {
40 char *ptr;
41 if (fgets(buf, MAXBUF, fp)) {
42 ptr = strchr(buf, '\n');
43 if (ptr)
44 *ptr = '\0';
45 if (strncmp(buf, "GeoIP Country Edition:", 22) == 0) {
46 ptr = buf + 22;
47 if (*ptr == ' ' && *(ptr + 3) == ',' && *(ptr + 4) == ' ') {
48 rv = ptr + 5;
49 rv = radix_add(ip, 0xffffffff, rv);
50 }
51 }
52 }
53 fclose(fp);
54 return rv;
55 }
56 else
57 geoip_not_found = 1;
58
59 free(cmd);
60
61 return NULL;
62}
63
64void load_hostnames(const char *fname) {
65 assert(fname);
66 FILE *fp = fopen(fname, "r");
67 if (!fp) {
68 fprintf(stderr, "Warning: cannot find %s file\n", fname);
69 return;
70 }
71
72 char buf[MAXBUF];
73 int line = 0;
74 while (fgets(buf, MAXBUF, fp)) {
75 line++;
76
77 // skip empty spaces
78 char *start = buf;
79 while (*start == ' ' || *start == '\t')
80 start++;
81 // comments
82 if (*start == '#')
83 continue;
84 char *end = strchr(start, '#');
85 if (end)
86 *end = '\0';
87
88 // end
89 end = strchr(start, '\n');
90 if (end)
91 *end = '\0';
92 end = start + strlen(start);
93 if (end == start) // empty line
94 continue;
95
96 // line format: 1.2.3.4/32 name_without_empty_spaces
97 // a single empty space between address and name
98 end = strchr(start, ' ');
99 if (!end)
100 goto errexit;
101 *end = '\0';
102 end++;
103 if (*end == '\0')
104 goto errexit;
105
106 uint32_t ip;
107 uint32_t mask;
108 if (atocidr(start, &ip, &mask)) {
109 fprintf(stderr, "Error: invalid CIDR address\n");
110 goto errexit;
111 }
112
113 radix_add(ip, mask, end);
114 }
115
116 fclose(fp);
117 return;
118
119
120errexit:
121 fprintf(stderr, "Error: invalid line %d in file %s\n", line, fname);
122 exit(1);
123}
124
diff --git a/src/fnettrace/main.c b/src/fnettrace/main.c
new file mode 100644
index 000000000..31d49d839
--- /dev/null
+++ b/src/fnettrace/main.c
@@ -0,0 +1,665 @@
1/*
2 * Copyright (C) 2014-2022 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20#include "fnettrace.h"
21#include "radix.h"
22#include <sys/ioctl.h>
23#define MAX_BUF_SIZE (64 * 1024)
24
25static int arg_netfilter = 0;
26static int arg_tail = 0;
27static char *arg_log = NULL;
28
29typedef struct hnode_t {
30 struct hnode_t *hnext; // used for hash table and unused linked list
31 struct hnode_t *dnext; // used to display stremas on the screen
32 uint32_t ip_src;
33 uint32_t bytes; // number of bytes received in the last display interval
34 uint16_t port_src;
35 uint8_t protocol;
36 // the firewall is build based on source address, and in the linked list
37 // we have elements with the same address but different ports
38 uint8_t ip_instance;
39 char *hostname;
40 int ttl;
41} HNode;
42
43// hash table
44#define HMAX 256
45HNode *htable[HMAX] = {NULL};
46// display linked list
47HNode *dlist = NULL;
48
49
50// speed up malloc/free
51#define HNODE_MAX_MALLOC 16
52static HNode *hnode_unused = NULL;
53HNode *hmalloc(void) {
54 if (hnode_unused == NULL) {
55 hnode_unused = malloc(sizeof(HNode) * HNODE_MAX_MALLOC);
56 if (!hnode_unused)
57 errExit("malloc");
58 memset(hnode_unused, 0, sizeof(HNode) * HNODE_MAX_MALLOC);
59 HNode *ptr = hnode_unused;
60 int i;
61 for ( i = 1; i < HNODE_MAX_MALLOC; i++, ptr++)
62 ptr->hnext = hnode_unused + i;
63 }
64
65 HNode *rv = hnode_unused;
66 hnode_unused = hnode_unused->hnext;
67 return rv;
68}
69
70void hfree(HNode *ptr) {
71 assert(ptr);
72 memset(ptr, 0, sizeof(HNode));
73 ptr->hnext = hnode_unused;
74 hnode_unused = ptr;
75}
76
77
78static void hnode_add(uint32_t ip_src, uint8_t protocol, uint16_t port_src, uint32_t bytes) {
79 uint8_t h = hash(ip_src);
80
81 // find
82 int ip_instance = 0;
83 HNode *ptr = htable[h];
84 while (ptr) {
85 if (ptr->ip_src == ip_src) {
86 ip_instance++;
87 if (ptr->port_src == port_src && ptr->protocol == protocol) {
88 ptr->bytes += bytes;
89 return;
90 }
91 }
92 ptr = ptr->hnext;
93 }
94
95#ifdef DEBUG
96 printf("malloc %d.%d.%d.%d\n", PRINT_IP(ip_src));
97#endif
98 HNode *hnew = hmalloc();
99 assert(hnew);
100 hnew->hostname = NULL;
101 hnew->ip_src = ip_src;
102 hnew->port_src = port_src;
103 hnew->protocol = protocol;
104 hnew->hnext = NULL;
105 hnew->bytes = bytes;
106 hnew->ip_instance = ip_instance + 1;
107 hnew->ttl = DISPLAY_TTL;
108 if (htable[h] == NULL)
109 htable[h] = hnew;
110 else {
111 hnew->hnext = htable[h];
112 htable[h] = hnew;
113 }
114
115 // add to the end of list
116 hnew->dnext = NULL;
117 if (dlist == NULL)
118 dlist = hnew;
119 else {
120 ptr = dlist;
121 while (ptr->dnext != NULL)
122 ptr = ptr->dnext;
123 ptr->dnext = hnew;
124 }
125
126 if (arg_netfilter)
127 logprintf(" %d.%d.%d.%d ", PRINT_IP(hnew->ip_src));
128}
129
130static void hnode_free(HNode *elem) {
131 assert(elem);
132#ifdef DEBUG
133 printf("free %d.%d.%d.%d\n", PRINT_IP(elem->ip_src));
134#endif
135
136 uint8_t h = hash(elem->ip_src);
137 HNode *ptr = htable[h];
138 assert(ptr);
139
140 HNode *prev = NULL;
141 while (ptr != elem) {
142 prev = ptr;
143 ptr = ptr->hnext;
144 }
145 if (prev == NULL)
146 htable[h] = elem->hnext;
147 else
148 prev->hnext = elem->hnext;
149 hfree(elem);
150}
151
152#ifdef DEBUG
153static void debug_dlist(void) {
154 HNode *ptr = dlist;
155 while (ptr) {
156 printf("dlist %d.%d.%d.%d:%d\n", PRINT_IP(ptr->ip_src), ptr->port_src);
157 ptr = ptr->dnext;
158 }
159}
160static void debug_hnode(void) {
161 int i;
162 for (i = 0; i < HMAX; i++) {
163 HNode *ptr = htable[i];
164 while (ptr) {
165 printf("hnode (%d) %d.%d.%d.%d:%d\n", i, PRINT_IP(ptr->ip_src), ptr->port_src);
166 ptr = ptr->hnext;
167 }
168 }
169}
170#endif
171
172static char *bw_line[DISPLAY_BW_UNITS + 1] = { NULL };
173
174static char *print_bw(unsigned units) {
175 if (units > DISPLAY_BW_UNITS)
176 units = DISPLAY_BW_UNITS ;
177
178 if (bw_line[units] == NULL) {
179 char *ptr = malloc(DISPLAY_BW_UNITS + 2);
180 if (!ptr)
181 errExit("malloc");
182 bw_line[units] = ptr;
183
184 unsigned i;
185 for (i = 0; i < DISPLAY_BW_UNITS; i++, ptr++)
186 sprintf(ptr, "%s", (i < units)? "*": " ");
187 sprintf(ptr, "%s", " ");
188 }
189
190 return bw_line[units];
191}
192
193#define LINE_MAX 200
194static inline void adjust_line(char *str, int len, int cols) {
195 if (len > LINE_MAX) // functions such as snprintf truncate the string, and return the length of the untruncated string
196 len = LINE_MAX;
197 if (cols > 4 && len > cols) {
198 str[cols] = '\0';
199 str[cols- 1] = '\n';
200 }
201}
202
203#define BWMAX_CNT 8
204static unsigned adjust_bandwidth(unsigned bw) {
205 static unsigned array[BWMAX_CNT] = {0};
206 static int instance = 0;
207
208 array[instance] = bw;
209 int i;
210 unsigned sum = 0;
211 unsigned max = 0;
212 for ( i = 0; i < BWMAX_CNT; i++) {
213 sum += array[i];
214 max = (max > array[i])? max: array[i];
215 }
216 sum /= BWMAX_CNT;
217
218 if (++instance >= BWMAX_CNT)
219 instance = 0;
220
221 return (max < (sum / 2))? sum: max;
222}
223
224static void hnode_print(unsigned bw) {
225 assert(!arg_netfilter);
226 bw = (bw < 1024 * DISPLAY_INTERVAL)? 1024 * DISPLAY_INTERVAL: bw;
227#ifdef DEBUG
228 printf("*********************\n");
229 debug_dlist();
230 printf("-----------------------------\n");
231 debug_hnode();
232 printf("*********************\n");
233#else
234 ansi_clrscr();
235#endif
236
237 // get terminal size
238 struct winsize sz;
239 int cols = 80;
240 if (isatty(STDIN_FILENO)) {
241 if (!ioctl(0, TIOCGWINSZ, &sz))
242 cols = sz.ws_col;
243 }
244 if (cols > LINE_MAX)
245 cols = LINE_MAX;
246 char line[LINE_MAX + 1];
247
248 // print stats line
249 bw = adjust_bandwidth(bw);
250 char stats[31];
251 if (bw > (1024 * 1024 * DISPLAY_INTERVAL))
252 sprintf(stats, "%u MB/s ", bw / (1024 * 1024 * DISPLAY_INTERVAL));
253 else
254 sprintf(stats, "%u KB/s ", bw / (1024 * DISPLAY_INTERVAL));
255 int len = snprintf(line, LINE_MAX, "%32s geoip %d, IP database %d\n", stats, geoip_calls, radix_nodes);
256 adjust_line(line, len, cols);
257 printf("%s", line);
258
259 HNode *ptr = dlist;
260 HNode *prev = NULL;
261 while (ptr) {
262 HNode *next = ptr->dnext;
263 if (--ptr->ttl > 0) {
264 char bytes[11];
265 if (ptr->bytes > (DISPLAY_INTERVAL * 1024 * 1024 * 2)) // > 2 MB/second
266 snprintf(bytes, 11, "%u MB/s",
267 (unsigned) (ptr->bytes / (DISPLAY_INTERVAL * 1024* 1024)));
268 else if (ptr->bytes > (DISPLAY_INTERVAL * 1024 * 2)) // > 2 KB/second
269 snprintf(bytes, 11, "%u KB/s",
270 (unsigned) (ptr->bytes / (DISPLAY_INTERVAL * 1024)));
271 else
272 snprintf(bytes, 11, "%u B/s ", (unsigned) (ptr->bytes / DISPLAY_INTERVAL));
273
274 if (!ptr->hostname)
275 ptr->hostname = radix_longest_prefix_match(ptr->ip_src);
276 if (!ptr->hostname)
277 ptr->hostname = retrieve_hostname(ptr->ip_src);
278 if (!ptr->hostname)
279 ptr->hostname = " ";
280
281 unsigned bwunit = bw / DISPLAY_BW_UNITS;
282 char *bwline;
283 if (bwunit == 0)
284 bwline = print_bw(0);
285 else
286 bwline = print_bw(ptr->bytes / bwunit);
287
288 char *protocol = "";
289 if (ptr->port_src == 80)
290 protocol = "(HTTP)";
291 else if (ptr->port_src == 853)
292 protocol = "(DoT)";
293 else if (ptr->protocol == 0x11)
294 protocol = "(UDP)";
295/*
296 else (ptr->port_src == 443)
297 protocol = "TLS";
298 else if (ptr->port_src == 53)
299 protocol = "DNS";
300*/
301
302 len = snprintf(line, LINE_MAX, "%10s %s %d.%d.%d.%d:%u%s %s\n",
303 bytes, bwline, PRINT_IP(ptr->ip_src), ptr->port_src, protocol, ptr->hostname);
304 adjust_line(line, len, cols);
305 printf("%s", line);
306
307 if (ptr->bytes)
308 ptr->ttl = DISPLAY_TTL;
309 ptr->bytes = 0;
310 prev = ptr;
311 }
312 else {
313 // free the element
314 if (prev == NULL)
315 dlist = next;
316 else
317 prev->dnext = next;
318 hnode_free(ptr);
319 }
320
321 ptr = next;
322 }
323
324#ifdef DEBUG
325 {
326 int cnt = 0;
327 HNode *ptr = hnode_unused;
328 while (ptr) {
329 cnt++;
330 ptr = ptr->hnext;
331 }
332 printf("hnode unused %d\n", cnt);
333 }
334#endif
335}
336
337static void run_trace(void) {
338 if (arg_netfilter)
339 logprintf("accumulating traffic for %d seconds\n", NETLOCK_INTERVAL);
340
341 // trace only rx ipv4 tcp and upd
342 int s1 = socket(AF_INET, SOCK_RAW, IPPROTO_TCP);
343 int s2 = socket(AF_INET, SOCK_RAW, IPPROTO_UDP);
344 if (s1 < 0 || s2 < 0)
345 errExit("socket");
346
347 unsigned start = time(NULL);
348 unsigned last_print_traces = 0;
349 unsigned last_print_remaining = 0;
350 unsigned char buf[MAX_BUF_SIZE];
351 unsigned bw = 0; // bandwidth calculations
352 while (1) {
353 unsigned end = time(NULL);
354 if (arg_netfilter && end - start >= NETLOCK_INTERVAL)
355 break;
356 if (end % DISPLAY_INTERVAL == 1 && last_print_traces != end) { // first print after 1 second
357 if (!arg_netfilter)
358 hnode_print(bw);
359 last_print_traces = end;
360 bw = 0;
361 }
362 if (arg_netfilter && last_print_remaining != end) {
363 logprintf(".");
364 fflush(0);
365 last_print_remaining = end;
366 }
367
368 fd_set rfds;
369 FD_ZERO(&rfds);
370 FD_SET(s1, &rfds);
371 FD_SET(s2, &rfds);
372 int maxfd = (s1 > s2) ? s1 : s2;
373 maxfd++;
374 struct timeval tv;
375 tv.tv_sec = 1;
376 tv.tv_usec = 0;
377 int rv = select(maxfd, &rfds, NULL, NULL, &tv);
378 if (rv < 0)
379 errExit("select");
380 else if (rv == 0)
381 continue;
382
383 int sock = (FD_ISSET(s1, &rfds)) ? s1 : s2;
384
385 unsigned bytes = recvfrom(sock, buf, MAX_BUF_SIZE, 0, NULL, NULL);
386 if (bytes >= 20) { // size of IP header
387#ifdef DEBUG
388 {
389 uint32_t ip_src;
390 memcpy(&ip_src, buf + 12, 4);
391 ip_src = ntohl(ip_src);
392
393 uint32_t ip_dst;
394 memcpy(&ip_dst, buf + 16, 4);
395 ip_dst = ntohl(ip_dst);
396 printf("%d.%d.%d.%d -> %d.%d.%d.%d, %u bytes\n", PRINT_IP(ip_src), PRINT_IP(ip_dst), bytes);
397 }
398#endif
399 // filter out loopback traffic
400 if (buf[12] != 127 && buf[16] != 127) {
401 bw += bytes + 14; // assume a 14 byte Ethernet layer
402
403 uint32_t ip_src;
404 memcpy(&ip_src, buf + 12, 4);
405 ip_src = ntohl(ip_src);
406
407 uint8_t hlen = (buf[0] & 0x0f) * 4;
408 uint16_t port_src;
409 memcpy(&port_src, buf + hlen, 2);
410 port_src = ntohs(port_src);
411
412 hnode_add(ip_src, buf[9], port_src, bytes + 14);
413 }
414 }
415 }
416
417 close(s1);
418 close(s2);
419}
420
421static char *filter_start =
422 "*filter\n"
423 ":INPUT DROP [0:0]\n"
424 ":FORWARD DROP [0:0]\n"
425 ":OUTPUT DROP [0:0]\n";
426
427// return 1 if error
428static int print_filter(FILE *fp) {
429 if (dlist == NULL)
430 return 1;
431 fprintf(fp, "%s\n", filter_start);
432 fprintf(fp, "-A INPUT -s 127.0.0.0/8 -j ACCEPT\n");
433 fprintf(fp, "-A OUTPUT -d 127.0.0.0/8 -j ACCEPT\n");
434 fprintf(fp, "\n");
435
436 int i;
437 for (i = 0; i < HMAX; i++) {
438 HNode *ptr = htable[i];
439 while (ptr) {
440 // filter rules are targeting ip address, the port number is disregarded,
441 // so we look only at the first instance of an address
442 if (ptr->ip_instance == 1) {
443 char *protocol = (ptr->protocol == 6)? "tcp": "udp";
444 fprintf(fp, "-A INPUT -s %d.%d.%d.%d -p %s -j ACCEPT\n",
445 PRINT_IP(ptr->ip_src),
446 protocol);
447 fprintf(fp, "-A OUTPUT -d %d.%d.%d.%d -p %s -j ACCEPT\n",
448 PRINT_IP(ptr->ip_src),
449 protocol);
450 fprintf(fp, "\n");
451 }
452 ptr = ptr->hnext;
453 }
454 }
455 fprintf(fp, "COMMIT\n");
456
457 return 0;
458}
459
460static char *flush_rules[] = {
461 "-P INPUT ACCEPT",
462// "-P FORWARD DENY",
463 "-P OUTPUT ACCEPT",
464 "-F",
465 "-X",
466// "-t nat -F",
467// "-t nat -X",
468// "-t mangle -F",
469// "-t mangle -X",
470// "iptables -t raw -F",
471// "-t raw -X",
472 NULL
473};
474
475static void deploy_netfilter(void) {
476 int rv;
477 char *cmd;
478 int i;
479
480 if (dlist == NULL) {
481 logprintf("Sorry, no network traffic was detected. The firewall was not configured.\n");
482 return;
483 }
484 // find iptables command
485 char *iptables = NULL;
486 char *iptables_restore = NULL;
487 if (access("/sbin/iptables", X_OK) == 0) {
488 iptables = "/sbin/iptables";
489 iptables_restore = "/sbin/iptables-restore";
490 }
491 else if (access("/usr/sbin/iptables", X_OK) == 0) {
492 iptables = "/usr/sbin/iptables";
493 iptables_restore = "/usr/sbin/iptables-restore";
494 }
495 if (iptables == NULL || iptables_restore == NULL) {
496 fprintf(stderr, "Error: iptables command not found, netfilter not configured\n");
497 exit(1);
498 }
499
500 // flush all netfilter rules
501 i = 0;
502 while (flush_rules[i]) {
503 char *cmd;
504 if (asprintf(&cmd, "%s %s", iptables, flush_rules[i]) == -1)
505 errExit("asprintf");
506 int rv = system(cmd);
507 (void) rv;
508 free(cmd);
509 i++;
510 }
511
512 // create temporary file
513 char fname[] = "/tmp/firejail-XXXXXX";
514 int fd = mkstemp(fname);
515 if (fd == -1) {
516 fprintf(stderr, "Error: cannot create temporary configuration file\n");
517 exit(1);
518 }
519
520 FILE* fp = fdopen(fd, "w");
521 if (!fp) {
522 rv = unlink(fname);
523 (void) rv;
524 fprintf(stderr, "Error: cannot create temporary configuration file\n");
525 exit(1);
526 }
527 print_filter(fp);
528 fclose(fp);
529
530 logprintf("\n\n");
531 logprintf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n");
532 if (asprintf(&cmd, "cat %s >> %s", fname, arg_log) == -1)
533 errExit("asprintf");
534 rv = system(cmd);
535 (void) rv;
536 free(cmd);
537
538 if (asprintf(&cmd, "cat %s", fname) == -1)
539 errExit("asprintf");
540 rv = system(cmd);
541 (void) rv;
542 free(cmd);
543 logprintf("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n");
544
545 // configuring
546 if (asprintf(&cmd, "%s %s", iptables_restore, fname) == -1)
547 errExit("asprintf");
548 rv = system(cmd);
549 if (rv)
550 fprintf(stdout, "Warning: possible netfilter problem!");
551 free(cmd);
552
553 rv = unlink(fname);
554 (void) rv;
555 logprintf("\nfirewall deployed\n");
556}
557
558void logprintf(char* fmt, ...) {
559 if (!arg_log)
560 return;
561
562 FILE *fp = fopen(arg_log, "a");
563 if (fp) { // disregard if error
564 va_list args;
565 va_start(args,fmt);
566 vfprintf(fp, fmt, args);
567 va_end(args);
568 fclose(fp);
569 }
570
571 va_list args;
572 va_start(args,fmt);
573 vfprintf(stdout, fmt, args);
574 va_end(args);
575}
576
577static void usage(void) {
578 printf("Usage: fnettrace [OPTIONS]\n");
579 printf("Options:\n");
580 printf(" --help, -? - this help screen\n");
581 printf(" --log=filename - netlocker logfile\n");
582 printf(" --netfilter - build the firewall rules and commit them.\n");
583 printf(" --tail - \"tail -f\" functionality\n");
584 printf("Examples:\n");
585 printf(" # fnettrace - traffic trace\n");
586 printf(" # fnettrace --netfilter --log=logfile - netlocker, dump output in logfile\n");
587 printf(" # fnettrace --tail --log=logifile - similar to \"tail -f logfile\"\n");
588 printf("\n");
589}
590
591int main(int argc, char **argv) {
592 int i;
593
594#ifdef DEBUG
595 // radix test
596 radix_add(0x09000000, 0xff000000, "IBM");
597 radix_add(0x09090909, 0xffffffff, "Quad9 DNS");
598 radix_add(0x09000000, 0xff000000, "IBM");
599 printf("This test should print \"IBM, Quad9 DNS, IBM\"\n");
600 char *name = radix_longest_prefix_match(0x09040404);
601 printf("%s, ", name);
602 name = radix_longest_prefix_match(0x09090909);
603 printf("%s, ", name);
604 name = radix_longest_prefix_match(0x09322209);
605 printf("%s\n", name);
606#endif
607
608 for (i = 1; i < argc; i++) {
609 if (strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "-?") == 0) {
610 usage();
611 return 0;
612 }
613 else if (strcmp(argv[i], "--netfilter") == 0)
614 arg_netfilter = 1;
615 else if (strcmp(argv[i], "--tail") == 0)
616 arg_tail = 1;
617 else if (strncmp(argv[i], "--log=", 6) == 0)
618 arg_log = argv[i] + 6;
619 else {
620 fprintf(stderr, "Error: invalid argument\n");
621 return 1;
622 }
623 }
624
625 // tail
626 if (arg_tail) {
627 if (!arg_log) {
628 fprintf(stderr, "Error: no log file\n");
629 usage();
630 exit(1);
631 }
632
633 tail(arg_log);
634 sleep(5);
635 exit(0);
636 }
637
638 if (getuid() != 0) {
639 fprintf(stderr, "Error: you need to be root to run this program\n");
640 return 1;
641 }
642
643 ansi_clrscr();
644 if (arg_netfilter)
645 logprintf("starting network lockdown\n");
646 else {
647 char *fname = LIBDIR "/firejail/static-ip-map";
648 load_hostnames(fname);
649 }
650
651 run_trace();
652 if (arg_netfilter) {
653 // TCP path MTU discovery will not work properly since the firewall drops all ICMP packets
654 // Instead, we use iPacketization Layer PMTUD (RFC 4821) support in Linux kernel
655 int rv = system("echo 1 > /proc/sys/net/ipv4/tcp_mtu_probing");
656 (void) rv;
657
658 deploy_netfilter();
659 sleep(3);
660 if (arg_log)
661 unlink(arg_log);
662 }
663
664 return 0;
665}
diff --git a/src/fnettrace/radix.c b/src/fnettrace/radix.c
new file mode 100644
index 000000000..c9493717d
--- /dev/null
+++ b/src/fnettrace/radix.c
@@ -0,0 +1,155 @@
1/*
2 * Copyright (C) 2014-2022 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20#include <stdio.h>
21#include <stdlib.h>
22#include <string.h>
23#include <stdint.h>
24#include <assert.h>
25#include "radix.h"
26#include "fnettrace.h"
27
28typedef struct rnode_t {
29 struct rnode_t *zero;
30 struct rnode_t *one;
31 char *name;
32} RNode;
33
34RNode *head = 0;
35int radix_nodes = 0;
36
37// get rid of the malloc overhead
38#define RNODE_MAX_MALLOC 128
39static RNode *rnode_unused = NULL;
40static int rnode_malloc_cnt = 0;
41static RNode *rmalloc(void) {
42 if (rnode_unused == NULL || rnode_malloc_cnt >= RNODE_MAX_MALLOC) {
43 rnode_unused = malloc(sizeof(RNode) * RNODE_MAX_MALLOC);
44 if (!rnode_unused)
45 errExit("malloc");
46 memset(rnode_unused, 0, sizeof(RNode) * RNODE_MAX_MALLOC);
47 rnode_malloc_cnt = 0;
48 }
49
50 rnode_malloc_cnt++;
51 return rnode_unused + rnode_malloc_cnt - 1;
52}
53
54
55static inline char *duplicate_name(const char *name) {
56 assert(name);
57
58 if (strcmp(name, "United States") == 0)
59 return "United States";
60 else if (strcmp(name, "Amazon") == 0)
61 return "Amazon";
62 return strdup(name);
63}
64
65static inline RNode *addOne(RNode *ptr, char *name) {
66 assert(ptr);
67 if (ptr->one)
68 return ptr->one;
69 RNode *node = rmalloc();
70 assert(node);
71 if (name) {
72 node->name = duplicate_name(name);
73 if (!node->name)
74 errExit("duplicate name");
75 }
76
77 ptr->one = node;
78 return node;
79}
80
81static inline RNode *addZero(RNode *ptr, char *name) {
82 assert(ptr);
83 if (ptr->zero)
84 return ptr->zero;
85 RNode *node = rmalloc();
86 assert(node);
87 if (name) {
88 node->name = duplicate_name(name);
89 if (!node->name)
90 errExit("duplicate name");
91 }
92
93 ptr->zero = node;
94 return node;
95}
96
97
98// add to radix tree
99char *radix_add(uint32_t ip, uint32_t mask, char *name) {
100 assert(name);
101 uint32_t m = 0x80000000;
102 uint32_t lastm = 0;
103 if (head == 0) {
104 head = malloc(sizeof(RNode));
105 memset(head, 0, sizeof(RNode));
106 }
107 RNode *ptr = head;
108 radix_nodes++;
109
110 int i;
111 for (i = 0; i < 32; i++, m >>= 1) {
112 if (!(m & mask))
113 break;
114
115 lastm |= m;
116 int valid = (lastm == mask)? 1: 0;
117 if (m & ip)
118 ptr = addOne(ptr, (valid)? name: NULL);
119 else
120 ptr = addZero(ptr, (valid)? name: NULL);
121 }
122 assert(ptr);
123 if (!ptr->name) {
124 ptr->name = duplicate_name(name);
125 if (!ptr->name)
126 errExit("duplicate_name");
127 }
128
129 return ptr->name;
130}
131
132// find last match
133char *radix_longest_prefix_match(uint32_t ip) {
134 if (!head)
135 return NULL;
136
137 uint32_t m = 0x80000000;
138 RNode *ptr = head;
139 RNode *rv = NULL;
140
141 int i;
142 for (i = 0; i < 32; i++, m >>= 1) {
143 if (m & ip)
144 ptr = ptr->one;
145 else
146 ptr = ptr->zero;
147 if (!ptr)
148 break;
149 if (ptr->name)
150 rv = ptr;
151 }
152
153 return (rv)? rv->name: NULL;
154}
155
diff --git a/src/fnettrace/radix.h b/src/fnettrace/radix.h
new file mode 100644
index 000000000..c22c5c547
--- /dev/null
+++ b/src/fnettrace/radix.h
@@ -0,0 +1,27 @@
1/*
2 * Copyright (C) 2014-2022 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20#ifndef RADIX_H
21#define RADIX_H
22
23extern int radix_nodes;
24char *radix_longest_prefix_match(uint32_t ip);
25char *radix_add(uint32_t ip, uint32_t mask, char *name);
26
27#endif \ No newline at end of file
diff --git a/src/fnettrace/static-ip-map b/src/fnettrace/static-ip-map
new file mode 100644
index 000000000..e24ecf218
--- /dev/null
+++ b/src/fnettrace/static-ip-map
@@ -0,0 +1,4044 @@
1#
2# Copyright (C) 2014-2022 Firejail Authors
3#
4# This file is part of firejail project
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program; if not, write to the Free Software Foundation, Inc.,
18# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19#
20#
21# Static Internet Map
22#
23# Unfortunately we cannot do a hostname lookup. This will leak a lot of
24# information about what network resources we access.
25# A static map, helped out by geoip package available on all Linux distros,
26# will have to do it for now!
27#
28# Format:
29# CIDR-IPv4-address-range hostname
30# a single space between address and hostname
31# use '#' for comments
32# example: 9.9.9.0/24 Quad9 DNS
33#
34#
35
36# local network addresses
37192.168.0.0/16 local network
3810.0.0.0/8 local network
39172.16.0.0/16 local network
40
41# huge address ranges
426.0.0.0/8 US Army
437.0.0.0/8 US Army
449.0.0.0/8 IBM
4511.0.0.0/8 US Army
4617.0.0.0/8 Apple
4719.0.0.0/8 Ford
4821.0.0.0/8 US Army
4922.0.0.0/8 US Army
5026.0.0.0/8 US Army
5128.0.0.0/8 US Army
5229.0.0.0/8 US Army
5330.0.0.0/8 US Army
5433.0.0.0/8 US Army
5548.0.0.0/8 Prudential US
5655.0.0.0/8 US Army
5756.0.0.0/8 US Postal Service
58214.0.0.0/8 US Army
59215.0.0.0/8 US Army
60
61# whois/DNS
621.1.1.0/24 Cloudflare DNS
631.0.0.0/24 Cloudflare DNS
648.8.4.0/24 Google DNS
658.8.8.0/24 Google DNS
669.9.9.0/24 Quad9 DNS
6745.90.28.0/22 NextDNS
68149.112.112.0/24 Quad9 DNS
69149.112.120.0/21 CIRA DNS Canada
70176.103.128.0/19 Adguard DNS
71185.228.168.0/24 Cleanbrowsing DNS
72193.0.0.0/21 whois.ripe.net Netherlands
73199.5.26.0/24 whois.arin.net US
74199.15.80.0/21 whois.publicinterestregistry.net Canada
75199.15.88.0/24 whois.publicinterestregistry.net Canada
76199.71.0.0/24 whois.arin.net US
77199.212.0.0/24 whois.arin.net US
78200.3.12.0/22 whois.lacnic.net Uruguay
79201.159.220.0/22 whois.lacnic.net Ecuador
80
81# some popular websites
8231.13.24.0/21 Facebook
8331.13.64.0/18 Facebook
8464.63.0.0/18 Twitter
8569.171.224.0/19 Facebook
86104.244.40.0/21 Twitter
87129.134.0.0/16 Facebook
88140.82.112.0/20 GitHub
89157.240.0.0/16 Facebook
90185.199.108.0/22 GitHub
91188.64.224.0/21 Twitter
92192.0.64.0/18 Wordpress
93199.16.156.0/22 Twitter
94199.59.148.0/22 Twitter
95208.80.152.0/22 Wikipedia
96
97# Akamai
9823.0.0.0/12 Akamai
9923.32.0.0/11 Akamai
10023.64.0.0/14 Akamai
10123.72.0.0/13 Akamai
10223.192.0.0/11 Akamai
10372.246.0.0/15 Akamai
10496.6.0.0/15 Akamai
10596.16.0.0/15 Akamai
106104.64.0.0/10 Akamai
107184.24.0.0/13 Akamai
108184.50.0.0/15 Akamai
109184.84.0.0/14 Akamai
110
111# Fastly
11223.235.32.0/20 Fastly
11343.249.72.0/22 Fastly
114103.244.50.0/24 Fastly
115103.245.222.0/23 Fastly
116103.245.224.0/24 Fastly
117104.156.80.0/20 Fastly
118146.75.0.0/16 Fastly
119151.101.0.0/16 Fastly
120157.52.64.0/18 Fastly
121167.82.0.0/17 Fastly
122167.82.128.0/20 Fastly
123167.82.160.0/20 Fastly
124167.82.224.0/20 Fastly
125172.111.64.0/18 Fastly
126185.31.16.0/22 Fastly
127199.27.72.0/21 Fastly
128199.232.0.0/16 Fastly
129
130# MCI/Verizon
13172.21.80.0/20 MCI
132108.29.0.0/16 MCI
133108.30.0.0/16 MCI
134108.31.0.0/16 MCI
135108.3.128.0/17 MCI
136108.32.0.0/17 MCI
137108.32.128.0/17 MCI
138108.33.254.0/24 MCI
139108.33.255.0/24 MCI
140108.34.128.0/17 MCI
141108.34.16.0/20 MCI
142108.34.32.0/19 MCI
143108.34.64.0/18 MCI
144108.35.0.0/16 MCI
145108.36.0.0/16 MCI
146108.3.64.0/18 MCI
147108.37.0.0/16 MCI
148108.39.0.0/17 MCI
149108.39.128.0/17 MCI
150108.40.0.0/17 MCI
151108.4.0.0/17 MCI
152108.41.0.0/16 MCI
153108.4.128.0/19 MCI
154108.4.160.0/19 MCI
155108.4.192.0/18 MCI
156108.44.0.0/18 MCI
157108.44.128.0/17 MCI
158108.44.64.0/18 MCI
159108.45.0.0/16 MCI
160108.46.0.0/16 MCI
161192.229.128.0/17 MCI
162
163# Microsoft
16440.76.0.0/14 Microsoft
16540.96.0.0/12 Microsoft
16640.112.0.0/13 Microsoft
16740.124.0.0/16 Microsoft
16840.74.0.0/15 Microsoft
16940.80.0.0/12 Microsoft
17040.120.0.0/14 Microsoft
17140.125.0.0/17 Microsoft
17252.145.0.0/16 Microsoft
17352.148.0.0/14 Microsoft
17452.152.0.0/13 Microsoft
17552.146.0.0/15 Microsoft
17652.160.0.0/11 Microsoft
177
178# Yahoo
17963.250.192.0/19 Yahoo
18066.196.64.0/18 Yahoo
18167.195.0.0/16 Yahoo
18269.147.64.0/18 Yahoo
18376.13.0.0/16 Yahoo
18498.136.0.0/14 Yahoo
185206.190.32.0/19 Yahoo
186209.73.160.0/19 Yahoo
187209.191.64.0/18 Yahoo
188216.115.96.0/20 Yahoo
189
190# Google
191# from https://support.google.com/a/answer/10026322?hl=en
192# last update January 5, 2022
1938.34.208.0/20 Google
1948.35.192.0/20 Google
19523.236.48.0/20 Google
19623.251.128.0/19 Google
19734.64.0.0/10 Google
19834.128.0.0/10 Google
19935.184.0.0/13 Google
20035.192.0.0/14 Google
20135.196.0.0/15 Google
20235.198.0.0/16 Google
20335.199.0.0/17 Google
20435.199.128.0/18 Google
20535.200.0.0/13 Google
20635.208.0.0/12 Google
20735.224.0.0/12 Google
20835.240.0.0/13 Google
20964.15.112.0/20 Google
21064.233.160.0/19 Google
21166.102.0.0/20 Google
21266.249.64.0/19 Google
21370.32.128.0/19 Google
21472.14.192.0/18 Google
21574.114.24.0/21 Google
21674.125.0.0/16 Google
217104.154.0.0/15 Google
218104.196.0.0/14 Google
219104.237.160.0/19 Google
220107.167.160.0/19 Google
221107.178.192.0/18 Google
222108.59.80.0/20 Google
223108.170.192.0/18 Google
224108.177.0.0/17 Google
225130.211.0.0/16 Google
226136.112.0.0/12 Google
227142.250.0.0/15 Google
228146.148.0.0/17 Google
229162.216.148.0/22 Google
230162.222.176.0/21 Google
231172.110.32.0/21 Google
232172.217.0.0/16 Google
233172.253.0.0/16 Google
234173.194.0.0/16 Google
235173.255.112.0/20 Google
236192.158.28.0/22 Google
237192.178.0.0/15 Google
238193.186.4.0/24 Google
239199.36.154.0/23 Google
240199.36.156.0/24 Google
241199.192.112.0/22 Google
242199.223.232.0/21 Google
243207.223.160.0/20 Google
244208.65.152.0/22 Google
245208.68.108.0/22 Google
246208.81.188.0/22 Google
247208.117.224.0/19 Google
248209.85.128.0/17 Google
249216.58.192.0/19 Google
250216.73.80.0/20 Google
251216.239.32.0/19 Google
252
253
254#Cloudflare
255# from https://www.cloudflare.com/ips/
256# update April 8, 2021
257103.21.244.0/22 Cloudflare
258103.22.200.0/22 Cloudflare
259103.31.4.0/22 Cloudflare
260104.16.0.0/13 Cloudflare
261104.24.0.0/14 Cloudflare
262108.162.192.0/18 Cloudflare
263131.0.72.0/22 Cloudflare
264141.101.64.0/18 Cloudflare
265162.158.0.0/15 Cloudflare
266172.64.0.0/13 Cloudflare
267173.245.48.0/20 Cloudflare
268188.114.96.0/20 Cloudflare
269190.93.240.0/20 Cloudflare
270197.234.240.0/22 Cloudflare
271198.41.128.0/17 Cloudflare
272
273# Amazon
274# from https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html
275# update January 6, 2022
2763.0.0.0/15 Amazon
2773.2.0.0/24 Amazon
2783.2.2.0/24 Amazon
2793.2.3.0/24 Amazon
2803.2.8.0/21 Amazon
2813.3.0.0/23 Amazon
2823.3.5.0/24 Amazon
2833.3.6.0/23 Amazon
2843.3.8.0/21 Amazon
2853.3.16.0/21 Amazon
2863.3.24.0/22 Amazon
2873.3.28.0/22 Amazon
2883.4.0.0/24 Amazon
2893.4.1.0/24 Amazon
2903.4.2.0/24 Amazon
2913.4.3.0/24 Amazon
2923.4.4.0/24 Amazon
2933.4.6.0/24 Amazon
2943.4.7.0/24 Amazon
2953.4.16.0/21 Amazon
2963.4.24.0/21 Amazon
2973.5.0.0/19 Amazon
2983.5.32.0/22 Amazon
2993.5.36.0/22 Amazon
3003.5.40.0/22 Amazon
3013.5.44.0/22 Amazon
3023.5.48.0/22 Amazon
3033.5.52.0/22 Amazon
3043.5.64.0/21 Amazon
3053.5.72.0/23 Amazon
3063.5.76.0/22 Amazon
3073.5.80.0/21 Amazon
3083.5.128.0/22 Amazon
3093.5.132.0/23 Amazon
3103.5.134.0/23 Amazon
3113.5.136.0/22 Amazon
3123.5.140.0/22 Amazon
3133.5.144.0/23 Amazon
3143.5.146.0/23 Amazon
3153.5.148.0/22 Amazon
3163.5.152.0/21 Amazon
3173.5.160.0/22 Amazon
3183.5.164.0/22 Amazon
3193.5.168.0/23 Amazon
3203.5.208.0/22 Amazon
3213.5.212.0/23 Amazon
3223.5.216.0/22 Amazon
3233.5.220.0/22 Amazon
3243.5.224.0/22 Amazon
3253.5.228.0/22 Amazon
3263.5.232.0/22 Amazon
3273.5.236.0/22 Amazon
3283.5.240.0/22 Amazon
3293.5.244.0/22 Amazon
3303.5.248.0/22 Amazon
3313.5.252.0/22 Amazon
3323.6.0.0/15 Amazon
3333.8.0.0/14 Amazon
3343.12.0.0/16 Amazon
3353.13.0.0/16 Amazon
3363.14.0.0/15 Amazon
3373.16.0.0/14 Amazon
3383.20.0.0/14 Amazon
3393.24.0.0/14 Amazon
3403.28.0.0/15 Amazon
3413.30.0.0/15 Amazon
3423.32.0.0/16 Amazon
3433.33.34.0/24 Amazon
3443.33.35.0/24 Amazon
3453.33.128.0/17 Amazon
3463.34.0.0/15 Amazon
3473.36.0.0/14 Amazon
3483.48.0.0/12 Amazon
3493.64.0.0/12 Amazon
3503.80.0.0/12 Amazon
3513.96.0.0/15 Amazon
3523.98.0.0/15 Amazon
3533.100.0.0/16 Amazon
3543.101.0.0/16 Amazon
3553.104.0.0/14 Amazon
3563.108.0.0/14 Amazon
3573.112.0.0/14 Amazon
3583.116.0.0/14 Amazon
3593.120.0.0/14 Amazon
3603.124.0.0/14 Amazon
3613.128.0.0/15 Amazon
3623.130.0.0/16 Amazon
3633.131.0.0/16 Amazon
3643.132.0.0/14 Amazon
3653.136.0.0/13 Amazon
3663.144.0.0/13 Amazon
3673.152.0.0/13 Amazon
3683.208.0.0/12 Amazon
3693.224.0.0/12 Amazon
3703.240.0.0/13 Amazon
3713.248.0.0/13 Amazon
37213.32.0.0/15 Amazon
37313.34.0.128/27 Amazon
37413.34.0.160/27 Amazon
37513.34.1.0/27 Amazon
37613.34.1.32/27 Amazon
37713.34.3.128/27 Amazon
37813.34.3.160/27 Amazon
37913.34.3.192/27 Amazon
38013.34.3.224/27 Amazon
38113.34.4.64/27 Amazon
38213.34.4.96/27 Amazon
38313.34.5.12/32 Amazon
38413.34.5.13/32 Amazon
38513.34.5.14/32 Amazon
38613.34.5.15/32 Amazon
38713.34.5.16/32 Amazon
38813.34.5.17/32 Amazon
38913.34.5.44/32 Amazon
39013.34.5.45/32 Amazon
39113.34.5.46/32 Amazon
39213.34.5.47/32 Amazon
39313.34.5.48/32 Amazon
39413.34.5.49/32 Amazon
39513.34.5.78/32 Amazon
39613.34.5.79/32 Amazon
39713.34.5.80/32 Amazon
39813.34.5.81/32 Amazon
39913.34.5.110/32 Amazon
40013.34.5.111/32 Amazon
40113.34.5.112/32 Amazon
40213.34.5.113/32 Amazon
40313.34.5.128/27 Amazon
40413.34.5.160/27 Amazon
40513.34.5.192/27 Amazon
40613.34.5.224/27 Amazon
40713.34.6.192/27 Amazon
40813.34.6.224/27 Amazon
40913.34.7.64/27 Amazon
41013.34.7.96/27 Amazon
41113.34.8.64/27 Amazon
41213.34.8.96/27 Amazon
41313.34.9.0/27 Amazon
41413.34.9.32/27 Amazon
41513.34.10.128/27 Amazon
41613.34.10.160/27 Amazon
41713.34.11.0/27 Amazon
41813.34.11.32/27 Amazon
41913.34.11.128/27 Amazon
42013.34.11.160/27 Amazon
42113.34.12.64/27 Amazon
42213.34.12.96/27 Amazon
42313.34.12.192/27 Amazon
42413.34.12.242/32 Amazon
42513.34.12.243/32 Amazon
42613.34.12.244/32 Amazon
42713.34.12.245/32 Amazon
42813.34.13.18/32 Amazon
42913.34.13.19/32 Amazon
43013.34.13.20/32 Amazon
43113.34.13.21/32 Amazon
43213.34.13.50/32 Amazon
43313.34.13.51/32 Amazon
43413.34.13.52/32 Amazon
43513.34.13.53/32 Amazon
43613.34.14.128/27 Amazon
43713.34.14.160/27 Amazon
43813.34.14.192/27 Amazon
43913.34.14.224/27 Amazon
44013.34.15.0/27 Amazon
44113.34.15.32/27 Amazon
44213.34.16.64/27 Amazon
44313.34.16.96/27 Amazon
44413.34.16.192/27 Amazon
44513.34.17.24/29 Amazon
44613.34.17.64/27 Amazon
44713.34.17.96/27 Amazon
44813.34.18.192/27 Amazon
44913.34.18.224/27 Amazon
45013.34.19.192/27 Amazon
45113.34.19.224/27 Amazon
45213.34.20.0/27 Amazon
45313.34.20.32/27 Amazon
45413.34.20.64/27 Amazon
45513.34.20.96/27 Amazon
45613.34.21.64/27 Amazon
45713.34.21.96/27 Amazon
45813.34.22.88/29 Amazon
45913.34.22.160/27 Amazon
46013.34.22.192/27 Amazon
46113.34.22.224/27 Amazon
46213.34.23.0/27 Amazon
46313.34.23.32/27 Amazon
46413.34.23.64/27 Amazon
46513.34.23.96/27 Amazon
46613.34.23.128/27 Amazon
46713.34.23.160/27 Amazon
46813.34.23.192/27 Amazon
46913.34.23.224/27 Amazon
47013.34.24.64/27 Amazon
47113.34.24.96/27 Amazon
47213.34.24.128/27 Amazon
47313.34.24.160/27 Amazon
47413.34.24.192/27 Amazon
47513.34.25.64/27 Amazon
47613.34.25.96/27 Amazon
47713.34.25.128/27 Amazon
47813.34.25.160/27 Amazon
47913.34.25.192/27 Amazon
48013.34.25.248/29 Amazon
48113.34.26.0/27 Amazon
48213.34.26.32/27 Amazon
48313.34.26.64/27 Amazon
48413.34.26.96/27 Amazon
48513.34.26.128/27 Amazon
48613.34.26.160/27 Amazon
48713.34.26.192/27 Amazon
48813.34.26.224/27 Amazon
48913.34.27.16/32 Amazon
49013.34.27.17/32 Amazon
49113.34.27.32/27 Amazon
49213.34.27.64/27 Amazon
49313.34.27.96/27 Amazon
49413.34.27.128/27 Amazon
49513.34.28.0/27 Amazon
49613.34.28.32/27 Amazon
49713.34.28.64/27 Amazon
49813.34.28.96/27 Amazon
49913.34.28.128/27 Amazon
50013.34.28.160/27 Amazon
50113.34.28.192/27 Amazon
50213.34.28.224/27 Amazon
50313.34.29.0/27 Amazon
50413.34.29.32/27 Amazon
50513.34.29.64/27 Amazon
50613.34.29.96/27 Amazon
50713.34.29.128/27 Amazon
50813.34.29.160/27 Amazon
50913.34.29.192/27 Amazon
51013.34.29.224/27 Amazon
51113.34.30.0/27 Amazon
51213.34.30.32/27 Amazon
51313.34.30.64/27 Amazon
51413.34.30.96/27 Amazon
51513.34.30.128/27 Amazon
51613.34.30.160/27 Amazon
51713.34.30.192/27 Amazon
51813.34.30.224/27 Amazon
51913.34.31.0/27 Amazon
52013.34.31.32/27 Amazon
52113.34.31.64/27 Amazon
52213.34.31.96/27 Amazon
52313.34.31.128/27 Amazon
52413.34.31.160/27 Amazon
52513.34.31.192/27 Amazon
52613.34.31.224/27 Amazon
52713.34.32.0/27 Amazon
52813.34.32.32/27 Amazon
52913.34.32.64/27 Amazon
53013.34.32.96/27 Amazon
53113.34.32.128/27 Amazon
53213.34.32.160/27 Amazon
53313.34.33.0/27 Amazon
53413.34.33.32/27 Amazon
53513.34.33.64/27 Amazon
53613.34.33.96/27 Amazon
53713.34.33.128/27 Amazon
53813.34.33.160/27 Amazon
53913.34.33.192/27 Amazon
54013.34.33.224/27 Amazon
54113.34.34.0/27 Amazon
54213.34.34.32/27 Amazon
54313.34.34.64/27 Amazon
54413.34.34.96/27 Amazon
54513.34.34.128/27 Amazon
54613.34.34.160/27 Amazon
54713.34.34.192/27 Amazon
54813.34.34.224/27 Amazon
54913.34.35.0/27 Amazon
55013.34.35.32/27 Amazon
55113.34.35.64/27 Amazon
55213.34.35.96/27 Amazon
55313.34.35.128/27 Amazon
55413.34.35.160/27 Amazon
55513.34.35.192/27 Amazon
55613.34.35.224/27 Amazon
55713.34.36.0/27 Amazon
55813.34.36.32/27 Amazon
55913.34.36.64/27 Amazon
56013.34.36.96/27 Amazon
56113.34.36.128/27 Amazon
56213.34.36.160/27 Amazon
56313.34.36.192/27 Amazon
56413.34.36.224/27 Amazon
56513.34.37.0/27 Amazon
56613.34.37.32/27 Amazon
56713.34.37.64/27 Amazon
56813.34.37.96/27 Amazon
56913.34.37.128/27 Amazon
57013.34.37.160/27 Amazon
57113.34.37.192/27 Amazon
57213.34.37.224/27 Amazon
57313.34.38.0/27 Amazon
57413.34.38.32/27 Amazon
57513.34.38.64/27 Amazon
57613.34.38.96/27 Amazon
57713.34.38.128/27 Amazon
57813.34.38.160/27 Amazon
57913.34.39.0/27 Amazon
58013.34.39.32/27 Amazon
58113.34.39.64/27 Amazon
58213.34.39.96/27 Amazon
58313.34.39.128/27 Amazon
58413.34.39.160/27 Amazon
58513.34.39.192/27 Amazon
58613.34.39.224/27 Amazon
58713.34.40.0/27 Amazon
58813.34.40.32/27 Amazon
58913.34.40.64/27 Amazon
59013.34.40.96/27 Amazon
59113.34.40.128/27 Amazon
59213.34.40.160/27 Amazon
59313.34.40.192/27 Amazon
59413.34.40.224/27 Amazon
59513.34.41.0/27 Amazon
59613.34.41.32/27 Amazon
59713.34.41.64/27 Amazon
59813.34.41.96/27 Amazon
59913.34.41.128/27 Amazon
60013.34.41.160/27 Amazon
60113.34.41.192/27 Amazon
60213.34.41.224/27 Amazon
60313.34.42.0/27 Amazon
60413.34.42.32/27 Amazon
60513.34.42.64/27 Amazon
60613.34.42.96/27 Amazon
60713.34.42.128/27 Amazon
60813.34.42.160/27 Amazon
60913.34.42.192/27 Amazon
61013.34.42.224/27 Amazon
61113.34.43.0/27 Amazon
61213.34.43.32/27 Amazon
61313.34.43.64/27 Amazon
61413.34.43.96/27 Amazon
61513.34.43.128/27 Amazon
61613.34.43.160/27 Amazon
61713.34.43.192/27 Amazon
61813.34.43.224/27 Amazon
61913.34.44.0/27 Amazon
62013.34.44.32/27 Amazon
62113.34.44.64/27 Amazon
62213.34.44.96/27 Amazon
62313.34.44.128/27 Amazon
62413.34.44.160/27 Amazon
62513.34.44.192/27 Amazon
62613.34.44.224/27 Amazon
62713.34.45.0/27 Amazon
62813.34.45.32/27 Amazon
62913.34.45.64/27 Amazon
63013.34.45.96/27 Amazon
63113.34.45.128/27 Amazon
63213.34.45.160/27 Amazon
63313.34.45.192/27 Amazon
63413.34.45.224/27 Amazon
63513.34.46.0/27 Amazon
63613.34.46.32/27 Amazon
63713.34.46.64/27 Amazon
63813.34.46.96/27 Amazon
63913.34.46.128/27 Amazon
64013.34.46.160/27 Amazon
64113.34.46.192/27 Amazon
64213.34.46.224/27 Amazon
64313.34.47.0/27 Amazon
64413.34.47.32/27 Amazon
64513.34.47.64/27 Amazon
64613.34.47.96/27 Amazon
64713.34.47.128/27 Amazon
64813.34.47.160/27 Amazon
64913.34.47.192/27 Amazon
65013.34.47.224/27 Amazon
65113.34.48.0/27 Amazon
65213.34.48.32/27 Amazon
65313.34.48.64/27 Amazon
65413.34.48.96/27 Amazon
65513.34.48.128/27 Amazon
65613.34.48.160/27 Amazon
65713.34.48.192/27 Amazon
65813.34.48.224/27 Amazon
65913.34.49.0/27 Amazon
66013.34.49.32/27 Amazon
66113.34.49.64/27 Amazon
66213.34.49.96/27 Amazon
66313.34.49.128/27 Amazon
66413.34.49.160/27 Amazon
66513.34.49.192/27 Amazon
66613.34.49.224/27 Amazon
66713.34.50.0/27 Amazon
66813.34.50.32/27 Amazon
66913.34.50.64/27 Amazon
67013.34.50.96/27 Amazon
67113.34.50.128/27 Amazon
67213.34.50.160/27 Amazon
67313.34.50.192/27 Amazon
67413.34.50.224/27 Amazon
67513.34.51.0/27 Amazon
67613.34.51.32/27 Amazon
67713.34.51.64/27 Amazon
67813.34.51.96/27 Amazon
67913.34.51.128/27 Amazon
68013.34.51.160/27 Amazon
68113.34.51.192/27 Amazon
68213.34.51.224/27 Amazon
68313.34.52.0/27 Amazon
68413.34.52.32/27 Amazon
68513.34.52.64/27 Amazon
68613.34.52.96/27 Amazon
68713.34.52.128/27 Amazon
68813.34.52.160/27 Amazon
68913.34.52.192/27 Amazon
69013.34.52.224/27 Amazon
69113.34.53.0/27 Amazon
69213.34.53.32/27 Amazon
69313.34.53.64/27 Amazon
69413.34.53.96/27 Amazon
69513.34.53.128/27 Amazon
69613.34.53.160/27 Amazon
69713.34.53.192/27 Amazon
69813.34.53.224/27 Amazon
69913.34.54.0/27 Amazon
70013.34.54.32/27 Amazon
70113.34.54.64/27 Amazon
70213.34.54.96/27 Amazon
70313.34.54.128/27 Amazon
70413.34.54.160/27 Amazon
70513.34.54.192/27 Amazon
70613.34.54.224/27 Amazon
70713.34.55.0/27 Amazon
70813.34.55.32/27 Amazon
70913.34.55.64/27 Amazon
71013.34.55.96/27 Amazon
71113.34.55.128/27 Amazon
71213.34.55.160/27 Amazon
71313.34.55.192/27 Amazon
71413.34.55.224/27 Amazon
71513.34.56.0/27 Amazon
71613.34.56.32/27 Amazon
71713.34.56.64/27 Amazon
71813.34.56.96/27 Amazon
71913.34.56.128/27 Amazon
72013.34.56.160/27 Amazon
72113.34.56.192/27 Amazon
72213.34.56.224/27 Amazon
72313.34.57.0/27 Amazon
72413.34.57.32/27 Amazon
72513.34.57.64/27 Amazon
72613.34.57.96/27 Amazon
72713.34.57.128/27 Amazon
72813.34.57.160/27 Amazon
72913.34.57.192/27 Amazon
73013.34.57.224/27 Amazon
73113.34.58.0/27 Amazon
73213.34.58.32/27 Amazon
73313.34.58.64/27 Amazon
73413.34.58.96/27 Amazon
73513.34.58.128/27 Amazon
73613.34.58.160/27 Amazon
73713.34.58.192/27 Amazon
73813.34.58.224/27 Amazon
73913.34.59.0/27 Amazon
74013.34.59.32/27 Amazon
74113.34.59.64/27 Amazon
74213.34.59.96/27 Amazon
74313.34.59.128/27 Amazon
74413.34.59.160/27 Amazon
74513.34.59.192/27 Amazon
74613.34.59.224/27 Amazon
74713.34.60.0/27 Amazon
74813.34.60.32/27 Amazon
74913.34.60.64/27 Amazon
75013.34.60.96/27 Amazon
75113.34.60.128/27 Amazon
75213.34.60.160/27 Amazon
75313.34.60.192/27 Amazon
75413.34.60.224/27 Amazon
75513.34.61.0/27 Amazon
75613.34.61.32/27 Amazon
75713.34.61.64/27 Amazon
75813.34.61.96/27 Amazon
75913.34.61.128/27 Amazon
76013.34.61.160/27 Amazon
76113.34.61.192/27 Amazon
76213.34.61.224/27 Amazon
76313.34.62.0/27 Amazon
76413.34.62.32/27 Amazon
76513.34.62.128/27 Amazon
76613.34.62.160/27 Amazon
76713.34.62.192/27 Amazon
76813.34.62.224/27 Amazon
76913.34.63.0/27 Amazon
77013.34.63.32/27 Amazon
77113.34.63.64/27 Amazon
77213.34.63.96/27 Amazon
77313.34.63.128/27 Amazon
77413.34.63.160/27 Amazon
77513.35.0.0/16 Amazon
77613.36.0.0/14 Amazon
77713.40.0.0/14 Amazon
77813.44.0.0/14 Amazon
77913.48.0.0/15 Amazon
78013.50.0.0/16 Amazon
78113.51.0.0/16 Amazon
78213.52.0.0/16 Amazon
78313.53.0.0/16 Amazon
78413.54.0.0/15 Amazon
78513.56.0.0/16 Amazon
78613.57.0.0/16 Amazon
78713.58.0.0/15 Amazon
78813.112.0.0/14 Amazon
78913.124.0.0/16 Amazon
79013.125.0.0/16 Amazon
79113.126.0.0/15 Amazon
79213.200.0.0/13 Amazon
79313.208.0.0/16 Amazon
79413.209.0.0/16 Amazon
79513.210.0.0/15 Amazon
79613.212.0.0/15 Amazon
79713.214.0.0/15 Amazon
79813.224.0.0/14 Amazon
79913.228.0.0/15 Amazon
80013.230.0.0/15 Amazon
80113.232.0.0/14 Amazon
80213.236.0.0/14 Amazon
80313.244.0.0/15 Amazon
80413.246.0.0/16 Amazon
80513.247.0.0/16 Amazon
80613.248.0.0/20 Amazon
80713.248.16.0/21 Amazon
80813.248.24.0/22 Amazon
80913.248.28.0/22 Amazon
81013.248.32.0/20 Amazon
81113.248.48.0/21 Amazon
81213.248.56.0/22 Amazon
81313.248.60.0/22 Amazon
81413.248.64.0/24 Amazon
81513.248.65.0/24 Amazon
81613.248.66.0/24 Amazon
81713.248.67.0/24 Amazon
81813.248.68.0/24 Amazon
81913.248.69.0/24 Amazon
82013.248.70.0/24 Amazon
82113.248.71.0/24 Amazon
82213.248.96.0/24 Amazon
82313.248.97.0/24 Amazon
82413.248.98.0/24 Amazon
82513.248.99.0/24 Amazon
82613.248.100.0/24 Amazon
82713.248.101.0/24 Amazon
82813.248.102.0/24 Amazon
82913.248.103.0/24 Amazon
83013.248.104.0/24 Amazon
83113.248.105.0/24 Amazon
83213.248.106.0/24 Amazon
83313.248.107.0/24 Amazon
83413.248.108.0/24 Amazon
83513.248.109.0/24 Amazon
83613.248.111.0/24 Amazon
83713.248.112.0/24 Amazon
83813.248.113.0/24 Amazon
83913.248.114.0/24 Amazon
84013.248.115.0/24 Amazon
84113.248.116.0/24 Amazon
84213.248.117.0/24 Amazon
84313.248.118.0/24 Amazon
84413.248.119.0/24 Amazon
84513.248.120.0/24 Amazon
84613.248.121.0/24 Amazon
84713.248.122.0/24 Amazon
84813.248.123.0/24 Amazon
84913.248.124.0/24 Amazon
85013.248.125.0/24 Amazon
85113.248.126.0/24 Amazon
85213.248.127.0/24 Amazon
85313.248.128.0/17 Amazon
85413.249.0.0/16 Amazon
85513.250.0.0/15 Amazon
85615.152.0.0/16 Amazon
85715.156.0.0/15 Amazon
85815.158.0.0/16 Amazon
85915.160.0.0/16 Amazon
86015.161.0.0/16 Amazon
86115.164.0.0/15 Amazon
86215.168.0.0/16 Amazon
86315.177.0.0/18 Amazon
86415.177.64.0/23 Amazon
86515.177.66.0/23 Amazon
86615.177.68.0/23 Amazon
86715.177.70.0/23 Amazon
86815.177.72.0/24 Amazon
86915.177.73.0/24 Amazon
87015.177.74.0/24 Amazon
87115.177.75.0/24 Amazon
87215.177.76.0/24 Amazon
87315.177.77.0/24 Amazon
87415.177.78.0/24 Amazon
87515.177.79.0/24 Amazon
87615.177.80.0/24 Amazon
87715.177.81.0/24 Amazon
87815.177.82.0/24 Amazon
87915.177.83.0/24 Amazon
88015.177.84.0/24 Amazon
88115.177.85.0/24 Amazon
88215.177.86.0/24 Amazon
88315.177.87.0/24 Amazon
88415.177.88.0/24 Amazon
88515.177.89.0/24 Amazon
88615.177.90.0/24 Amazon
88715.177.91.0/24 Amazon
88815.177.92.0/24 Amazon
88915.181.0.0/20 Amazon
89015.181.16.0/20 Amazon
89115.181.32.0/21 Amazon
89215.181.40.0/21 Amazon
89315.181.48.0/20 Amazon
89415.181.64.0/20 Amazon
89515.181.80.0/20 Amazon
89615.181.96.0/20 Amazon
89715.181.112.0/22 Amazon
89815.181.116.0/22 Amazon
89915.181.120.0/21 Amazon
90015.181.128.0/20 Amazon
90115.181.144.0/20 Amazon
90215.181.160.0/20 Amazon
90315.181.176.0/20 Amazon
90415.181.192.0/19 Amazon
90515.181.224.0/21 Amazon
90615.181.232.0/21 Amazon
90715.181.240.0/24 Amazon
90815.181.241.0/24 Amazon
90915.181.242.0/24 Amazon
91015.181.243.0/24 Amazon
91115.181.244.0/24 Amazon
91215.181.245.0/24 Amazon
91315.181.246.0/24 Amazon
91415.181.247.0/24 Amazon
91515.181.248.0/24 Amazon
91615.181.249.0/24 Amazon
91715.181.250.0/24 Amazon
91815.181.251.0/24 Amazon
91915.181.252.0/24 Amazon
92015.181.253.0/24 Amazon
92115.181.254.0/24 Amazon
92215.184.0.0/16 Amazon
92315.185.0.0/16 Amazon
92415.188.0.0/16 Amazon
92515.191.0.0/16 Amazon
92615.193.0.0/19 Amazon
92715.197.0.0/23 Amazon
92815.197.2.0/24 Amazon
92915.197.3.0/24 Amazon
93015.197.4.0/22 Amazon
93115.197.8.0/22 Amazon
93215.197.12.0/22 Amazon
93315.197.16.0/23 Amazon
93415.197.18.0/23 Amazon
93515.197.20.0/22 Amazon
93615.197.24.0/22 Amazon
93715.197.28.0/23 Amazon
93815.197.30.0/23 Amazon
93915.197.32.0/23 Amazon
94015.197.128.0/17 Amazon
94115.200.0.0/16 Amazon
94215.205.0.0/16 Amazon
94315.206.0.0/15 Amazon
94415.220.0.0/20 Amazon
94515.220.16.0/20 Amazon
94615.220.220.0/23 Amazon
94715.220.222.0/23 Amazon
94815.220.224.0/23 Amazon
94915.220.226.0/24 Amazon
95015.220.250.0/23 Amazon
95115.220.252.0/22 Amazon
95215.221.0.0/24 Amazon
95315.221.1.0/24 Amazon
95415.221.2.0/24 Amazon
95515.221.3.0/24 Amazon
95615.221.4.0/23 Amazon
95715.221.6.0/24 Amazon
95815.221.7.0/24 Amazon
95915.221.8.0/21 Amazon
96015.221.16.0/22 Amazon
96115.221.20.0/22 Amazon
96215.221.24.0/21 Amazon
96315.221.33.0/24 Amazon
96415.221.34.0/24 Amazon
96515.221.35.0/24 Amazon
96615.221.36.0/22 Amazon
96715.221.40.0/21 Amazon
96815.221.48.0/24 Amazon
96915.221.49.0/24 Amazon
97015.221.50.0/24 Amazon
97115.221.51.0/24 Amazon
97215.221.52.0/24 Amazon
97315.221.53.0/24 Amazon
97415.222.0.0/15 Amazon
97515.228.0.0/15 Amazon
97615.230.0.4/32 Amazon
97715.230.0.5/32 Amazon
97815.230.0.6/31 Amazon
97915.230.0.12/31 Amazon
98015.230.0.14/32 Amazon
98115.230.4.19/32 Amazon
98215.230.4.152/31 Amazon
98315.230.4.154/31 Amazon
98415.230.4.156/31 Amazon
98515.230.4.158/31 Amazon
98615.230.4.160/31 Amazon
98715.230.4.162/31 Amazon
98815.230.4.176/28 Amazon
98915.230.5.0/24 Amazon
99015.230.6.0/24 Amazon
99115.230.14.12/32 Amazon
99215.230.14.18/31 Amazon
99315.230.14.20/31 Amazon
99415.230.14.252/31 Amazon
99515.230.16.0/32 Amazon
99615.230.16.12/32 Amazon
99715.230.16.17/32 Amazon
99815.230.16.18/31 Amazon
99915.230.16.20/31 Amazon
100015.230.16.252/31 Amazon
100115.230.18.0/24 Amazon
100215.230.21.0/24 Amazon
100315.230.22.0/24 Amazon
100415.230.23.0/24 Amazon
100515.230.24.0/22 Amazon
100615.230.28.0/24 Amazon
100715.230.29.0/24 Amazon
100815.230.30.0/24 Amazon
100915.230.31.0/24 Amazon
101015.230.32.0/24 Amazon
101115.230.35.0/24 Amazon
101215.230.36.0/23 Amazon
101315.230.38.0/24 Amazon
101415.230.39.0/31 Amazon
101515.230.39.2/31 Amazon
101615.230.39.4/31 Amazon
101715.230.39.6/31 Amazon
101815.230.39.8/31 Amazon
101915.230.39.10/31 Amazon
102015.230.39.12/31 Amazon
102115.230.39.14/31 Amazon
102215.230.39.16/31 Amazon
102315.230.39.18/31 Amazon
102415.230.39.20/31 Amazon
102515.230.39.22/31 Amazon
102615.230.39.24/31 Amazon
102715.230.39.26/31 Amazon
102815.230.39.28/31 Amazon
102915.230.39.30/31 Amazon
103015.230.39.32/31 Amazon
103115.230.39.34/31 Amazon
103215.230.39.36/31 Amazon
103315.230.39.38/31 Amazon
103415.230.39.40/31 Amazon
103515.230.39.42/31 Amazon
103615.230.39.44/31 Amazon
103715.230.39.46/31 Amazon
103815.230.39.48/31 Amazon
103915.230.39.50/31 Amazon
104015.230.39.52/31 Amazon
104115.230.39.54/31 Amazon
104215.230.39.56/31 Amazon
104315.230.39.58/31 Amazon
104415.230.39.60/31 Amazon
104515.230.39.62/31 Amazon
104615.230.39.64/31 Amazon
104715.230.39.66/31 Amazon
104815.230.39.68/31 Amazon
104915.230.39.70/31 Amazon
105015.230.39.72/31 Amazon
105115.230.39.74/31 Amazon
105215.230.39.76/31 Amazon
105315.230.39.78/31 Amazon
105415.230.39.80/31 Amazon
105515.230.39.82/31 Amazon
105615.230.39.84/31 Amazon
105715.230.39.86/31 Amazon
105815.230.39.88/31 Amazon
105915.230.39.90/31 Amazon
106015.230.39.92/31 Amazon
106115.230.39.94/31 Amazon
106215.230.39.96/31 Amazon
106315.230.39.98/31 Amazon
106415.230.39.100/31 Amazon
106515.230.39.102/31 Amazon
106615.230.39.104/31 Amazon
106715.230.39.106/31 Amazon
106815.230.39.108/31 Amazon
106915.230.39.110/31 Amazon
107015.230.39.112/31 Amazon
107115.230.39.114/31 Amazon
107215.230.39.116/31 Amazon
107315.230.39.118/31 Amazon
107415.230.39.120/31 Amazon
107515.230.39.122/31 Amazon
107615.230.39.124/31 Amazon
107715.230.39.126/31 Amazon
107815.230.39.128/31 Amazon
107915.230.39.130/31 Amazon
108015.230.39.132/31 Amazon
108115.230.39.134/31 Amazon
108215.230.39.136/31 Amazon
108315.230.39.138/31 Amazon
108415.230.39.140/31 Amazon
108515.230.39.142/31 Amazon
108615.230.39.144/31 Amazon
108715.230.39.146/31 Amazon
108815.230.39.148/31 Amazon
108915.230.39.150/31 Amazon
109015.230.39.152/31 Amazon
109115.230.39.154/31 Amazon
109215.230.39.156/31 Amazon
109315.230.39.158/31 Amazon
109415.230.39.160/31 Amazon
109515.230.39.162/31 Amazon
109615.230.39.164/31 Amazon
109715.230.39.166/31 Amazon
109815.230.39.168/31 Amazon
109915.230.39.170/31 Amazon
110015.230.39.172/31 Amazon
110115.230.39.174/31 Amazon
110215.230.39.176/31 Amazon
110315.230.39.178/31 Amazon
110415.230.39.180/31 Amazon
110515.230.39.182/31 Amazon
110615.230.39.184/31 Amazon
110715.230.39.186/31 Amazon
110815.230.39.188/31 Amazon
110915.230.39.190/31 Amazon
111015.230.39.192/31 Amazon
111115.230.39.194/31 Amazon
111215.230.39.196/31 Amazon
111315.230.39.198/31 Amazon
111415.230.39.200/31 Amazon
111515.230.39.202/31 Amazon
111615.230.39.204/31 Amazon
111715.230.39.206/31 Amazon
111815.230.39.208/31 Amazon
111915.230.39.210/31 Amazon
112015.230.39.212/31 Amazon
112115.230.39.214/31 Amazon
112215.230.39.216/31 Amazon
112315.230.39.218/31 Amazon
112415.230.39.220/31 Amazon
112515.230.39.222/31 Amazon
112615.230.39.224/31 Amazon
112715.230.39.226/31 Amazon
112815.230.39.228/31 Amazon
112915.230.39.230/31 Amazon
113015.230.39.232/31 Amazon
113115.230.39.234/31 Amazon
113215.230.39.236/31 Amazon
113315.230.39.238/31 Amazon
113415.230.39.240/31 Amazon
113515.230.39.242/31 Amazon
113615.230.39.244/31 Amazon
113715.230.39.246/31 Amazon
113815.230.39.248/31 Amazon
113915.230.39.250/31 Amazon
114015.230.39.252/31 Amazon
114115.230.39.254/31 Amazon
114215.230.40.0/24 Amazon
114315.230.41.0/24 Amazon
114415.230.42.0/24 Amazon
114515.230.43.0/24 Amazon
114615.230.49.0/24 Amazon
114715.230.50.0/24 Amazon
114815.230.51.0/24 Amazon
114915.230.52.0/24 Amazon
115015.230.53.0/24 Amazon
115115.230.54.0/24 Amazon
115215.230.55.0/24 Amazon
115315.230.56.0/24 Amazon
115415.230.57.0/24 Amazon
115515.230.58.0/24 Amazon
115615.230.59.0/24 Amazon
115715.230.60.0/24 Amazon
115815.230.61.0/24 Amazon
115915.230.64.192/26 Amazon
116015.230.65.0/26 Amazon
116115.230.65.64/26 Amazon
116215.230.65.128/25 Amazon
116315.230.66.0/25 Amazon
116415.230.66.128/25 Amazon
116515.230.67.0/26 Amazon
116615.230.67.64/26 Amazon
116715.230.67.128/26 Amazon
116815.230.67.192/26 Amazon
116915.230.68.0/26 Amazon
117015.230.68.64/26 Amazon
117115.230.68.128/26 Amazon
117215.230.68.192/26 Amazon
117315.230.69.0/26 Amazon
117415.230.69.64/26 Amazon
117515.230.69.128/26 Amazon
117615.230.69.192/26 Amazon
117715.230.70.0/26 Amazon
117815.230.70.64/26 Amazon
117915.230.70.128/26 Amazon
118015.230.70.192/26 Amazon
118115.230.71.0/26 Amazon
118215.230.71.64/26 Amazon
118315.230.71.128/26 Amazon
118415.230.71.192/26 Amazon
118515.230.72.0/26 Amazon
118615.230.72.64/26 Amazon
118715.230.72.128/26 Amazon
118815.230.72.192/26 Amazon
118915.230.73.0/26 Amazon
119015.230.73.64/26 Amazon
119115.230.73.128/26 Amazon
119215.230.73.192/26 Amazon
119315.230.74.0/26 Amazon
119415.230.74.64/26 Amazon
119515.230.74.128/26 Amazon
119615.230.74.192/26 Amazon
119715.230.75.0/26 Amazon
119815.230.75.64/26 Amazon
119915.230.75.128/26 Amazon
120015.230.75.192/26 Amazon
120115.230.76.0/26 Amazon
120215.230.76.64/26 Amazon
120315.230.76.128/26 Amazon
120415.230.76.192/26 Amazon
120515.230.77.0/26 Amazon
120615.230.77.64/26 Amazon
120715.230.77.128/26 Amazon
120815.230.77.192/26 Amazon
120915.230.78.0/26 Amazon
121015.230.78.64/26 Amazon
121115.230.78.128/26 Amazon
121215.230.78.192/26 Amazon
121315.230.79.0/26 Amazon
121415.230.79.64/26 Amazon
121515.230.79.128/26 Amazon
121615.230.80.0/24 Amazon
121715.230.81.0/24 Amazon
121815.230.82.0/24 Amazon
121915.230.83.0/24 Amazon
122015.230.84.0/24 Amazon
122115.230.85.0/24 Amazon
122215.230.86.0/24 Amazon
122315.230.87.0/24 Amazon
122415.230.88.0/24 Amazon
122515.230.89.0/24 Amazon
122615.230.90.0/24 Amazon
122715.230.91.0/24 Amazon
122815.230.92.0/24 Amazon
122915.230.93.0/24 Amazon
123015.230.94.0/24 Amazon
123115.230.129.0/24 Amazon
123215.230.130.0/24 Amazon
123315.230.131.0/32 Amazon
123415.230.131.1/32 Amazon
123515.230.131.2/32 Amazon
123615.230.131.3/32 Amazon
123715.230.131.4/32 Amazon
123815.230.131.5/32 Amazon
123915.230.131.6/32 Amazon
124015.230.131.7/32 Amazon
124115.230.131.8/32 Amazon
124215.230.131.9/32 Amazon
124315.230.131.10/31 Amazon
124415.230.131.12/31 Amazon
124515.230.131.14/32 Amazon
124615.230.131.15/32 Amazon
124715.230.131.16/28 Amazon
124815.230.131.32/28 Amazon
124915.230.131.48/28 Amazon
125015.230.131.64/28 Amazon
125115.230.131.80/28 Amazon
125215.230.131.96/28 Amazon
125315.230.131.112/28 Amazon
125415.230.131.128/28 Amazon
125515.230.131.144/28 Amazon
125615.230.131.160/31 Amazon
125715.230.131.162/31 Amazon
125815.230.131.164/31 Amazon
125915.230.131.166/31 Amazon
126015.230.131.168/31 Amazon
126115.230.131.170/31 Amazon
126215.230.131.172/31 Amazon
126315.230.131.174/31 Amazon
126415.230.132.0/24 Amazon
126515.230.133.0/28 Amazon
126615.230.133.16/32 Amazon
126715.230.133.17/32 Amazon
126815.230.133.18/31 Amazon
126915.230.133.20/31 Amazon
127015.230.133.22/31 Amazon
127115.230.133.24/32 Amazon
127215.230.133.26/31 Amazon
127315.230.133.28/31 Amazon
127415.230.134.0/24 Amazon
127515.230.135.0/24 Amazon
127615.230.136.0/24 Amazon
127715.230.137.0/24 Amazon
127815.230.138.0/24 Amazon
127915.230.140.0/24 Amazon
128015.230.141.0/24 Amazon
128115.230.142.0/24 Amazon
128215.230.143.0/24 Amazon
128315.230.144.0/24 Amazon
128415.230.145.0/24 Amazon
128515.230.148.0/24 Amazon
128615.230.149.0/31 Amazon
128715.230.149.2/31 Amazon
128815.230.149.4/31 Amazon
128915.230.149.8/31 Amazon
129015.230.149.10/32 Amazon
129115.230.149.11/32 Amazon
129215.230.150.0/23 Amazon
129315.230.152.0/24 Amazon
129415.230.153.0/24 Amazon
129515.230.154.0/23 Amazon
129615.230.156.0/24 Amazon
129715.230.157.0/24 Amazon
129815.230.158.0/23 Amazon
129915.230.160.0/24 Amazon
130015.230.161.0/24 Amazon
130115.230.162.0/24 Amazon
130215.230.163.0/24 Amazon
130315.230.164.0/24 Amazon
130415.230.165.0/24 Amazon
130515.230.166.0/24 Amazon
130615.230.170.0/23 Amazon
130715.230.173.0/24 Amazon
130815.230.174.0/24 Amazon
130915.230.176.0/24 Amazon
131015.230.177.0/31 Amazon
131115.230.177.2/31 Amazon
131215.230.178.0/24 Amazon
131315.230.179.0/29 Amazon
131415.230.179.8/29 Amazon
131515.230.179.16/29 Amazon
131615.230.181.0/24 Amazon
131715.230.182.0/24 Amazon
131815.230.183.0/24 Amazon
131915.230.184.0/24 Amazon
132015.230.185.0/24 Amazon
132115.230.186.0/24 Amazon
132215.230.188.0/25 Amazon
132315.230.188.128/25 Amazon
132415.230.189.0/25 Amazon
132515.230.189.128/25 Amazon
132615.230.190.0/25 Amazon
132715.230.190.128/25 Amazon
132815.230.192.0/24 Amazon
132915.230.193.0/24 Amazon
133015.230.195.0/24 Amazon
133115.230.196.0/24 Amazon
133215.230.197.0/24 Amazon
133315.230.198.0/24 Amazon
133415.230.199.0/28 Amazon
133515.230.200.0/24 Amazon
133615.230.201.0/24 Amazon
133715.230.202.0/30 Amazon
133815.230.203.0/24 Amazon
133915.230.204.0/32 Amazon
134015.230.204.1/32 Amazon
134115.230.204.2/32 Amazon
134215.230.204.3/32 Amazon
134315.230.205.0/24 Amazon
134415.230.206.0/24 Amazon
134515.230.207.0/24 Amazon
134615.231.0.0/16 Amazon
134715.236.0.0/15 Amazon
134815.248.8.0/22 Amazon
134915.248.16.0/22 Amazon
135015.248.20.0/22 Amazon
135115.248.24.0/22 Amazon
135215.248.28.0/22 Amazon
135315.248.32.0/22 Amazon
135415.248.36.0/22 Amazon
135515.248.40.0/22 Amazon
135615.251.0.0/32 Amazon
135715.251.0.1/32 Amazon
135815.251.0.2/32 Amazon
135915.251.0.3/32 Amazon
136015.251.0.4/32 Amazon
136115.251.0.5/32 Amazon
136215.251.0.6/32 Amazon
136315.251.0.7/32 Amazon
136415.251.0.8/32 Amazon
136515.251.0.9/32 Amazon
136615.251.0.10/32 Amazon
136715.251.0.11/32 Amazon
136815.251.0.12/32 Amazon
136915.251.0.13/32 Amazon
137015.251.0.14/32 Amazon
137115.251.0.15/32 Amazon
137215.253.0.0/16 Amazon
137315.254.0.0/16 Amazon
137416.12.0.0/23 Amazon
137516.12.2.0/24 Amazon
137616.12.4.0/23 Amazon
137716.12.6.0/23 Amazon
137816.12.8.0/24 Amazon
137916.16.0.0/16 Amazon
138016.50.0.0/15 Amazon
138116.62.0.0/15 Amazon
138216.162.0.0/15 Amazon
138316.168.0.0/15 Amazon
138416.170.0.0/15 Amazon
138518.60.0.0/15 Amazon
138618.64.0.0/14 Amazon
138718.100.0.0/15 Amazon
138818.102.0.0/16 Amazon
138918.116.0.0/14 Amazon
139018.130.0.0/16 Amazon
139118.132.0.0/14 Amazon
139218.136.0.0/16 Amazon
139318.138.0.0/15 Amazon
139418.140.0.0/15 Amazon
139518.142.0.0/15 Amazon
139618.144.0.0/15 Amazon
139718.148.0.0/14 Amazon
139818.153.0.0/16 Amazon
139918.156.0.0/14 Amazon
140018.162.0.0/16 Amazon
140118.163.0.0/16 Amazon
140218.166.0.0/15 Amazon
140318.168.0.0/14 Amazon
140418.175.0.0/16 Amazon
140518.176.0.0/15 Amazon
140618.178.0.0/16 Amazon
140718.179.0.0/16 Amazon
140818.180.0.0/15 Amazon
140918.182.0.0/16 Amazon
141018.183.0.0/16 Amazon
141118.184.0.0/15 Amazon
141218.186.0.0/15 Amazon
141318.188.0.0/16 Amazon
141418.189.0.0/16 Amazon
141518.190.0.0/16 Amazon
141618.191.0.0/16 Amazon
141718.192.0.0/15 Amazon
141818.194.0.0/15 Amazon
141918.196.0.0/15 Amazon
142018.198.0.0/15 Amazon
142118.200.0.0/16 Amazon
142218.201.0.0/16 Amazon
142318.202.0.0/15 Amazon
142418.204.0.0/14 Amazon
142518.208.0.0/13 Amazon
142618.216.0.0/14 Amazon
142718.220.0.0/14 Amazon
142818.224.0.0/14 Amazon
142918.228.0.0/16 Amazon
143018.229.0.0/16 Amazon
143118.230.0.0/16 Amazon
143218.231.0.0/16 Amazon
143318.232.0.0/14 Amazon
143418.236.0.0/15 Amazon
143518.246.0.0/16 Amazon
143618.252.0.0/16 Amazon
143718.253.0.0/16 Amazon
143818.254.0.0/16 Amazon
143923.20.0.0/14 Amazon
144027.0.0.0/22 Amazon
144134.192.0.0/12 Amazon
144234.208.0.0/12 Amazon
144334.224.0.0/12 Amazon
144434.240.0.0/13 Amazon
144534.248.0.0/13 Amazon
144635.71.64.0/22 Amazon
144735.71.96.0/24 Amazon
144835.71.97.0/24 Amazon
144935.71.128.0/17 Amazon
145035.72.0.0/13 Amazon
145135.80.0.0/12 Amazon
145235.96.0.0/12 Amazon
145335.152.0.0/16 Amazon
145435.153.0.0/16 Amazon
145535.154.0.0/16 Amazon
145635.155.0.0/16 Amazon
145735.156.0.0/14 Amazon
145835.160.0.0/13 Amazon
145935.168.0.0/13 Amazon
146035.176.0.0/15 Amazon
146135.178.0.0/15 Amazon
146235.180.0.0/16 Amazon
146335.181.0.0/16 Amazon
146435.182.0.0/15 Amazon
146536.103.232.0/25 Amazon
146636.103.232.128/26 Amazon
146743.192.0.0/15 Amazon
146843.194.0.0/16 Amazon
146943.195.0.0/16 Amazon
147043.196.0.0/15 Amazon
147143.198.0.0/15 Amazon
147243.200.0.0/14 Amazon
147343.204.0.0/15 Amazon
147443.206.0.0/15 Amazon
147543.224.76.0/30 Amazon
147643.224.76.4/30 Amazon
147743.224.76.8/30 Amazon
147843.224.76.12/30 Amazon
147943.224.76.16/30 Amazon
148043.224.76.20/30 Amazon
148143.224.76.24/30 Amazon
148243.224.76.28/30 Amazon
148343.224.76.32/30 Amazon
148443.224.76.36/30 Amazon
148543.224.76.40/30 Amazon
148643.224.76.44/30 Amazon
148743.224.76.48/30 Amazon
148843.224.76.52/30 Amazon
148943.224.76.56/30 Amazon
149043.224.76.60/30 Amazon
149143.224.76.64/30 Amazon
149243.224.76.68/30 Amazon
149343.224.76.72/30 Amazon
149443.224.76.76/30 Amazon
149543.224.76.80/30 Amazon
149643.224.76.84/30 Amazon
149743.224.76.88/30 Amazon
149843.224.76.92/30 Amazon
149943.224.76.96/30 Amazon
150043.224.76.100/30 Amazon
150143.224.76.104/30 Amazon
150243.224.76.108/30 Amazon
150343.224.76.112/30 Amazon
150443.224.76.116/30 Amazon
150543.224.76.120/30 Amazon
150643.224.76.124/30 Amazon
150743.224.76.128/30 Amazon
150843.224.76.132/30 Amazon
150943.224.76.136/30 Amazon
151043.224.76.140/30 Amazon
151143.224.76.144/30 Amazon
151243.224.76.148/30 Amazon
151343.224.76.152/30 Amazon
151443.224.76.156/30 Amazon
151543.224.76.160/30 Amazon
151643.224.76.164/30 Amazon
151743.224.76.168/30 Amazon
151843.224.76.172/30 Amazon
151943.224.76.176/30 Amazon
152043.224.76.180/30 Amazon
152143.224.76.184/30 Amazon
152243.224.76.188/30 Amazon
152343.224.76.192/30 Amazon
152443.224.76.196/30 Amazon
152543.224.76.200/30 Amazon
152643.224.76.204/30 Amazon
152743.224.76.208/30 Amazon
152843.224.76.212/30 Amazon
152943.224.76.216/30 Amazon
153043.224.76.220/30 Amazon
153143.224.76.224/30 Amazon
153243.224.76.228/30 Amazon
153343.224.76.232/30 Amazon
153443.224.76.236/30 Amazon
153543.224.76.240/30 Amazon
153643.224.76.244/30 Amazon
153743.224.76.248/30 Amazon
153843.224.77.0/29 Amazon
153943.224.77.8/29 Amazon
154043.224.77.24/30 Amazon
154143.224.77.28/30 Amazon
154243.224.77.32/30 Amazon
154343.224.77.36/30 Amazon
154443.224.77.40/30 Amazon
154543.224.77.44/30 Amazon
154643.224.77.76/30 Amazon
154743.224.77.80/30 Amazon
154843.224.77.84/30 Amazon
154943.224.77.88/30 Amazon
155043.224.77.92/30 Amazon
155143.224.77.96/30 Amazon
155243.224.77.100/30 Amazon
155343.224.77.104/30 Amazon
155443.224.77.108/30 Amazon
155543.224.77.112/30 Amazon
155643.224.77.116/30 Amazon
155743.224.77.120/30 Amazon
155843.224.77.124/30 Amazon
155943.224.77.128/30 Amazon
156043.224.77.132/30 Amazon
156143.224.77.136/30 Amazon
156243.224.77.140/30 Amazon
156343.224.77.144/30 Amazon
156443.224.77.148/30 Amazon
156543.224.77.152/30 Amazon
156643.224.77.156/30 Amazon
156743.224.77.168/30 Amazon
156843.224.77.172/30 Amazon
156943.224.77.176/30 Amazon
157043.224.77.180/30 Amazon
157143.224.77.184/30 Amazon
157243.224.77.188/30 Amazon
157343.224.77.192/30 Amazon
157443.224.77.208/30 Amazon
157543.224.77.212/30 Amazon
157643.224.79.26/31 Amazon
157743.224.79.28/31 Amazon
157843.224.79.30/31 Amazon
157943.224.79.32/31 Amazon
158043.224.79.34/31 Amazon
158143.224.79.36/31 Amazon
158243.224.79.38/31 Amazon
158343.224.79.40/31 Amazon
158443.224.79.42/31 Amazon
158543.224.79.44/31 Amazon
158643.224.79.46/31 Amazon
158743.224.79.48/31 Amazon
158843.224.79.50/31 Amazon
158943.224.79.52/31 Amazon
159043.224.79.54/31 Amazon
159143.224.79.56/31 Amazon
159243.224.79.58/31 Amazon
159343.224.79.60/31 Amazon
159443.224.79.62/31 Amazon
159543.224.79.64/31 Amazon
159643.224.79.66/31 Amazon
159743.224.79.68/31 Amazon
159843.224.79.70/31 Amazon
159943.224.79.72/31 Amazon
160043.224.79.74/31 Amazon
160143.224.79.76/31 Amazon
160243.224.79.78/31 Amazon
160343.224.79.80/31 Amazon
160443.224.79.82/31 Amazon
160543.224.79.84/31 Amazon
160643.224.79.90/31 Amazon
160743.224.79.92/31 Amazon
160843.224.79.94/31 Amazon
160943.224.79.96/31 Amazon
161043.224.79.98/31 Amazon
161143.224.79.100/31 Amazon
161243.224.79.102/31 Amazon
161343.224.79.104/31 Amazon
161443.224.79.106/31 Amazon
161543.224.79.108/31 Amazon
161643.224.79.110/31 Amazon
161743.224.79.112/31 Amazon
161843.224.79.114/31 Amazon
161943.224.79.116/31 Amazon
162043.224.79.118/31 Amazon
162143.224.79.120/31 Amazon
162243.224.79.122/31 Amazon
162343.224.79.124/31 Amazon
162443.224.79.126/31 Amazon
162543.224.79.128/31 Amazon
162643.224.79.130/31 Amazon
162743.224.79.136/31 Amazon
162843.224.79.138/31 Amazon
162943.224.79.140/31 Amazon
163043.224.79.142/31 Amazon
163143.224.79.144/31 Amazon
163243.224.79.154/31 Amazon
163343.224.79.156/31 Amazon
163443.224.79.158/31 Amazon
163543.224.79.160/31 Amazon
163643.224.79.162/31 Amazon
163743.224.79.164/31 Amazon
163843.224.79.166/31 Amazon
163943.224.79.168/31 Amazon
164043.224.79.174/31 Amazon
164143.224.79.176/31 Amazon
164243.224.79.178/31 Amazon
164343.224.79.180/31 Amazon
164443.224.79.182/31 Amazon
164543.224.79.184/31 Amazon
164643.224.79.186/31 Amazon
164743.224.79.188/31 Amazon
164843.224.79.190/31 Amazon
164943.224.79.192/31 Amazon
165043.224.79.194/31 Amazon
165143.224.79.196/31 Amazon
165243.224.79.198/31 Amazon
165343.224.79.200/31 Amazon
165443.224.79.202/31 Amazon
165543.224.79.204/31 Amazon
165643.224.79.206/31 Amazon
165743.224.79.208/31 Amazon
165843.224.79.210/31 Amazon
165943.224.79.212/31 Amazon
166043.224.79.214/31 Amazon
166143.224.79.216/31 Amazon
166243.224.79.218/31 Amazon
166343.224.79.220/31 Amazon
166443.224.79.222/31 Amazon
166543.224.79.224/31 Amazon
166643.224.79.226/31 Amazon
166743.224.79.228/31 Amazon
166843.224.79.230/31 Amazon
166943.224.79.232/31 Amazon
167043.224.79.234/31 Amazon
167143.224.79.236/31 Amazon
167243.224.79.238/31 Amazon
167343.224.79.240/31 Amazon
167443.224.79.242/31 Amazon
167543.224.79.244/31 Amazon
167643.224.79.246/31 Amazon
167743.224.79.248/31 Amazon
167843.224.79.250/31 Amazon
167943.224.79.252/31 Amazon
168043.224.79.254/31 Amazon
168143.249.45.0/24 Amazon
168243.249.46.0/24 Amazon
168343.249.47.0/24 Amazon
168443.250.192.0/24 Amazon
168543.250.193.0/24 Amazon
168644.192.0.0/11 Amazon
168744.224.0.0/11 Amazon
168846.51.128.0/18 Amazon
168946.51.192.0/20 Amazon
169046.51.208.0/22 Amazon
169146.51.216.0/21 Amazon
169246.51.224.0/19 Amazon
169346.137.0.0/17 Amazon
169446.137.128.0/18 Amazon
169546.137.192.0/19 Amazon
169646.137.224.0/19 Amazon
169750.16.0.0/15 Amazon
169850.18.0.0/16 Amazon
169950.19.0.0/16 Amazon
170050.112.0.0/16 Amazon
170151.20.0.0/14 Amazon
170252.0.0.0/15 Amazon
170352.2.0.0/15 Amazon
170452.4.0.0/14 Amazon
170552.8.0.0/16 Amazon
170652.9.0.0/16 Amazon
170752.10.0.0/15 Amazon
170852.12.0.0/15 Amazon
170952.14.0.0/16 Amazon
171052.15.0.0/16 Amazon
171152.16.0.0/15 Amazon
171252.18.0.0/15 Amazon
171352.20.0.0/14 Amazon
171452.24.0.0/14 Amazon
171552.28.0.0/16 Amazon
171652.29.0.0/16 Amazon
171752.30.0.0/15 Amazon
171852.32.0.0/14 Amazon
171952.36.0.0/14 Amazon
172052.40.0.0/14 Amazon
172152.44.0.0/15 Amazon
172252.46.0.0/18 Amazon
172352.46.64.0/20 Amazon
172452.46.80.0/21 Amazon
172552.46.88.0/22 Amazon
172652.46.92.0/22 Amazon
172752.46.96.0/19 Amazon
172852.46.128.0/19 Amazon
172952.46.164.0/23 Amazon
173052.46.166.0/23 Amazon
173152.46.168.0/23 Amazon
173252.46.170.0/23 Amazon
173352.46.172.0/22 Amazon
173452.46.176.0/22 Amazon
173552.46.180.0/22 Amazon
173652.46.184.0/22 Amazon
173752.46.188.24/30 Amazon
173852.46.188.28/30 Amazon
173952.46.188.36/30 Amazon
174052.46.188.40/30 Amazon
174152.46.188.44/30 Amazon
174252.46.188.48/30 Amazon
174352.46.188.52/30 Amazon
174452.46.188.56/30 Amazon
174552.46.188.60/30 Amazon
174652.46.188.64/30 Amazon
174752.46.188.68/30 Amazon
174852.46.188.72/30 Amazon
174952.46.188.76/30 Amazon
175052.46.188.80/30 Amazon
175152.46.188.84/30 Amazon
175252.46.188.88/30 Amazon
175352.46.188.92/30 Amazon
175452.46.188.96/30 Amazon
175552.46.188.108/30 Amazon
175652.46.188.120/30 Amazon
175752.46.188.132/30 Amazon
175852.46.188.136/30 Amazon
175952.46.188.140/30 Amazon
176052.46.188.144/30 Amazon
176152.46.188.148/30 Amazon
176252.46.188.152/30 Amazon
176352.46.188.156/30 Amazon
176452.46.188.160/30 Amazon
176552.46.188.164/30 Amazon
176652.46.188.168/30 Amazon
176752.46.188.172/30 Amazon
176852.46.188.176/30 Amazon
176952.46.188.180/30 Amazon
177052.46.188.184/30 Amazon
177152.46.188.188/30 Amazon
177252.46.188.192/30 Amazon
177352.46.188.204/30 Amazon
177452.46.188.208/30 Amazon
177552.46.188.216/30 Amazon
177652.46.188.224/30 Amazon
177752.46.188.228/30 Amazon
177852.46.188.232/30 Amazon
177952.46.188.236/30 Amazon
178052.46.188.240/30 Amazon
178152.46.188.244/30 Amazon
178252.46.188.248/30 Amazon
178352.46.188.252/30 Amazon
178452.46.189.0/30 Amazon
178552.46.189.4/30 Amazon
178652.46.189.8/30 Amazon
178752.46.189.12/30 Amazon
178852.46.189.16/30 Amazon
178952.46.189.32/30 Amazon
179052.46.189.36/30 Amazon
179152.46.189.40/30 Amazon
179252.46.189.44/30 Amazon
179352.46.189.48/30 Amazon
179452.46.189.52/30 Amazon
179552.46.189.56/30 Amazon
179652.46.189.60/30 Amazon
179752.46.189.64/30 Amazon
179852.46.189.68/30 Amazon
179952.46.189.72/30 Amazon
180052.46.189.76/30 Amazon
180152.46.189.80/30 Amazon
180252.46.189.84/30 Amazon
180352.46.189.88/30 Amazon
180452.46.189.92/30 Amazon
180552.46.189.96/30 Amazon
180652.46.189.100/30 Amazon
180752.46.189.104/30 Amazon
180852.46.189.108/30 Amazon
180952.46.189.112/30 Amazon
181052.46.189.124/30 Amazon
181152.46.189.128/30 Amazon
181252.46.189.132/30 Amazon
181352.46.189.136/30 Amazon
181452.46.189.140/30 Amazon
181552.46.189.156/30 Amazon
181652.46.189.160/30 Amazon
181752.46.189.168/30 Amazon
181852.46.189.172/30 Amazon
181952.46.189.176/30 Amazon
182052.46.189.180/30 Amazon
182152.46.189.192/30 Amazon
182252.46.189.196/30 Amazon
182352.46.189.200/30 Amazon
182452.46.189.204/30 Amazon
182552.46.189.216/30 Amazon
182652.46.189.220/30 Amazon
182752.46.189.224/30 Amazon
182852.46.189.228/30 Amazon
182952.46.189.240/30 Amazon
183052.46.189.244/30 Amazon
183152.46.189.248/30 Amazon
183252.46.189.252/30 Amazon
183352.46.190.0/30 Amazon
183452.46.190.4/30 Amazon
183552.46.190.8/30 Amazon
183652.46.190.12/30 Amazon
183752.46.190.32/30 Amazon
183852.46.190.36/30 Amazon
183952.46.190.40/30 Amazon
184052.46.190.44/30 Amazon
184152.46.190.52/30 Amazon
184252.46.190.56/30 Amazon
184352.46.190.60/30 Amazon
184452.46.190.64/30 Amazon
184552.46.190.68/30 Amazon
184652.46.190.72/30 Amazon
184752.46.190.76/30 Amazon
184852.46.190.92/30 Amazon
184952.46.190.96/30 Amazon
185052.46.190.100/30 Amazon
185152.46.190.104/30 Amazon
185252.46.190.108/30 Amazon
185352.46.190.120/30 Amazon
185452.46.190.124/30 Amazon
185552.46.190.144/30 Amazon
185652.46.190.148/30 Amazon
185752.46.190.152/30 Amazon
185852.46.190.164/30 Amazon
185952.46.190.168/30 Amazon
186052.46.190.180/31 Amazon
186152.46.190.182/31 Amazon
186252.46.190.188/31 Amazon
186352.46.190.190/31 Amazon
186452.46.190.192/31 Amazon
186552.46.190.202/31 Amazon
186652.46.190.204/31 Amazon
186752.46.190.206/31 Amazon
186852.46.190.208/31 Amazon
186952.46.190.210/31 Amazon
187052.46.190.212/31 Amazon
187152.46.190.214/31 Amazon
187252.46.190.216/31 Amazon
187352.46.190.222/31 Amazon
187452.46.190.224/31 Amazon
187552.46.190.226/31 Amazon
187652.46.190.228/31 Amazon
187752.46.190.230/31 Amazon
187852.46.190.232/31 Amazon
187952.46.190.234/31 Amazon
188052.46.190.236/31 Amazon
188152.46.190.238/31 Amazon
188252.46.190.240/31 Amazon
188352.46.190.242/31 Amazon
188452.46.190.244/31 Amazon
188552.46.190.254/31 Amazon
188652.46.191.0/31 Amazon
188752.46.191.2/31 Amazon
188852.46.191.4/31 Amazon
188952.46.191.6/31 Amazon
189052.46.191.8/31 Amazon
189152.46.191.10/31 Amazon
189252.46.191.12/31 Amazon
189352.46.191.18/31 Amazon
189452.46.191.20/31 Amazon
189552.46.191.22/31 Amazon
189652.46.191.24/31 Amazon
189752.46.191.26/31 Amazon
189852.46.191.28/31 Amazon
189952.46.191.34/31 Amazon
190052.46.191.36/31 Amazon
190152.46.191.42/31 Amazon
190252.46.191.44/31 Amazon
190352.46.191.46/31 Amazon
190452.46.191.48/31 Amazon
190552.46.191.52/31 Amazon
190652.46.191.54/31 Amazon
190752.46.191.60/31 Amazon
190852.46.191.62/31 Amazon
190952.46.191.64/31 Amazon
191052.46.191.66/31 Amazon
191152.46.191.68/31 Amazon
191252.46.191.70/31 Amazon
191352.46.191.72/31 Amazon
191452.46.191.76/31 Amazon
191552.46.191.78/31 Amazon
191652.46.191.80/31 Amazon
191752.46.191.82/31 Amazon
191852.46.191.84/31 Amazon
191952.46.191.86/31 Amazon
192052.46.191.88/31 Amazon
192152.46.191.90/31 Amazon
192252.46.191.92/31 Amazon
192352.46.191.94/31 Amazon
192452.46.191.96/31 Amazon
192552.46.191.98/31 Amazon
192652.46.191.100/31 Amazon
192752.46.191.102/31 Amazon
192852.46.191.104/31 Amazon
192952.46.191.106/31 Amazon
193052.46.191.108/31 Amazon
193152.46.191.110/31 Amazon
193252.46.191.120/31 Amazon
193352.46.191.122/31 Amazon
193452.46.191.124/31 Amazon
193552.46.191.126/31 Amazon
193652.46.191.128/31 Amazon
193752.46.191.130/31 Amazon
193852.46.191.132/31 Amazon
193952.46.191.134/31 Amazon
194052.46.191.136/31 Amazon
194152.46.191.140/31 Amazon
194252.46.191.142/31 Amazon
194352.46.191.144/31 Amazon
194452.46.191.148/31 Amazon
194552.46.191.150/31 Amazon
194652.46.191.152/31 Amazon
194752.46.191.156/31 Amazon
194852.46.191.158/31 Amazon
194952.46.191.164/31 Amazon
195052.46.191.166/31 Amazon
195152.46.191.168/31 Amazon
195252.46.191.170/31 Amazon
195352.46.191.172/31 Amazon
195452.46.191.174/31 Amazon
195552.46.191.176/31 Amazon
195652.46.191.178/31 Amazon
195752.46.191.180/31 Amazon
195852.46.191.182/31 Amazon
195952.46.191.184/31 Amazon
196052.46.191.186/31 Amazon
196152.46.191.188/31 Amazon
196252.46.191.190/31 Amazon
196352.46.191.192/31 Amazon
196452.46.191.194/31 Amazon
196552.46.191.200/31 Amazon
196652.46.191.202/31 Amazon
196752.46.191.210/31 Amazon
196852.46.191.212/31 Amazon
196952.46.191.214/31 Amazon
197052.46.191.216/31 Amazon
197152.46.191.218/31 Amazon
197252.46.191.220/31 Amazon
197352.46.191.222/31 Amazon
197452.46.191.224/31 Amazon
197552.46.191.226/31 Amazon
197652.46.191.228/31 Amazon
197752.46.191.230/31 Amazon
197852.46.191.232/31 Amazon
197952.46.191.234/31 Amazon
198052.46.191.236/31 Amazon
198152.46.191.238/31 Amazon
198252.46.191.240/31 Amazon
198352.46.192.0/20 Amazon
198452.46.208.0/21 Amazon
198552.46.216.0/22 Amazon
198652.46.220.0/22 Amazon
198752.46.224.0/20 Amazon
198852.46.240.0/22 Amazon
198952.46.249.0/24 Amazon
199052.46.250.0/23 Amazon
199152.46.252.0/22 Amazon
199252.47.0.0/16 Amazon
199352.48.0.0/14 Amazon
199452.52.0.0/15 Amazon
199552.54.0.0/15 Amazon
199652.56.0.0/16 Amazon
199752.57.0.0/16 Amazon
199852.58.0.0/15 Amazon
199952.60.0.0/16 Amazon
200052.61.0.0/16 Amazon
200152.62.0.0/15 Amazon
200252.64.0.0/17 Amazon
200352.64.128.0/17 Amazon
200452.65.0.0/16 Amazon
200552.66.0.0/16 Amazon
200652.67.0.0/16 Amazon
200752.68.0.0/15 Amazon
200852.70.0.0/15 Amazon
200952.72.0.0/15 Amazon
201052.74.0.0/16 Amazon
201152.75.0.0/16 Amazon
201252.76.0.0/17 Amazon
201352.76.128.0/17 Amazon
201452.77.0.0/16 Amazon
201552.78.0.0/16 Amazon
201652.79.0.0/16 Amazon
201752.80.0.0/16 Amazon
201852.81.0.0/16 Amazon
201952.82.0.0/17 Amazon
202052.82.128.0/19 Amazon
202152.82.160.0/22 Amazon
202252.82.164.0/22 Amazon
202352.82.168.0/24 Amazon
202452.82.169.0/28 Amazon
202552.82.169.16/28 Amazon
202652.82.176.0/22 Amazon
202752.82.180.0/22 Amazon
202852.82.184.0/23 Amazon
202952.82.187.0/24 Amazon
203052.82.188.0/22 Amazon
203152.82.192.0/18 Amazon
203252.83.0.0/16 Amazon
203352.84.0.0/15 Amazon
203452.86.0.0/15 Amazon
203552.88.0.0/15 Amazon
203652.90.0.0/15 Amazon
203752.92.0.0/17 Amazon
203852.92.128.0/17 Amazon
203952.93.0.0/24 Amazon
204052.93.1.0/24 Amazon
204152.93.2.0/24 Amazon
204252.93.3.0/24 Amazon
204352.93.4.0/24 Amazon
204452.93.5.0/24 Amazon
204552.93.8.0/22 Amazon
204652.93.12.12/32 Amazon
204752.93.12.13/32 Amazon
204852.93.14.18/32 Amazon
204952.93.14.19/32 Amazon
205052.93.16.0/24 Amazon
205152.93.17.0/24 Amazon
205252.93.18.178/32 Amazon
205352.93.18.179/32 Amazon
205452.93.19.236/32 Amazon
205552.93.19.237/32 Amazon
205652.93.20.0/24 Amazon
205752.93.21.14/32 Amazon
205852.93.21.15/32 Amazon
205952.93.32.176/32 Amazon
206052.93.32.179/32 Amazon
206152.93.32.180/32 Amazon
206252.93.34.40/32 Amazon
206352.93.34.42/32 Amazon
206452.93.34.56/32 Amazon
206552.93.34.57/32 Amazon
206652.93.34.120/31 Amazon
206752.93.34.122/31 Amazon
206852.93.34.124/31 Amazon
206952.93.34.126/31 Amazon
207052.93.35.212/32 Amazon
207152.93.35.213/32 Amazon
207252.93.37.222/32 Amazon
207352.93.37.223/32 Amazon
207452.93.38.0/24 Amazon
207552.93.43.0/24 Amazon
207652.93.48.0/24 Amazon
207752.93.50.128/32 Amazon
207852.93.50.129/32 Amazon
207952.93.50.130/32 Amazon
208052.93.50.131/32 Amazon
208152.93.50.132/31 Amazon
208252.93.50.134/31 Amazon
208352.93.50.136/31 Amazon
208452.93.50.138/31 Amazon
208552.93.50.140/31 Amazon
208652.93.50.142/31 Amazon
208752.93.50.144/31 Amazon
208852.93.50.146/31 Amazon
208952.93.50.148/31 Amazon
209052.93.50.150/31 Amazon
209152.93.50.152/31 Amazon
209252.93.50.154/31 Amazon
209352.93.50.156/31 Amazon
209452.93.50.158/31 Amazon
209552.93.50.160/31 Amazon
209652.93.50.162/31 Amazon
209752.93.50.164/31 Amazon
209852.93.50.166/31 Amazon
209952.93.50.168/31 Amazon
210052.93.50.170/31 Amazon
210152.93.50.172/31 Amazon
210252.93.50.174/31 Amazon
210352.93.50.176/31 Amazon
210452.93.50.178/31 Amazon
210552.93.50.180/31 Amazon
210652.93.50.182/31 Amazon
210752.93.50.184/31 Amazon
210852.93.50.186/31 Amazon
210952.93.50.188/31 Amazon
211052.93.50.190/31 Amazon
211152.93.50.192/31 Amazon
211252.93.50.194/31 Amazon
211352.93.51.28/32 Amazon
211452.93.51.29/32 Amazon
211552.93.55.144/31 Amazon
211652.93.55.146/31 Amazon
211752.93.55.148/31 Amazon
211852.93.55.152/31 Amazon
211952.93.55.154/31 Amazon
212052.93.55.156/31 Amazon
212152.93.55.158/31 Amazon
212252.93.55.160/31 Amazon
212352.93.55.162/31 Amazon
212452.93.55.164/31 Amazon
212552.93.55.166/31 Amazon
212652.93.56.0/24 Amazon
212752.93.57.0/24 Amazon
212852.93.58.32/28 Amazon
212952.93.59.0/24 Amazon
213052.93.60.0/24 Amazon
213152.93.62.0/24 Amazon
213252.93.63.0/24 Amazon
213352.93.64.0/24 Amazon
213452.93.66.0/24 Amazon
213552.93.67.0/24 Amazon
213652.93.69.0/24 Amazon
213752.93.71.37/32 Amazon
213852.93.73.0/26 Amazon
213952.93.75.0/24 Amazon
214052.93.76.0/24 Amazon
214152.93.78.0/24 Amazon
214252.93.80.0/24 Amazon
214352.93.81.0/24 Amazon
214452.93.87.96/27 Amazon
214552.93.91.96/32 Amazon
214652.93.91.97/32 Amazon
214752.93.91.98/32 Amazon
214852.93.91.99/32 Amazon
214952.93.91.100/32 Amazon
215052.93.91.101/32 Amazon
215152.93.91.102/32 Amazon
215252.93.91.103/32 Amazon
215352.93.91.104/32 Amazon
215452.93.91.105/32 Amazon
215552.93.91.106/32 Amazon
215652.93.91.107/32 Amazon
215752.93.91.108/32 Amazon
215852.93.91.109/32 Amazon
215952.93.91.110/32 Amazon
216052.93.91.111/32 Amazon
216152.93.91.112/32 Amazon
216252.93.91.113/32 Amazon
216352.93.91.114/32 Amazon
216452.93.91.115/32 Amazon
216552.93.92.64/31 Amazon
216652.93.92.66/31 Amazon
216752.93.92.68/31 Amazon
216852.93.92.70/31 Amazon
216952.93.92.72/31 Amazon
217052.93.92.74/31 Amazon
217152.93.96.0/24 Amazon
217252.93.97.0/24 Amazon
217352.93.98.0/24 Amazon
217452.93.99.0/24 Amazon
217552.93.112.0/24 Amazon
217652.93.120.176/32 Amazon
217752.93.120.177/32 Amazon
217852.93.120.178/32 Amazon
217952.93.120.179/32 Amazon
218052.93.121.187/32 Amazon
218152.93.121.188/32 Amazon
218252.93.121.189/32 Amazon
218352.93.121.190/32 Amazon
218452.93.121.195/32 Amazon
218552.93.121.196/32 Amazon
218652.93.121.197/32 Amazon
218752.93.121.198/32 Amazon
218852.93.122.131/32 Amazon
218952.93.122.202/32 Amazon
219052.93.122.203/32 Amazon
219152.93.122.218/32 Amazon
219252.93.122.255/32 Amazon
219352.93.123.6/32 Amazon
219452.93.123.11/32 Amazon
219552.93.123.98/32 Amazon
219652.93.123.99/32 Amazon
219752.93.123.136/32 Amazon
219852.93.123.255/32 Amazon
219952.93.124.14/32 Amazon
220052.93.124.15/32 Amazon
220152.93.124.96/32 Amazon
220252.93.124.97/32 Amazon
220352.93.124.210/32 Amazon
220452.93.124.211/32 Amazon
220552.93.124.212/32 Amazon
220652.93.124.213/32 Amazon
220752.93.125.42/32 Amazon
220852.93.125.43/32 Amazon
220952.93.126.76/32 Amazon
221052.93.126.122/32 Amazon
221152.93.126.123/32 Amazon
221252.93.126.132/32 Amazon
221352.93.126.133/32 Amazon
221452.93.126.134/32 Amazon
221552.93.126.135/32 Amazon
221652.93.126.136/32 Amazon
221752.93.126.137/32 Amazon
221852.93.126.138/32 Amazon
221952.93.126.139/32 Amazon
222052.93.126.144/32 Amazon
222152.93.126.145/32 Amazon
222252.93.126.146/32 Amazon
222352.93.126.147/32 Amazon
222452.93.126.198/32 Amazon
222552.93.126.199/32 Amazon
222652.93.126.204/32 Amazon
222752.93.126.205/32 Amazon
222852.93.126.206/32 Amazon
222952.93.126.207/32 Amazon
223052.93.126.212/32 Amazon
223152.93.126.213/32 Amazon
223252.93.126.214/32 Amazon
223352.93.126.215/32 Amazon
223452.93.126.234/32 Amazon
223552.93.126.235/32 Amazon
223652.93.126.244/32 Amazon
223752.93.126.245/32 Amazon
223852.93.126.250/32 Amazon
223952.93.126.251/32 Amazon
224052.93.127.17/32 Amazon
224152.93.127.18/32 Amazon
224252.93.127.19/32 Amazon
224352.93.127.24/32 Amazon
224452.93.127.25/32 Amazon
224552.93.127.26/32 Amazon
224652.93.127.27/32 Amazon
224752.93.127.68/32 Amazon
224852.93.127.69/32 Amazon
224952.93.127.70/32 Amazon
225052.93.127.71/32 Amazon
225152.93.127.92/32 Amazon
225252.93.127.93/32 Amazon
225352.93.127.94/32 Amazon
225452.93.127.95/32 Amazon
225552.93.127.96/32 Amazon
225652.93.127.97/32 Amazon
225752.93.127.98/32 Amazon
225852.93.127.99/32 Amazon
225952.93.127.100/32 Amazon
226052.93.127.101/32 Amazon
226152.93.127.102/32 Amazon
226252.93.127.103/32 Amazon
226352.93.127.104/32 Amazon
226452.93.127.105/32 Amazon
226552.93.127.106/32 Amazon
226652.93.127.107/32 Amazon
226752.93.127.108/32 Amazon
226852.93.127.109/32 Amazon
226952.93.127.110/32 Amazon
227052.93.127.111/32 Amazon
227152.93.127.112/32 Amazon
227252.93.127.113/32 Amazon
227352.93.127.114/32 Amazon
227452.93.127.115/32 Amazon
227552.93.127.116/32 Amazon
227652.93.127.117/32 Amazon
227752.93.127.118/32 Amazon
227852.93.127.119/32 Amazon
227952.93.127.120/32 Amazon
228052.93.127.121/32 Amazon
228152.93.127.122/32 Amazon
228252.93.127.123/32 Amazon
228352.93.127.124/32 Amazon
228452.93.127.125/32 Amazon
228552.93.127.126/32 Amazon
228652.93.127.127/32 Amazon
228752.93.127.128/32 Amazon
228852.93.127.129/32 Amazon
228952.93.127.130/32 Amazon
229052.93.127.131/32 Amazon
229152.93.127.132/32 Amazon
229252.93.127.133/32 Amazon
229352.93.127.138/32 Amazon
229452.93.127.139/32 Amazon
229552.93.127.146/32 Amazon
229652.93.127.147/32 Amazon
229752.93.127.148/32 Amazon
229852.93.127.149/32 Amazon
229952.93.127.152/32 Amazon
230052.93.127.153/32 Amazon
230152.93.127.154/32 Amazon
230252.93.127.155/32 Amazon
230352.93.127.156/32 Amazon
230452.93.127.157/32 Amazon
230552.93.127.158/32 Amazon
230652.93.127.159/32 Amazon
230752.93.127.160/32 Amazon
230852.93.127.161/32 Amazon
230952.93.127.162/32 Amazon
231052.93.127.163/32 Amazon
231152.93.127.164/32 Amazon
231252.93.127.165/32 Amazon
231352.93.127.166/32 Amazon
231452.93.127.167/32 Amazon
231552.93.127.168/32 Amazon
231652.93.127.169/32 Amazon
231752.93.127.172/32 Amazon
231852.93.127.173/32 Amazon
231952.93.127.174/32 Amazon
232052.93.127.175/32 Amazon
232152.93.127.176/32 Amazon
232252.93.127.177/32 Amazon
232352.93.127.178/32 Amazon
232452.93.127.179/32 Amazon
232552.93.127.180/32 Amazon
232652.93.127.181/32 Amazon
232752.93.127.182/32 Amazon
232852.93.127.183/32 Amazon
232952.93.127.184/32 Amazon
233052.93.127.185/32 Amazon
233152.93.127.194/32 Amazon
233252.93.127.195/32 Amazon
233352.93.127.196/32 Amazon
233452.93.127.197/32 Amazon
233552.93.127.198/32 Amazon
233652.93.127.199/32 Amazon
233752.93.127.200/32 Amazon
233852.93.127.201/32 Amazon
233952.93.127.202/32 Amazon
234052.93.127.203/32 Amazon
234152.93.127.204/32 Amazon
234252.93.127.205/32 Amazon
234352.93.127.206/32 Amazon
234452.93.127.207/32 Amazon
234552.93.127.216/32 Amazon
234652.93.127.217/32 Amazon
234752.93.127.218/32 Amazon
234852.93.127.219/32 Amazon
234952.93.127.220/32 Amazon
235052.93.127.221/32 Amazon
235152.93.127.232/32 Amazon
235252.93.127.237/32 Amazon
235352.93.127.238/32 Amazon
235452.93.127.239/32 Amazon
235552.93.127.244/32 Amazon
235652.93.127.245/32 Amazon
235752.93.127.246/32 Amazon
235852.93.127.247/32 Amazon
235952.93.127.248/32 Amazon
236052.93.127.249/32 Amazon
236152.93.127.250/32 Amazon
236252.93.127.251/32 Amazon
236352.93.127.252/32 Amazon
236452.93.127.253/32 Amazon
236552.93.127.254/32 Amazon
236652.93.127.255/32 Amazon
236752.93.129.95/32 Amazon
236852.93.131.217/32 Amazon
236952.93.133.127/32 Amazon
237052.93.133.129/32 Amazon
237152.93.133.131/32 Amazon
237252.93.133.133/32 Amazon
237352.93.133.153/32 Amazon
237452.93.133.155/32 Amazon
237552.93.133.175/32 Amazon
237652.93.133.177/32 Amazon
237752.93.133.179/32 Amazon
237852.93.133.181/32 Amazon
237952.93.134.181/32 Amazon
238052.93.135.195/32 Amazon
238152.93.137.0/24 Amazon
238252.93.138.252/32 Amazon
238352.93.138.253/32 Amazon
238452.93.139.252/32 Amazon
238552.93.139.253/32 Amazon
238652.93.141.212/32 Amazon
238752.93.141.213/32 Amazon
238852.93.141.214/31 Amazon
238952.93.141.216/31 Amazon
239052.93.141.218/31 Amazon
239152.93.141.220/31 Amazon
239252.93.141.222/31 Amazon
239352.93.141.224/31 Amazon
239452.93.141.226/31 Amazon
239552.93.141.228/31 Amazon
239652.93.141.230/31 Amazon
239752.93.141.232/31 Amazon
239852.93.141.234/31 Amazon
239952.93.141.236/31 Amazon
240052.93.141.238/31 Amazon
240152.93.141.240/31 Amazon
240252.93.141.242/31 Amazon
240352.93.141.244/31 Amazon
240452.93.146.5/32 Amazon
240552.93.149.0/24 Amazon
240652.93.150.0/24 Amazon
240752.93.151.0/24 Amazon
240852.93.153.80/32 Amazon
240952.93.153.148/32 Amazon
241052.93.153.149/32 Amazon
241152.93.153.168/32 Amazon
241252.93.153.169/32 Amazon
241352.93.153.170/32 Amazon
241452.93.153.171/32 Amazon
241552.93.153.172/32 Amazon
241652.93.153.173/32 Amazon
241752.93.153.174/32 Amazon
241852.93.153.175/32 Amazon
241952.93.153.176/32 Amazon
242052.93.153.177/32 Amazon
242152.93.153.178/32 Amazon
242252.93.153.179/32 Amazon
242352.93.156.0/22 Amazon
242452.93.178.128/32 Amazon
242552.93.178.129/32 Amazon
242652.93.178.130/32 Amazon
242752.93.178.131/32 Amazon
242852.93.178.132/32 Amazon
242952.93.178.133/32 Amazon
243052.93.178.134/32 Amazon
243152.93.178.135/32 Amazon
243252.93.178.136/32 Amazon
243352.93.178.137/32 Amazon
243452.93.178.138/32 Amazon
243552.93.178.139/32 Amazon
243652.93.178.140/32 Amazon
243752.93.178.141/32 Amazon
243852.93.178.142/32 Amazon
243952.93.178.143/32 Amazon
244052.93.178.144/32 Amazon
244152.93.178.145/32 Amazon
244252.93.178.146/32 Amazon
244352.93.178.147/32 Amazon
244452.93.178.148/32 Amazon
244552.93.178.149/32 Amazon
244652.93.178.150/32 Amazon
244752.93.178.151/32 Amazon
244852.93.178.152/32 Amazon
244952.93.178.153/32 Amazon
245052.93.178.154/32 Amazon
245152.93.178.155/32 Amazon
245252.93.178.156/32 Amazon
245352.93.178.157/32 Amazon
245452.93.178.158/32 Amazon
245552.93.178.159/32 Amazon
245652.93.178.160/32 Amazon
245752.93.178.161/32 Amazon
245852.93.178.162/32 Amazon
245952.93.178.163/32 Amazon
246052.93.178.164/32 Amazon
246152.93.178.165/32 Amazon
246252.93.178.166/32 Amazon
246352.93.178.167/32 Amazon
246452.93.178.168/32 Amazon
246552.93.178.169/32 Amazon
246652.93.178.170/32 Amazon
246752.93.178.171/32 Amazon
246852.93.178.172/32 Amazon
246952.93.178.173/32 Amazon
247052.93.178.174/32 Amazon
247152.93.178.175/32 Amazon
247252.93.178.176/32 Amazon
247352.93.178.177/32 Amazon
247452.93.178.178/32 Amazon
247552.93.178.179/32 Amazon
247652.93.178.180/32 Amazon
247752.93.178.181/32 Amazon
247852.93.178.182/32 Amazon
247952.93.178.183/32 Amazon
248052.93.178.184/32 Amazon
248152.93.178.185/32 Amazon
248252.93.178.186/32 Amazon
248352.93.178.187/32 Amazon
248452.93.178.188/32 Amazon
248552.93.178.189/32 Amazon
248652.93.178.190/32 Amazon
248752.93.178.191/32 Amazon
248852.93.178.192/32 Amazon
248952.93.178.193/32 Amazon
249052.93.178.194/32 Amazon
249152.93.178.195/32 Amazon
249252.93.178.196/32 Amazon
249352.93.178.197/32 Amazon
249452.93.178.198/32 Amazon
249552.93.178.199/32 Amazon
249652.93.178.200/32 Amazon
249752.93.178.201/32 Amazon
249852.93.178.202/32 Amazon
249952.93.178.203/32 Amazon
250052.93.178.204/32 Amazon
250152.93.178.205/32 Amazon
250252.93.178.206/32 Amazon
250352.93.178.207/32 Amazon
250452.93.178.208/32 Amazon
250552.93.178.209/32 Amazon
250652.93.178.210/32 Amazon
250752.93.178.211/32 Amazon
250852.93.178.212/32 Amazon
250952.93.178.213/32 Amazon
251052.93.178.214/32 Amazon
251152.93.178.215/32 Amazon
251252.93.178.216/32 Amazon
251352.93.178.217/32 Amazon
251452.93.178.218/32 Amazon
251552.93.178.219/32 Amazon
251652.93.178.220/32 Amazon
251752.93.178.221/32 Amazon
251852.93.178.222/32 Amazon
251952.93.178.223/32 Amazon
252052.93.178.224/32 Amazon
252152.93.178.225/32 Amazon
252252.93.178.226/32 Amazon
252352.93.178.227/32 Amazon
252452.93.178.228/32 Amazon
252552.93.178.229/32 Amazon
252652.93.178.230/32 Amazon
252752.93.178.231/32 Amazon
252852.93.178.232/32 Amazon
252952.93.178.233/32 Amazon
253052.93.178.234/32 Amazon
253152.93.178.235/32 Amazon
253252.93.193.192/32 Amazon
253352.93.193.193/32 Amazon
253452.93.193.194/32 Amazon
253552.93.193.195/32 Amazon
253652.93.193.196/32 Amazon
253752.93.193.197/32 Amazon
253852.93.193.198/32 Amazon
253952.93.193.199/32 Amazon
254052.93.193.200/32 Amazon
254152.93.193.201/32 Amazon
254252.93.193.202/32 Amazon
254352.93.193.203/32 Amazon
254452.93.198.0/25 Amazon
254552.93.229.148/32 Amazon
254652.93.229.149/32 Amazon
254752.93.236.0/24 Amazon
254852.93.237.0/24 Amazon
254952.93.240.146/31 Amazon
255052.93.240.148/31 Amazon
255152.93.240.150/31 Amazon
255252.93.240.152/31 Amazon
255352.93.240.154/31 Amazon
255452.93.240.156/31 Amazon
255552.93.240.158/31 Amazon
255652.93.240.160/31 Amazon
255752.93.240.162/31 Amazon
255852.93.240.164/31 Amazon
255952.93.240.166/31 Amazon
256052.93.240.168/31 Amazon
256152.93.240.170/31 Amazon
256252.93.240.172/31 Amazon
256352.93.240.174/31 Amazon
256452.93.240.176/31 Amazon
256552.93.240.178/31 Amazon
256652.93.240.180/31 Amazon
256752.93.240.182/31 Amazon
256852.93.240.184/31 Amazon
256952.93.240.186/31 Amazon
257052.93.240.188/31 Amazon
257152.93.240.190/31 Amazon
257252.93.240.192/31 Amazon
257352.93.240.194/31 Amazon
257452.93.240.196/31 Amazon
257552.93.240.198/31 Amazon
257652.93.240.200/31 Amazon
257752.93.240.202/31 Amazon
257852.93.240.204/31 Amazon
257952.93.245.0/24 Amazon
258052.93.247.0/25 Amazon
258152.93.248.0/24 Amazon
258252.93.249.0/24 Amazon
258352.93.250.0/23 Amazon
258452.93.254.0/24 Amazon
258552.94.0.0/22 Amazon
258652.94.4.0/24 Amazon
258752.94.5.0/24 Amazon
258852.94.6.0/24 Amazon
258952.94.7.0/24 Amazon
259052.94.8.0/24 Amazon
259152.94.9.0/24 Amazon
259252.94.10.0/24 Amazon
259352.94.11.0/24 Amazon
259452.94.12.0/24 Amazon
259552.94.13.0/24 Amazon
259652.94.14.0/24 Amazon
259752.94.15.0/24 Amazon
259852.94.16.0/24 Amazon
259952.94.17.0/24 Amazon
260052.94.18.0/24 Amazon
260152.94.19.0/24 Amazon
260252.94.20.0/24 Amazon
260352.94.22.0/24 Amazon
260452.94.23.0/24 Amazon
260552.94.24.0/23 Amazon
260652.94.26.0/23 Amazon
260752.94.28.0/23 Amazon
260852.94.30.0/24 Amazon
260952.94.32.0/20 Amazon
261052.94.48.0/20 Amazon
261152.94.64.0/22 Amazon
261252.94.68.0/24 Amazon
261352.94.69.0/24 Amazon
261452.94.72.0/22 Amazon
261552.94.76.0/22 Amazon
261652.94.80.0/20 Amazon
261752.94.96.0/20 Amazon
261852.94.112.0/22 Amazon
261952.94.116.0/22 Amazon
262052.94.120.0/22 Amazon
262152.94.124.0/22 Amazon
262252.94.128.0/22 Amazon
262352.94.132.0/22 Amazon
262452.94.136.0/21 Amazon
262552.94.148.0/22 Amazon
262652.94.152.3/32 Amazon
262752.94.152.9/32 Amazon
262852.94.152.11/32 Amazon
262952.94.152.12/32 Amazon
263052.94.152.44/32 Amazon
263152.94.152.60/32 Amazon
263252.94.152.61/32 Amazon
263352.94.152.62/32 Amazon
263452.94.152.63/32 Amazon
263552.94.152.64/32 Amazon
263652.94.152.65/32 Amazon
263752.94.152.66/32 Amazon
263852.94.152.67/32 Amazon
263952.94.152.68/32 Amazon
264052.94.152.69/32 Amazon
264152.94.160.0/20 Amazon
264252.94.176.0/20 Amazon
264352.94.192.0/22 Amazon
264452.94.196.0/24 Amazon
264552.94.197.0/24 Amazon
264652.94.198.0/28 Amazon
264752.94.198.16/28 Amazon
264852.94.198.32/28 Amazon
264952.94.198.48/28 Amazon
265052.94.198.64/28 Amazon
265152.94.198.80/28 Amazon
265252.94.198.96/28 Amazon
265352.94.198.112/28 Amazon
265452.94.198.128/28 Amazon
265552.94.198.144/28 Amazon
265652.94.199.0/24 Amazon
265752.94.200.0/24 Amazon
265852.94.201.0/26 Amazon
265952.94.204.0/23 Amazon
266052.94.206.0/23 Amazon
266152.94.208.0/21 Amazon
266252.94.216.0/21 Amazon
266352.94.224.0/20 Amazon
266452.94.240.0/22 Amazon
266552.94.244.0/22 Amazon
266652.94.248.0/28 Amazon
266752.94.248.16/28 Amazon
266852.94.248.32/28 Amazon
266952.94.248.48/28 Amazon
267052.94.248.64/28 Amazon
267152.94.248.80/28 Amazon
267252.94.248.96/28 Amazon
267352.94.248.112/28 Amazon
267452.94.248.128/28 Amazon
267552.94.248.144/28 Amazon
267652.94.248.160/28 Amazon
267752.94.248.176/28 Amazon
267852.94.248.192/28 Amazon
267952.94.248.208/28 Amazon
268052.94.248.224/28 Amazon
268152.94.249.32/28 Amazon
268252.94.249.48/28 Amazon
268352.94.249.64/28 Amazon
268452.94.249.80/28 Amazon
268552.94.249.96/28 Amazon
268652.94.249.112/28 Amazon
268752.94.249.128/28 Amazon
268852.94.249.144/28 Amazon
268952.94.249.160/28 Amazon
269052.94.249.176/28 Amazon
269152.94.249.192/28 Amazon
269252.94.249.208/28 Amazon
269352.94.249.224/28 Amazon
269452.94.249.240/28 Amazon
269552.94.250.0/28 Amazon
269652.94.250.16/28 Amazon
269752.94.252.0/23 Amazon
269852.94.254.0/23 Amazon
269952.95.0.0/20 Amazon
270052.95.16.0/21 Amazon
270152.95.24.0/22 Amazon
270252.95.28.0/24 Amazon
270352.95.29.0/26 Amazon
270452.95.30.0/23 Amazon
270552.95.34.0/24 Amazon
270652.95.35.0/24 Amazon
270752.95.36.0/22 Amazon
270852.95.40.0/24 Amazon
270952.95.41.0/24 Amazon
271052.95.42.0/24 Amazon
271152.95.48.0/22 Amazon
271252.95.52.0/22 Amazon
271352.95.56.0/22 Amazon
271452.95.60.0/24 Amazon
271552.95.61.0/24 Amazon
271652.95.62.0/24 Amazon
271752.95.63.0/24 Amazon
271852.95.64.0/20 Amazon
271952.95.80.0/20 Amazon
272052.95.96.0/22 Amazon
272152.95.100.0/22 Amazon
272252.95.104.0/22 Amazon
272352.95.108.0/23 Amazon
272452.95.110.0/24 Amazon
272552.95.111.0/24 Amazon
272652.95.112.0/20 Amazon
272752.95.128.0/21 Amazon
272852.95.136.0/23 Amazon
272952.95.138.0/24 Amazon
273052.95.139.0/24 Amazon
273152.95.140.0/23 Amazon
273252.95.142.0/23 Amazon
273352.95.144.0/24 Amazon
273452.95.145.0/24 Amazon
273552.95.146.0/23 Amazon
273652.95.148.0/23 Amazon
273752.95.150.0/24 Amazon
273852.95.151.0/24 Amazon
273952.95.152.0/23 Amazon
274052.95.154.0/23 Amazon
274152.95.156.0/24 Amazon
274252.95.157.0/24 Amazon
274352.95.158.0/23 Amazon
274452.95.160.0/23 Amazon
274552.95.162.0/24 Amazon
274652.95.163.0/24 Amazon
274752.95.164.0/23 Amazon
274852.95.166.0/23 Amazon
274952.95.168.0/24 Amazon
275052.95.169.0/24 Amazon
275152.95.170.0/23 Amazon
275252.95.172.0/23 Amazon
275352.95.174.0/24 Amazon
275452.95.175.0/24 Amazon
275552.95.176.0/24 Amazon
275652.95.177.0/24 Amazon
275752.95.178.0/23 Amazon
275852.95.180.0/24 Amazon
275952.95.181.0/24 Amazon
276052.95.182.0/23 Amazon
276152.95.184.0/23 Amazon
276252.95.186.0/24 Amazon
276352.95.187.0/24 Amazon
276452.95.188.0/23 Amazon
276552.95.190.0/24 Amazon
276652.95.192.0/20 Amazon
276752.95.208.0/22 Amazon
276852.95.212.0/22 Amazon
276952.95.216.0/22 Amazon
277052.95.224.0/24 Amazon
277152.95.225.0/24 Amazon
277252.95.226.0/24 Amazon
277352.95.227.0/24 Amazon
277452.95.228.0/24 Amazon
277552.95.229.0/24 Amazon
277652.95.230.0/24 Amazon
277752.95.235.0/24 Amazon
277852.95.239.0/24 Amazon
277952.95.240.0/24 Amazon
278052.95.241.0/24 Amazon
278152.95.242.0/24 Amazon
278252.95.243.0/24 Amazon
278352.95.244.0/24 Amazon
278452.95.245.0/24 Amazon
278552.95.246.0/24 Amazon
278652.95.247.0/24 Amazon
278752.95.248.0/24 Amazon
278852.95.249.0/24 Amazon
278952.95.250.0/24 Amazon
279052.95.251.0/24 Amazon
279152.95.252.0/24 Amazon
279252.95.253.0/24 Amazon
279352.95.254.0/24 Amazon
279452.95.255.0/28 Amazon
279552.95.255.16/28 Amazon
279652.95.255.32/28 Amazon
279752.95.255.48/28 Amazon
279852.95.255.64/28 Amazon
279952.95.255.80/28 Amazon
280052.95.255.96/28 Amazon
280152.95.255.112/28 Amazon
280252.95.255.128/28 Amazon
280352.95.255.144/28 Amazon
280452.119.128.0/20 Amazon
280552.119.144.0/21 Amazon
280652.119.152.0/22 Amazon
280752.119.156.0/22 Amazon
280852.119.160.0/20 Amazon
280952.119.176.0/21 Amazon
281052.119.184.0/22 Amazon
281152.119.188.0/22 Amazon
281252.119.192.0/22 Amazon
281352.119.196.0/22 Amazon
281452.119.205.0/24 Amazon
281552.119.206.0/23 Amazon
281652.119.208.0/23 Amazon
281752.119.210.0/23 Amazon
281852.119.212.0/23 Amazon
281952.119.214.0/23 Amazon
282052.119.216.0/21 Amazon
282152.119.224.0/21 Amazon
282252.119.232.0/21 Amazon
282352.119.240.0/21 Amazon
282452.119.248.0/24 Amazon
282552.119.249.0/24 Amazon
282652.119.252.0/22 Amazon
282752.124.128.0/17 Amazon
282852.144.133.32/27 Amazon
282952.144.192.0/26 Amazon
283052.144.192.64/26 Amazon
283152.144.192.128/26 Amazon
283252.144.192.192/26 Amazon
283352.144.193.0/26 Amazon
283452.144.193.64/26 Amazon
283552.144.193.128/26 Amazon
283652.144.194.0/26 Amazon
283752.144.194.64/26 Amazon
283852.144.194.128/26 Amazon
283952.144.194.192/26 Amazon
284052.144.195.0/26 Amazon
284152.144.196.192/26 Amazon
284252.144.197.128/26 Amazon
284352.144.197.192/26 Amazon
284452.144.199.128/26 Amazon
284552.144.200.64/26 Amazon
284652.144.200.128/26 Amazon
284752.144.201.64/26 Amazon
284852.144.201.128/26 Amazon
284952.144.205.0/26 Amazon
285052.144.208.0/31 Amazon
285152.144.208.2/31 Amazon
285252.144.208.64/26 Amazon
285352.144.208.128/26 Amazon
285452.144.208.192/26 Amazon
285552.144.209.0/26 Amazon
285652.144.209.64/26 Amazon
285752.144.209.128/26 Amazon
285852.144.209.192/26 Amazon
285952.144.210.0/26 Amazon
286052.144.210.64/26 Amazon
286152.144.210.128/26 Amazon
286252.144.210.192/26 Amazon
286352.144.211.0/26 Amazon
286452.144.211.64/26 Amazon
286552.144.211.128/26 Amazon
286652.144.211.192/31 Amazon
286752.144.211.194/31 Amazon
286852.144.211.196/31 Amazon
286952.144.211.198/31 Amazon
287052.144.211.200/31 Amazon
287152.144.211.202/31 Amazon
287252.144.212.64/26 Amazon
287352.144.212.192/26 Amazon
287452.144.213.64/26 Amazon
287552.144.214.128/26 Amazon
287652.144.215.0/31 Amazon
287752.144.215.2/31 Amazon
287852.144.215.192/31 Amazon
287952.144.215.194/31 Amazon
288052.144.215.196/31 Amazon
288152.144.215.198/31 Amazon
288252.144.215.200/31 Amazon
288352.144.215.202/31 Amazon
288452.144.216.0/31 Amazon
288552.144.216.2/31 Amazon
288652.144.216.4/31 Amazon
288752.144.216.6/31 Amazon
288852.144.216.8/31 Amazon
288952.144.216.10/31 Amazon
289052.144.218.0/26 Amazon
289152.144.218.64/26 Amazon
289252.144.223.64/26 Amazon
289352.144.223.128/26 Amazon
289452.144.224.64/26 Amazon
289552.144.224.128/26 Amazon
289652.144.224.192/26 Amazon
289752.144.225.0/26 Amazon
289852.144.225.64/26 Amazon
289952.144.225.128/26 Amazon
290052.144.227.64/26 Amazon
290152.144.227.192/26 Amazon
290252.144.228.0/31 Amazon
290352.144.228.2/31 Amazon
290452.144.228.64/26 Amazon
290552.144.228.128/26 Amazon
290652.144.228.192/26 Amazon
290752.144.229.0/26 Amazon
290852.144.229.64/26 Amazon
290952.144.230.0/26 Amazon
291052.144.231.64/26 Amazon
291152.144.233.64/31 Amazon
291252.144.233.66/31 Amazon
291352.144.233.68/31 Amazon
291452.144.233.70/31 Amazon
291552.144.233.128/31 Amazon
291652.144.233.130/31 Amazon
291752.144.233.132/31 Amazon
291852.144.233.134/31 Amazon
291952.144.233.192/26 Amazon
292052.192.0.0/15 Amazon
292152.194.0.0/15 Amazon
292252.196.0.0/14 Amazon
292352.200.0.0/13 Amazon
292452.208.0.0/13 Amazon
292552.216.0.0/15 Amazon
292652.218.0.0/17 Amazon
292752.218.128.0/17 Amazon
292852.219.0.0/20 Amazon
292952.219.16.0/22 Amazon
293052.219.24.0/21 Amazon
293152.219.32.0/21 Amazon
293252.219.40.0/22 Amazon
293352.219.44.0/22 Amazon
293452.219.56.0/22 Amazon
293552.219.60.0/23 Amazon
293652.219.62.0/23 Amazon
293752.219.64.0/22 Amazon
293852.219.68.0/22 Amazon
293952.219.72.0/22 Amazon
294052.219.80.0/20 Amazon
294152.219.96.0/20 Amazon
294252.219.112.0/21 Amazon
294352.219.120.0/22 Amazon
294452.219.124.0/22 Amazon
294552.219.128.0/22 Amazon
294652.219.132.0/22 Amazon
294752.219.136.0/22 Amazon
294852.219.140.0/24 Amazon
294952.219.141.0/24 Amazon
295052.219.142.0/24 Amazon
295152.219.143.0/24 Amazon
295252.219.144.0/22 Amazon
295352.219.148.0/23 Amazon
295452.219.152.0/22 Amazon
295552.219.156.0/22 Amazon
295652.219.160.0/23 Amazon
295752.219.164.0/22 Amazon
295852.219.168.0/24 Amazon
295952.219.169.0/24 Amazon
296052.219.170.0/23 Amazon
296152.219.172.0/22 Amazon
296252.219.176.0/22 Amazon
296352.219.180.0/22 Amazon
296452.219.184.0/21 Amazon
296552.219.192.0/23 Amazon
296652.219.194.0/24 Amazon
296752.219.195.0/24 Amazon
296852.219.196.0/22 Amazon
296952.219.200.0/24 Amazon
297052.219.202.0/23 Amazon
297152.219.204.0/22 Amazon
297252.220.0.0/15 Amazon
297352.222.0.0/17 Amazon
297452.222.128.0/17 Amazon
297552.223.0.0/17 Amazon
297654.64.0.0/15 Amazon
297754.66.0.0/16 Amazon
297854.67.0.0/16 Amazon
297954.68.0.0/14 Amazon
298054.72.0.0/15 Amazon
298154.74.0.0/15 Amazon
298254.76.0.0/15 Amazon
298354.78.0.0/16 Amazon
298454.79.0.0/16 Amazon
298554.80.0.0/13 Amazon
298654.88.0.0/14 Amazon
298754.92.0.0/17 Amazon
298854.92.128.0/17 Amazon
298954.93.0.0/16 Amazon
299054.94.0.0/16 Amazon
299154.95.0.0/16 Amazon
299254.144.0.0/14 Amazon
299354.148.0.0/15 Amazon
299454.150.0.0/16 Amazon
299554.151.0.0/17 Amazon
299654.151.128.0/17 Amazon
299754.152.0.0/16 Amazon
299854.153.0.0/17 Amazon
299954.153.128.0/17 Amazon
300054.154.0.0/16 Amazon
300154.155.0.0/16 Amazon
300254.156.0.0/14 Amazon
300354.160.0.0/13 Amazon
300454.168.0.0/16 Amazon
300554.169.0.0/16 Amazon
300654.170.0.0/15 Amazon
300754.172.0.0/15 Amazon
300854.174.0.0/15 Amazon
300954.176.0.0/15 Amazon
301054.178.0.0/16 Amazon
301154.179.0.0/16 Amazon
301254.180.0.0/15 Amazon
301354.182.0.0/16 Amazon
301454.183.0.0/16 Amazon
301554.184.0.0/13 Amazon
301654.192.0.0/16 Amazon
301754.193.0.0/16 Amazon
301854.194.0.0/15 Amazon
301954.196.0.0/15 Amazon
302054.198.0.0/16 Amazon
302154.199.0.0/16 Amazon
302254.200.0.0/15 Amazon
302354.202.0.0/15 Amazon
302454.204.0.0/15 Amazon
302554.206.0.0/16 Amazon
302654.207.0.0/16 Amazon
302754.208.0.0/15 Amazon
302854.210.0.0/15 Amazon
302954.212.0.0/15 Amazon
303054.214.0.0/16 Amazon
303154.215.0.0/16 Amazon
303254.216.0.0/15 Amazon
303354.218.0.0/16 Amazon
303454.219.0.0/16 Amazon
303554.220.0.0/16 Amazon
303654.221.0.0/16 Amazon
303754.222.0.0/19 Amazon
303854.222.32.0/22 Amazon
303954.222.36.0/22 Amazon
304054.222.48.0/22 Amazon
304154.222.52.0/22 Amazon
304254.222.57.0/24 Amazon
304354.222.58.0/28 Amazon
304454.222.58.32/28 Amazon
304554.222.58.48/28 Amazon
304654.222.59.0/24 Amazon
304754.222.64.0/23 Amazon
304854.222.66.0/23 Amazon
304954.222.68.0/23 Amazon
305054.222.70.0/24 Amazon
305154.222.71.0/24 Amazon
305254.222.76.0/22 Amazon
305354.222.80.0/21 Amazon
305454.222.128.0/17 Amazon
305554.223.0.0/16 Amazon
305654.224.0.0/15 Amazon
305754.226.0.0/15 Amazon
305854.228.0.0/16 Amazon
305954.229.0.0/16 Amazon
306054.230.0.0/17 Amazon
306154.230.128.0/18 Amazon
306254.230.192.0/21 Amazon
306354.230.200.0/21 Amazon
306454.230.208.0/20 Amazon
306554.230.224.0/19 Amazon
306654.231.0.0/16 Amazon
306754.232.0.0/16 Amazon
306854.233.0.0/18 Amazon
306954.233.64.0/18 Amazon
307054.233.128.0/17 Amazon
307154.234.0.0/15 Amazon
307254.236.0.0/15 Amazon
307354.238.0.0/16 Amazon
307454.239.0.0/28 Amazon
307554.239.0.16/28 Amazon
307654.239.0.32/28 Amazon
307754.239.0.48/28 Amazon
307854.239.0.64/28 Amazon
307954.239.0.80/28 Amazon
308054.239.0.96/28 Amazon
308154.239.0.112/28 Amazon
308254.239.0.128/28 Amazon
308354.239.0.144/28 Amazon
308454.239.0.160/28 Amazon
308554.239.0.176/28 Amazon
308654.239.0.192/28 Amazon
308754.239.0.208/28 Amazon
308854.239.0.224/28 Amazon
308954.239.0.240/28 Amazon
309054.239.1.0/28 Amazon
309154.239.1.16/28 Amazon
309254.239.1.32/28 Amazon
309354.239.1.48/28 Amazon
309454.239.1.64/28 Amazon
309554.239.1.80/28 Amazon
309654.239.1.96/28 Amazon
309754.239.1.112/28 Amazon
309854.239.1.128/28 Amazon
309954.239.1.144/28 Amazon
310054.239.1.160/28 Amazon
310154.239.1.176/28 Amazon
310254.239.1.192/28 Amazon
310354.239.1.208/28 Amazon
310454.239.1.224/28 Amazon
310554.239.2.0/23 Amazon
310654.239.4.0/22 Amazon
310754.239.8.0/21 Amazon
310854.239.16.0/20 Amazon
310954.239.32.0/21 Amazon
311054.239.40.152/29 Amazon
311154.239.48.0/22 Amazon
311254.239.52.0/23 Amazon
311354.239.54.0/23 Amazon
311454.239.56.0/21 Amazon
311554.239.64.0/21 Amazon
311654.239.96.0/24 Amazon
311754.239.98.0/24 Amazon
311854.239.99.0/24 Amazon
311954.239.100.0/23 Amazon
312054.239.102.162/31 Amazon
312154.239.102.232/31 Amazon
312254.239.102.234/31 Amazon
312354.239.102.236/31 Amazon
312454.239.104.0/23 Amazon
312554.239.106.0/23 Amazon
312654.239.108.0/22 Amazon
312754.239.112.0/24 Amazon
312854.239.113.0/24 Amazon
312954.239.115.0/25 Amazon
313054.239.116.0/22 Amazon
313154.239.120.0/21 Amazon
313254.239.128.0/18 Amazon
313354.239.192.0/19 Amazon
313454.240.17.0/24 Amazon
313554.240.128.0/18 Amazon
313654.240.192.0/22 Amazon
313754.240.196.0/24 Amazon
313854.240.197.0/24 Amazon
313954.240.198.0/24 Amazon
314054.240.199.0/24 Amazon
314154.240.200.0/24 Amazon
314254.240.202.0/24 Amazon
314354.240.203.0/24 Amazon
314454.240.204.0/22 Amazon
314554.240.208.0/22 Amazon
314654.240.212.0/22 Amazon
314754.240.216.0/22 Amazon
314854.240.220.0/22 Amazon
314954.240.225.0/24 Amazon
315054.240.226.0/24 Amazon
315154.240.227.0/24 Amazon
315254.240.228.0/23 Amazon
315354.240.230.0/23 Amazon
315454.240.232.0/22 Amazon
315554.240.236.1/32 Amazon
315654.240.236.2/32 Amazon
315754.240.236.5/32 Amazon
315854.240.236.6/32 Amazon
315954.240.236.9/32 Amazon
316054.240.236.10/32 Amazon
316154.240.236.13/32 Amazon
316254.240.236.14/32 Amazon
316354.240.236.17/32 Amazon
316454.240.236.18/32 Amazon
316554.240.236.21/32 Amazon
316654.240.236.22/32 Amazon
316754.240.236.25/32 Amazon
316854.240.236.26/32 Amazon
316954.240.236.29/32 Amazon
317054.240.236.30/32 Amazon
317154.240.236.33/32 Amazon
317254.240.236.34/32 Amazon
317354.240.236.37/32 Amazon
317454.240.236.38/32 Amazon
317554.240.236.41/32 Amazon
317654.240.236.42/32 Amazon
317754.240.236.45/32 Amazon
317854.240.236.46/32 Amazon
317954.240.236.49/32 Amazon
318054.240.236.50/32 Amazon
318154.240.236.53/32 Amazon
318254.240.236.54/32 Amazon
318354.240.236.57/32 Amazon
318454.240.236.58/32 Amazon
318554.240.236.61/32 Amazon
318654.240.236.62/32 Amazon
318754.240.236.65/32 Amazon
318854.240.236.66/32 Amazon
318954.240.236.69/32 Amazon
319054.240.236.70/32 Amazon
319154.240.236.73/32 Amazon
319254.240.236.74/32 Amazon
319354.240.236.77/32 Amazon
319454.240.236.78/32 Amazon
319554.240.236.81/32 Amazon
319654.240.236.82/32 Amazon
319754.240.236.85/32 Amazon
319854.240.236.86/32 Amazon
319954.240.236.89/32 Amazon
320054.240.236.90/32 Amazon
320154.240.236.93/32 Amazon
320254.240.236.94/32 Amazon
320354.240.241.0/24 Amazon
320454.240.244.0/22 Amazon
320554.240.248.0/21 Amazon
320654.241.0.0/16 Amazon
320754.242.0.0/15 Amazon
320854.244.0.0/16 Amazon
320954.245.0.0/16 Amazon
321054.246.0.0/16 Amazon
321154.247.0.0/16 Amazon
321254.248.0.0/15 Amazon
321354.250.0.0/16 Amazon
321454.251.0.0/16 Amazon
321554.252.0.0/16 Amazon
321654.253.0.0/16 Amazon
321754.254.0.0/16 Amazon
321854.255.0.0/16 Amazon
321958.254.138.0/25 Amazon
322058.254.138.128/26 Amazon
322163.32.0.0/14 Amazon
322263.246.112.0/24 Amazon
322363.246.113.0/24 Amazon
322463.246.114.0/23 Amazon
322563.246.119.0/24 Amazon
322664.187.128.0/20 Amazon
322764.252.64.0/18 Amazon
322864.252.128.0/18 Amazon
322965.0.0.0/14 Amazon
323065.8.0.0/16 Amazon
323165.9.0.0/17 Amazon
323265.9.128.0/18 Amazon
323367.202.0.0/18 Amazon
323467.220.224.0/20 Amazon
323567.220.240.0/20 Amazon
323668.66.112.0/20 Amazon
323768.79.0.0/18 Amazon
323869.107.3.176/29 Amazon
323969.107.3.184/29 Amazon
324069.107.6.112/29 Amazon
324169.107.6.120/29 Amazon
324269.107.6.160/29 Amazon
324369.107.6.168/29 Amazon
324469.107.6.200/29 Amazon
324569.107.6.208/29 Amazon
324669.107.6.216/29 Amazon
324769.107.6.224/29 Amazon
324869.107.7.0/29 Amazon
324969.107.7.8/29 Amazon
325069.107.7.16/29 Amazon
325169.107.7.32/29 Amazon
325269.107.7.40/29 Amazon
325369.107.7.48/29 Amazon
325469.107.7.56/29 Amazon
325569.107.7.64/29 Amazon
325669.107.7.72/29 Amazon
325769.107.7.80/29 Amazon
325869.107.7.88/29 Amazon
325969.107.7.96/29 Amazon
326069.107.7.104/29 Amazon
326169.107.7.112/29 Amazon
326269.107.7.120/29 Amazon
326369.107.7.128/29 Amazon
326469.107.7.136/29 Amazon
326569.230.192.0/18 Amazon
326669.231.128.0/18 Amazon
326769.234.192.0/18 Amazon
326869.235.128.0/18 Amazon
326970.132.0.0/18 Amazon
327070.224.192.0/18 Amazon
327170.232.64.0/20 Amazon
327270.232.80.0/21 Amazon
327370.232.88.0/22 Amazon
327470.232.92.0/22 Amazon
327570.232.96.0/20 Amazon
327670.232.112.0/21 Amazon
327770.232.120.0/22 Amazon
327870.232.124.0/22 Amazon
327971.131.192.0/18 Amazon
328071.132.0.0/18 Amazon
328171.137.0.0/22 Amazon
328271.137.4.0/24 Amazon
328371.137.8.0/22 Amazon
328471.152.0.0/17 Amazon
328572.21.192.0/19 Amazon
328672.41.0.0/20 Amazon
328772.44.32.0/19 Amazon
328875.2.0.0/17 Amazon
328975.101.128.0/17 Amazon
329076.223.0.0/17 Amazon
329179.125.0.0/17 Amazon
329287.238.80.0/21 Amazon
329396.127.0.0/17 Amazon
329499.77.0.0/20 Amazon
329599.77.16.0/21 Amazon
329699.77.24.0/22 Amazon
329799.77.28.0/22 Amazon
329899.77.32.0/20 Amazon
329999.77.48.0/21 Amazon
330099.77.56.0/21 Amazon
330199.77.128.0/18 Amazon
330299.77.247.0/24 Amazon
330399.77.250.0/24 Amazon
330499.77.253.0/24 Amazon
330599.77.254.0/24 Amazon
330699.78.128.0/20 Amazon
330799.78.144.0/21 Amazon
330899.78.152.0/22 Amazon
330999.78.156.0/22 Amazon
331099.78.160.0/21 Amazon
331199.78.168.0/23 Amazon
331299.78.170.0/23 Amazon
331399.78.172.0/24 Amazon
331499.78.176.0/21 Amazon
331599.78.184.0/22 Amazon
331699.78.188.0/22 Amazon
331799.78.192.0/22 Amazon
331899.78.196.0/22 Amazon
331999.78.208.0/22 Amazon
332099.78.212.0/22 Amazon
332199.78.216.0/22 Amazon
332299.78.220.0/22 Amazon
332399.78.228.0/22 Amazon
332499.78.232.0/21 Amazon
332599.78.240.0/20 Amazon
332699.79.0.0/16 Amazon
332799.80.0.0/15 Amazon
332899.82.128.0/20 Amazon
332999.82.144.0/21 Amazon
333099.82.152.0/22 Amazon
333199.82.156.0/22 Amazon
333299.82.160.0/24 Amazon
333399.82.161.0/24 Amazon
333499.82.162.0/24 Amazon
333599.82.163.0/24 Amazon
333699.82.164.0/24 Amazon
333799.82.165.0/24 Amazon
333899.82.166.0/24 Amazon
333999.82.167.0/24 Amazon
334099.82.168.0/24 Amazon
334199.82.169.0/24 Amazon
334299.82.170.0/24 Amazon
334399.82.171.0/24 Amazon
334499.82.172.0/24 Amazon
334599.82.173.0/24 Amazon
334699.82.174.0/24 Amazon
334799.82.175.0/24 Amazon
334899.82.176.0/21 Amazon
334999.82.184.0/22 Amazon
335099.82.188.0/22 Amazon
335199.83.64.0/21 Amazon
335299.83.72.0/22 Amazon
335399.83.76.0/22 Amazon
335499.83.80.0/22 Amazon
335599.83.84.0/22 Amazon
335699.83.88.0/21 Amazon
335799.83.96.0/24 Amazon
335899.83.97.0/24 Amazon
335999.83.98.0/24 Amazon
336099.83.99.0/24 Amazon
336199.83.100.0/24 Amazon
336299.83.101.0/24 Amazon
336399.83.112.0/21 Amazon
336499.83.120.0/22 Amazon
336599.83.128.0/17 Amazon
336699.84.0.0/16 Amazon
336799.86.0.0/16 Amazon
336899.87.0.0/22 Amazon
336999.87.4.0/22 Amazon
337099.87.8.0/21 Amazon
337199.87.16.0/20 Amazon
337299.87.32.0/22 Amazon
337399.150.0.0/21 Amazon
337499.150.8.0/21 Amazon
337599.150.16.0/21 Amazon
337699.150.24.0/21 Amazon
337799.150.32.0/21 Amazon
337899.150.40.0/21 Amazon
337999.150.48.0/21 Amazon
338099.150.56.0/21 Amazon
338199.150.64.0/21 Amazon
338299.150.72.0/21 Amazon
338399.150.80.0/21 Amazon
338499.150.88.0/21 Amazon
338599.150.96.0/21 Amazon
338699.150.104.0/21 Amazon
338799.150.112.0/21 Amazon
338899.150.120.0/21 Amazon
338999.151.64.0/21 Amazon
339099.151.72.0/21 Amazon
339199.151.80.0/21 Amazon
339299.151.88.0/21 Amazon
339399.151.96.0/21 Amazon
339499.151.104.0/21 Amazon
339599.151.112.0/21 Amazon
339699.151.120.0/21 Amazon
339799.151.128.0/21 Amazon
339899.151.136.0/21 Amazon
339999.151.144.0/21 Amazon
3400100.20.0.0/14 Amazon
3401100.24.0.0/13 Amazon
3402103.4.8.0/21 Amazon
3403103.8.172.0/22 Amazon
3404103.246.148.0/23 Amazon
3405103.246.150.0/23 Amazon
3406104.255.56.11/32 Amazon
3407104.255.56.12/32 Amazon
3408104.255.59.81/32 Amazon
3409104.255.59.82/32 Amazon
3410104.255.59.83/32 Amazon
3411104.255.59.85/32 Amazon
3412104.255.59.86/32 Amazon
3413104.255.59.87/32 Amazon
3414104.255.59.88/32 Amazon
3415104.255.59.91/32 Amazon
3416104.255.59.101/32 Amazon
3417104.255.59.102/32 Amazon
3418104.255.59.103/32 Amazon
3419104.255.59.104/32 Amazon
3420104.255.59.105/32 Amazon
3421104.255.59.106/32 Amazon
3422104.255.59.114/32 Amazon
3423104.255.59.115/32 Amazon
3424104.255.59.118/32 Amazon
3425104.255.59.119/32 Amazon
3426104.255.59.122/32 Amazon
3427104.255.59.130/32 Amazon
3428104.255.59.131/32 Amazon
3429104.255.59.132/32 Amazon
3430104.255.59.133/32 Amazon
3431104.255.59.134/32 Amazon
3432104.255.59.135/32 Amazon
3433104.255.59.136/32 Amazon
3434104.255.59.137/32 Amazon
3435104.255.59.138/32 Amazon
3436104.255.59.139/32 Amazon
3437107.20.0.0/14 Amazon
3438107.176.0.0/15 Amazon
3439108.128.0.0/13 Amazon
3440108.136.0.0/15 Amazon
3441108.138.0.0/15 Amazon
3442108.156.0.0/14 Amazon
3443108.166.224.0/21 Amazon
3444108.166.232.0/21 Amazon
3445108.166.240.0/21 Amazon
3446108.166.248.0/21 Amazon
3447108.175.48.0/22 Amazon
3448108.175.52.0/22 Amazon
3449108.175.56.0/22 Amazon
3450108.175.60.0/22 Amazon
3451116.129.226.0/25 Amazon
3452116.129.226.128/26 Amazon
3453118.193.97.64/26 Amazon
3454118.193.97.128/25 Amazon
3455119.147.182.0/25 Amazon
3456119.147.182.128/26 Amazon
3457120.52.12.64/26 Amazon
3458120.52.22.96/27 Amazon
3459120.52.39.128/27 Amazon
3460120.52.153.192/26 Amazon
3461120.232.236.0/25 Amazon
3462120.232.236.128/26 Amazon
3463120.253.240.192/26 Amazon
3464120.253.241.160/27 Amazon
3465120.253.245.128/26 Amazon
3466120.253.245.192/27 Amazon
3467122.248.192.0/18 Amazon
3468130.176.0.0/17 Amazon
3469130.176.128.0/18 Amazon
3470130.176.192.0/19 Amazon
3471130.176.224.0/20 Amazon
3472130.176.254.0/24 Amazon
3473130.176.255.0/24 Amazon
3474140.179.0.0/16 Amazon
3475142.4.160.0/29 Amazon
3476142.4.160.8/29 Amazon
3477142.4.160.16/29 Amazon
3478142.4.160.24/29 Amazon
3479142.4.160.32/29 Amazon
3480142.4.160.40/29 Amazon
3481142.4.160.48/29 Amazon
3482142.4.160.56/29 Amazon
3483142.4.160.64/29 Amazon
3484142.4.160.72/29 Amazon
3485142.4.160.80/29 Amazon
3486142.4.160.88/29 Amazon
3487142.4.160.96/29 Amazon
3488142.4.160.104/29 Amazon
3489142.4.160.112/29 Amazon
3490143.204.0.0/16 Amazon
3491144.220.0.0/16 Amazon
3492150.222.0.16/32 Amazon
3493150.222.0.17/32 Amazon
3494150.222.0.18/32 Amazon
3495150.222.0.19/32 Amazon
3496150.222.2.0/24 Amazon
3497150.222.3.176/32 Amazon
3498150.222.3.177/32 Amazon
3499150.222.3.178/32 Amazon
3500150.222.3.179/32 Amazon
3501150.222.3.180/32 Amazon
3502150.222.3.181/32 Amazon
3503150.222.3.182/32 Amazon
3504150.222.3.183/32 Amazon
3505150.222.3.184/32 Amazon
3506150.222.3.185/32 Amazon
3507150.222.3.186/32 Amazon
3508150.222.3.187/32 Amazon
3509150.222.3.188/32 Amazon
3510150.222.3.189/32 Amazon
3511150.222.3.190/32 Amazon
3512150.222.3.191/32 Amazon
3513150.222.3.192/31 Amazon
3514150.222.3.194/31 Amazon
3515150.222.3.196/31 Amazon
3516150.222.3.198/31 Amazon
3517150.222.3.200/31 Amazon
3518150.222.3.202/31 Amazon
3519150.222.3.204/31 Amazon
3520150.222.3.206/31 Amazon
3521150.222.3.208/31 Amazon
3522150.222.3.210/31 Amazon
3523150.222.3.212/31 Amazon
3524150.222.3.214/31 Amazon
3525150.222.3.216/31 Amazon
3526150.222.3.218/31 Amazon
3527150.222.3.220/31 Amazon
3528150.222.3.222/31 Amazon
3529150.222.3.224/31 Amazon
3530150.222.3.226/31 Amazon
3531150.222.3.228/31 Amazon
3532150.222.3.230/31 Amazon
3533150.222.3.232/31 Amazon
3534150.222.3.234/31 Amazon
3535150.222.3.236/31 Amazon
3536150.222.3.238/31 Amazon
3537150.222.3.240/31 Amazon
3538150.222.3.242/31 Amazon
3539150.222.3.244/31 Amazon
3540150.222.3.246/31 Amazon
3541150.222.3.248/31 Amazon
3542150.222.3.250/31 Amazon
3543150.222.3.252/31 Amazon
3544150.222.3.254/31 Amazon
3545150.222.5.0/24 Amazon
3546150.222.6.0/24 Amazon
3547150.222.7.0/24 Amazon
3548150.222.10.0/24 Amazon
3549150.222.11.0/31 Amazon
3550150.222.11.74/31 Amazon
3551150.222.11.76/31 Amazon
3552150.222.11.78/31 Amazon
3553150.222.11.80/31 Amazon
3554150.222.11.84/31 Amazon
3555150.222.11.86/31 Amazon
3556150.222.11.88/31 Amazon
3557150.222.11.90/31 Amazon
3558150.222.11.92/31 Amazon
3559150.222.11.94/31 Amazon
3560150.222.11.96/31 Amazon
3561150.222.12.0/24 Amazon
3562150.222.13.0/24 Amazon
3563150.222.14.72/31 Amazon
3564150.222.15.124/32 Amazon
3565150.222.15.125/32 Amazon
3566150.222.15.126/32 Amazon
3567150.222.15.127/32 Amazon
3568150.222.15.128/31 Amazon
3569150.222.15.130/31 Amazon
3570150.222.28.17/32 Amazon
3571150.222.28.18/31 Amazon
3572150.222.28.104/32 Amazon
3573150.222.28.105/32 Amazon
3574150.222.28.106/31 Amazon
3575150.222.28.108/31 Amazon
3576150.222.28.110/31 Amazon
3577150.222.28.112/31 Amazon
3578150.222.28.114/31 Amazon
3579150.222.28.116/31 Amazon
3580150.222.28.118/31 Amazon
3581150.222.28.120/31 Amazon
3582150.222.28.122/31 Amazon
3583150.222.28.124/31 Amazon
3584150.222.28.126/31 Amazon
3585150.222.28.128/31 Amazon
3586150.222.28.130/31 Amazon
3587150.222.28.132/31 Amazon
3588150.222.28.134/31 Amazon
3589150.222.28.136/31 Amazon
3590150.222.28.138/31 Amazon
3591150.222.28.140/31 Amazon
3592150.222.28.142/31 Amazon
3593150.222.66.0/24 Amazon
3594150.222.67.0/24 Amazon
3595150.222.69.0/24 Amazon
3596150.222.70.0/24 Amazon
3597150.222.71.0/24 Amazon
3598150.222.72.0/24 Amazon
3599150.222.73.0/24 Amazon
3600150.222.74.0/24 Amazon
3601150.222.75.0/24 Amazon
3602150.222.76.0/24 Amazon
3603150.222.77.0/24 Amazon
3604150.222.78.0/24 Amazon
3605150.222.79.0/24 Amazon
3606150.222.80.0/24 Amazon
3607150.222.81.0/24 Amazon
3608150.222.82.0/24 Amazon
3609150.222.83.0/24 Amazon
3610150.222.84.0/24 Amazon
3611150.222.85.0/24 Amazon
3612150.222.87.0/24 Amazon
3613150.222.88.0/24 Amazon
3614150.222.89.0/24 Amazon
3615150.222.90.0/24 Amazon
3616150.222.91.0/24 Amazon
3617150.222.92.0/22 Amazon
3618150.222.96.0/24 Amazon
3619150.222.97.0/24 Amazon
3620150.222.98.0/24 Amazon
3621150.222.99.0/24 Amazon
3622150.222.100.0/24 Amazon
3623150.222.101.0/24 Amazon
3624150.222.102.0/24 Amazon
3625150.222.104.0/24 Amazon
3626150.222.105.0/24 Amazon
3627150.222.106.0/24 Amazon
3628150.222.108.0/24 Amazon
3629150.222.109.0/24 Amazon
3630150.222.110.0/24 Amazon
3631150.222.112.0/24 Amazon
3632150.222.113.0/24 Amazon
3633150.222.114.0/24 Amazon
3634150.222.115.0/24 Amazon
3635150.222.116.0/24 Amazon
3636150.222.117.0/24 Amazon
3637150.222.118.0/24 Amazon
3638150.222.119.0/24 Amazon
3639150.222.120.20/31 Amazon
3640150.222.120.62/31 Amazon
3641150.222.120.224/31 Amazon
3642150.222.120.226/31 Amazon
3643150.222.120.228/31 Amazon
3644150.222.120.230/31 Amazon
3645150.222.120.232/31 Amazon
3646150.222.120.234/31 Amazon
3647150.222.120.240/31 Amazon
3648150.222.120.242/31 Amazon
3649150.222.120.244/31 Amazon
3650150.222.120.246/31 Amazon
3651150.222.120.248/31 Amazon
3652150.222.120.250/31 Amazon
3653150.222.120.252/32 Amazon
3654150.222.120.255/32 Amazon
3655150.222.121.0/24 Amazon
3656150.222.122.92/31 Amazon
3657150.222.122.94/31 Amazon
3658150.222.122.96/31 Amazon
3659150.222.122.98/31 Amazon
3660150.222.122.100/31 Amazon
3661150.222.122.102/31 Amazon
3662150.222.122.104/31 Amazon
3663150.222.122.106/31 Amazon
3664150.222.122.108/31 Amazon
3665150.222.122.110/31 Amazon
3666150.222.122.112/31 Amazon
3667150.222.122.114/31 Amazon
3668150.222.122.116/31 Amazon
3669150.222.129.19/32 Amazon
3670150.222.129.20/31 Amazon
3671150.222.129.62/31 Amazon
3672150.222.129.64/31 Amazon
3673150.222.129.66/31 Amazon
3674150.222.129.69/32 Amazon
3675150.222.129.110/31 Amazon
3676150.222.129.112/31 Amazon
3677150.222.129.114/31 Amazon
3678150.222.129.116/31 Amazon
3679150.222.129.118/31 Amazon
3680150.222.129.120/31 Amazon
3681150.222.129.122/31 Amazon
3682150.222.129.124/31 Amazon
3683150.222.129.126/31 Amazon
3684150.222.129.128/31 Amazon
3685150.222.129.130/31 Amazon
3686150.222.129.132/31 Amazon
3687150.222.129.134/31 Amazon
3688150.222.129.136/31 Amazon
3689150.222.129.138/31 Amazon
3690150.222.129.140/31 Amazon
3691150.222.129.142/31 Amazon
3692150.222.129.144/31 Amazon
3693150.222.129.146/31 Amazon
3694150.222.129.152/31 Amazon
3695150.222.129.154/31 Amazon
3696150.222.129.156/31 Amazon
3697150.222.129.158/31 Amazon
3698150.222.129.240/31 Amazon
3699150.222.129.242/31 Amazon
3700150.222.129.244/31 Amazon
3701150.222.129.246/31 Amazon
3702150.222.129.248/31 Amazon
3703150.222.129.250/31 Amazon
3704150.222.129.252/32 Amazon
3705150.222.129.255/32 Amazon
3706150.222.133.0/24 Amazon
3707150.222.134.0/24 Amazon
3708150.222.135.0/24 Amazon
3709150.222.136.0/24 Amazon
3710150.222.138.0/24 Amazon
3711150.222.139.116/30 Amazon
3712150.222.139.120/30 Amazon
3713150.222.139.124/30 Amazon
3714150.222.140.0/24 Amazon
3715150.222.141.0/24 Amazon
3716150.222.142.0/24 Amazon
3717150.222.143.0/24 Amazon
3718150.222.164.208/31 Amazon
3719150.222.164.210/32 Amazon
3720150.222.164.211/32 Amazon
3721150.222.164.220/31 Amazon
3722150.222.164.222/32 Amazon
3723150.222.176.0/22 Amazon
3724150.222.180.0/24 Amazon
3725150.222.196.0/24 Amazon
3726150.222.199.0/25 Amazon
3727150.222.202.0/24 Amazon
3728150.222.203.0/24 Amazon
3729150.222.204.0/24 Amazon
3730150.222.205.0/24 Amazon
3731150.222.206.0/24 Amazon
3732150.222.207.0/24 Amazon
3733150.222.208.64/32 Amazon
3734150.222.208.65/32 Amazon
3735150.222.208.66/31 Amazon
3736150.222.208.68/31 Amazon
3737150.222.208.70/31 Amazon
3738150.222.208.72/31 Amazon
3739150.222.208.74/31 Amazon
3740150.222.208.76/31 Amazon
3741150.222.208.78/31 Amazon
3742150.222.208.80/31 Amazon
3743150.222.208.82/31 Amazon
3744150.222.208.84/31 Amazon
3745150.222.208.86/31 Amazon
3746150.222.208.88/31 Amazon
3747150.222.208.90/31 Amazon
3748150.222.208.92/31 Amazon
3749150.222.208.94/31 Amazon
3750150.222.208.96/31 Amazon
3751150.222.210.0/24 Amazon
3752150.222.212.0/24 Amazon
3753150.222.213.40/32 Amazon
3754150.222.213.41/32 Amazon
3755150.222.214.0/24 Amazon
3756150.222.215.0/24 Amazon
3757150.222.217.17/32 Amazon
3758150.222.217.226/31 Amazon
3759150.222.217.228/30 Amazon
3760150.222.217.232/31 Amazon
3761150.222.217.234/31 Amazon
3762150.222.217.248/31 Amazon
3763150.222.217.250/31 Amazon
3764150.222.218.0/24 Amazon
3765150.222.219.0/24 Amazon
3766150.222.220.0/24 Amazon
3767150.222.221.0/24 Amazon
3768150.222.222.0/24 Amazon
3769150.222.223.0/24 Amazon
3770150.222.224.0/24 Amazon
3771150.222.226.0/24 Amazon
3772150.222.227.0/24 Amazon
3773150.222.228.0/24 Amazon
3774150.222.229.0/24 Amazon
3775150.222.230.92/32 Amazon
3776150.222.230.93/32 Amazon
3777150.222.230.94/31 Amazon
3778150.222.230.96/31 Amazon
3779150.222.230.98/31 Amazon
3780150.222.230.100/31 Amazon
3781150.222.230.102/31 Amazon
3782150.222.230.104/31 Amazon
3783150.222.230.106/31 Amazon
3784150.222.230.108/31 Amazon
3785150.222.230.110/31 Amazon
3786150.222.230.112/31 Amazon
3787150.222.230.114/31 Amazon
3788150.222.230.116/31 Amazon
3789150.222.230.118/31 Amazon
3790150.222.230.120/31 Amazon
3791150.222.230.122/31 Amazon
3792150.222.230.124/31 Amazon
3793150.222.231.0/24 Amazon
3794150.222.232.51/32 Amazon
3795150.222.232.88/32 Amazon
3796150.222.232.94/31 Amazon
3797150.222.232.96/28 Amazon
3798150.222.232.112/31 Amazon
3799150.222.232.114/31 Amazon
3800150.222.232.116/31 Amazon
3801150.222.232.118/31 Amazon
3802150.222.232.120/31 Amazon
3803150.222.233.0/24 Amazon
3804150.222.234.0/32 Amazon
3805150.222.234.1/32 Amazon
3806150.222.234.2/32 Amazon
3807150.222.234.3/32 Amazon
3808150.222.234.4/32 Amazon
3809150.222.234.5/32 Amazon
3810150.222.234.6/31 Amazon
3811150.222.234.8/31 Amazon
3812150.222.234.10/31 Amazon
3813150.222.234.12/31 Amazon
3814150.222.234.14/31 Amazon
3815150.222.234.16/31 Amazon
3816150.222.234.18/31 Amazon
3817150.222.234.20/31 Amazon
3818150.222.234.22/31 Amazon
3819150.222.234.24/31 Amazon
3820150.222.234.26/31 Amazon
3821150.222.234.28/31 Amazon
3822150.222.234.30/31 Amazon
3823150.222.234.32/31 Amazon
3824150.222.234.34/31 Amazon
3825150.222.234.36/31 Amazon
3826150.222.234.38/31 Amazon
3827150.222.234.40/31 Amazon
3828150.222.234.42/31 Amazon
3829150.222.234.44/31 Amazon
3830150.222.234.46/31 Amazon
3831150.222.234.48/31 Amazon
3832150.222.234.50/31 Amazon
3833150.222.234.52/31 Amazon
3834150.222.234.54/31 Amazon
3835150.222.234.56/31 Amazon
3836150.222.234.58/31 Amazon
3837150.222.234.60/31 Amazon
3838150.222.234.62/31 Amazon
3839150.222.234.64/31 Amazon
3840150.222.234.66/31 Amazon
3841150.222.234.68/31 Amazon
3842150.222.234.70/31 Amazon
3843150.222.234.72/31 Amazon
3844150.222.234.74/31 Amazon
3845150.222.234.76/31 Amazon
3846150.222.234.78/31 Amazon
3847150.222.234.80/31 Amazon
3848150.222.234.82/31 Amazon
3849150.222.234.84/31 Amazon
3850150.222.234.86/31 Amazon
3851150.222.234.96/31 Amazon
3852150.222.234.98/31 Amazon
3853150.222.234.100/31 Amazon
3854150.222.234.102/32 Amazon
3855150.222.234.103/32 Amazon
3856150.222.234.104/31 Amazon
3857150.222.234.106/31 Amazon
3858150.222.234.108/31 Amazon
3859150.222.234.110/31 Amazon
3860150.222.234.112/31 Amazon
3861150.222.234.114/31 Amazon
3862150.222.234.116/31 Amazon
3863150.222.234.118/31 Amazon
3864150.222.234.120/31 Amazon
3865150.222.234.122/31 Amazon
3866150.222.234.124/31 Amazon
3867150.222.234.126/31 Amazon
3868150.222.234.128/31 Amazon
3869150.222.234.130/31 Amazon
3870150.222.234.132/31 Amazon
3871150.222.234.134/31 Amazon
3872150.222.234.136/31 Amazon
3873150.222.234.138/31 Amazon
3874150.222.234.140/31 Amazon
3875150.222.234.142/31 Amazon
3876150.222.235.0/24 Amazon
3877150.222.236.0/24 Amazon
3878150.222.237.0/24 Amazon
3879150.222.239.0/24 Amazon
3880150.222.240.131/32 Amazon
3881150.222.240.135/32 Amazon
3882150.222.240.137/32 Amazon
3883150.222.240.161/32 Amazon
3884150.222.240.207/32 Amazon
3885150.222.240.237/32 Amazon
3886150.222.240.245/32 Amazon
3887150.222.240.247/32 Amazon
3888150.222.240.249/32 Amazon
3889150.222.240.251/32 Amazon
3890150.222.242.84/31 Amazon
3891150.222.242.97/32 Amazon
3892150.222.242.99/32 Amazon
3893150.222.242.214/31 Amazon
3894150.222.242.227/32 Amazon
3895150.222.242.229/32 Amazon
3896150.222.242.231/32 Amazon
3897150.222.242.233/32 Amazon
3898150.222.243.9/32 Amazon
3899150.222.243.11/32 Amazon
3900150.222.243.13/32 Amazon
3901150.222.243.15/32 Amazon
3902150.222.243.17/32 Amazon
3903150.222.243.19/32 Amazon
3904150.222.243.33/32 Amazon
3905150.222.243.35/32 Amazon
3906150.222.243.37/32 Amazon
3907150.222.243.39/32 Amazon
3908150.222.243.41/32 Amazon
3909150.222.243.43/32 Amazon
3910150.222.243.45/32 Amazon
3911150.222.243.47/32 Amazon
3912150.222.243.51/32 Amazon
3913150.222.243.53/32 Amazon
3914150.222.243.55/32 Amazon
3915150.222.243.57/32 Amazon
3916150.222.243.59/32 Amazon
3917150.222.243.177/32 Amazon
3918150.222.244.35/32 Amazon
3919150.222.244.37/32 Amazon
3920150.222.245.122/31 Amazon
3921150.222.252.244/31 Amazon
3922150.222.252.246/31 Amazon
3923150.222.252.248/31 Amazon
3924150.222.252.250/31 Amazon
3925157.175.0.0/16 Amazon
3926157.241.0.0/16 Amazon
3927160.1.0.0/16 Amazon
3928161.188.128.0/23 Amazon
3929161.188.130.0/23 Amazon
3930161.188.132.0/23 Amazon
3931161.188.134.0/23 Amazon
3932161.188.136.0/23 Amazon
3933161.188.138.0/23 Amazon
3934161.188.140.0/23 Amazon
3935161.188.142.0/23 Amazon
3936161.188.144.0/23 Amazon
3937161.188.146.0/23 Amazon
3938161.188.148.0/23 Amazon
3939161.188.150.0/23 Amazon
3940161.188.152.0/23 Amazon
3941161.188.154.0/23 Amazon
3942161.188.156.0/23 Amazon
3943161.188.158.0/23 Amazon
3944161.188.160.0/23 Amazon
3945161.189.0.0/16 Amazon
3946162.213.232.0/24 Amazon
3947162.213.233.0/24 Amazon
3948162.213.234.0/23 Amazon
3949162.222.148.0/22 Amazon
3950162.250.236.0/24 Amazon
3951162.250.237.0/24 Amazon
3952162.250.238.0/23 Amazon
3953172.96.97.0/24 Amazon
3954172.96.98.0/24 Amazon
3955172.96.110.0/24 Amazon
3956174.129.0.0/16 Amazon
3957175.41.128.0/18 Amazon
3958175.41.192.0/18 Amazon
3959176.32.64.0/19 Amazon
3960176.32.96.0/21 Amazon
3961176.32.104.0/21 Amazon
3962176.32.112.0/21 Amazon
3963176.32.120.0/22 Amazon
3964176.32.124.128/25 Amazon
3965176.32.125.0/25 Amazon
3966176.32.125.128/26 Amazon
3967176.32.125.192/27 Amazon
3968176.32.125.224/31 Amazon
3969176.32.125.226/31 Amazon
3970176.32.125.228/31 Amazon
3971176.32.125.230/31 Amazon
3972176.32.125.232/31 Amazon
3973176.32.125.234/31 Amazon
3974176.32.125.236/31 Amazon
3975176.32.125.238/31 Amazon
3976176.32.125.240/31 Amazon
3977176.32.125.242/31 Amazon
3978176.32.125.244/31 Amazon
3979176.32.125.246/31 Amazon
3980176.32.125.248/31 Amazon
3981176.32.125.250/31 Amazon
3982176.32.125.252/31 Amazon
3983176.32.125.254/31 Amazon
3984176.34.0.0/19 Amazon
3985176.34.32.0/19 Amazon
3986176.34.64.0/18 Amazon
3987176.34.128.0/17 Amazon
3988177.71.128.0/17 Amazon
3989177.72.240.0/21 Amazon
3990178.236.0.0/20 Amazon
3991180.163.57.0/25 Amazon
3992180.163.57.128/26 Amazon
3993184.72.0.0/18 Amazon
3994184.72.64.0/18 Amazon
3995184.72.128.0/17 Amazon
3996184.73.0.0/16 Amazon
3997184.169.128.0/17 Amazon
3998185.48.120.0/22 Amazon
3999185.143.16.0/24 Amazon
4000195.17.0.0/24 Amazon
4001198.99.2.0/24 Amazon
4002199.127.232.0/22 Amazon
4003203.83.220.0/22 Amazon
4004204.45.0.0/16 Amazon
4005204.236.128.0/18 Amazon
4006204.236.192.0/18 Amazon
4007204.246.160.0/22 Amazon
4008204.246.164.0/22 Amazon
4009204.246.168.0/22 Amazon
4010204.246.172.0/24 Amazon
4011204.246.173.0/24 Amazon
4012204.246.174.0/23 Amazon
4013204.246.176.0/20 Amazon
4014205.251.192.0/21 Amazon
4015205.251.200.0/21 Amazon
4016205.251.208.0/20 Amazon
4017205.251.224.0/22 Amazon
4018205.251.228.0/22 Amazon
4019205.251.232.0/22 Amazon
4020205.251.236.0/22 Amazon
4021205.251.240.0/22 Amazon
4022205.251.244.0/23 Amazon
4023205.251.246.0/24 Amazon
4024205.251.247.0/24 Amazon
4025205.251.248.0/24 Amazon
4026205.251.249.0/24 Amazon
4027205.251.250.0/23 Amazon
4028205.251.252.0/23 Amazon
4029205.251.254.0/24 Amazon
4030207.171.160.0/20 Amazon
4031207.171.176.0/20 Amazon
4032208.86.88.0/23 Amazon
4033208.86.90.0/23 Amazon
4034208.110.48.0/20 Amazon
4035209.54.176.0/21 Amazon
4036209.54.184.0/21 Amazon
4037216.137.32.0/19 Amazon
4038216.182.224.0/21 Amazon
4039216.182.232.0/22 Amazon
4040216.182.236.0/23 Amazon
4041216.182.238.0/23 Amazon
4042223.71.11.0/27 Amazon
4043223.71.71.96/27 Amazon
4044223.71.71.128/25 Amazon
diff --git a/src/fnettrace/tail.c b/src/fnettrace/tail.c
new file mode 100644
index 000000000..a910788d6
--- /dev/null
+++ b/src/fnettrace/tail.c
@@ -0,0 +1,63 @@
1/*
2 * Copyright (C) 2014-2022 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20#include "fnettrace.h"
21
22void tail(const char *logfile) {
23 assert(logfile);
24
25 // wait for no more than 5 seconds for the logfile to appear in the filesystem
26 int cnt = 5;
27 while (access(logfile, R_OK) && cnt > 0)
28 cnt--;
29 if (cnt == 0)
30 exit(1);
31
32 off_t last_size = 0;
33
34 while (1) {
35 int fd = open(logfile, O_RDONLY);
36 if (fd == -1)
37 return;
38
39 off_t size = lseek(fd, 0, SEEK_END);
40 if (size < 0) {
41 close(fd);
42 return;
43 }
44
45 char *content = NULL;
46 int mmapped = 0;
47 if (size && size != last_size) {
48 content = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
49 close(fd);
50 if (content != MAP_FAILED)
51 mmapped = 1;
52 }
53
54 if (mmapped) {
55 printf("%.*s", (int) (size - last_size), content + last_size);
56 fflush(0);
57 munmap(content, size);
58 last_size = size;
59 }
60
61 sleep(1);
62 }
63}
diff --git a/src/fsec-optimize/fsec_optimize.h b/src/fsec-optimize/fsec_optimize.h
index fc9dd7db8..2a77f69aa 100644
--- a/src/fsec-optimize/fsec_optimize.h
+++ b/src/fsec-optimize/fsec_optimize.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fsec-optimize/main.c b/src/fsec-optimize/main.c
index 84bf2d4f9..ec3420e16 100644
--- a/src/fsec-optimize/main.c
+++ b/src/fsec-optimize/main.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fsec-optimize/optimizer.c b/src/fsec-optimize/optimizer.c
index 4c02de59d..20333a8a8 100644
--- a/src/fsec-optimize/optimizer.c
+++ b/src/fsec-optimize/optimizer.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fsec-print/fsec_print.h b/src/fsec-print/fsec_print.h
index 75a82c11a..a754e2295 100644
--- a/src/fsec-print/fsec_print.h
+++ b/src/fsec-print/fsec_print.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fsec-print/main.c b/src/fsec-print/main.c
index 5bca93d50..039377999 100644
--- a/src/fsec-print/main.c
+++ b/src/fsec-print/main.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fsec-print/print.c b/src/fsec-print/print.c
index 143a7a53e..f6af20f04 100644
--- a/src/fsec-print/print.c
+++ b/src/fsec-print/print.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fseccomp/fseccomp.h b/src/fseccomp/fseccomp.h
index 97eac9ed8..65337da2a 100644
--- a/src/fseccomp/fseccomp.h
+++ b/src/fseccomp/fseccomp.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fseccomp/main.c b/src/fseccomp/main.c
index 326c29a44..48665ab71 100644
--- a/src/fseccomp/main.c
+++ b/src/fseccomp/main.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fseccomp/protocol.c b/src/fseccomp/protocol.c
index 48dda61dd..25742c173 100644
--- a/src/fseccomp/protocol.c
+++ b/src/fseccomp/protocol.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fseccomp/seccomp.c b/src/fseccomp/seccomp.c
index 99e671799..49b789755 100644
--- a/src/fseccomp/seccomp.c
+++ b/src/fseccomp/seccomp.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fseccomp/seccomp_file.c b/src/fseccomp/seccomp_file.c
index 846c7f335..ee18ca74f 100644
--- a/src/fseccomp/seccomp_file.c
+++ b/src/fseccomp/seccomp_file.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fseccomp/seccomp_secondary.c b/src/fseccomp/seccomp_secondary.c
index 540892026..d4ccd96b2 100644
--- a/src/fseccomp/seccomp_secondary.c
+++ b/src/fseccomp/seccomp_secondary.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/fshaper/fshaper.sh b/src/fshaper/fshaper.sh
index f9a6c4f06..a8379612d 100755
--- a/src/fshaper/fshaper.sh
+++ b/src/fshaper/fshaper.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6TCFILE="" 6TCFILE=""
diff --git a/src/ftee/ftee.h b/src/ftee/ftee.h
index a556efb75..458308a4c 100644
--- a/src/ftee/ftee.h
+++ b/src/ftee/ftee.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/ftee/main.c b/src/ftee/main.c
index 4d447f2c4..d408566fa 100644
--- a/src/ftee/main.c
+++ b/src/ftee/main.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/include/common.h b/src/include/common.h
index 5bcbaad88..c9640435a 100644
--- a/src/include/common.h
+++ b/src/include/common.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -73,6 +73,25 @@ static inline int atoip(const char *str, uint32_t *ip) {
73 return 0; 73 return 0;
74} 74}
75 75
76// read an IPv4 address in CIDR format, for example 192.168.1.0/24
77static inline int atocidr(const char *str, uint32_t *ip, uint32_t *mask) {
78 unsigned a, b, c, d, e;
79
80 // extract ip
81 int rv = sscanf(str, "%u.%u.%u.%u/%u", &a, &b, &c, &d, &e);
82 if (rv != 5 || a > 255 || b > 255 || c > 255 || d > 255 || e > 32)
83 return 1;
84 *ip = a * 0x1000000 + b * 0x10000 + c * 0x100 + d;
85
86 // extract mask
87 uint32_t tmp;
88 unsigned i;
89 for (i = 0, *mask = 0, tmp = 0x80000000; i < e; i++, tmp >>= 1) {
90 *mask |= tmp;
91 }
92 return 0;
93}
94
76// verify an ip address is in the network range given by ifip and mask 95// verify an ip address is in the network range given by ifip and mask
77static inline char *in_netrange(uint32_t ip, uint32_t ifip, uint32_t ifmask) { 96static inline char *in_netrange(uint32_t ip, uint32_t ifip, uint32_t ifmask) {
78 if ((ip & ifmask) != (ifip & ifmask)) 97 if ((ip & ifmask) != (ifip & ifmask))
@@ -121,6 +140,12 @@ char *pid_proc_comm(const pid_t pid);
121char *pid_proc_cmdline(const pid_t pid); 140char *pid_proc_cmdline(const pid_t pid);
122int pid_proc_cmdline_x11_xpra_xephyr(const pid_t pid); 141int pid_proc_cmdline_x11_xpra_xephyr(const pid_t pid);
123int pid_hidepid(void); 142int pid_hidepid(void);
143char *do_replace_cntrl_chars(char *str, char c);
144char *replace_cntrl_chars(const char *str, char c);
145int has_cntrl_chars(const char *str);
146void reject_cntrl_chars(const char *fname);
147void reject_meta_chars(const char *fname, int globbing);
124void warn_dumpable(void); 148void warn_dumpable(void);
125const char *gnu_basename(const char *path); 149const char *gnu_basename(const char *path);
150int *str_to_int_array(const char *str, size_t *sz);
126#endif 151#endif
diff --git a/src/include/euid_common.h b/src/include/euid_common.h
index 8d8dd95f6..f40cbb9de 100644
--- a/src/include/euid_common.h
+++ b/src/include/euid_common.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/include/firejail_user.h b/src/include/firejail_user.h
index cf17fa0cf..6cf895db8 100644
--- a/src/include/firejail_user.h
+++ b/src/include/firejail_user.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/include/gcov_wrapper.h b/src/include/gcov_wrapper.h
new file mode 100644
index 000000000..144181ca0
--- /dev/null
+++ b/src/include/gcov_wrapper.h
@@ -0,0 +1,46 @@
1/*
2 * Copyright (C) 2022 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef GCOV_WRAPPER_H
22#define GCOV_WRAPPER_H
23
24#ifdef HAS_GCOV
25#include <gcov.h>
26
27/*
28 * __gcov_flush was removed on gcc 11.1.0 (as it's no longer needed), but it
29 * appears to be the safe/"correct" way to do things on previous versions (as
30 * it ensured proper locking, which is now done elsewhere). Thus, keep using
31 * it in the code and ensure that it exists, in order to support gcc <11.1.0
32 * and gcc >=11.1.0, respectively.
33 */
34#if __GNUC__ > 11 || (__GNUC__ == 11 && __GNUC_MINOR__ >= 1)
35static void __gcov_flush(void) {
36 __gcov_dump();
37 __gcov_reset();
38}
39#endif
40#else
41#define __gcov_dump() ((void)0)
42#define __gcov_reset() ((void)0)
43#define __gcov_flush() ((void)0)
44#endif /* HAS_GCOV */
45
46#endif /* GCOV_WRAPPER_H */
diff --git a/src/include/ldd_utils.h b/src/include/ldd_utils.h
index ffd6e189f..e9dac1171 100644
--- a/src/include/ldd_utils.h
+++ b/src/include/ldd_utils.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/include/pid.h b/src/include/pid.h
index 17e51f660..7e235b713 100644
--- a/src/include/pid.h
+++ b/src/include/pid.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/include/rundefs.h b/src/include/rundefs.h
index d14f6782f..4ba3e27f4 100644
--- a/src/include/rundefs.h
+++ b/src/include/rundefs.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -79,24 +79,8 @@
79#define PATH_SECCOMP_MDWX_32 LIBDIR "/firejail/seccomp.mdwx.32" 79#define PATH_SECCOMP_MDWX_32 LIBDIR "/firejail/seccomp.mdwx.32"
80#define PATH_SECCOMP_BLOCK_SECONDARY LIBDIR "/firejail/seccomp.block_secondary" // secondary arch blocking filter built during make 80#define PATH_SECCOMP_BLOCK_SECONDARY LIBDIR "/firejail/seccomp.block_secondary" // secondary arch blocking filter built during make
81 81
82
83#define RUN_DEV_DIR RUN_MNT_DIR "/dev" 82#define RUN_DEV_DIR RUN_MNT_DIR "/dev"
84#define RUN_DEVLOG_FILE RUN_MNT_DIR "/devlog" 83#define RUN_DEVLOG_FILE RUN_MNT_DIR "/devlog"
85
86#define RUN_WHITELIST_X11_DIR RUN_MNT_DIR "/orig-x11"
87#define RUN_WHITELIST_HOME_USER_DIR RUN_MNT_DIR "/orig-home-user" // home directory whitelisting
88#define RUN_WHITELIST_RUN_USER_DIR RUN_MNT_DIR "/orig-run-user" // run directory whitelisting
89#define RUN_WHITELIST_TMP_DIR RUN_MNT_DIR "/orig-tmp"
90#define RUN_WHITELIST_MEDIA_DIR RUN_MNT_DIR "/orig-media"
91#define RUN_WHITELIST_MNT_DIR RUN_MNT_DIR "/orig-mnt"
92#define RUN_WHITELIST_VAR_DIR RUN_MNT_DIR "/orig-var"
93#define RUN_WHITELIST_DEV_DIR RUN_MNT_DIR "/orig-dev"
94#define RUN_WHITELIST_OPT_DIR RUN_MNT_DIR "/orig-opt"
95#define RUN_WHITELIST_SRV_DIR RUN_MNT_DIR "/orig-srv"
96#define RUN_WHITELIST_ETC_DIR RUN_MNT_DIR "/orig-etc"
97#define RUN_WHITELIST_SHARE_DIR RUN_MNT_DIR "/orig-share"
98#define RUN_WHITELIST_MODULE_DIR RUN_MNT_DIR "/orig-module"
99
100#define RUN_XAUTHORITY_FILE RUN_MNT_DIR "/.Xauthority" // private options 84#define RUN_XAUTHORITY_FILE RUN_MNT_DIR "/.Xauthority" // private options
101#define RUN_XAUTH_FILE RUN_MNT_DIR "/xauth" // x11=xorg 85#define RUN_XAUTH_FILE RUN_MNT_DIR "/xauth" // x11=xorg
102#define RUN_XAUTHORITY_SEC_DIR RUN_MNT_DIR "/.sec.Xauthority" // x11=xorg 86#define RUN_XAUTHORITY_SEC_DIR RUN_MNT_DIR "/.sec.Xauthority" // x11=xorg
diff --git a/src/include/seccomp.h b/src/include/seccomp.h
index 43bb73a04..9dbe25bfa 100644
--- a/src/include/seccomp.h
+++ b/src/include/seccomp.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/include/syscall.h b/src/include/syscall.h
index 015dd01b9..68be16a04 100644
--- a/src/include/syscall.h
+++ b/src/include/syscall.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/jailtest/Makefile.in b/src/jailcheck/Makefile.in
index 6306d24ec..d218c1f90 100644
--- a/src/jailtest/Makefile.in
+++ b/src/jailcheck/Makefile.in
@@ -1,16 +1,16 @@
1.PHONY: all 1.PHONY: all
2all: jailtest 2all: jailcheck
3 3
4include ../common.mk 4include ../common.mk
5 5
6%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/pid.h 6%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/pid.h
7 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@ 7 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@
8 8
9jailtest: $(OBJS) 9jailcheck: $(OBJS)
10 $(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o ../lib/pid.o $(LIBS) $(EXTRA_LDFLAGS) 10 $(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o ../lib/pid.o $(LIBS) $(EXTRA_LDFLAGS)
11 11
12.PHONY: clean 12.PHONY: clean
13clean:; rm -fr *.o jailtest *.gcov *.gcda *.gcno *.plist 13clean:; rm -fr *.o jailcheck *.gcov *.gcda *.gcno *.plist
14 14
15.PHONY: distclean 15.PHONY: distclean
16distclean: clean 16distclean: clean
diff --git a/src/jailtest/access.c b/src/jailcheck/access.c
index 4e737dc7a..3e99b0b52 100644
--- a/src/jailtest/access.c
+++ b/src/jailcheck/access.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -17,7 +17,7 @@
17 * with this program; if not, write to the Free Software Foundation, Inc., 17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include "jailtest.h" 20#include "jailcheck.h"
21#include <dirent.h> 21#include <dirent.h>
22#include <sys/wait.h> 22#include <sys/wait.h>
23 23
@@ -36,7 +36,7 @@ void access_setup(const char *directory) {
36 assert(user_home_dir); 36 assert(user_home_dir);
37 37
38 if (files_cnt >= MAX_TEST_FILES) { 38 if (files_cnt >= MAX_TEST_FILES) {
39 fprintf(stderr, "Error: maximum number of test directories exceded\n"); 39 fprintf(stderr, "Error: maximum number of test directories exceeded\n");
40 exit(1); 40 exit(1);
41 } 41 }
42 42
@@ -74,7 +74,7 @@ void access_setup(const char *directory) {
74 74
75 // create a test file 75 // create a test file
76 char *test_file; 76 char *test_file;
77 if (asprintf(&test_file, "%s/jailtest-access-%d", path, getpid()) == -1) 77 if (asprintf(&test_file, "%s/jailcheck-access-%d", path, getpid()) == -1)
78 errExit("asprintf"); 78 errExit("asprintf");
79 79
80 FILE *fp = fopen(test_file, "w"); 80 FILE *fp = fopen(test_file, "w");
diff --git a/src/jailtest/apparmor.c b/src/jailcheck/apparmor.c
index 9ddfea3de..521ce047e 100644
--- a/src/jailtest/apparmor.c
+++ b/src/jailcheck/apparmor.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -17,7 +17,7 @@
17 * with this program; if not, write to the Free Software Foundation, Inc., 17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include "jailtest.h" 20#include "jailcheck.h"
21 21
22#ifdef HAVE_APPARMOR 22#ifdef HAVE_APPARMOR
23#include <sys/apparmor.h> 23#include <sys/apparmor.h>
diff --git a/src/jailtest/jailtest.h b/src/jailcheck/jailcheck.h
index 0c4883061..2d25ee8ce 100644
--- a/src/jailtest/jailtest.h
+++ b/src/jailcheck/jailcheck.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -17,8 +17,8 @@
17 * with this program; if not, write to the Free Software Foundation, Inc., 17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#ifndef JAILTEST_H 20#ifndef JAILCHECK_H
21#define JAILTEST_H 21#define JAILCHECK_H
22 22
23#include "../include/common.h" 23#include "../include/common.h"
24 24
@@ -53,10 +53,12 @@ void apparmor_test(pid_t pid);
53// seccomp.c 53// seccomp.c
54void seccomp_test(pid_t pid); 54void seccomp_test(pid_t pid);
55 55
56// network.c
57void network_test(void);
56// utils.c 58// utils.c
57char *get_sudo_user(void); 59char *get_sudo_user(void);
58char *get_homedir(const char *user, uid_t *uid, gid_t *gid); 60char *get_homedir(const char *user, uid_t *uid, gid_t *gid);
59int find_child(pid_t pid); 61int find_child(pid_t pid);
60pid_t switch_to_child(pid_t pid); 62pid_t switch_to_child(pid_t pid);
61 63
62#endif \ No newline at end of file 64#endif
diff --git a/src/jailtest/main.c b/src/jailcheck/main.c
index 3369dca39..04fc3a6af 100644
--- a/src/jailtest/main.c
+++ b/src/jailcheck/main.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -17,7 +17,7 @@
17 * with this program; if not, write to the Free Software Foundation, Inc., 17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include "jailtest.h" 20#include "jailcheck.h"
21#include "../include/firejail_user.h" 21#include "../include/firejail_user.h"
22#include "../include/pid.h" 22#include "../include/pid.h"
23#include <sys/wait.h> 23#include <sys/wait.h>
@@ -30,7 +30,7 @@ char *user_run_dir = NULL;
30int arg_debug = 0; 30int arg_debug = 0;
31 31
32static char *usage_str = 32static char *usage_str =
33 "Usage: jailtest [options] directory [directory]\n\n" 33 "Usage: jailcheck [options] directory [directory]\n\n"
34 "Options:\n" 34 "Options:\n"
35 " --debug - print debug messages.\n" 35 " --debug - print debug messages.\n"
36 " --help, -? - this help screen.\n" 36 " --help, -? - this help screen.\n"
@@ -157,6 +157,7 @@ int main(int argc, char **argv) {
157 seccomp_test(pid); 157 seccomp_test(pid);
158 fflush(0); 158 fflush(0);
159 159
160 // filesystem tests
160 pid_t child = fork(); 161 pid_t child = fork();
161 if (child == -1) 162 if (child == -1)
162 errExit("fork"); 163 errExit("fork");
@@ -185,6 +186,28 @@ int main(int argc, char **argv) {
185 } 186 }
186 int status; 187 int status;
187 wait(&status); 188 wait(&status);
189
190 // network test
191 child = fork();
192 if (child == -1)
193 errExit("fork");
194 if (child == 0) {
195 int rv = join_namespace(pid, "net");
196 if (rv == 0)
197 network_test();
198 else {
199 printf(" Error: I cannot join the process network stack\n");
200 exit(1);
201 }
202
203 // drop privileges in order not to trigger cleanup()
204 if (setgid(user_gid) != 0)
205 errExit("setgid");
206 if (setuid(user_uid) != 0)
207 errExit("setuid");
208 return 0;
209 }
210 wait(&status);
188 } 211 }
189 } 212 }
190 213
diff --git a/src/jailcheck/network.c b/src/jailcheck/network.c
new file mode 100644
index 000000000..8f70c6ff0
--- /dev/null
+++ b/src/jailcheck/network.c
@@ -0,0 +1,57 @@
1/*
2 * Copyright (C) 2014-2022 Firejail Authors
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20#include "jailcheck.h"
21#include <netdb.h>
22#include <arpa/inet.h>
23#include <ifaddrs.h>
24#include <net/if.h>
25#include <linux/connector.h>
26#include <linux/netlink.h>
27#include <linux/if_link.h>
28#include <linux/sockios.h>
29#include <sys/ioctl.h>
30
31
32void network_test(void) {
33 // I am root running in a network namespace
34 struct ifaddrs *ifaddr, *ifa;
35 int found = 0;
36
37 // walk through the linked list
38 if (getifaddrs(&ifaddr) == -1)
39 errExit("getifaddrs");
40 for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
41 if (strcmp(ifa->ifa_name, "lo") == 0)
42 continue;
43
44 found = 1;
45 break;
46 }
47
48 freeifaddrs(ifaddr);
49
50 if (found)
51 printf(" Networking: enabled\n");
52 else
53 printf(" Networking: disabled\n");
54}
55
56
57
diff --git a/src/jailtest/noexec.c b/src/jailcheck/noexec.c
index 4347b7eef..4cf5dabde 100644
--- a/src/jailtest/noexec.c
+++ b/src/jailcheck/noexec.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -17,7 +17,7 @@
17 * with this program; if not, write to the Free Software Foundation, Inc., 17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include "jailtest.h" 20#include "jailcheck.h"
21#include <sys/wait.h> 21#include <sys/wait.h>
22#include <sys/stat.h> 22#include <sys/stat.h>
23#include <fcntl.h> 23#include <fcntl.h>
@@ -67,7 +67,7 @@ void noexec_test(const char *path) {
67 return; 67 return;
68 68
69 char *fname; 69 char *fname;
70 if (asprintf(&fname, "%s/jailtest-noexec-%d", path, getpid()) == -1) 70 if (asprintf(&fname, "%s/jailcheck-noexec-%d", path, getpid()) == -1)
71 errExit("asprintf"); 71 errExit("asprintf");
72 72
73 pid_t child = fork(); 73 pid_t child = fork();
@@ -110,4 +110,4 @@ void noexec_test(const char *path) {
110 wait(&status); 110 wait(&status);
111 int rv = unlink(fname); 111 int rv = unlink(fname);
112 (void) rv; 112 (void) rv;
113} \ No newline at end of file 113}
diff --git a/src/jailtest/seccomp.c b/src/jailcheck/seccomp.c
index 2cecb4b4d..ac8064f0b 100644
--- a/src/jailtest/seccomp.c
+++ b/src/jailcheck/seccomp.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -17,7 +17,7 @@
17 * with this program; if not, write to the Free Software Foundation, Inc., 17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include "jailtest.h" 20#include "jailcheck.h"
21#define MAXBUF 4096 21#define MAXBUF 4096
22 22
23void seccomp_test(pid_t pid) { 23void seccomp_test(pid_t pid) {
diff --git a/src/jailtest/sysfiles.c b/src/jailcheck/sysfiles.c
index 7e4709453..0df95d496 100644
--- a/src/jailtest/sysfiles.c
+++ b/src/jailcheck/sysfiles.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -17,7 +17,7 @@
17 * with this program; if not, write to the Free Software Foundation, Inc., 17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include "jailtest.h" 20#include "jailcheck.h"
21#include <dirent.h> 21#include <dirent.h>
22#include <sys/wait.h> 22#include <sys/wait.h>
23 23
@@ -34,7 +34,7 @@ void sysfiles_setup(const char *file) {
34 assert(file); 34 assert(file);
35 35
36 if (files_cnt >= MAX_TEST_FILES) { 36 if (files_cnt >= MAX_TEST_FILES) {
37 fprintf(stderr, "Error: maximum number of system test files exceded\n"); 37 fprintf(stderr, "Error: maximum number of system test files exceeded\n");
38 exit(1); 38 exit(1);
39 } 39 }
40 40
diff --git a/src/jailtest/utils.c b/src/jailcheck/utils.c
index 41c21b753..65431e2e1 100644
--- a/src/jailtest/utils.c
+++ b/src/jailcheck/utils.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -17,7 +17,7 @@
17 * with this program; if not, write to the Free Software Foundation, Inc., 17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include "jailtest.h" 20#include "jailcheck.h"
21#include "../include/pid.h" 21#include "../include/pid.h"
22#include <errno.h> 22#include <errno.h>
23#include <pwd.h> 23#include <pwd.h>
diff --git a/src/jailtest/virtual.c b/src/jailcheck/virtual.c
index fcdcf9720..93172d65c 100644
--- a/src/jailtest/virtual.c
+++ b/src/jailcheck/virtual.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -17,7 +17,7 @@
17 * with this program; if not, write to the Free Software Foundation, Inc., 17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include "jailtest.h" 20#include "jailcheck.h"
21#include <dirent.h> 21#include <dirent.h>
22#include <sys/wait.h> 22#include <sys/wait.h>
23 23
@@ -43,7 +43,7 @@ void virtual_setup(const char *directory) {
43 43
44 // create a test file 44 // create a test file
45 char *test_file; 45 char *test_file;
46 if (asprintf(&test_file, "%s/jailtest-private-%d", directory, getpid()) == -1) 46 if (asprintf(&test_file, "%s/jailcheck-private-%d", directory, getpid()) == -1)
47 errExit("asprintf"); 47 errExit("asprintf");
48 48
49 FILE *fp = fopen(test_file, "w"); 49 FILE *fp = fopen(test_file, "w");
diff --git a/src/lib/common.c b/src/lib/common.c
index f1bd7a6fe..8e84fab26 100644
--- a/src/lib/common.c
+++ b/src/lib/common.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -31,6 +31,7 @@
31#include <dirent.h> 31#include <dirent.h>
32#include <string.h> 32#include <string.h>
33#include <time.h> 33#include <time.h>
34#include <limits.h>
34#include "../include/common.h" 35#include "../include/common.h"
35#define BUFLEN 4096 36#define BUFLEN 4096
36 37
@@ -320,6 +321,115 @@ const char *gnu_basename(const char *path) {
320 return last_slash+1; 321 return last_slash+1;
321} 322}
322 323
324char *do_replace_cntrl_chars(char *str, char c) {
325 if (str) {
326 size_t i;
327 for (i = 0; str[i]; i++) {
328 if (iscntrl((unsigned char) str[i]))
329 str[i] = c;
330 }
331 }
332 return str;
333}
334
335char *replace_cntrl_chars(const char *str, char c) {
336 assert(str);
337
338 char *rv = strdup(str);
339 if (!rv)
340 errExit("strdup");
341
342 do_replace_cntrl_chars(rv, c);
343 return rv;
344}
345
346int has_cntrl_chars(const char *str) {
347 assert(str);
348
349 size_t i;
350 for (i = 0; str[i]; i++) {
351 if (iscntrl((unsigned char) str[i]))
352 return 1;
353 }
354 return 0;
355}
356
357void reject_cntrl_chars(const char *fname) {
358 assert(fname);
359
360 if (has_cntrl_chars(fname)) {
361 char *fname_print = replace_cntrl_chars(fname, '?');
362
363 fprintf(stderr, "Error: \"%s\" is an invalid filename: no control characters are allowed\n", fname_print);
364 exit(1);
365 }
366}
367
368void reject_meta_chars(const char *fname, int globbing) {
369 assert(fname);
370
371 reject_cntrl_chars(fname);
372
373 const char *reject = "\\&!?\"<>%^{};,*[]";
374 if (globbing)
375 reject = "\\&!\"<>%^{};,"; // file globbing ('*?[]') is allowed
376
377 const char *c = strpbrk(fname, reject);
378 if (c) {
379 fprintf(stderr, "Error: \"%s\" is an invalid filename: rejected character: \"%c\"\n", fname, *c);
380 exit(1);
381 }
382}
383
384// takes string with comma separated int values, returns int array
385int *str_to_int_array(const char *str, size_t *sz) {
386 assert(str && sz);
387
388 size_t curr_sz = 0;
389 size_t arr_sz = 16;
390 int *rv = malloc(arr_sz * sizeof(int));
391 if (!rv)
392 errExit("malloc");
393
394 char *dup = strdup(str);
395 if (!dup)
396 errExit("strdup");
397 char *tok = strtok(dup, ",");
398 if (!tok) {
399 free(dup);
400 free(rv);
401 goto errout;
402 }
403
404 while (tok) {
405 char *end;
406 long val = strtol(tok, &end, 10);
407 if (end == tok || *end != '\0' || val < INT_MIN || val > INT_MAX) {
408 free(dup);
409 free(rv);
410 goto errout;
411 }
412
413 if (curr_sz == arr_sz) {
414 arr_sz *= 2;
415 rv = realloc(rv, arr_sz * sizeof(int));
416 if (!rv)
417 errExit("realloc");
418 }
419 rv[curr_sz++] = val;
420
421 tok = strtok(NULL, ",");
422 }
423 free(dup);
424
425 *sz = curr_sz;
426 return rv;
427
428errout:
429 *sz = 0;
430 return NULL;
431}
432
323//************************** 433//**************************
324// time trace based on getticks function 434// time trace based on getticks function
325//************************** 435//**************************
diff --git a/src/lib/errno.c b/src/lib/errno.c
index 9edb44c22..b666c5646 100644
--- a/src/lib/errno.c
+++ b/src/lib/errno.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/lib/firejail_user.c b/src/lib/firejail_user.c
index d6a3c71ab..bf338ee43 100644
--- a/src/lib/firejail_user.c
+++ b/src/lib/firejail_user.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/lib/ldd_utils.c b/src/lib/ldd_utils.c
index cd60d74e4..bc4f7cf9c 100644
--- a/src/lib/ldd_utils.c
+++ b/src/lib/ldd_utils.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -50,7 +50,7 @@ int is_lib_64(const char *exe) {
50 unsigned char buf[EI_NIDENT]; 50 unsigned char buf[EI_NIDENT];
51 ssize_t len = 0; 51 ssize_t len = 0;
52 while (len < EI_NIDENT) { 52 while (len < EI_NIDENT) {
53 ssize_t sz = read(fd, buf, EI_NIDENT); 53 ssize_t sz = read(fd, buf + len, EI_NIDENT - len);
54 if (sz <= 0) 54 if (sz <= 0)
55 goto doexit; 55 goto doexit;
56 len += sz; 56 len += sz;
diff --git a/src/lib/pid.c b/src/lib/pid.c
index ca62aaa42..ad6403f65 100644
--- a/src/lib/pid.c
+++ b/src/lib/pid.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/lib/syscall.c b/src/lib/syscall.c
index b3131ac17..a17f6423a 100644
--- a/src/lib/syscall.c
+++ b/src/lib/syscall.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -253,9 +253,6 @@ static const SyscallGroupList sysgroups[] = {
253#ifdef SYS_fanotify_init 253#ifdef SYS_fanotify_init
254 "fanotify_init," 254 "fanotify_init,"
255#endif 255#endif
256#ifdef SYS_kcmp
257 "kcmp,"
258#endif
259#ifdef SYS_add_key 256#ifdef SYS_add_key
260 "add_key," 257 "add_key,"
261#endif 258#endif
@@ -1681,14 +1678,14 @@ void syscalls_in_list(const char *list, const char *slist, int fd, char **prelis
1681 sl.postlist = NULL; 1678 sl.postlist = NULL;
1682 syscall_check_list(list, syscall_in_list, 0, 0, &sl, native); 1679 syscall_check_list(list, syscall_in_list, 0, 0, &sl, native);
1683 if (!arg_quiet) { 1680 if (!arg_quiet) {
1684 printf("Seccomp list in: %s,", list); 1681 fprintf(stderr, "Seccomp list in: %s,", list);
1685 if (sl.slist) 1682 if (sl.slist)
1686 printf(" check list: %s,", sl.slist); 1683 fprintf(stderr, " check list: %s,", sl.slist);
1687 if (sl.prelist) 1684 if (sl.prelist)
1688 printf(" prelist: %s,", sl.prelist); 1685 fprintf(stderr, " prelist: %s,", sl.prelist);
1689 if (sl.postlist) 1686 if (sl.postlist)
1690 printf(" postlist: %s", sl.postlist); 1687 fprintf(stderr, " postlist: %s", sl.postlist);
1691 printf("\n"); 1688 fprintf(stderr, "\n");
1692 } 1689 }
1693 *prelist = sl.prelist; 1690 *prelist = sl.prelist;
1694 *postlist = sl.postlist; 1691 *postlist = sl.postlist;
diff --git a/src/libpostexecseccomp/libpostexecseccomp.c b/src/libpostexecseccomp/libpostexecseccomp.c
index 1d1eb283b..e2339547e 100644
--- a/src/libpostexecseccomp/libpostexecseccomp.c
+++ b/src/libpostexecseccomp/libpostexecseccomp.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/libtrace/libtrace.c b/src/libtrace/libtrace.c
index d88512b0a..c0832cbde 100644
--- a/src/libtrace/libtrace.c
+++ b/src/libtrace/libtrace.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -18,12 +18,12 @@
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#define _GNU_SOURCE 20#define _GNU_SOURCE
21#include <errno.h>
21#include <stdio.h> 22#include <stdio.h>
22#include <stdlib.h> 23#include <stdlib.h>
23#include <string.h> 24#include <string.h>
24#include <dlfcn.h> 25#include <dlfcn.h>
25#include <sys/types.h> 26#include <sys/types.h>
26#include <limits.h>
27#include <unistd.h> 27#include <unistd.h>
28#include <sys/socket.h> 28#include <sys/socket.h>
29#include <netinet/in.h> 29#include <netinet/in.h>
@@ -706,10 +706,14 @@ __attribute__((constructor))
706static void log_exec(int argc, char** argv) { 706static void log_exec(int argc, char** argv) {
707 (void) argc; 707 (void) argc;
708 (void) argv; 708 (void) argv;
709 static char buf[PATH_MAX + 1]; 709 char *buf = realpath("/proc/self/exe", NULL);
710 int rv = readlink("/proc/self/exe", buf, PATH_MAX); 710 if (buf == NULL) {
711 if (rv != -1) { 711 if (errno == ENOMEM) {
712 buf[rv] = '\0'; // readlink does not add a '\0' at the end 712 tprintf(ftty, "realpath: %s\n", strerror(errno));
713 exit(1);
714 }
715 } else {
713 tprintf(ftty, "%u:%s:exec %s:0\n", mypid, myname, buf); 716 tprintf(ftty, "%u:%s:exec %s:0\n", mypid, myname, buf);
717 free(buf);
714 } 718 }
715} 719}
diff --git a/src/libtracelog/libtracelog.c b/src/libtracelog/libtracelog.c
index b946cc889..760ac7612 100644
--- a/src/libtracelog/libtracelog.c
+++ b/src/libtracelog/libtracelog.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/man/Makefile.in b/src/man/Makefile.in
index 3711d5cec..fbd2d795e 100644
--- a/src/man/Makefile.in
+++ b/src/man/Makefile.in
@@ -1,5 +1,5 @@
1.PHONY: all 1.PHONY: all
2all: firecfg.man firejail.man firejail-login.man firejail-users.man firejail-profile.man firemon.man jailtest.man 2all: firecfg.man firejail.man firejail-login.man firejail-users.man firejail-profile.man firemon.man jailcheck.man
3 3
4include ../common.mk 4include ../common.mk
5 5
diff --git a/src/man/firecfg.txt b/src/man/firecfg.txt
index dbb9397c6..189e9cc8d 100644
--- a/src/man/firecfg.txt
+++ b/src/man/firecfg.txt
@@ -27,7 +27,7 @@ desktop managers are supported in this moment
27To set it up, run "sudo firecfg" after installing Firejail software. 27To set it up, run "sudo firecfg" after installing Firejail software.
28The same command should also be run after 28The same command should also be run after
29installing new programs. If the program is supported by Firejail, the symbolic link in /usr/local/bin 29installing new programs. If the program is supported by Firejail, the symbolic link in /usr/local/bin
30will be created. For a full list of programs supported by default run "cat /usr/lib/firejail/firecfg.config". 30will be created. For a full list of programs supported by default run "cat /etc/firejail/firecfg.config".
31 31
32For user-driven manual integration, see \fBDESKTOP INTEGRATION\fR section in \fBman 1 firejail\fR. 32For user-driven manual integration, see \fBDESKTOP INTEGRATION\fR section in \fBman 1 firejail\fR.
33.SH DEFAULT ACTIONS 33.SH DEFAULT ACTIONS
@@ -135,4 +135,4 @@ Homepage: https://firejail.wordpress.com
135.BR firejail-profile (5), 135.BR firejail-profile (5),
136.BR firejail-login (5), 136.BR firejail-login (5),
137.BR firejail-users (5), 137.BR firejail-users (5),
138.BR jailtest (1) 138.BR jailcheck (1)
diff --git a/src/man/firejail-login.txt b/src/man/firejail-login.txt
index 1b8a4931c..05afd55b5 100644
--- a/src/man/firejail-login.txt
+++ b/src/man/firejail-login.txt
@@ -39,4 +39,4 @@ Homepage: https://firejail.wordpress.com
39.BR firecfg (1), 39.BR firecfg (1),
40.BR firejail-profile (5), 40.BR firejail-profile (5),
41.BR firejail-users (5), 41.BR firejail-users (5),
42.BR jailtest (1) 42.BR jailcheck (1)
diff --git a/src/man/firejail-profile.txt b/src/man/firejail-profile.txt
index 9d11add06..e962e18da 100644
--- a/src/man/firejail-profile.txt
+++ b/src/man/firejail-profile.txt
@@ -1,18 +1,84 @@
1.TH FIREJAIL-PROFILE 5 "MONTH YEAR" "VERSION" "firejail profiles man page" 1.TH FIREJAIL-PROFILE 5 "MONTH YEAR" "VERSION" "firejail profiles man page"
2.SH NAME 2.SH NAME
3profile \- Security profile file syntax for Firejail 3profile \- Security profile file syntax, and information about building new application profiles.
4 4
5.SH USAGE 5.SH SYNOPSIS
6
7Using a specific profile:
8.PP
9.RS
6.TP 10.TP
7firejail \-\-profile=filename.profile 11\fBfirejail \-\-profile=filename.profile
12.br
13
14.br
15Example:
16.br
17$ firejail --profile=/etc/firejail/kdenlive.profile --appimage kdenlive.appimage
18.br
19
20.br
21.TP
22\fBfirejail \-\-profile=profile_name
23.br
24
25.br
26Example:
27.br
28$ firejail --profile=kdenlive --appimage kdenlive.appimage
29.br
30
31.br
32.RE
33.PP
34
35
36
37Building a profile manually:
38.PP
39.RS
40Start with the template in /usr/share/doc/firejail/profile.template and modify it in a text editor.
41To integrate the program in your desktop environment copy the profile file in ~/.config/firejail
42directory and run "sudo firecfg".
8.RE 43.RE
9firejail \-\-profile=profile_name 44.PP
45
46Aliases and redirections:
47.PP
48.RS
49In some cases the same profile can be used for several applications.
50One such example is LibreOffice.
51Build a regular profile for the main application, and for the rest use
52/usr/share/doc/firejail/redirect_alias-profile.template.
53.RE
54.PP
55
56Running the profile builder:
57.PP
58.RS
59.TP
60\fBfirejail \-\-build=appname.profile appname
61.br
62
63.br
64Example:
65.br
66$ firejail --build=blobby.profile blobby
67.br
68
69.br
70Run the program in "firejail \-\-build" and try to exercise as many program features as possible.
71The profile is extracted and saved in the current directory. Open it in a text editor and add or remove
72sandboxing options as necessary. Test again after modifying the profile. To integrate the program
73in your desktop environment copy the profile file in ~/.config/firejail directory and run "sudo firecfg".
74.RE
75.PP
10 76
11.SH DESCRIPTION 77.SH DESCRIPTION
12Several command line options can be passed to the program using 78Several command line options can be passed to the program using
13profile files. Firejail chooses the profile file as follows: 79profile files. Firejail chooses the profile file as follows:
14 80
15\fB1.\fR If a profile file is provided by the user with \-\-profile option, the profile file is loaded. If a profile name is given, it is searched for first in the ~/.config/firejail directory and if not found then in /etc/firejail directory. Profile names do not include the .profile suffix. 81\fB1.\fR If a profile file is provided by the user with \-\-profile option, the profile file is loaded. If a profile name is given, it is searched for first in the ~/.config/firejail directory and if not found then in /etc/firejail directory. Profile names do not include the .profile suffix.
16Example: 82Example:
17.PP 83.PP
18.RS 84.RS
@@ -94,6 +160,11 @@ Example: "blacklist ~/My Virtual Machines"
94 160
95.TP 161.TP
96\fB# this is a comment 162\fB# this is a comment
163Example:
164
165# disable networking
166.br
167net none # this command creates an empty network namespace
97 168
98.TP 169.TP
99\fB?CONDITIONAL: profile line 170\fB?CONDITIONAL: profile line
@@ -103,7 +174,7 @@ Example: "?HAS_APPIMAGE: whitelist ${HOME}/special/appimage/dir"
103 174
104This example will load the whitelist profile line only if the \-\-appimage option has been specified on the command line. 175This example will load the whitelist profile line only if the \-\-appimage option has been specified on the command line.
105 176
106Currently the only conditionals supported this way are HAS_APPIMAGE, HAS_NET, HAS_NODBUS, HAS_NOSOUND, HAS_PRIVATE and HAS_X11. The conditionals BROWSER_DISABLE_U2F and BROWSER_ALLOW_DRM 177Currently the only conditionals supported this way are HAS_APPIMAGE, HAS_NET, HAS_NODBUS, HAS_NOSOUND, HAS_PRIVATE and HAS_X11. The conditionals ALLOW_TRAY, BROWSER_DISABLE_U2F and BROWSER_ALLOW_DRM
107can be enabled or disabled globally in Firejail's configuration file. 178can be enabled or disabled globally in Firejail's configuration file.
108 179
109The profile line may be any profile line that you would normally use in a profile \fBexcept\fR for "quiet" and "include" lines. 180The profile line may be any profile line that you would normally use in a profile \fBexcept\fR for "quiet" and "include" lines.
@@ -205,6 +276,10 @@ Mount-bind file1 on top of file2. This option is only available when running as
205\fBdisable-mnt 276\fBdisable-mnt
206Disable /mnt, /media, /run/mount and /run/media access. 277Disable /mnt, /media, /run/mount and /run/media access.
207.TP 278.TP
279\fBkeep-config-pulse
280Disable automatic ~/.config/pulse init, for complex setups such as remote
281pulse servers or non-standard socket paths.
282.TP
208\fBkeep-dev-shm 283\fBkeep-dev-shm
209/dev/shm directory is untouched (even with private-dev). 284/dev/shm directory is untouched (even with private-dev).
210.TP 285.TP
@@ -249,16 +324,16 @@ Remount the file or the directory noexec, nodev and nosuid.
249#ifdef HAVE_OVERLAYFS 324#ifdef HAVE_OVERLAYFS
250.TP 325.TP
251\fBoverlay 326\fBoverlay
252Mount a filesystem overlay on top of the current filesystem. 327Mount a filesystem overlay on top of the current filesystem.
253The overlay is stored in $HOME/.firejail/<PID> directory. 328The overlay is stored in $HOME/.firejail/<PID> directory.
254.TP 329.TP
255\fBoverlay-named name 330\fBoverlay-named name
256Mount a filesystem overlay on top of the current filesystem. 331Mount a filesystem overlay on top of the current filesystem.
257The overlay is stored in $HOME/.firejail/name directory. 332The overlay is stored in $HOME/.firejail/name directory.
258.TP 333.TP
259\fBoverlay-tmpfs 334\fBoverlay-tmpfs
260Mount a filesystem overlay on top of the current filesystem. 335Mount a filesystem overlay on top of the current filesystem.
261All filesystem modifications are discarded when the sandbox is closed. 336All filesystem modifications are discarded when the sandbox is closed.
262#endif 337#endif
263.TP 338.TP
264\fBprivate 339\fBprivate
@@ -274,6 +349,7 @@ Build a new /bin in a temporary filesystem, and copy the programs in the list.
274The files in the list must be expressed as relative to the /bin, 349The files in the list must be expressed as relative to the /bin,
275/sbin, /usr/bin, /usr/sbin, or /usr/local/bin directories. 350/sbin, /usr/bin, /usr/sbin, or /usr/local/bin directories.
276The same directory is also bind-mounted over /sbin, /usr/bin and /usr/sbin. 351The same directory is also bind-mounted over /sbin, /usr/bin and /usr/sbin.
352Multiple private-bin commands are allowed and they accumulate.
277.TP 353.TP
278\fBprivate-cache 354\fBprivate-cache
279Mount an empty temporary filesystem on top of the .cache directory in user home. All 355Mount an empty temporary filesystem on top of the .cache directory in user home. All
@@ -283,7 +359,7 @@ modifications are discarded when the sandbox is closed.
283Set working directory inside jail to the home directory, and failing that, the root directory. 359Set working directory inside jail to the home directory, and failing that, the root directory.
284.TP 360.TP
285\fBprivate-cwd directory 361\fBprivate-cwd directory
286Set working directory inside the jail. 362Set working directory inside the jail. Full directory path is required. Symbolic links are not allowed.
287.TP 363.TP
288\fBprivate-dev 364\fBprivate-dev
289Create a new /dev directory. Only disc, dri, dvb, hidraw, null, full, zero, tty, pts, ptmx, 365Create a new /dev directory. Only disc, dri, dvb, hidraw, null, full, zero, tty, pts, ptmx,
@@ -299,6 +375,7 @@ the /etc directory, and must not contain the / character
299(e.g., /etc/foo must be expressed as foo, but /etc/foo/bar -- 375(e.g., /etc/foo must be expressed as foo, but /etc/foo/bar --
300expressed as foo/bar -- is disallowed). 376expressed as foo/bar -- is disallowed).
301All modifications are discarded when the sandbox is closed. 377All modifications are discarded when the sandbox is closed.
378Multiple private-etc commands are allowed and they accumulate.
302#ifdef HAVE_PRIVATE_HOME 379#ifdef HAVE_PRIVATE_HOME
303.TP 380.TP
304\fBprivate-home file,directory 381\fBprivate-home file,directory
@@ -345,7 +422,7 @@ Make directory or file read-only.
345Make directory or file read-write. 422Make directory or file read-write.
346.TP 423.TP
347\fBtmpfs directory 424\fBtmpfs directory
348Mount an empty tmpfs filesystem on top of directory. This option is available only when running the sandbox as root. 425Mount an empty tmpfs filesystem on top of directory. Directories outside user home or not owned by the user are not allowed. Sandboxes running as root are exempt from these restrictions.
349.TP 426.TP
350\fBtracelog 427\fBtracelog
351Blacklist violations logged to syslog. 428Blacklist violations logged to syslog.
@@ -353,13 +430,19 @@ Blacklist violations logged to syslog.
353\fBwhitelist file_or_directory 430\fBwhitelist file_or_directory
354Whitelist directory or file. A temporary file system is mounted on the top directory, and the 431Whitelist directory or file. A temporary file system is mounted on the top directory, and the
355whitelisted files are mount-binded inside. Modifications to whitelisted files are persistent, 432whitelisted files are mount-binded inside. Modifications to whitelisted files are persistent,
356everything else is discarded when the sandbox is closed. The top directory could be 433everything else is discarded when the sandbox is closed. The top directory can be
357user home, /dev, /etc, /media, /mnt, /opt, /srv, /sys/module, /usr/share, /var, and /tmp. 434all directories in / (except /proc and /sys), /sys/module, /run/user/$UID, $HOME and
435all directories in /usr.
358.br 436.br
359 437
360.br 438.br
361Symbolic link handling: with the exception of user home, both the link and the real file should be in 439Symbolic link handling: with the exception of user home, both the link and the real file should be in
362the same top directory. For user home, both the link and the real file should be owned by the user. 440the same top directory. For user home, both the link and the real file should be owned by the user.
441
442.TP
443\fBwhitelist-ro file_or_directory
444Equivalent to "whitelist file_or_directory" followed by "read-only file_or_directory"
445
363.TP 446.TP
364\fBwritable-etc 447\fBwritable-etc
365Mount /etc directory read-write. 448Mount /etc directory read-write.
@@ -408,17 +491,21 @@ Sets the NO_NEW_PRIVS prctl. This ensures that child processes
408cannot acquire new privileges using execve(2); in particular, 491cannot acquire new privileges using execve(2); in particular,
409this means that calling a suid binary (or one with file capabilities) 492this means that calling a suid binary (or one with file capabilities)
410does not result in an increase of privilege. 493does not result in an increase of privilege.
494.TP
495\fBnoprinters
496Disable printers.
411#ifdef HAVE_USERNS 497#ifdef HAVE_USERNS
412.TP 498.TP
413\fBnoroot 499\fBnoroot
414Use this command to enable an user namespace. The namespace has only one user, the current user. 500Use this command to enable an user namespace. The namespace has only one user, the current user.
415There is no root account (uid 0) defined in the namespace. 501There is no root account (uid 0) defined in the namespace.
416#endif 502#endif
417.TP 503.TP
418\fBprotocol protocol1,protocol2,protocol3 504\fBprotocol protocol1,protocol2,protocol3
419Enable protocol filter. The filter is based on seccomp and checks the 505Enable protocol filter. The filter is based on seccomp and checks the
420first argument to socket system call. Recognized values: \fBunix\fR, 506first argument to socket system call. Recognized values: \fBunix\fR,
421\fBinet\fR, \fBinet6\fR, \fBnetlink\fR, \fBpacket\fR and \fBbluetooth\fR. 507\fBinet\fR, \fBinet6\fR, \fBnetlink\fR, \fBpacket\fR, and \fBbluetooth\fR.
508Multiple protocol commands are allowed.
422.TP 509.TP
423\fBseccomp 510\fBseccomp
424Enable seccomp filter and blacklist the syscalls in the default list. See man 1 firejail for more details. 511Enable seccomp filter and blacklist the syscalls in the default list. See man 1 firejail for more details.
@@ -530,7 +617,7 @@ Allow the application to see but not talk to the name org.freedesktop.Notificati
530Allow the application to call methods of the interface org.freedesktop.Notifications of the object exposed at the path /org/freedesktop/Notifications by the client owning the bus name org.freedesktop.Notifications on the system DBus. 617Allow the application to call methods of the interface org.freedesktop.Notifications of the object exposed at the path /org/freedesktop/Notifications by the client owning the bus name org.freedesktop.Notifications on the system DBus.
531.TP 618.TP
532\fBdbus-system.broadcast org.freedesktop.Notifications=org.freedesktop.Notifications.*@/org/freedesktop/Notifications 619\fBdbus-system.broadcast org.freedesktop.Notifications=org.freedesktop.Notifications.*@/org/freedesktop/Notifications
533Allow the application to receive broadcast signals from the the interface org.freedesktop.Notifications of the object exposed at the path /org/freedesktop/Notifications by the client owning the bus name org.freedesktop.Notifications on the system DBus. 620Allow the application to receive broadcast signals from the interface org.freedesktop.Notifications of the object exposed at the path /org/freedesktop/Notifications by the client owning the bus name org.freedesktop.Notifications on the system DBus.
534.TP 621.TP
535\fBdbus-user filter 622\fBdbus-user filter
536Enable filtered access to the session DBus. Filters can be specified with the dbus-user.talk and dbus-user.own commands. 623Enable filtered access to the session DBus. Filters can be specified with the dbus-user.talk and dbus-user.own commands.
@@ -640,6 +727,11 @@ env CFLAGS="-W -Wall -Werror"
640.TP 727.TP
641\fBipc-namespace 728\fBipc-namespace
642Enable IPC namespace. 729Enable IPC namespace.
730
731.TP
732\fBkeep-fd
733Inherit open file descriptors to sandbox.
734
643.TP 735.TP
644\fBname sandboxname 736\fBname sandboxname
645Set sandbox name. Example: 737Set sandbox name. Example:
@@ -652,9 +744,8 @@ name browser
652\fBno3d 744\fBno3d
653Disable 3D hardware acceleration. 745Disable 3D hardware acceleration.
654.TP 746.TP
655\fBnoautopulse 747\fBnoautopulse \fR(deprecated)
656Disable automatic ~/.config/pulse init, for complex setups such as remote 748See keep-config-pulse.
657pulse servers or non-standard socket paths.
658.TP 749.TP
659\fBnodvd 750\fBnodvd
660Disable DVD and audio CD devices. 751Disable DVD and audio CD devices.
@@ -662,6 +753,9 @@ Disable DVD and audio CD devices.
662\fBnogroups 753\fBnogroups
663Disable supplementary user groups 754Disable supplementary user groups
664.TP 755.TP
756\fBnoinput
757Disable input devices.
758.TP
665\fBnosound 759\fBnosound
666Disable sound system. 760Disable sound system.
667.TP 761.TP
@@ -674,8 +768,8 @@ Disable U2F devices.
674\fBnovideo 768\fBnovideo
675Disable video capture devices. 769Disable video capture devices.
676.TP 770.TP
677\fBnoinput 771\fBmachine-id
678Disable input devices. 772Spoof id number in /etc/machine-id file - a new random id is generated inside the sandbox.
679.TP 773.TP
680\fBshell none 774\fBshell none
681Run the program directly, without a shell. 775Run the program directly, without a shell.
@@ -795,8 +889,8 @@ a DHCP client and releasing the lease manually.
795 889
796.TP 890.TP
797\fBiprange address,address 891\fBiprange address,address
798Assign an IP address in the provided range to the last network 892Assign an IP address in the provided range to the last network
799interface defined by a net command. A default gateway is assigned by default. 893interface defined by a net command. A default gateway is assigned by default.
800.br 894.br
801 895
802.br 896.br
@@ -814,10 +908,6 @@ iprange 192.168.1.150,192.168.1.160
814Assign MAC addresses to the last network interface defined by a net command. 908Assign MAC addresses to the last network interface defined by a net command.
815 909
816.TP 910.TP
817\fBmachine-id
818Spoof id number in /etc/machine-id file - a new random id is generated inside the sandbox.
819
820.TP
821\fBmtu number 911\fBmtu number
822Assign a MTU value to the last network interface defined by a net command. 912Assign a MTU value to the last network interface defined by a net command.
823 913
@@ -880,18 +970,37 @@ be created and configured using "ip netns".
880Use this name for the interface connected to the bridge for --net=bridge_interface commands, 970Use this name for the interface connected to the bridge for --net=bridge_interface commands,
881instead of the default one. 971instead of the default one.
882#endif 972#endif
973
883.SH Other 974.SH Other
884.TP 975.TP
885\fBdeterministic-exit-code 976\fBdeterministic-exit-code
886Always exit firejail with the first child's exit status. The default behavior is to use the exit status of the final child to exit, which can be nondeterministic. 977Always exit firejail with the first child's exit status. The default behavior is to use the exit status of the final child to exit, which can be nondeterministic.
887 978
888.TP 979.TP
980\fBdeterministic-shutdown
981Always shut down the sandbox after the first child has terminated. The default behavior is to keep the sandbox alive as long as it contains running processes.
982
983.TP
889\fBjoin-or-start sandboxname 984\fBjoin-or-start sandboxname
890Join the sandbox identified by name or start a new one. 985Join the sandbox identified by name or start a new one.
891Same as "firejail --join=sandboxname" command if sandbox with specified name exists, otherwise same as "name sandboxname". 986Same as "firejail --join=sandboxname" command if sandbox with specified name exists, otherwise same as "name sandboxname".
892 987
893.SH FILES 988.SH FILES
894/etc/firejail/filename.profile, $HOME/.config/firejail/filename.profile 989.TP
990\fB/etc/firejail/appname.profile
991Global Firejail configuration consisting mainly of profiles for each application supported by default.
992
993.TP
994\fB$HOME/.config/firejail/appname.profile
995User application profiles, will take precedence over the global profiles.
996
997.TP
998\fB/usr/share/doc/firejail/profile.template
999Template for building new profiles.
1000
1001.TP
1002\fB/usr/share/doc/firejail/redirect_alias-profile.template
1003Template for aliasing/redirecting profiles.
895 1004
896.SH LICENSE 1005.SH LICENSE
897Firejail is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 1006Firejail is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
@@ -903,7 +1012,7 @@ Homepage: https://firejail.wordpress.com
903.BR firecfg (1), 1012.BR firecfg (1),
904.BR firejail-login (5), 1013.BR firejail-login (5),
905.BR firejail-users (5), 1014.BR firejail-users (5),
906.BR jailtest (1) 1015.BR jailcheck (1)
907 1016
908.UR https://github.com/netblue30/firejail/wiki/Creating-Profiles 1017.UR https://github.com/netblue30/firejail/wiki/Creating-Profiles
909.UE 1018.UE
diff --git a/src/man/firejail-users.txt b/src/man/firejail-users.txt
index c5a9c1848..e3cce7ed5 100644
--- a/src/man/firejail-users.txt
+++ b/src/man/firejail-users.txt
@@ -59,4 +59,4 @@ Homepage: https://firejail.wordpress.com
59.BR firecfg (1), 59.BR firecfg (1),
60.BR firejail-profile (5), 60.BR firejail-profile (5),
61.BR firejail-login (5), 61.BR firejail-login (5),
62.BR jailtest (1) 62.BR jailcheck (1)
diff --git a/src/man/firejail.txt b/src/man/firejail.txt
index 23ec23fb1..f9deaeaa4 100644
--- a/src/man/firejail.txt
+++ b/src/man/firejail.txt
@@ -45,7 +45,7 @@ firejail {\-? | \-\-debug-caps | \-\-debug-errnos | \-\-debug-syscalls | \-\-deb
45#ifdef HAVE_LTS 45#ifdef HAVE_LTS
46This is Firejail long-term support (LTS), an enterprise focused version of the software, 46This is Firejail long-term support (LTS), an enterprise focused version of the software,
47LTS is usually supported for two or three years. 47LTS is usually supported for two or three years.
48During this time only bugs and the occasional documentation problems are fixed. 48During this time only bugs and the occasional documentation problems are fixed.
49The attack surface of the SUID executable was greatly reduced by removing some of the features. 49The attack surface of the SUID executable was greatly reduced by removing some of the features.
50.br 50.br
51 51
@@ -109,7 +109,7 @@ ptrace system call allows a full bypass of the seccomp filter.
109.br 109.br
110Example: 110Example:
111.br 111.br
112$ firejail --allow-debuggers --profile=/etc/firejail/firefox.profile strace -f firefox 112$ firejail --allow-debuggers --profile=/etc/firejail/firefox.profile strace -f firefox
113.TP 113.TP
114\fB\-\-allusers 114\fB\-\-allusers
115All directories under /home are visible inside the sandbox. By default, only current user home directory is visible. 115All directories under /home are visible inside the sandbox. By default, only current user home directory is visible.
@@ -147,12 +147,12 @@ private-bin and private-lib are disabled by default when running appimages.
147.br 147.br
148Example: 148Example:
149.br 149.br
150$ firejail --appimage krita-3.0-x86_64.appimage 150$ firejail --appimage --profile=krita krita-3.0-x86_64.appimage
151.br 151.br
152$ firejail --appimage --private krita-3.0-x86_64.appimage 152$ firejail --appimage --private --profile=krita krita-3.0-x86_64.appimage
153.br 153.br
154#ifdef HAVE_X11 154#ifdef HAVE_X11
155$ firejail --appimage --net=none --x11 krita-3.0-x86_64.appimage 155$ firejail --appimage --net=none --x11 --profile=krita krita-3.0-x86_64.appimage
156#endif 156#endif
157.TP 157.TP
158#ifdef HAVE_NETWORK 158#ifdef HAVE_NETWORK
@@ -185,10 +185,7 @@ $ firejail "\-\-blacklist=/home/username/My Virtual Machines"
185$ firejail \-\-blacklist=/home/username/My\\ Virtual\\ Machines 185$ firejail \-\-blacklist=/home/username/My\\ Virtual\\ Machines
186.TP 186.TP
187\fB\-\-build 187\fB\-\-build
188The command builds a whitelisted profile. The profile is printed on the screen. If /usr/bin/strace is installed on the system, it also 188The command builds a whitelisted profile. The profile is printed on the screen. The program is run in a very relaxed sandbox, with only --caps.drop=all and --nonewprivs. Programs that raise user privileges are not supported.
189builds a whitelisted seccomp profile. The program is run in a very relaxed sandbox,
190with only --caps.drop=all and --nonewprivs. Programs that raise user privileges are not supported
191in order to allow strace to run. Chromium and Chromium-based browsers will not work.
192.br 189.br
193 190
194.br 191.br
@@ -197,10 +194,8 @@ Example:
197$ firejail --build vlc ~/Videos/test.mp4 194$ firejail --build vlc ~/Videos/test.mp4
198.TP 195.TP
199\fB\-\-build=profile-file 196\fB\-\-build=profile-file
200The command builds a whitelisted profile, and saves it in profile-file. If /usr/bin/strace is installed on the system, it also 197The command builds a whitelisted profile, and saves it in profile-file. The program is run in a very relaxed sandbox,
201builds a whitelisted seccomp profile. The program is run in a very relaxed sandbox, 198with only --caps.drop=all and --nonewprivs. Programs that raise user privileges are not supported.
202with only --caps.drop=all and --nonewprivs. Programs that raise user privileges are not supported
203in order to allow strace to run. Chromium and Chromium-based browsers will not work.
204.br 199.br
205 200
206.br 201.br
@@ -290,8 +285,8 @@ $ firejail \-\-caps.print=3272
290Print content of file from sandbox container, see FILE TRANSFER section for more details. 285Print content of file from sandbox container, see FILE TRANSFER section for more details.
291#endif 286#endif
292.TP 287.TP
293\fB\-\-cgroup=tasks-file 288\fB\-\-cgroup=file
294Place the sandbox in the specified control group. tasks-file is the full path of cgroup tasks file. 289Place the sandbox in the specified control group. file is the full path of a tasks or cgroup.procs file.
295.br 290.br
296 291
297.br 292.br
@@ -310,6 +305,11 @@ regular user, nonewprivs and a default capabilities filter are enabled.
310Example: 305Example:
311.br 306.br
312$ firejail \-\-chroot=/media/ubuntu warzone2100 307$ firejail \-\-chroot=/media/ubuntu warzone2100
308.br
309
310.br
311For automatic mounting of X11 and PulseAudio sockets set environment variables
312FIREJAIL_CHROOT_X11 and FIREJAIL_CHROOT_PULSE.
313#endif 313#endif
314.TP 314.TP
315\fB\-\-cpu=cpu-number,cpu-number,cpu-number 315\fB\-\-cpu=cpu-number,cpu-number,cpu-number
@@ -701,6 +701,12 @@ $ firejail \-\-net=eth0 \-\-defaultgw=10.10.20.1 firefox
701\fB\-\-deterministic-exit-code 701\fB\-\-deterministic-exit-code
702Always exit firejail with the first child's exit status. The default behavior is to use the exit status of the final child to exit, which can be nondeterministic. 702Always exit firejail with the first child's exit status. The default behavior is to use the exit status of the final child to exit, which can be nondeterministic.
703.br 703.br
704
705.TP
706\fB\-\-deterministic-shutdown
707Always shut down the sandbox after the first child has terminated. The default behavior is to keep the sandbox alive as long as it contains running processes.
708.br
709
704.TP 710.TP
705\fB\-\-disable-mnt 711\fB\-\-disable-mnt
706Blacklist /mnt, /media, /run/mount and /run/media access. 712Blacklist /mnt, /media, /run/mount and /run/media access.
@@ -810,6 +816,26 @@ Example:
810$ firejail \-\-hosts-file=~/myhosts firefox 816$ firejail \-\-hosts-file=~/myhosts firefox
811 817
812.TP 818.TP
819\fB\-\-ids-check
820Check file hashes previously generated by \-\-ids-check. See INTRUSION DETECTION SYSTEM section for more details.
821.br
822
823.br
824Example:
825.br
826$ firejail \-\-ids-check
827
828.TP
829\fB\-\-ids-init
830Initialize file hashes. See INTRUSION DETECTION SYSTEM section for more details.
831.br
832
833.br
834Example:
835.br
836$ firejail \-\-ids-init
837
838.TP
813\fB\-\-ignore=command 839\fB\-\-ignore=command
814Ignore command in profile file. 840Ignore command in profile file.
815.br 841.br
@@ -947,7 +973,7 @@ $ firejail \-\-net=eth0 \-\-\iprange=192.168.1.100,192.168.1.150
947 973
948.TP 974.TP
949\fB\-\-ipc-namespace 975\fB\-\-ipc-namespace
950Enable a new IPC namespace if the sandbox was started as a regular user. IPC namespace is enabled by default 976Enable a new IPC namespace if the sandbox was started as a regular user. IPC namespace is enabled by default
951for sandboxes started as root. 977for sandboxes started as root.
952.br 978.br
953 979
@@ -1014,7 +1040,7 @@ $ sudo firejail --join-network=browser /sbin/iptables -vL
1014.br 1040.br
1015 1041
1016.br 1042.br
1017# verify IP addresses 1043# verify IP addresses
1018.br 1044.br
1019$ sudo firejail --join-network=browser ip addr 1045$ sudo firejail --join-network=browser ip addr
1020.br 1046.br
@@ -1052,6 +1078,17 @@ Same as "firejail --join=name" if sandbox with specified name exists, otherwise
1052Note that in contrary to other join options there is respective profile option. 1078Note that in contrary to other join options there is respective profile option.
1053 1079
1054.TP 1080.TP
1081\fB\-\-keep-config-pulse
1082Disable automatic ~/.config/pulse init, for complex setups such as remote
1083pulse servers or non-standard socket paths.
1084.br
1085
1086.br
1087Example:
1088.br
1089$ firejail \-\-keep-config-pulse firefox
1090
1091.TP
1055\fB\-\-keep-dev-shm 1092\fB\-\-keep-dev-shm
1056/dev/shm directory is untouched (even with --private-dev) 1093/dev/shm directory is untouched (even with --private-dev)
1057.br 1094.br
@@ -1062,6 +1099,26 @@ Example:
1062$ firejail --keep-dev-shm --private-dev 1099$ firejail --keep-dev-shm --private-dev
1063 1100
1064.TP 1101.TP
1102\fB\-\-keep-fd=all
1103Inherit all open file descriptors to the sandbox. By default only file descriptors 0, 1 and 2 are inherited to the sandbox, and all other file descriptors are closed.
1104.br
1105
1106.br
1107Example:
1108.br
1109$ firejail --keep-fd=all
1110
1111.TP
1112\fB\-\-keep-fd=file_descriptor
1113Don't close specified open file descriptors. By default only file descriptors 0, 1 and 2 are inherited to the sandbox, and all other file descriptors are closed.
1114.br
1115
1116.br
1117Example:
1118.br
1119$ firejail --keep-fd=3,4,5
1120
1121.TP
1065\fB\-\-keep-var-tmp 1122\fB\-\-keep-var-tmp
1066/var/tmp directory is untouched. 1123/var/tmp directory is untouched.
1067.br 1124.br
@@ -1214,7 +1271,7 @@ $ firejail \-\-net=br0 \-\-net=br1
1214.TP 1271.TP
1215\fB\-\-net=ethernet_interface|wireless_interface 1272\fB\-\-net=ethernet_interface|wireless_interface
1216Enable a new network namespace and connect it 1273Enable a new network namespace and connect it
1217to this ethernet interface using the standard Linux macvlan|ipvaln 1274to this ethernet interface using the standard Linux macvlan|ipvlan
1218driver. Unless specified with option \-\-ip and \-\-defaultgw, an 1275driver. Unless specified with option \-\-ip and \-\-defaultgw, an
1219IP address and a default gateway will be assigned automatically 1276IP address and a default gateway will be assigned automatically
1220to the sandbox. The IP address is verified using ARP before 1277to the sandbox. The IP address is verified using ARP before
@@ -1401,6 +1458,30 @@ $ firejail --name=browser --net=eth0 --netfilter firefox &
1401$ firejail --netfilter6.print=browser 1458$ firejail --netfilter6.print=browser
1402 1459
1403.TP 1460.TP
1461\fB\-\-netlock
1462Several type of programs (email clients, multiplayer games etc.) talk to a very small
1463number of IP addresses. But the best example is tor browser. It only talks to a guard node,
1464and there are two or three more on standby in case the main one fails.
1465During startup, the browser contacts all of them, after that it keeps talking to the main
1466one... for weeks!
1467
1468Use the network locking feature to build and deploy a custom network firewall in your sandbox.
1469The firewall allows only the traffic to the IP addresses detected during the program
1470startup. Traffic to any other address is quietly dropped. By default the network monitoring
1471time is one minute.
1472
1473A network namespace (\-\-net=eth0) is required for this feature to work. Example:
1474.br
1475
1476.br
1477$ firejail --net=eth0 --netlock \\
1478.br
1479--private=~/tor-browser_en-US ./start-tor-browser.desktop
1480.br
1481
1482.br
1483
1484.TP
1404\fB\-\-netmask=address 1485\fB\-\-netmask=address
1405Use this option when you want to assign an IP address in a new namespace and 1486Use this option when you want to assign an IP address in a new namespace and
1406the parent interface specified by --net is not configured. An IP address and 1487the parent interface specified by --net is not configured. An IP address and
@@ -1437,6 +1518,40 @@ PID User RX(KB/s) TX(KB/s) Command
14371294 netblue 53.355 1.473 firejail \-\-net=eth0 firefox 15181294 netblue 53.355 1.473 firejail \-\-net=eth0 firefox
1438.br 1519.br
14397383 netblue 9.045 0.112 firejail \-\-net=eth0 transmission 15207383 netblue 9.045 0.112 firejail \-\-net=eth0 transmission
1521.TP
1522\fB\-\-nettrace[=name|pid]
1523Monitor TCP and UDP traffic coming into the sandbox specified by name or pid. Only networked sandboxes
1524created with \-\-net are supported.
1525.br
1526
1527.br
1528Without a name/pid, Firejail will monitor the main system network namespace.
1529.br
1530
1531.br
1532 $ firejail --nettrace=browser
1533.br
1534
1535.br
1536 95 KB/s geoip 457, IP database 4436
1537.br
1538 52 KB/s *********** 64.222.84.207:443 United States
1539.br
1540 33 KB/s ******* 89.147.74.105:63930 Hungary
1541.br
1542 0 B/s 45.90.28.0:443 NextDNS
1543.br
1544 0 B/s 94.70.122.176:52309(UDP) Greece
1545.br
1546 339 B/s 104.26.7.35:443 Cloudflare
1547.br
1548
1549.br
1550If /usr/bin/geoiplookup is installed (geoip-bin package in Debian),
1551the country the IP address originates from is added to the trace.
1552We also use the static IP map in /etc/firejail/hostnames
1553to print the domain names for some of the more common websites and cloud platforms.
1554No external services are contacted for reverse IP lookup.
1440#endif 1555#endif
1441.TP 1556.TP
1442\fB\-\-nice=value 1557\fB\-\-nice=value
@@ -1460,15 +1575,8 @@ Example:
1460$ firejail --no3d firefox 1575$ firejail --no3d firefox
1461 1576
1462.TP 1577.TP
1463\fB\-\-noautopulse 1578\fB\-\-noautopulse \fR(deprecated)
1464Disable automatic ~/.config/pulse init, for complex setups such as remote 1579See --keep-config-pulse.
1465pulse servers or non-standard socket paths.
1466.br
1467
1468.br
1469Example:
1470.br
1471$ firejail \-\-noautopulse firefox
1472 1580
1473.TP 1581.TP
1474\fB\-\-noblacklist=dirname_or_filename 1582\fB\-\-noblacklist=dirname_or_filename
@@ -1576,6 +1684,10 @@ does not result in an increase of privilege. This option
1576is enabled by default if seccomp filter is activated. 1684is enabled by default if seccomp filter is activated.
1577 1685
1578.TP 1686.TP
1687\fB\-\-noprinters
1688Disable printers.
1689
1690.TP
1579\fB\-\-noprofile 1691\fB\-\-noprofile
1580Do not use a security profile. 1692Do not use a security profile.
1581.br 1693.br
@@ -1797,8 +1909,9 @@ The files in the list must be expressed as relative to the /bin,
1797/sbin, /usr/bin, /usr/sbin, or /usr/local/bin directories. 1909/sbin, /usr/bin, /usr/sbin, or /usr/local/bin directories.
1798If no listed files are found, /bin directory will be empty. 1910If no listed files are found, /bin directory will be empty.
1799The same directory is also bind-mounted over /sbin, /usr/bin, /usr/sbin and /usr/local/bin. 1911The same directory is also bind-mounted over /sbin, /usr/bin, /usr/sbin and /usr/local/bin.
1800All modifications are discarded when the sandbox is closed. File globbing is supported, 1912All modifications are discarded when the sandbox is closed.
1801see \fBFILE GLOBBING\fR section for more details. 1913Multiple private-bin commands are allowed and they accumulate.
1914File globbing is supported, see \fBFILE GLOBBING\fR section for more details.
1802.br 1915.br
1803 1916
1804.br 1917.br
@@ -1828,7 +1941,6 @@ $ firejail \-\-private-cache openbox
1828.TP 1941.TP
1829\fB\-\-private-cwd 1942\fB\-\-private-cwd
1830Set working directory inside jail to the home directory, and failing that, the root directory. 1943Set working directory inside jail to the home directory, and failing that, the root directory.
1831.br
1832Does not impact working directory of profile include paths. 1944Does not impact working directory of profile include paths.
1833.br 1945.br
1834 1946
@@ -1849,7 +1961,7 @@ $ pwd
1849.TP 1961.TP
1850\fB\-\-private-cwd=directory 1962\fB\-\-private-cwd=directory
1851Set working directory inside the jail. 1963Set working directory inside the jail.
1852.br 1964Full directory path is required. Symbolic links are not allowed.
1853Does not impact working directory of profile include paths. 1965Does not impact working directory of profile include paths.
1854.br 1966.br
1855 1967
@@ -1892,11 +2004,10 @@ $
1892Build a new /etc in a temporary 2004Build a new /etc in a temporary
1893filesystem, and copy the files and directories in the list. 2005filesystem, and copy the files and directories in the list.
1894The files and directories in the list must be expressed as relative to 2006The files and directories in the list must be expressed as relative to
1895the /etc directory, and must not contain the / character 2007the /etc directory (e.g., /etc/foo must be expressed as foo).
1896(e.g., /etc/foo must be expressed as foo, but /etc/foo/bar --
1897expressed as foo/bar -- is disallowed).
1898If no listed file is found, /etc directory will be empty. 2008If no listed file is found, /etc directory will be empty.
1899All modifications are discarded when the sandbox is closed. 2009All modifications are discarded when the sandbox is closed.
2010Multiple private-etc commands are allowed and they accumulate.
1900.br 2011.br
1901 2012
1902.br 2013.br
@@ -1997,7 +2108,7 @@ Build a new /srv in a temporary
1997filesystem, and copy the files and directories in the list. 2108filesystem, and copy the files and directories in the list.
1998The files and directories in the list must be expressed as relative to 2109The files and directories in the list must be expressed as relative to
1999the /srv directory, and must not contain the / character 2110the /srv directory, and must not contain the / character
2000(e.g., /opt/srv must be expressed as foo, but /srv/foo/bar -- 2111(e.g., /srv/foo must be expressed as foo, but /srv/foo/bar --
2001expressed as srv/bar -- is disallowed). 2112expressed as srv/bar -- is disallowed).
2002If no listed file is found, /srv directory will be empty. 2113If no listed file is found, /srv directory will be empty.
2003All modifications are discarded when the sandbox is closed. 2114All modifications are discarded when the sandbox is closed.
@@ -2055,7 +2166,7 @@ $ firejail \-\-profile.print=browser
2055.TP 2166.TP
2056\fB\-\-protocol=protocol,protocol,protocol 2167\fB\-\-protocol=protocol,protocol,protocol
2057Enable protocol filter. The filter is based on seccomp and checks the first argument to socket system call. 2168Enable protocol filter. The filter is based on seccomp and checks the first argument to socket system call.
2058Recognized values: unix, inet, inet6, netlink, packet and bluetooth. This option is not supported for i386 architecture. 2169Recognized values: unix, inet, inet6, netlink, packet, and bluetooth. This option is not supported for i386 architecture.
2059.br 2170.br
2060 2171
2061.br 2172.br
@@ -2127,11 +2238,12 @@ $ firejail --read-only=~/test --read-write=~/test/a
2127.TP 2238.TP
2128\fB\-\-rlimit-as=number 2239\fB\-\-rlimit-as=number
2129Set the maximum size of the process's virtual memory (address space) in bytes. 2240Set the maximum size of the process's virtual memory (address space) in bytes.
2241Use k(ilobyte), m(egabyte) or g(igabyte) for size suffix (base 1024).
2130 2242
2131.TP 2243.TP
2132\fB\-\-rlimit-cpu=number 2244\fB\-\-rlimit-cpu=number
2133Set the maximum limit, in seconds, for the amount of CPU time each 2245Set the maximum limit, in seconds, for the amount of CPU time each
2134sandboxed process can consume. When the limit is reached, the processes are killed. 2246sandboxed process can consume. When the limit is reached, the processes are killed.
2135 2247
2136The CPU limit is a limit on CPU seconds rather than elapsed time. CPU seconds is basically how many seconds 2248The CPU limit is a limit on CPU seconds rather than elapsed time. CPU seconds is basically how many seconds
2137the CPU has been in use and does not necessarily directly relate to the elapsed time. Linux kernel keeps 2249the CPU has been in use and does not necessarily directly relate to the elapsed time. Linux kernel keeps
@@ -2140,6 +2252,7 @@ track of CPU seconds for each process independently.
2140.TP 2252.TP
2141\fB\-\-rlimit-fsize=number 2253\fB\-\-rlimit-fsize=number
2142Set the maximum file size that can be created by a process. 2254Set the maximum file size that can be created by a process.
2255Use k(ilobyte), m(egabyte) or g(igabyte) for size suffix (base 1024).
2143.TP 2256.TP
2144\fB\-\-rlimit-nofile=number 2257\fB\-\-rlimit-nofile=number
2145Set the maximum number of files that can be opened by a process. 2258Set the maximum number of files that can be opened by a process.
@@ -2174,7 +2287,7 @@ $ firejail \-\-net=eth0 \-\-scan
2174.TP 2287.TP
2175\fB\-\-seccomp 2288\fB\-\-seccomp
2176Enable seccomp filter and blacklist the syscalls in the default list, 2289Enable seccomp filter and blacklist the syscalls in the default list,
2177which is @default-nodebuggers unless allow-debuggers is specified, 2290which is @default-nodebuggers unless \-\-allow-debuggers is specified,
2178then it is @default. 2291then it is @default.
2179 2292
2180.br 2293.br
@@ -2185,18 +2298,18 @@ system call groups are defined: @aio, @basic-io, @chown, @clock,
2185@network-io, @obsolete, @privileged, @process, @raw-io, @reboot, 2298@network-io, @obsolete, @privileged, @process, @raw-io, @reboot,
2186@resources, @setuid, @swap, @sync, @system-service and @timer. 2299@resources, @setuid, @swap, @sync, @system-service and @timer.
2187More information about groups can be found in /usr/share/doc/firejail/syscalls.txt 2300More information about groups can be found in /usr/share/doc/firejail/syscalls.txt
2301.br
2188 2302
2189In addition, a system call can be specified by its number instead of 2303.br
2190name with prefix $, so for example $165 would be equal to mount on i386. 2304The default list can be customized, see \-\-seccomp= for a description.
2191Exceptions can be allowed with prefix !. 2305It can be customized also globally in /etc/firejail/firejail.config file.
2306.br
2192 2307
2193.br 2308.br
2194System architecture is strictly imposed only if flag 2309System architecture is strictly imposed only if flag
2195\-\-seccomp.block-secondary is used. The filter is applied at run time 2310\-\-seccomp.block-secondary is used. The filter is applied at run time
2196only if the correct architecture was detected. For the case of I386 2311only if the correct architecture was detected. For the case of I386
2197and AMD64 both 32-bit and 64-bit filters are installed. On a 64 bit 2312and AMD64 both 32-bit and 64-bit filters are installed.
2198architecture, an additional filter for 32 bit system calls can be
2199installed with \-\-seccomp.32.
2200.br 2313.br
2201 2314
2202.br 2315.br
@@ -2207,11 +2320,14 @@ Firejail will print seccomp violations to the audit log if the kernel was compil
2207Example: 2320Example:
2208.br 2321.br
2209$ firejail \-\-seccomp 2322$ firejail \-\-seccomp
2323
2324
2210.TP 2325.TP
2211\fB\-\-seccomp=syscall,@group,!syscall2 2326\fB\-\-seccomp=syscall,@group,!syscall2
2212Enable seccomp filter, whitelist "syscall2", but blacklist the default 2327Enable seccomp filter, blacklist the default list and the syscalls or syscall groups
2213list and the syscalls or syscall groups specified by the 2328specified by the command, but don't blacklist "syscall2". On a 64 bit
2214command. 2329architecture, an additional filter for 32 bit system calls can be
2330installed with \-\-seccomp.32.
2215.br 2331.br
2216 2332
2217.br 2333.br
@@ -2221,6 +2337,13 @@ $ firejail \-\-seccomp=utime,utimensat,utimes firefox
2221.br 2337.br
2222$ firejail \-\-seccomp=@clock,mkdir,unlinkat transmission-gtk 2338$ firejail \-\-seccomp=@clock,mkdir,unlinkat transmission-gtk
2223.br 2339.br
2340$ firejail '\-\-seccomp=@ipc,!pipe,!pipe2' audacious
2341.br
2342
2343.br
2344Syscalls can be specified by their number if prefix $ is added,
2345so for example $165 would be equal to mount on i386.
2346.br
2224 2347
2225.br 2348.br
2226Instead of dropping the syscall by returning EPERM, another error 2349Instead of dropping the syscall by returning EPERM, another error
@@ -2233,6 +2356,7 @@ by using \fBsyscall:kill\fR syntax, or the attempt may be logged with
2233 2356
2234.br 2357.br
2235Example: 2358Example:
2359.br
2236$ firejail \-\-seccomp=unlinkat:ENOENT,utimensat,utimes 2360$ firejail \-\-seccomp=unlinkat:ENOENT,utimensat,utimes
2237.br 2361.br
2238Parent pid 10662, child pid 10663 2362Parent pid 10662, child pid 10663
@@ -2241,9 +2365,13 @@ Child process initialized
2241.br 2365.br
2242$ touch testfile 2366$ touch testfile
2243.br 2367.br
2368$ ls testfile
2369.br
2370testfile
2371.br
2244$ rm testfile 2372$ rm testfile
2245.br 2373.br
2246rm: cannot remove `testfile': Operation not permitted 2374rm: cannot remove `testfile': No such file or directory
2247.br 2375.br
2248 2376
2249.br 2377.br
@@ -2256,7 +2384,7 @@ filters.
2256.br 2384.br
2257Example: 2385Example:
2258.br 2386.br
2259$ firejail \-\-noprofile \-\-shell=none \-\-seccomp=execve bash 2387$ firejail \-\-noprofile \-\-shell=none \-\-seccomp=execve sh
2260.br 2388.br
2261Parent pid 32751, child pid 32752 2389Parent pid 32751, child pid 32752
2262.br 2390.br
@@ -2268,8 +2396,7 @@ Child process initialized in 46.44 ms
2268.br 2396.br
2269$ ls 2397$ ls
2270.br 2398.br
2271Bad system call 2399Operation not permitted
2272.br
2273 2400
2274.TP 2401.TP
2275\fB\-\-seccomp.block-secondary 2402\fB\-\-seccomp.block-secondary
@@ -2313,15 +2440,15 @@ Child process initialized
2313.br 2440.br
2314$ touch testfile 2441$ touch testfile
2315.br 2442.br
2443$ ls testfile
2444.br
2445testfile
2446.br
2316$ rm testfile 2447$ rm testfile
2317.br 2448.br
2318rm: cannot remove `testfile': Operation not permitted 2449rm: cannot remove `testfile': No such file or directory
2319.br 2450.br
2320 2451
2321
2322
2323
2324
2325.TP 2452.TP
2326\fB\-\-seccomp.keep=syscall,@group,!syscall2 2453\fB\-\-seccomp.keep=syscall,@group,!syscall2
2327Enable seccomp filter, blacklist all syscall not listed and "syscall2". 2454Enable seccomp filter, blacklist all syscall not listed and "syscall2".
@@ -2556,6 +2683,13 @@ $ firejail \-\-list
2556.br 2683.br
2557$ firejail \-\-shutdown=3272 2684$ firejail \-\-shutdown=3272
2558.TP 2685.TP
2686\fB\-\-tab
2687Enable shell tab completion in sandboxes using private or whitelisted home directories.
2688.br
2689
2690.br
2691$ firejail \-\-private --tab
2692.TP
2559\fB\-\-timeout=hh:mm:ss 2693\fB\-\-timeout=hh:mm:ss
2560Kill the sandbox automatically after the time has elapsed. The time is specified in hours/minutes/seconds format. 2694Kill the sandbox automatically after the time has elapsed. The time is specified in hours/minutes/seconds format.
2561.br 2695.br
@@ -2564,14 +2698,13 @@ Kill the sandbox automatically after the time has elapsed. The time is specified
2564$ firejail \-\-timeout=01:30:00 firefox 2698$ firejail \-\-timeout=01:30:00 firefox
2565.TP 2699.TP
2566\fB\-\-tmpfs=dirname 2700\fB\-\-tmpfs=dirname
2567Mount a writable tmpfs filesystem on directory dirname. This option is available only when running the sandbox as root. 2701Mount a writable tmpfs filesystem on directory dirname. Directories outside user home or not owned by the user are not allowed. Sandboxes running as root are exempt from these restrictions. File globbing is supported, see \fBFILE GLOBBING\fR section for more details.
2568File globbing is supported, see \fBFILE GLOBBING\fR section for more details.
2569.br 2702.br
2570 2703
2571.br 2704.br
2572Example: 2705Example:
2573.br 2706.br
2574# firejail \-\-tmpfs=/var 2707$ firejail \-\-tmpfs=~/.local/share
2575.TP 2708.TP
2576\fB\-\-top 2709\fB\-\-top
2577Monitor the most CPU-intensive sandboxes, see \fBMONITORING\fR section for more details. 2710Monitor the most CPU-intensive sandboxes, see \fBMONITORING\fR section for more details.
@@ -2721,8 +2854,9 @@ $ firejail \-\-net=br0 --veth-name=if0
2721\fB\-\-whitelist=dirname_or_filename 2854\fB\-\-whitelist=dirname_or_filename
2722Whitelist directory or file. A temporary file system is mounted on the top directory, and the 2855Whitelist directory or file. A temporary file system is mounted on the top directory, and the
2723whitelisted files are mount-binded inside. Modifications to whitelisted files are persistent, 2856whitelisted files are mount-binded inside. Modifications to whitelisted files are persistent,
2724everything else is discarded when the sandbox is closed. The top directory could be 2857everything else is discarded when the sandbox is closed. The top directory can be
2725user home, /dev, /etc, /media, /mnt, /opt, /run/user/$UID, /srv, /sys/module, /tmp, /usr/share and /var. 2858all directories in / (except /proc and /sys), /sys/module, /run/user/$UID, $HOME and
2859all directories in /usr.
2726.br 2860.br
2727 2861
2728.br 2862.br
@@ -2848,7 +2982,7 @@ and it is installed by default on most Linux distributions. It provides support
2848connection model. Untrusted clients are restricted in certain ways to prevent them from reading window 2982connection model. Untrusted clients are restricted in certain ways to prevent them from reading window
2849contents of other clients, stealing input events, etc. 2983contents of other clients, stealing input events, etc.
2850 2984
2851The untrusted mode has several limitations. A lot of regular programs assume they are a trusted X11 clients 2985The untrusted mode has several limitations. A lot of regular programs assume they are a trusted X11 clients
2852and will crash or lock up when run in untrusted mode. Chromium browser and xterm are two examples. 2986and will crash or lock up when run in untrusted mode. Chromium browser and xterm are two examples.
2853Firefox and transmission-gtk seem to be working fine. 2987Firefox and transmission-gtk seem to be working fine.
2854A network namespace is not required for this option. 2988A network namespace is not required for this option.
@@ -3179,6 +3313,65 @@ $ firejail \-\-put=mybrowser xpra-clipboard.png ~/Downloads/xpra-clipboard.png
3179$ firejail \-\-cat=mybrowser ~/.bashrc 3313$ firejail \-\-cat=mybrowser ~/.bashrc
3180.br 3314.br
3181#endif 3315#endif
3316
3317.SH INTRUSION DETECTION SYSTEM (IDS)
3318The host-based intrusion detection system tracks down and audits user and system file modifications.
3319The feature is configured using /etc/firejail/ids.config file, the checksums are stored in /var/lib/firejail/USERNAME.ids,
3320where USERNAME is the name of the current user. We use BLAKE2 cryptographic function for hashing.
3321
3322As a regular user, initialize the database:
3323.br
3324
3325.br
3326$ firejail --ids-init
3327.br
3328Opening config file /etc/firejail/ids.config
3329.br
3330Loading config file /etc/firejail/ids.config
3331.br
3332Opening config file /etc/firejail/ids.config.local
3333.br
3334500 1000 1500 2000
3335.br
33362466 files scanned
3337.br
3338IDS database initialized
3339.br
3340
3341.br
3342The default configuration targets several system executables in directories such as /bin, /sbin, /usr/bin, /usr/sbin, and several critical config files in user home directory
3343such as ~/.bashrc, ~/.xinitrc, and ~/.config/autostart. Several system config files in /etc directory are also hashed.
3344.br
3345
3346.br
3347Run --ids-check to audit the system:
3348.br
3349
3350.br
3351$ firejail --ids-check
3352.br
3353Opening config file /etc/firejail/ids.config
3354.br
3355Loading config file /etc/firejail/ids.config
3356.br
3357Opening config file /etc/firejail/ids.config.local
3358.br
3359500 1000 1500
3360.br
3361Warning: modified /home/netblue/.bashrc
3362.br
33632000
3364.br
33652466 files scanned: modified 1, permissions 0, new 0, removed 0
3366.br
3367
3368.br
3369The program will print the files that have been modified since the database was created, or the files with different access permissions.
3370New files and deleted files are also flagged.
3371
3372Currently while scanning the file system, symbolic links are not followed, and files the user doesn't have read access to are silently dropped.
3373The program can also be run as root (sudo firejail --ids-init/--ids-check).
3374
3182.SH MONITORING 3375.SH MONITORING
3183Option \-\-list prints a list of all sandboxes. The format 3376Option \-\-list prints a list of all sandboxes. The format
3184for each process entry is as follows: 3377for each process entry is as follows:
@@ -3239,7 +3432,7 @@ The owner of the sandbox.
3239.SH RESTRICTED SHELL 3432.SH RESTRICTED SHELL
3240To configure a restricted shell, replace /bin/bash with /usr/bin/firejail in 3433To configure a restricted shell, replace /bin/bash with /usr/bin/firejail in
3241/etc/passwd file for each user that needs to be restricted. Alternatively, 3434/etc/passwd file for each user that needs to be restricted. Alternatively,
3242you can specify /usr/bin/firejail in adduser command: 3435you can specify /usr/bin/firejail in adduser command:
3243 3436
3244adduser \-\-shell /usr/bin/firejail username 3437adduser \-\-shell /usr/bin/firejail username
3245 3438
@@ -3249,7 +3442,7 @@ Additional arguments passed to firejail executable upon login are declared in /e
3249Several command line options can be passed to the program using 3442Several command line options can be passed to the program using
3250profile files. Firejail chooses the profile file as follows: 3443profile files. Firejail chooses the profile file as follows:
3251 3444
32521. If a profile file is provided by the user with --profile=FILE option, the profile FILE is loaded. If a profile name is given, it is searched for first in the ~/.config/firejail directory and if not found then in /etc/firejail directory. Profile names do not include the .profile suffix. If there is a file with the same name as the given profile name, it will be used instead of doing the profile search. To force a profile search, prefix the profile name with a colon (:), eg. --profile=:PROFILE_NAME. 34451. If a profile file is provided by the user with --profile=FILE option, the profile FILE is loaded. If a profile name is given, it is searched for first in the ~/.config/firejail directory and if not found then in /etc/firejail directory. Profile names do not include the .profile suffix. If there is a file with the same name as the given profile name, it will be used instead of doing the profile search. To force a profile search, prefix the profile name with a colon (:), eg. --profile=:PROFILE_NAME.
3253Example: 3446Example:
3254.PP 3447.PP
3255.RS 3448.RS
@@ -3365,7 +3558,7 @@ Homepage: https://firejail.wordpress.com
3365.BR firejail-profile (5), 3558.BR firejail-profile (5),
3366.BR firejail-login (5), 3559.BR firejail-login (5),
3367.BR firejail-users (5), 3560.BR firejail-users (5),
3368.BR jailtest (1) 3561.BR jailcheck (1)
3369 3562
3370.UR https://github.com/netblue30/firejail/wiki 3563.UR https://github.com/netblue30/firejail/wiki
3371.UE , 3564.UE ,
diff --git a/src/man/firemon.txt b/src/man/firemon.txt
index 64f15a1f0..c4e6e15b3 100644
--- a/src/man/firemon.txt
+++ b/src/man/firemon.txt
@@ -56,7 +56,7 @@ Print route table for each sandbox.
56Print seccomp configuration for each sandbox. 56Print seccomp configuration for each sandbox.
57.TP 57.TP
58\fB\-\-top 58\fB\-\-top
59Monitor the most CPU-intensive sandboxes. This command is similar to 59Monitor the most CPU-intensive sandboxes. This command is similar to
60the regular UNIX top command, however it applies only to sandboxes. 60the regular UNIX top command, however it applies only to sandboxes.
61.TP 61.TP
62\fB\-\-tree 62\fB\-\-tree
@@ -120,4 +120,4 @@ Homepage: https://firejail.wordpress.com
120.BR firejail-profile (5), 120.BR firejail-profile (5),
121.BR firejail-login (5), 121.BR firejail-login (5),
122.BR firejail-users (5), 122.BR firejail-users (5),
123.BR jailtest (1) 123.BR jailcheck (1)
diff --git a/src/man/jailtest.txt b/src/man/jailcheck.txt
index b52fc5eed..483f47fb9 100644
--- a/src/man/jailtest.txt
+++ b/src/man/jailcheck.txt
@@ -1,29 +1,30 @@
1.TH JAILTEST 1 "MONTH YEAR" "VERSION" "JAILTEST man page" 1.TH JAILCHECK 1 "MONTH YEAR" "VERSION" "JAILCHECK man page"
2.SH NAME 2.SH NAME
3jailtest \- Simple utility program to test running sandboxes 3jailcheck \- Simple utility program to test running sandboxes
4.SH SYNOPSIS 4.SH SYNOPSIS
5sudo jailtest [OPTIONS] [directory] 5sudo jailcheck [OPTIONS] [directory]
6.SH DESCRIPTION 6.SH DESCRIPTION
7WORK IN PROGRESS! 7jailcheck attaches itself to all sandboxes started by the user and performs some basic tests
8jailtest attaches itself to all sandboxes started by the user and performs some basic tests
9on the sandbox filesystem: 8on the sandbox filesystem:
10.TP 9.TP
11\fB1. Virtual directories 10\fB1. Virtual directories
12jailtest extracts a list with the main virtual directories installed by the sandbox. 11jailcheck extracts a list with the main virtual directories installed by the sandbox.
13These directories are build by firejail at startup using --private* and --whitelist commands. 12These directories are build by firejail at startup using --private* and --whitelist commands.
14.TP 13.TP
15\fB2. Noexec test 14\fB2. Noexec test
16jailtest inserts executable programs in /home/username, /tmp, and /var/tmp directories 15jailcheck inserts executable programs in /home/username, /tmp, and /var/tmp directories
17and tries to run them from inside the sandbox, thus testing if the directory is executable or not. 16and tries to run them from inside the sandbox, thus testing if the directory is executable or not.
18.TP 17.TP
19\fB3. Read access test 18\fB3. Read access test
20jailtest creates test files in the directories specified by the user and tries to read 19jailcheck creates test files in the directories specified by the user and tries to read
21them from inside the sandbox. 20them from inside the sandbox.
22.TP 21.TP
23\fB4. AppArmor test 22\fB4. AppArmor test
24.TP 23.TP
25\fB5. Seccomp test 24\fB5. Seccomp test
26.TP 25.TP
26\fB6. Networking test
27.TP
27The program is started as root using sudo. 28The program is started as root using sudo.
28 29
29.SH OPTIONS 30.SH OPTIONS
@@ -49,7 +50,7 @@ It is followed by relevant sandbox information, such as the virtual directories
49 50
50.SH EXAMPLE 51.SH EXAMPLE
51 52
52$ sudo jailtest 53$ sudo jailcheck
53.br 54.br
542014:netblue::firejail /usr/bin/gimp 552014:netblue::firejail /usr/bin/gimp
55.br 56.br
@@ -57,6 +58,8 @@ $ sudo jailtest
57.br 58.br
58 Warning: I can run programs in /home/netblue 59 Warning: I can run programs in /home/netblue
59.br 60.br
61 Networking: disabled
62.br
60 63
61.br 64.br
622055:netblue::firejail /usr/bin/ssh -X netblue@x.y.z.net 652055:netblue::firejail /usr/bin/ssh -X netblue@x.y.z.net
@@ -65,12 +68,16 @@ $ sudo jailtest
65.br 68.br
66 Warning: I can read ~/.ssh 69 Warning: I can read ~/.ssh
67.br 70.br
71 Networking: enabled
72.br
68 73
69.br 74.br
702186:netblue:libreoffice:firejail --appimage /opt/LibreOffice-fresh.appimage 752186:netblue:libreoffice:firejail --appimage /opt/LibreOffice-fresh.appimage
71.br 76.br
72 Virtual dirs: /tmp, /var/tmp, /dev, 77 Virtual dirs: /tmp, /var/tmp, /dev,
73.br 78.br
79 Networking: enabled
80.br
74 81
75.br 82.br
7626090:netblue::/usr/bin/firejail /opt/firefox/firefox 8326090:netblue::/usr/bin/firejail /opt/firefox/firefox
@@ -79,6 +86,8 @@ $ sudo jailtest
79.br 86.br
80 /run/user/1000, 87 /run/user/1000,
81.br 88.br
89 Networking: enabled
90.br
82 91
83.br 92.br
8426160:netblue:tor:firejail --private=~/tor-browser_en-US ./start-tor 9326160:netblue:tor:firejail --private=~/tor-browser_en-US ./start-tor
@@ -91,6 +100,8 @@ $ sudo jailtest
91.br 100.br
92 Warning: I can run programs in /home/netblue 101 Warning: I can run programs in /home/netblue
93.br 102.br
103 Networking: enabled
104.br
94 105
95 106
96.SH LICENSE 107.SH LICENSE
diff --git a/src/man/preproc.awk b/src/man/preproc.awk
index 1ce5c82de..d3a2b71c9 100755
--- a/src/man/preproc.awk
+++ b/src/man/preproc.awk
@@ -1,6 +1,6 @@
1#!/usr/bin/gawk -E 1#!/usr/bin/gawk -E
2 2
3# Copyright (c) 2019-2021 rusty-snake 3# Copyright (c) 2019-2022 rusty-snake
4# 4#
5# Permission is hereby granted, free of charge, to any person obtaining a copy 5# Permission is hereby granted, free of charge, to any person obtaining a copy
6# of this software and associated documentation files (the "Software"), to deal 6# of this software and associated documentation files (the "Software"), to deal
diff --git a/src/profstats/Makefile.in b/src/profstats/Makefile.in
index e025f5939..fa1b4f200 100644
--- a/src/profstats/Makefile.in
+++ b/src/profstats/Makefile.in
@@ -3,7 +3,7 @@ all: profstats
3 3
4include ../common.mk 4include ../common.mk
5 5
6%.o : %.c $(H_FILE_LIST) 6%.o : %.c $(H_FILE_LIST) ../include/common.h
7 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@ 7 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@
8 8
9profstats: $(OBJS) 9profstats: $(OBJS)
diff --git a/src/profstats/main.c b/src/profstats/main.c
index 5035280b1..595a94c11 100644
--- a/src/profstats/main.c
+++ b/src/profstats/main.c
@@ -1,5 +1,5 @@
1 /* 1 /*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
@@ -17,10 +17,8 @@
17 * with this program; if not, write to the Free Software Foundation, Inc., 17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/ 19*/
20#include <stdio.h> 20
21#include <stdlib.h> 21#include "../include/common.h"
22#include <string.h>
23#include <assert.h>
24 22
25#define MAXBUF 2048 23#define MAXBUF 2048
26// stats 24// stats
@@ -46,6 +44,7 @@ static int cnt_whitelistusrshare = 0; // include whitelist-usr-share-common.inc
46static int cnt_ssh = 0; 44static int cnt_ssh = 0;
47static int cnt_mdwx = 0; 45static int cnt_mdwx = 0;
48static int cnt_whitelisthome = 0; 46static int cnt_whitelisthome = 0;
47static int cnt_noroot = 0;
49 48
50static int level = 0; 49static int level = 0;
51static int arg_debug = 0; 50static int arg_debug = 0;
@@ -65,27 +64,31 @@ static int arg_mdwx = 0;
65static int arg_dbus_system_none = 0; 64static int arg_dbus_system_none = 0;
66static int arg_dbus_user_none = 0; 65static int arg_dbus_user_none = 0;
67static int arg_whitelisthome = 0; 66static int arg_whitelisthome = 0;
68 67static int arg_noroot = 0;
68static int arg_print_blacklist = 0;
69static int arg_print_whitelist = 0;
69 70
70static char *profile = NULL; 71static char *profile = NULL;
71 72
72
73static void usage(void) { 73static void usage(void) {
74 printf("proftool - print profile statistics\n"); 74 printf("profstats - print profile statistics\n");
75 printf("Usage: proftool [options] file[s]\n"); 75 printf("Usage: profstats [options] file[s]\n");
76 printf("Options:\n"); 76 printf("Options:\n");
77 printf(" --apparmor - print profiles without apparmor\n"); 77 printf(" --apparmor - print profiles without apparmor\n");
78 printf(" --caps - print profiles without caps\n"); 78 printf(" --caps - print profiles without caps\n");
79 printf(" --dbus-system-none - profiles without \"dbus-system none\"\n"); 79 printf(" --dbus-system-none - print profiles without \"dbus-system none\"\n");
80 printf(" --dbus-user-none - profiles without \"dbus-user none\"\n"); 80 printf(" --dbus-user-none - print profiles without \"dbus-user none\"\n");
81 printf(" --ssh - print profiles without \"include disable-common.inc\"\n"); 81 printf(" --ssh - print profiles without \"include disable-common.inc\"\n");
82 printf(" --noexec - print profiles without \"include disable-exec.inc\"\n"); 82 printf(" --noexec - print profiles without \"include disable-exec.inc\"\n");
83 printf(" --noroot - print profiles without \"noroot\"\n");
83 printf(" --private-bin - print profiles without private-bin\n"); 84 printf(" --private-bin - print profiles without private-bin\n");
84 printf(" --private-dev - print profiles without private-dev\n"); 85 printf(" --private-dev - print profiles without private-dev\n");
85 printf(" --private-etc - print profiles without private-etc\n"); 86 printf(" --private-etc - print profiles without private-etc\n");
86 printf(" --private-tmp - print profiles without private-tmp\n"); 87 printf(" --private-tmp - print profiles without private-tmp\n");
88 printf(" --print-blacklist - print all --blacklist for a profile\n");
89 printf(" --print-whitelist - print all --private and --whitelist for a profile\n");
87 printf(" --seccomp - print profiles without seccomp\n"); 90 printf(" --seccomp - print profiles without seccomp\n");
88 printf(" --memory-deny-write-execute - profile without \"memory-deny-write-execute\"\n"); 91 printf(" --memory-deny-write-execute - print profiles without \"memory-deny-write-execute\"\n");
89 printf(" --whitelist-home - print profiles whitelisting home directory\n"); 92 printf(" --whitelist-home - print profiles whitelisting home directory\n");
90 printf(" --whitelist-var - print profiles without \"include whitelist-var-common.inc\"\n"); 93 printf(" --whitelist-var - print profiles without \"include whitelist-var-common.inc\"\n");
91 printf(" --whitelist-runuser - print profiles without \"include whitelist-runuser-common.inc\" or \"blacklist ${RUNUSER}\"\n"); 94 printf(" --whitelist-runuser - print profiles without \"include whitelist-runuser-common.inc\" or \"blacklist ${RUNUSER}\"\n");
@@ -94,8 +97,9 @@ static void usage(void) {
94 printf("\n"); 97 printf("\n");
95} 98}
96 99
97void process_file(const char *fname) { 100static void process_file(char *fname) {
98 assert(fname); 101 assert(fname);
102 char *tmpfname = NULL;
99 103
100 if (arg_debug) 104 if (arg_debug)
101 printf("processing #%s#\n", fname); 105 printf("processing #%s#\n", fname);
@@ -104,9 +108,19 @@ void process_file(const char *fname) {
104 108
105 FILE *fp = fopen(fname, "r"); 109 FILE *fp = fopen(fname, "r");
106 if (!fp) { 110 if (!fp) {
107 fprintf(stderr, "Warning: cannot open %s, while processing %s\n", fname, profile); 111 // the file was not found in the current directory
108 level--; 112 // look for it in /etc/firejail directory
109 return; 113 if (asprintf(&tmpfname, "%s/%s", SYSCONFDIR, fname) == -1)
114 errExit("asprintf");
115
116 fp = fopen(tmpfname, "r");
117 if (!fp) {
118 fprintf(stderr, "Warning: cannot open %s or %s, while processing %s\n", fname, tmpfname, profile);
119 free(tmpfname);
120 level--;
121 return;
122 }
123 fname = tmpfname;
110 } 124 }
111 125
112 int have_include_local = 0; 126 int have_include_local = 0;
@@ -122,12 +136,26 @@ void process_file(const char *fname) {
122 if (*ptr == '\n' || *ptr == '#') 136 if (*ptr == '\n' || *ptr == '#')
123 continue; 137 continue;
124 138
139 if (arg_print_blacklist) {
140 if (strncmp(ptr, "blacklist", 9) == 0 ||
141 strncmp(ptr, "noblacklist", 11) == 0)
142 printf("%s: %s\n", fname, ptr);
143 }
144 else if (arg_print_whitelist) {
145 if (strncmp(ptr, "whitelist", 9) == 0 ||
146 strncmp(ptr, "nowhitelist", 11) == 0 ||
147 strncmp(ptr, "private", 7) == 0)
148 printf("%s: %s\n", fname, ptr);
149 }
150
125 if (strncmp(ptr, "seccomp", 7) == 0) 151 if (strncmp(ptr, "seccomp", 7) == 0)
126 cnt_seccomp++; 152 cnt_seccomp++;
127 else if (strncmp(ptr, "caps", 4) == 0) 153 else if (strncmp(ptr, "caps", 4) == 0)
128 cnt_caps++; 154 cnt_caps++;
129 else if (strncmp(ptr, "include disable-exec.inc", 24) == 0) 155 else if (strncmp(ptr, "include disable-exec.inc", 24) == 0)
130 cnt_noexec++; 156 cnt_noexec++;
157 else if (strncmp(ptr, "noroot", 6) == 0)
158 cnt_noroot++;
131 else if (strncmp(ptr, "include whitelist-var-common.inc", 32) == 0) 159 else if (strncmp(ptr, "include whitelist-var-common.inc", 32) == 0)
132 cnt_whitelistvar++; 160 cnt_whitelistvar++;
133 else if (strncmp(ptr, "include whitelist-runuser-common.inc", 36) == 0 || 161 else if (strncmp(ptr, "include whitelist-runuser-common.inc", 36) == 0 ||
@@ -185,6 +213,8 @@ void process_file(const char *fname) {
185 if (!have_include_local) 213 if (!have_include_local)
186 printf("No include .local found in %s\n", fname); 214 printf("No include .local found in %s\n", fname);
187 level--; 215 level--;
216 if (tmpfname)
217 free(tmpfname);
188} 218}
189 219
190int main(int argc, char **argv) { 220int main(int argc, char **argv) {
@@ -212,6 +242,8 @@ int main(int argc, char **argv) {
212 arg_mdwx = 1; 242 arg_mdwx = 1;
213 else if (strcmp(argv[i], "--noexec") == 0) 243 else if (strcmp(argv[i], "--noexec") == 0)
214 arg_noexec = 1; 244 arg_noexec = 1;
245 else if (strcmp(argv[i], "--noroot") == 0)
246 arg_noroot = 1;
215 else if (strcmp(argv[i], "--private-bin") == 0) 247 else if (strcmp(argv[i], "--private-bin") == 0)
216 arg_privatebin = 1; 248 arg_privatebin = 1;
217 else if (strcmp(argv[i], "--private-dev") == 0) 249 else if (strcmp(argv[i], "--private-dev") == 0)
@@ -220,6 +252,10 @@ int main(int argc, char **argv) {
220 arg_privatetmp = 1; 252 arg_privatetmp = 1;
221 else if (strcmp(argv[i], "--private-etc") == 0) 253 else if (strcmp(argv[i], "--private-etc") == 0)
222 arg_privateetc = 1; 254 arg_privateetc = 1;
255 else if (strcmp(argv[i], "--print-blacklist") == 0)
256 arg_print_blacklist = 1;
257 else if (strcmp(argv[i], "--print-whitelist") == 0)
258 arg_print_whitelist = 1;
223 else if (strcmp(argv[i], "--whitelist-home") == 0) 259 else if (strcmp(argv[i], "--whitelist-home") == 0)
224 arg_whitelisthome = 1; 260 arg_whitelisthome = 1;
225 else if (strcmp(argv[i], "--whitelist-var") == 0) 261 else if (strcmp(argv[i], "--whitelist-var") == 0)
@@ -256,6 +292,7 @@ int main(int argc, char **argv) {
256 int caps = cnt_caps; 292 int caps = cnt_caps;
257 int apparmor = cnt_apparmor; 293 int apparmor = cnt_apparmor;
258 int noexec = cnt_noexec; 294 int noexec = cnt_noexec;
295 int noroot = cnt_noroot;
259 int privatebin = cnt_privatebin; 296 int privatebin = cnt_privatebin;
260 int privatetmp = cnt_privatetmp; 297 int privatetmp = cnt_privatetmp;
261 int privatedev = cnt_privatedev; 298 int privatedev = cnt_privatedev;
@@ -313,6 +350,8 @@ int main(int argc, char **argv) {
313 printf("No seccomp found in %s\n", argv[i]); 350 printf("No seccomp found in %s\n", argv[i]);
314 if (arg_noexec && noexec == cnt_noexec) 351 if (arg_noexec && noexec == cnt_noexec)
315 printf("No include disable-exec.inc found in %s\n", argv[i]); 352 printf("No include disable-exec.inc found in %s\n", argv[i]);
353 if (arg_noroot && noroot == cnt_noroot)
354 printf("No noroot found in %s\n", argv[i]);
316 if (arg_privatedev && privatedev == cnt_privatedev) 355 if (arg_privatedev && privatedev == cnt_privatedev)
317 printf("No private-dev found in %s\n", argv[i]); 356 printf("No private-dev found in %s\n", argv[i]);
318 if (arg_privatebin && privatebin == cnt_privatebin) 357 if (arg_privatebin && privatebin == cnt_privatebin)
@@ -337,6 +376,9 @@ int main(int argc, char **argv) {
337 assert(level == 0); 376 assert(level == 0);
338 } 377 }
339 378
379 if (arg_print_blacklist || arg_print_whitelist)
380 return 0;
381
340 printf("\n"); 382 printf("\n");
341 printf("Stats:\n"); 383 printf("Stats:\n");
342 printf(" profiles\t\t\t%d\n", cnt_profiles); 384 printf(" profiles\t\t\t%d\n", cnt_profiles);
@@ -346,6 +388,7 @@ int main(int argc, char **argv) {
346 printf(" seccomp\t\t\t%d\n", cnt_seccomp); 388 printf(" seccomp\t\t\t%d\n", cnt_seccomp);
347 printf(" capabilities\t\t%d\n", cnt_caps); 389 printf(" capabilities\t\t%d\n", cnt_caps);
348 printf(" noexec\t\t\t%d (include disable-exec.inc)\n", cnt_noexec); 390 printf(" noexec\t\t\t%d (include disable-exec.inc)\n", cnt_noexec);
391 printf(" noroot\t\t\t%d\n", cnt_noroot);
349 printf(" memory-deny-write-execute\t%d\n", cnt_mdwx); 392 printf(" memory-deny-write-execute\t%d\n", cnt_mdwx);
350 printf(" apparmor\t\t\t%d\n", cnt_apparmor); 393 printf(" apparmor\t\t\t%d\n", cnt_apparmor);
351 printf(" private-bin\t\t\t%d\n", cnt_privatebin); 394 printf(" private-bin\t\t\t%d\n", cnt_privatebin);
diff --git a/src/tools/check-caps.sh b/src/tools/check-caps.sh
index b7026b1cd..62c3b9066 100755
--- a/src/tools/check-caps.sh
+++ b/src/tools/check-caps.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6if [ $# -eq 0 ] 6if [ $# -eq 0 ]
diff --git a/src/tools/extract_caps.c b/src/tools/extract_caps.c
index 8da9c452b..5e5b3cdc6 100644
--- a/src/tools/extract_caps.c
+++ b/src/tools/extract_caps.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/tools/extract_errnos.sh b/src/tools/extract_errnos.sh
index 34c416b04..bb430b3e1 100644
--- a/src/tools/extract_errnos.sh
+++ b/src/tools/extract_errnos.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6echo -e "#include <errno.h>\n#include <attr/xattr.h>" | \ 6echo -e "#include <errno.h>\n#include <attr/xattr.h>" | \
diff --git a/src/tools/extract_seccomp.c b/src/tools/extract_seccomp.c
index b5f92d2df..6b644796b 100644
--- a/src/tools/extract_seccomp.c
+++ b/src/tools/extract_seccomp.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/tools/extract_syscalls.c b/src/tools/extract_syscalls.c
index 9159b6576..f77a84123 100644
--- a/src/tools/extract_syscalls.c
+++ b/src/tools/extract_syscalls.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/tools/mkcoverit.sh b/src/tools/mkcoverit.sh
index 86d798a11..c7a57cd21 100755
--- a/src/tools/mkcoverit.sh
+++ b/src/tools/mkcoverit.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6# unpack firejail archive 6# unpack firejail archive
diff --git a/src/tools/testuid.c b/src/tools/testuid.c
index a18d57d5e..1bc617522 100644
--- a/src/tools/testuid.c
+++ b/src/tools/testuid.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/tools/ttytest.c b/src/tools/ttytest.c
index 0f72753bc..9e40d289a 100644
--- a/src/tools/ttytest.c
+++ b/src/tools/ttytest.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/tools/unixsocket.c b/src/tools/unixsocket.c
index c4ecabca7..bd638269d 100644
--- a/src/tools/unixsocket.c
+++ b/src/tools/unixsocket.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/src/zsh_completion/_firejail.in b/src/zsh_completion/_firejail.in
index fd27bb35f..f7cd3cdff 100644
--- a/src/zsh_completion/_firejail.in
+++ b/src/zsh_completion/_firejail.in
@@ -62,6 +62,9 @@ _firejail_args=(
62 '--tree[print a tree of all sandboxed processes]' 62 '--tree[print a tree of all sandboxed processes]'
63 '--version[print program version and exit]' 63 '--version[print program version and exit]'
64 64
65 '--ids-check[verify file system]'
66 '--ids-init[initialize IDS database]'
67
65 '--debug[print sandbox debug messages]' 68 '--debug[print sandbox debug messages]'
66 '--debug-blacklists[debug blacklisting]' 69 '--debug-blacklists[debug blacklisting]'
67 '--debug-caps[print all recognized capabilities]' 70 '--debug-caps[print all recognized capabilities]'
@@ -91,6 +94,7 @@ _firejail_args=(
91 '--cgroup=-[place the sandbox in the specified control group]: :' 94 '--cgroup=-[place the sandbox in the specified control group]: :'
92 '--cpu=-[set cpu affinity]: :->cpus' 95 '--cpu=-[set cpu affinity]: :->cpus'
93 "--deterministic-exit-code[always exit with first child's status code]" 96 "--deterministic-exit-code[always exit with first child's status code]"
97 '--deterministic-shutdown[terminate orphan processes]'
94 '*--dns=-[set DNS server]: :' 98 '*--dns=-[set DNS server]: :'
95 '*--env=-[set environment variable]: :' 99 '*--env=-[set environment variable]: :'
96 '--hostname=-[set sandbox hostname]: :' 100 '--hostname=-[set sandbox hostname]: :'
@@ -98,9 +102,11 @@ _firejail_args=(
98 '*--ignore=-[ignore command in profile files]: :' 102 '*--ignore=-[ignore command in profile files]: :'
99 '--ipc-namespace[enable a new IPC namespace]' 103 '--ipc-namespace[enable a new IPC namespace]'
100 '--join-or-start=-[join the sandbox or start a new one name|pid]: :_all_firejails' 104 '--join-or-start=-[join the sandbox or start a new one name|pid]: :_all_firejails'
105 '--keep-config-pulse[disable automatic ~/.config/pulse init]'
101 '--keep-dev-shm[/dev/shm directory is untouched (even with --private-dev)]' 106 '--keep-dev-shm[/dev/shm directory is untouched (even with --private-dev)]'
107 '--keep-fd[inherit open file descriptors to sandbox]'
102 '--keep-var-tmp[/var/tmp directory is untouched]' 108 '--keep-var-tmp[/var/tmp directory is untouched]'
103 '--machine-id[preserve /etc/machine-id]' 109 '--machine-id[spoof /etc/machine-id with a random id]'
104 '--memory-deny-write-execute[seccomp filter to block attempts to create memory mappings that are both writable and executable]' 110 '--memory-deny-write-execute[seccomp filter to block attempts to create memory mappings that are both writable and executable]'
105 '*--mkdir=-[create a directory]:' 111 '*--mkdir=-[create a directory]:'
106 '*--mkfile=-[create a file]:' 112 '*--mkfile=-[create a file]:'
@@ -116,7 +122,9 @@ _firejail_args=(
116 '--nodvd[disable DVD and audio CD devices]' 122 '--nodvd[disable DVD and audio CD devices]'
117 '*--noexec=-[remount the file or directory noexec nosuid and nodev]: :_files' 123 '*--noexec=-[remount the file or directory noexec nosuid and nodev]: :_files'
118 '--nogroups[disable supplementary groups]' 124 '--nogroups[disable supplementary groups]'
125 '--noinput[disable input devices]'
119 '--nonewprivs[sets the NO_NEW_PRIVS prctl]' 126 '--nonewprivs[sets the NO_NEW_PRIVS prctl]'
127 '--noprinters[disable printers]'
120 '--nosound[disable sound system]' 128 '--nosound[disable sound system]'
121 '--nou2f[disable U2F devices]' 129 '--nou2f[disable U2F devices]'
122 '--novideo[disable video devices]' 130 '--novideo[disable video devices]'
@@ -213,7 +221,7 @@ _firejail_args=(
213 '--netfilter.print=-[print the firewall name|pid]: :_all_firejails' 221 '--netfilter.print=-[print the firewall name|pid]: :_all_firejails'
214 '--netfilter6=-[enable IPv6 firewall]: :' 222 '--netfilter6=-[enable IPv6 firewall]: :'
215 '--netfilter6.print=-[print the IPv6 firewall name|pid]: :_all_firejails' 223 '--netfilter6.print=-[print the IPv6 firewall name|pid]: :_all_firejails'
216 '--netmask=-[define a network mask when dealing with unconfigured parrent interfaces]: :' 224 '--netmask=-[define a network mask when dealing with unconfigured parent interfaces]: :'
217 '--netns=-[Run the program in a named, persistent network namespace]: :' 225 '--netns=-[Run the program in a named, persistent network namespace]: :'
218 '--netstats[monitor network statistics]' 226 '--netstats[monitor network statistics]'
219 '--interface=-[move interface in sandbox]: :' 227 '--interface=-[move interface in sandbox]: :'
@@ -249,10 +257,8 @@ _firejail_args=(
249 '*--tmpfs=-[mount a tmpfs filesystem on directory dirname]: :_files -/' 257 '*--tmpfs=-[mount a tmpfs filesystem on directory dirname]: :_files -/'
250#endif 258#endif
251 259
252#ifdef HAVE_WHITELIST
253 '*--nowhitelist=-[disable whitelist for file or directory]: :_files' 260 '*--nowhitelist=-[disable whitelist for file or directory]: :_files'
254 '*--whitelist=-[whitelist directory or file]: :_files' 261 '*--whitelist=-[whitelist directory or file]: :_files'
255#endif
256 262
257#ifdef HAVE_X11 263#ifdef HAVE_X11
258 '--x11[enable X11 sandboxing. The software checks first if Xpra is installed, then it checks if Xephyr is installed. If all fails, it will attempt to use X11 security extension]' 264 '--x11[enable X11 sandboxing. The software checks first if Xpra is installed, then it checks if Xephyr is installed. If all fails, it will attempt to use X11 security extension]'
diff --git a/test/appimage/appimage-args.exp b/test/appimage/appimage-args.exp
index eecb9bf82..e1fb8567a 100755
--- a/test/appimage/appimage-args.exp
+++ b/test/appimage/appimage-args.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -23,7 +23,7 @@ expect {
23} 23}
24expect { 24expect {
25 timeout {puts "TESTING ERROR 4\n";exit} 25 timeout {puts "TESTING ERROR 4\n";exit}
26 "Child process initialized" 26 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
27} 27}
28sleep 2 28sleep 2
29 29
@@ -51,7 +51,7 @@ expect {
51send -- "firejail --name=blablabla\r" 51send -- "firejail --name=blablabla\r"
52expect { 52expect {
53 timeout {puts "TESTING ERROR 7\n";exit} 53 timeout {puts "TESTING ERROR 7\n";exit}
54 "Child process initialized" 54 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
55} 55}
56sleep 2 56sleep 2
57 57
diff --git a/test/appimage/appimage-trace.exp b/test/appimage/appimage-trace.exp
index 2f67eb531..d1530349e 100755
--- a/test/appimage/appimage-trace.exp
+++ b/test/appimage/appimage-trace.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ set appimage_id $spawn_id
11send -- "firejail --trace --timeout=00:00:05 --appimage Leafpad-0.8.17-x86_64.AppImage\r" 11send -- "firejail --trace --timeout=00:00:05 --appimage Leafpad-0.8.17-x86_64.AppImage\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 1\n";exit} 13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16expect { 16expect {
17 timeout {puts "TESTING ERROR 2\n";exit} 17 timeout {puts "TESTING ERROR 2\n";exit}
@@ -38,7 +38,7 @@ sleep 1
38send -- "firejail --trace --timeout=00:00:05 --appimage Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage\r" 38send -- "firejail --trace --timeout=00:00:05 --appimage Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage\r"
39expect { 39expect {
40 timeout {puts "TESTING ERROR 11\n";exit} 40 timeout {puts "TESTING ERROR 11\n";exit}
41 "Child process initialized" 41 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
42} 42}
43expect { 43expect {
44 timeout {puts "TESTING ERROR 12\n";exit} 44 timeout {puts "TESTING ERROR 12\n";exit}
diff --git a/test/appimage/appimage-v1.exp b/test/appimage/appimage-v1.exp
index b8b6e0c96..2fcccfd5b 100755
--- a/test/appimage/appimage-v1.exp
+++ b/test/appimage/appimage-v1.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ set appimage_id $spawn_id
11send -- "firejail --name=appimage-test --debug --appimage Leafpad-0.8.17-x86_64.AppImage\r" 11send -- "firejail --name=appimage-test --debug --appimage Leafpad-0.8.17-x86_64.AppImage\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 1\n";exit} 13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 2 16sleep 2
17 17
@@ -39,7 +39,7 @@ expect {
39send -- "firejail --name=blablabla\r" 39send -- "firejail --name=blablabla\r"
40expect { 40expect {
41 timeout {puts "TESTING ERROR 4\n";exit} 41 timeout {puts "TESTING ERROR 4\n";exit}
42 "Child process initialized" 42 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
43} 43}
44sleep 2 44sleep 2
45 45
diff --git a/test/appimage/appimage-v2.exp b/test/appimage/appimage-v2.exp
index 243824f75..d289165d9 100755
--- a/test/appimage/appimage-v2.exp
+++ b/test/appimage/appimage-v2.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ set appimage_id $spawn_id
11send -- "firejail --name=appimage-test --appimage Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage\r" 11send -- "firejail --name=appimage-test --appimage Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 1\n";exit} 13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 2 16sleep 2
17 17
@@ -39,7 +39,7 @@ expect {
39send -- "firejail --name=blablabla\r" 39send -- "firejail --name=blablabla\r"
40expect { 40expect {
41 timeout {puts "TESTING ERROR 4\n";exit} 41 timeout {puts "TESTING ERROR 4\n";exit}
42 "Child process initialized" 42 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
43} 43}
44sleep 2 44sleep 2
45 45
diff --git a/test/appimage/appimage.sh b/test/appimage/appimage.sh
index e766b1acd..9afacf5be 100755
--- a/test/appimage/appimage.sh
+++ b/test/appimage/appimage.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
diff --git a/test/appimage/filename.exp b/test/appimage/filename.exp
index 54d8d722d..711eae8d2 100755
--- a/test/appimage/filename.exp
+++ b/test/appimage/filename.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/apps-x11-xorg/apps-x11-xorg.sh b/test/apps-x11-xorg/apps-x11-xorg.sh
index 7f37914aa..9ed123979 100755
--- a/test/apps-x11-xorg/apps-x11-xorg.sh
+++ b/test/apps-x11-xorg/apps-x11-xorg.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
diff --git a/test/apps-x11-xorg/firefox.exp b/test/apps-x11-xorg/firefox.exp
index 12fcc13ce..4a85b593b 100755
--- a/test/apps-x11-xorg/firefox.exp
+++ b/test/apps-x11-xorg/firefox.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -36,7 +36,7 @@ expect {
36send -- "firejail --name=blablabla\r" 36send -- "firejail --name=blablabla\r"
37expect { 37expect {
38 timeout {puts "TESTING ERROR 4\n";exit} 38 timeout {puts "TESTING ERROR 4\n";exit}
39 "Child process initialized" 39 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
40} 40}
41sleep 2 41sleep 2
42 42
diff --git a/test/apps-x11-xorg/thunderbird.exp b/test/apps-x11-xorg/thunderbird.exp
index 5c810c517..a06303fc5 100755
--- a/test/apps-x11-xorg/thunderbird.exp
+++ b/test/apps-x11-xorg/thunderbird.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -33,7 +33,7 @@ expect {
33send -- "firejail --name=blablabla\r" 33send -- "firejail --name=blablabla\r"
34expect { 34expect {
35 timeout {puts "TESTING ERROR 4\n";exit} 35 timeout {puts "TESTING ERROR 4\n";exit}
36 "Child process initialized" 36 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
37} 37}
38sleep 2 38sleep 2
39 39
diff --git a/test/apps-x11-xorg/transmission-gtk.exp b/test/apps-x11-xorg/transmission-gtk.exp
index e0f519c00..3e497f9e0 100755
--- a/test/apps-x11-xorg/transmission-gtk.exp
+++ b/test/apps-x11-xorg/transmission-gtk.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -33,7 +33,7 @@ expect {
33send -- "firejail --name=blablabla\r" 33send -- "firejail --name=blablabla\r"
34expect { 34expect {
35 timeout {puts "TESTING ERROR 4\n";exit} 35 timeout {puts "TESTING ERROR 4\n";exit}
36 "Child process initialized" 36 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
37} 37}
38sleep 2 38sleep 2
39 39
diff --git a/test/apps-x11-xorg/transmission-qt.exp b/test/apps-x11-xorg/transmission-qt.exp
index 02a015968..0642d3d32 100755
--- a/test/apps-x11-xorg/transmission-qt.exp
+++ b/test/apps-x11-xorg/transmission-qt.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -33,7 +33,7 @@ expect {
33send -- "firejail --name=blablabla\r" 33send -- "firejail --name=blablabla\r"
34expect { 34expect {
35 timeout {puts "TESTING ERROR 4\n";exit} 35 timeout {puts "TESTING ERROR 4\n";exit}
36 "Child process initialized" 36 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
37} 37}
38sleep 2 38sleep 2
39 39
diff --git a/test/apps-x11/apps-x11.sh b/test/apps-x11/apps-x11.sh
index 9954cb736..a3c946ca4 100755
--- a/test/apps-x11/apps-x11.sh
+++ b/test/apps-x11/apps-x11.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
diff --git a/test/apps-x11/chromium.exp b/test/apps-x11/chromium.exp
index 92739048c..059fd0ad7 100755
--- a/test/apps-x11/chromium.exp
+++ b/test/apps-x11/chromium.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -32,7 +32,7 @@ expect {
32send -- "firejail --name=blablabla\r" 32send -- "firejail --name=blablabla\r"
33expect { 33expect {
34 timeout {puts "TESTING ERROR 4\n";exit} 34 timeout {puts "TESTING ERROR 4\n";exit}
35 "Child process initialized" 35 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
36} 36}
37sleep 2 37sleep 2
38 38
diff --git a/test/apps-x11/firefox.exp b/test/apps-x11/firefox.exp
index 69efc79d9..ac177211d 100755
--- a/test/apps-x11/firefox.exp
+++ b/test/apps-x11/firefox.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -36,7 +36,7 @@ expect {
36send -- "firejail --name=blablabla\r" 36send -- "firejail --name=blablabla\r"
37expect { 37expect {
38 timeout {puts "TESTING ERROR 4\n";exit} 38 timeout {puts "TESTING ERROR 4\n";exit}
39 "Child process initialized" 39 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
40} 40}
41sleep 2 41sleep 2
42 42
diff --git a/test/apps-x11/thunderbird.exp b/test/apps-x11/thunderbird.exp
index 7cfc957b7..391dc52e3 100755
--- a/test/apps-x11/thunderbird.exp
+++ b/test/apps-x11/thunderbird.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -33,7 +33,7 @@ expect {
33send -- "firejail --name=blablabla\r" 33send -- "firejail --name=blablabla\r"
34expect { 34expect {
35 timeout {puts "TESTING ERROR 4\n";exit} 35 timeout {puts "TESTING ERROR 4\n";exit}
36 "Child process initialized" 36 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
37} 37}
38sleep 2 38sleep 2
39 39
diff --git a/test/apps-x11/transmission-gtk.exp b/test/apps-x11/transmission-gtk.exp
index 53e396a9e..21bc4a8bc 100755
--- a/test/apps-x11/transmission-gtk.exp
+++ b/test/apps-x11/transmission-gtk.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -33,7 +33,7 @@ expect {
33send -- "firejail --name=blablabla\r" 33send -- "firejail --name=blablabla\r"
34expect { 34expect {
35 timeout {puts "TESTING ERROR 4\n";exit} 35 timeout {puts "TESTING ERROR 4\n";exit}
36 "Child process initialized" 36 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
37} 37}
38sleep 2 38sleep 2
39 39
diff --git a/test/apps-x11/x11-none.exp b/test/apps-x11/x11-none.exp
index b45751aa7..e6ff12f27 100755
--- a/test/apps-x11/x11-none.exp
+++ b/test/apps-x11/x11-none.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -17,7 +17,7 @@ sleep 1
17send -- "firejail --name=test --net=none --x11=none\r" 17send -- "firejail --name=test --net=none --x11=none\r"
18expect { 18expect {
19 timeout {puts "TESTING ERROR 1\n";exit} 19 timeout {puts "TESTING ERROR 1\n";exit}
20 "Child process initialized" 20 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
21} 21}
22sleep 1 22sleep 1
23 23
diff --git a/test/apps-x11/x11-xephyr.exp b/test/apps-x11/x11-xephyr.exp
index 3da0e1a46..f0090d713 100755
--- a/test/apps-x11/x11-xephyr.exp
+++ b/test/apps-x11/x11-xephyr.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=test --x11=xephyr xterm\r" 10send -- "firejail --name=test --x11=xephyr xterm\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15 15
16exit 16exit
@@ -28,7 +28,7 @@ sleep 1
28send -- "firejail --name=test --net=none --x11=none\r" 28send -- "firejail --name=test --net=none --x11=none\r"
29expect { 29expect {
30 timeout {puts "TESTING ERROR 1\n";exit} 30 timeout {puts "TESTING ERROR 1\n";exit}
31 "Child process initialized" 31 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
32} 32}
33sleep 1 33sleep 1
34 34
diff --git a/test/apps-x11/xterm-xephyr.exp b/test/apps-x11/xterm-xephyr.exp
index 5edbadad9..3db6cf793 100755
--- a/test/apps-x11/xterm-xephyr.exp
+++ b/test/apps-x11/xterm-xephyr.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -33,7 +33,7 @@ expect {
33send -- "firejail --name=blablabla\r" 33send -- "firejail --name=blablabla\r"
34expect { 34expect {
35 timeout {puts "TESTING ERROR 4\n";exit} 35 timeout {puts "TESTING ERROR 4\n";exit}
36 "Child process initialized" 36 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
37} 37}
38sleep 2 38sleep 2
39 39
diff --git a/test/apps-x11/xterm-xorg.exp b/test/apps-x11/xterm-xorg.exp
index a2a027729..409b39f40 100755
--- a/test/apps-x11/xterm-xorg.exp
+++ b/test/apps-x11/xterm-xorg.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -33,7 +33,7 @@ expect {
33send -- "firejail --name=blablabla\r" 33send -- "firejail --name=blablabla\r"
34expect { 34expect {
35 timeout {puts "TESTING ERROR 4\n";exit} 35 timeout {puts "TESTING ERROR 4\n";exit}
36 "Child process initialized" 36 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
37} 37}
38sleep 2 38sleep 2
39 39
diff --git a/test/apps-x11/xterm-xpra.exp b/test/apps-x11/xterm-xpra.exp
index 0f1458d15..4acf780ac 100755
--- a/test/apps-x11/xterm-xpra.exp
+++ b/test/apps-x11/xterm-xpra.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -33,7 +33,7 @@ expect {
33send -- "firejail --name=blablabla\r" 33send -- "firejail --name=blablabla\r"
34expect { 34expect {
35 timeout {puts "TESTING ERROR 4\n";exit} 35 timeout {puts "TESTING ERROR 4\n";exit}
36 "Child process initialized" 36 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
37} 37}
38sleep 2 38sleep 2
39 39
diff --git a/test/apps/apps.sh b/test/apps/apps.sh
index c332fe416..83e977ba0 100755
--- a/test/apps/apps.sh
+++ b/test/apps/apps.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
diff --git a/test/apps/chromium.exp b/test/apps/chromium.exp
index d65bc93a9..4e036dee9 100755
--- a/test/apps/chromium.exp
+++ b/test/apps/chromium.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 10 19sleep 10
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/apps/deluge.exp b/test/apps/deluge.exp
index 25c98623c..5df35fce4 100755
--- a/test/apps/deluge.exp
+++ b/test/apps/deluge.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 10 19sleep 10
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/apps/fbreader.exp b/test/apps/fbreader.exp
index 67301c1d2..ebb21bcf2 100755
--- a/test/apps/fbreader.exp
+++ b/test/apps/fbreader.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/apps/filezilla.exp b/test/apps/filezilla.exp
index da37f1eff..397904860 100755
--- a/test/apps/filezilla.exp
+++ b/test/apps/filezilla.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/apps/firefox.exp b/test/apps/firefox.exp
index 2a6f18276..f09c76b5d 100755
--- a/test/apps/firefox.exp
+++ b/test/apps/firefox.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 10 19sleep 10
20 20
@@ -47,7 +47,7 @@ expect {
47send -- "firejail --name=blablabla\r" 47send -- "firejail --name=blablabla\r"
48expect { 48expect {
49 timeout {puts "TESTING ERROR 4\n";exit} 49 timeout {puts "TESTING ERROR 4\n";exit}
50 "Child process initialized" 50 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
51} 51}
52sleep 2 52sleep 2
53 53
diff --git a/test/apps/gnome-mplayer.exp b/test/apps/gnome-mplayer.exp
index 564220d95..4d7ccff81 100755
--- a/test/apps/gnome-mplayer.exp
+++ b/test/apps/gnome-mplayer.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 5 19sleep 5
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/apps/gthumb.exp b/test/apps/gthumb.exp
index 569adcd34..0da1572b2 100755
--- a/test/apps/gthumb.exp
+++ b/test/apps/gthumb.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/apps/hexchat.exp b/test/apps/hexchat.exp
index adea02216..8ed823dd5 100755
--- a/test/apps/hexchat.exp
+++ b/test/apps/hexchat.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/apps/kcalc.exp b/test/apps/kcalc.exp
index aaeb5221d..d7251eec1 100755
--- a/test/apps/kcalc.exp
+++ b/test/apps/kcalc.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/apps/ktorrent.exp b/test/apps/ktorrent.exp
index 8693f5f1d..efa3f1d08 100755
--- a/test/apps/ktorrent.exp
+++ b/test/apps/ktorrent.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/apps/midori.exp b/test/apps/midori.exp
index fae41e6da..431b43f8d 100755
--- a/test/apps/midori.exp
+++ b/test/apps/midori.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 5 19sleep 5
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/apps/opera.exp b/test/apps/opera.exp
index 990476ed5..b0d1f3b9d 100755
--- a/test/apps/opera.exp
+++ b/test/apps/opera.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 10 19sleep 10
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/apps/qbittorrent.exp b/test/apps/qbittorrent.exp
index bc0386335..842e47986 100755
--- a/test/apps/qbittorrent.exp
+++ b/test/apps/qbittorrent.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/apps/thunderbird.exp b/test/apps/thunderbird.exp
index 10d0bb2f6..2b93835b6 100755
--- a/test/apps/thunderbird.exp
+++ b/test/apps/thunderbird.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 5 19sleep 5
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/apps/transmission-qt.exp b/test/apps/transmission-qt.exp
index fec18a8bf..90b0ef4ac 100755
--- a/test/apps/transmission-qt.exp
+++ b/test/apps/transmission-qt.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/apps/uget-gtk.exp b/test/apps/uget-gtk.exp
index caa4063b9..21b859ee2 100755
--- a/test/apps/uget-gtk.exp
+++ b/test/apps/uget-gtk.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/apps/vlc.exp b/test/apps/vlc.exp
index ce3df1ba6..a0aed9cc9 100755
--- a/test/apps/vlc.exp
+++ b/test/apps/vlc.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/apps/wine.exp b/test/apps/wine.exp
index 982a0c6d9..e2a08089f 100755
--- a/test/apps/wine.exp
+++ b/test/apps/wine.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19expect { 19expect {
20 timeout {puts "TESTING ERROR 2\n";exit} 20 timeout {puts "TESTING ERROR 2\n";exit}
diff --git a/test/apps/xchat.exp b/test/apps/xchat.exp
index 9ed75d821..ca17f44e4 100755
--- a/test/apps/xchat.exp
+++ b/test/apps/xchat.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/chroot/chroot.sh b/test/chroot/chroot.sh
index 1ac5cf47e..3c3e7311b 100755
--- a/test/chroot/chroot.sh
+++ b/test/chroot/chroot.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
diff --git a/test/chroot/configure b/test/chroot/configure
index 747dc4383..3f3555193 100755
--- a/test/chroot/configure
+++ b/test/chroot/configure
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6# build a very small chroot 6# build a very small chroot
diff --git a/test/chroot/fs_chroot.exp b/test/chroot/fs_chroot.exp
index 650425829..c379e389c 100755
--- a/test/chroot/fs_chroot.exp
+++ b/test/chroot/fs_chroot.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ send -- "firejail --chroot=/tmp/chroot\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Error: --chroot option is not available on Grsecurity systems" {puts "\nall done\n"; exit} 13 "Error: --chroot option is not available on Grsecurity systems" {puts "\nall done\n"; exit}
14 "Child process initialized" {puts "chroot available\n"}; 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "chroot available\n"};
15} 15}
16sleep 1 16sleep 1
17 17
diff --git a/test/chroot/unchroot-as-root.exp b/test/chroot/unchroot-as-root.exp
index b88367054..f67590768 100755
--- a/test/chroot/unchroot-as-root.exp
+++ b/test/chroot/unchroot-as-root.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ send -- "firejail --chroot=/tmp/chroot\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Error: --chroot option is not available on Grsecurity systems" {puts "\nall done\n"; exit} 13 "Error: --chroot option is not available on Grsecurity systems" {puts "\nall done\n"; exit}
14 "Child process initialized" {puts "chroot available\n"}; 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "chroot available\n"};
15} 15}
16sleep 1 16sleep 1
17 17
diff --git a/test/chroot/unchroot.c b/test/chroot/unchroot.c
index 643983ce4..5d006e318 100644
--- a/test/chroot/unchroot.c
+++ b/test/chroot/unchroot.c
@@ -1,5 +1,5 @@
1// This file is part of Firejail project 1// This file is part of Firejail project
2// Copyright (C) 2014-2021 Firejail Authors 2// Copyright (C) 2014-2022 Firejail Authors
3// License GPL v2 3// License GPL v2
4 4
5// simple unchroot example from http://linux-vserver.org/Secure_chroot_Barrier 5// simple unchroot example from http://linux-vserver.org/Secure_chroot_Barrier
diff --git a/test/compile/compile.sh b/test/compile/compile.sh
index 101998187..0a87913f1 100755
--- a/test/compile/compile.sh
+++ b/test/compile/compile.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6# not currently covered 6# not currently covered
diff --git a/test/environment/allow-debuggers.exp b/test/environment/allow-debuggers.exp
index f660c123a..f972b5788 100755
--- a/test/environment/allow-debuggers.exp
+++ b/test/environment/allow-debuggers.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --allow-debuggers\r" 11send -- "firejail --allow-debuggers\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" { puts "\n"} 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" { puts "\n"}
15 "is disabled on Linux kernels prior to 4.8" { puts "TESTING SKIP: kernel too old\n"; exit } 15 "is disabled on Linux kernels prior to 4.8" { puts "TESTING SKIP: kernel too old\n"; exit }
16} 16}
17after 100 17after 100
diff --git a/test/environment/csh.exp b/test/environment/csh.exp
index f8ced07b5..31bfbfa40 100755
--- a/test/environment/csh.exp
+++ b/test/environment/csh.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --private --shell=/bin/csh\r" 11send -- "firejail --private --shell=/bin/csh\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 1 16sleep 1
17 17
diff --git a/test/environment/dash.exp b/test/environment/dash.exp
index 983a527cf..4dd5cac9f 100755
--- a/test/environment/dash.exp
+++ b/test/environment/dash.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --private --tracelog --shell=/bin/dash\r" 11send -- "firejail --private --tracelog --shell=/bin/dash\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 1 16sleep 1
17 17
diff --git a/test/environment/deterministic-exit-code.exp b/test/environment/deterministic-exit-code.exp
index 1a1e53605..9f5be2c3d 100755
--- a/test/environment/deterministic-exit-code.exp
+++ b/test/environment/deterministic-exit-code.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 4 6set timeout 4
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail\r" 10send -- "firejail\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
@@ -32,7 +32,7 @@ after 100
32send -- "firejail --deterministic-exit-code\r" 32send -- "firejail --deterministic-exit-code\r"
33expect { 33expect {
34 timeout {puts "TESTING ERROR 3\n";exit} 34 timeout {puts "TESTING ERROR 3\n";exit}
35 "Child process initialized" 35 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
36} 36}
37sleep 1 37sleep 1
38 38
diff --git a/test/environment/deterministic-shutdown.exp b/test/environment/deterministic-shutdown.exp
new file mode 100755
index 000000000..be4e9c42e
--- /dev/null
+++ b/test/environment/deterministic-shutdown.exp
@@ -0,0 +1,17 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --deterministic-shutdown bash -c \"sleep 100 & exec sleep 1\"\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Parent is shutting down, bye..."
14}
15after 100
16
17puts "\nall done\n"
diff --git a/test/environment/dns.exp b/test/environment/dns.exp
index 5b06b51c0..b5a8c119b 100755
--- a/test/environment/dns.exp
+++ b/test/environment/dns.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -30,7 +30,7 @@ expect {
30} 30}
31expect { 31expect {
32 timeout {puts "TESTING ERROR 1.5\n";exit} 32 timeout {puts "TESTING ERROR 1.5\n";exit}
33 "Child process initialized" 33 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
34} 34}
35expect { 35expect {
36 timeout {puts "TESTING ERROR 1.6\n";exit} 36 timeout {puts "TESTING ERROR 1.6\n";exit}
@@ -47,7 +47,7 @@ expect {
47 "DNS server 8.8.8.8" {puts "TESTING ERROR 2.3\n";exit} 47 "DNS server 8.8.8.8" {puts "TESTING ERROR 2.3\n";exit}
48 "DNS server 4.2.2.1" {puts "TESTING ERROR 2.4\n";exit} 48 "DNS server 4.2.2.1" {puts "TESTING ERROR 2.4\n";exit}
49 "DNS server ::2" {puts "TESTING ERROR 2.5\n";exit} 49 "DNS server ::2" {puts "TESTING ERROR 2.5\n";exit}
50 "Child process initialized" {puts "TESTING ERROR 2.6\n";exit} 50 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "TESTING ERROR 2.6\n";exit}
51 "Parent is shutting down, bye..." {puts "TESTING ERROR 2.7\n";exit} 51 "Parent is shutting down, bye..." {puts "TESTING ERROR 2.7\n";exit}
52 "root" 52 "root"
53} 53}
@@ -56,7 +56,7 @@ after 100
56send -- "firejail --dns=8.8.4.4 --dns=8.8.8.8 --dns=4.2.2.1 --dns=::2\r" 56send -- "firejail --dns=8.8.4.4 --dns=8.8.8.8 --dns=4.2.2.1 --dns=::2\r"
57expect { 57expect {
58 timeout {puts "TESTING ERROR 3\n";exit} 58 timeout {puts "TESTING ERROR 3\n";exit}
59 "Child process initialized" 59 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
60} 60}
61sleep 1 61sleep 1
62 62
@@ -85,7 +85,7 @@ sleep 1
85send -- "firejail --profile=dns.profile\r" 85send -- "firejail --profile=dns.profile\r"
86expect { 86expect {
87 timeout {puts "TESTING ERROR 5.1\n";exit} 87 timeout {puts "TESTING ERROR 5.1\n";exit}
88 "Child process initialized" 88 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
89} 89}
90sleep 1 90sleep 1
91 91
diff --git a/test/environment/doubledash.exp b/test/environment/doubledash.exp
index 275755337..dd2725426 100755
--- a/test/environment/doubledash.exp
+++ b/test/environment/doubledash.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail -- ls -- -testdir\r" 10send -- "firejail -- ls -- -testdir\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 2\n";exit} 16 timeout {puts "TESTING ERROR 2\n";exit}
@@ -26,7 +26,7 @@ sleep 1
26send -- "firejail --name=testing -- -testdir/bash\r" 26send -- "firejail --name=testing -- -testdir/bash\r"
27expect { 27expect {
28 timeout {puts "TESTING ERROR 4\n";exit} 28 timeout {puts "TESTING ERROR 4\n";exit}
29 "Child process initialized" 29 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
30} 30}
31sleep 3 31sleep 3
32 32
diff --git a/test/environment/env.exp b/test/environment/env.exp
index 4f6f8a1b7..9394f2066 100755
--- a/test/environment/env.exp
+++ b/test/environment/env.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --env=ENV1=env1 --env=ENV2=env2 --env=ENV3=env3\r" 11send -- "firejail --env=ENV1=env1 --env=ENV2=env2 --env=ENV3=env3\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 1 16sleep 1
17 17
@@ -37,7 +37,7 @@ after 100
37send -- "firejail --profile=env.profile\r" 37send -- "firejail --profile=env.profile\r"
38expect { 38expect {
39 timeout {puts "TESTING ERROR 4\n";exit} 39 timeout {puts "TESTING ERROR 4\n";exit}
40 "Child process initialized" 40 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
41} 41}
42sleep 1 42sleep 1
43send -- "env | grep LD_LIBRARY_PATH\r" 43send -- "env | grep LD_LIBRARY_PATH\r"
diff --git a/test/environment/environment.sh b/test/environment/environment.sh
index 152975c9d..2b77973ac 100755
--- a/test/environment/environment.sh
+++ b/test/environment/environment.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
@@ -112,14 +112,26 @@ echo "TESTING: rlimit (test/environment/rlimit.exp)"
112echo "TESTING: rlimit profile (test/environment/rlimit-profile.exp)" 112echo "TESTING: rlimit profile (test/environment/rlimit-profile.exp)"
113./rlimit-profile.exp 113./rlimit-profile.exp
114 114
115echo "TESTING: rlimit join (test/environment/rlimit-join.exp)"
116./rlimit-join.exp
117
115echo "TESTING: rlimit errors (test/environment/rlimit-bad.exp)" 118echo "TESTING: rlimit errors (test/environment/rlimit-bad.exp)"
116./rlimit-bad.exp 119./rlimit-bad.exp
117 120
118echo "TESTING: rlimit errors profile (test/environment/rlimit-bad-profile.exp)" 121echo "TESTING: rlimit errors profile (test/environment/rlimit-bad-profile.exp)"
119./rlimit-bad-profile.exp 122./rlimit-bad-profile.exp
120 123
121echo "TESTING: deterministic exit code (test/environment/deterministic-exit-code.exp" 124echo "TESTING: deterministic exit code (test/environment/deterministic-exit-code.exp)"
122./deterministic-exit-code.exp 125./deterministic-exit-code.exp
123 126
124echo "TESTING: retain umask (test/environment/umask.exp" 127echo "TESTING: deterministic shutdown (test/environment/deterministic-shutdown.exp)"
128./deterministic-shutdown.exp
129
130echo "TESTING: keep fd (test/environment/keep-fd.exp)"
131./keep-fd.exp
132
133echo "TESTING: keep fd errors (test/environment/keep-fd-bad.exp)"
134./keep-fd-bad.exp
135
136echo "TESTING: retain umask (test/environment/umask.exp)"
125(umask 123 && ./umask.exp) 137(umask 123 && ./umask.exp)
diff --git a/test/environment/extract_command.exp b/test/environment/extract_command.exp
index f91a10fa6..45ff1f291 100755
--- a/test/environment/extract_command.exp
+++ b/test/environment/extract_command.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 2\n";exit} 16 timeout {puts "TESTING ERROR 2\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19expect { 19expect {
20 timeout {puts "TESTING ERROR 2\n";exit} 20 timeout {puts "TESTING ERROR 2\n";exit}
diff --git a/test/environment/firejail-in-firejail.exp b/test/environment/firejail-in-firejail.exp
index 459056260..4a60d5611 100755
--- a/test/environment/firejail-in-firejail.exp
+++ b/test/environment/firejail-in-firejail.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail\r" 10send -- "firejail\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
diff --git a/test/environment/hostfile.exp b/test/environment/hostfile.exp
index 6b98863e5..ccc8d049e 100755
--- a/test/environment/hostfile.exp
+++ b/test/environment/hostfile.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6 6
@@ -15,7 +15,7 @@ expect {
15} 15}
16expect { 16expect {
17 timeout {puts "TESTING ERROR 2\n";exit} 17 timeout {puts "TESTING ERROR 2\n";exit}
18 "Child process initialized" 18 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
19} 19}
20after 100 20after 100
21 21
diff --git a/test/environment/ibus.exp b/test/environment/ibus.exp
index 089736f33..e9dd290a1 100755
--- a/test/environment/ibus.exp
+++ b/test/environment/ibus.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail\r" 11send -- "firejail\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16after 100 16after 100
17 17
diff --git a/test/environment/keep-fd-bad.exp b/test/environment/keep-fd-bad.exp
new file mode 100755
index 000000000..e8b411ea0
--- /dev/null
+++ b/test/environment/keep-fd-bad.exp
@@ -0,0 +1,40 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10
11send -- "firejail --noprofile --keep-fd=\r"
12expect {
13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Error: invalid keep-fd option"
15}
16after 100
17
18send -- "firejail --noprofile --keep-fd=,,,\r"
19expect {
20 timeout {puts "TESTING ERROR 1\n";exit}
21 "Error: invalid keep-fd option"
22}
23after 100
24
25send -- "firejail --noprofile --keep-fd=dall\r"
26expect {
27 timeout {puts "TESTING ERROR 2\n";exit}
28 "Error: invalid keep-fd option"
29}
30after 100
31
32send -- "firejail --noprofile --keep-fd=6,7,8,10b,11\r"
33expect {
34 timeout {puts "TESTING ERROR 3\n";exit}
35 "Error: invalid keep-fd option"
36}
37after 100
38
39
40puts "\nall done\n"
diff --git a/test/environment/keep-fd.exp b/test/environment/keep-fd.exp
new file mode 100755
index 000000000..440cbd860
--- /dev/null
+++ b/test/environment/keep-fd.exp
@@ -0,0 +1,223 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10
11#
12# obtain some open file descriptors
13#
14send -- "exec {WRITE_FD}> blabla\r"
15after 100
16
17send -- "readlink -v /proc/self/fd/\$WRITE_FD\r"
18expect {
19 timeout {puts "TESTING ERROR 0\n";exit}
20 "/blabla"
21}
22after 100
23
24send -- "exec {READ_FD}< blabla\r"
25after 100
26
27send -- "readlink -v /proc/self/fd/\$READ_FD\r"
28expect {
29 timeout {puts "TESTING ERROR 1\n";exit}
30 "/blabla"
31}
32after 100
33
34
35#
36# inherit environment variables
37#
38send -- "export READ_FD\r"
39send -- "export WRITE_FD\r"
40after 100
41
42
43#
44# close all file descriptors
45# 0, 1, 2 stay open
46#
47send -- "firejail --noprofile\r"
48expect {
49 timeout {puts "TESTING ERROR 2\n";exit}
50 -re {Child process initialized in [0-9]+.[0-9]+ ms}
51}
52after 100
53
54# off by one because of ls
55send -- "ls /proc/self/fd | wc -w\r"
56expect {
57 timeout {puts "TESTING ERROR 3\n";exit}
58 "4"
59}
60after 100
61
62send -- "readlink -v /proc/self/fd/\$READ_FD\r"
63expect {
64 timeout {puts "TESTING ERROR 4\n";exit}
65 "No such file or directory"
66}
67after 100
68
69send -- "readlink -v /proc/self/fd/\$WRITE_FD\r"
70expect {
71 timeout {puts "TESTING ERROR 5\n";exit}
72 "No such file or directory"
73}
74after 100
75
76send -- "exit\r"
77after 500
78
79
80#
81# keep one file descriptor
82#
83send -- "firejail --noprofile --keep-fd=\$READ_FD\r"
84expect {
85 timeout {puts "TESTING ERROR 6\n";exit}
86 -re {Child process initialized in [0-9]+.[0-9]+ ms}
87}
88after 100
89
90# off by one because of ls
91send -- "ls /proc/self/fd | wc -w\r"
92expect {
93 timeout {puts "TESTING ERROR 7\n";exit}
94 "5"
95}
96after 100
97
98send -- "readlink -v /proc/self/fd/\$READ_FD\r"
99expect {
100 timeout {puts "TESTING ERROR 8\n";exit}
101 "/blabla"
102}
103after 100
104
105send -- "readlink -v /proc/self/fd/\$WRITE_FD\r"
106expect {
107 timeout {puts "TESTING ERROR 9\n";exit}
108 "No such file or directory"
109}
110after 100
111
112send -- "exit\r"
113after 500
114
115
116#
117# keep other file descriptor
118#
119send -- "firejail --noprofile --keep-fd=\$WRITE_FD\r"
120expect {
121 timeout {puts "TESTING ERROR 10\n";exit}
122 -re {Child process initialized in [0-9]+.[0-9]+ ms}
123}
124after 100
125
126# off by one because of ls
127send -- "ls /proc/self/fd | wc -w\r"
128expect {
129 timeout {puts "TESTING ERROR 11\n";exit}
130 "5"
131}
132after 100
133
134send -- "readlink -v /proc/self/fd/\$READ_FD\r"
135expect {
136 timeout {puts "TESTING ERROR 12\n";exit}
137 "No such file or directory"
138}
139after 100
140
141send -- "readlink -v /proc/self/fd/\$WRITE_FD\r"
142expect {
143 timeout {puts "TESTING ERROR 13\n";exit}
144 "/blabla"
145}
146after 100
147
148send -- "exit\r"
149after 500
150
151
152#
153# keep both file descriptors
154#
155send -- "firejail --noprofile --keep-fd=\$READ_FD,\$WRITE_FD\r"
156expect {
157 timeout {puts "TESTING ERROR 14\n";exit}
158 -re {Child process initialized in [0-9]+.[0-9]+ ms}
159}
160after 100
161
162# off by one because of ls
163send -- "ls /proc/self/fd | wc -w\r"
164expect {
165 timeout {puts "TESTING ERROR 15\n";exit}
166 "6"
167}
168after 100
169
170send -- "readlink -v /proc/self/fd/\$READ_FD\r"
171expect {
172 timeout {puts "TESTING ERROR 16\n";exit}
173 "/blabla"
174}
175after 100
176
177send -- "readlink -v /proc/self/fd/\$WRITE_FD\r"
178expect {
179 timeout {puts "TESTING ERROR 17\n";exit}
180 "/blabla"
181}
182after 100
183
184send -- "exit\r"
185after 500
186
187
188#
189# keep all file descriptors
190#
191send -- "firejail --noprofile --keep-fd=all\r"
192expect {
193 timeout {puts "TESTING ERROR 18\n";exit}
194 -re {Child process initialized in [0-9]+.[0-9]+ ms}
195}
196after 100
197
198send -- "readlink -v /proc/self/fd/\$READ_FD\r"
199expect {
200 timeout {puts "TESTING ERROR 19\n";exit}
201 "/blabla"
202}
203after 100
204
205send -- "readlink -v /proc/self/fd/\$WRITE_FD\r"
206expect {
207 timeout {puts "TESTING ERROR 20\n";exit}
208 "/blabla"
209}
210after 100
211
212send -- "exit\r"
213after 500
214
215
216#
217# cleanup
218#
219send -- "rm -f blabla\r"
220after 100
221
222
223puts "\nall done\n"
diff --git a/test/environment/machineid.exp b/test/environment/machineid.exp
index f0b3d2942..2392dc9d6 100755
--- a/test/environment/machineid.exp
+++ b/test/environment/machineid.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6 6
@@ -15,7 +15,7 @@ expect {
15} 15}
16expect { 16expect {
17 timeout {puts "TESTING ERROR 1\n";exit} 17 timeout {puts "TESTING ERROR 1\n";exit}
18 "Child process initialized" 18 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
19} 19}
20after 100 20after 100
21send -- "exit\r" 21send -- "exit\r"
diff --git a/test/environment/nice.exp b/test/environment/nice.exp
index 80591978d..823d10c67 100755
--- a/test/environment/nice.exp
+++ b/test/environment/nice.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --nice=15\r" 10send -- "firejail --nice=15\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
@@ -39,7 +39,7 @@ after 100
39send -- "firejail --profile=nice.profile\r" 39send -- "firejail --profile=nice.profile\r"
40expect { 40expect {
41 timeout {puts "TESTING ERROR 10\n";exit} 41 timeout {puts "TESTING ERROR 10\n";exit}
42 "Child process initialized" 42 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
43} 43}
44sleep 1 44sleep 1
45 45
@@ -70,7 +70,7 @@ after 100
70send -- "firejail --nice=-5\r" 70send -- "firejail --nice=-5\r"
71expect { 71expect {
72 timeout {puts "TESTING ERROR 17\n";exit} 72 timeout {puts "TESTING ERROR 17\n";exit}
73 "Child process initialized" 73 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
74} 74}
75sleep 1 75sleep 1
76 76
diff --git a/test/environment/output.exp b/test/environment/output.exp
index dd03001d7..2b9594b61 100755
--- a/test/environment/output.exp
+++ b/test/environment/output.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/environment/output.sh b/test/environment/output.sh
index edf7dc4cb..329cb40c7 100755
--- a/test/environment/output.sh
+++ b/test/environment/output.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6i="0" 6i="0"
diff --git a/test/environment/quiet.exp b/test/environment/quiet.exp
index 510491738..b1b3b0173 100755
--- a/test/environment/quiet.exp
+++ b/test/environment/quiet.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 4 6set timeout 4
diff --git a/test/environment/rlimit-bad-profile.exp b/test/environment/rlimit-bad-profile.exp
index b838f83f4..627cc860f 100755
--- a/test/environment/rlimit-bad-profile.exp
+++ b/test/environment/rlimit-bad-profile.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --profile=rlimit-bad1.profile\r" 11send -- "firejail --profile=rlimit-bad1.profile\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 4\n";exit} 13 timeout {puts "TESTING ERROR 4\n";exit}
14 "invalid rlimit" 14 "invalid rlimit-fsize in profile file. Only use positive numbers and k, m or g suffix."
15} 15}
16after 100 16after 100
17 17
diff --git a/test/environment/rlimit-bad.exp b/test/environment/rlimit-bad.exp
index 3a82ded9b..24df1874c 100755
--- a/test/environment/rlimit-bad.exp
+++ b/test/environment/rlimit-bad.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --rlimit-fsize=-1024\r" 10send -- "firejail --rlimit-fsize=-1024\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "invalid rlimit" 13 "invalid rlimit-fsize. Only use positive numbers and k, m or g suffix."
14} 14}
15after 100 15after 100
16 16
diff --git a/test/environment/rlimit-join.exp b/test/environment/rlimit-join.exp
new file mode 100755
index 000000000..9e7161241
--- /dev/null
+++ b/test/environment/rlimit-join.exp
@@ -0,0 +1,40 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2
5
6set timeout 10
7cd /home
8spawn $env(SHELL)
9match_max 100000
10
11send -- "firejail --noprofile --name=\"rlimit testing\"\r"
12expect {
13 timeout {puts "TESTING ERROR 0\n";exit}
14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15}
16sleep 1
17
18spawn $env(SHELL)
19send -- "firejail --rlimit-nofile=1234 --join=\"rlimit testing\"\r"
20expect {
21 timeout {puts "TESTING ERROR 1\n";exit}
22 "Switching to pid"
23}
24expect {
25 timeout {puts "TESTING ERROR 2\n";exit}
26 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
27}
28sleep 1
29
30send -- "cat /proc/self/limits\r"
31expect {
32 timeout {puts "TESTING ERROR 3\n";exit}
33 "Max open files 1234 1234"
34}
35after 100
36
37send -- "exit\r"
38after 100
39
40puts "\nall done\n"
diff --git a/test/environment/rlimit-profile.exp b/test/environment/rlimit-profile.exp
index 4071675ee..762f70ba9 100755
--- a/test/environment/rlimit-profile.exp
+++ b/test/environment/rlimit-profile.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --profile=rlimit.profile\r" 11send -- "firejail --profile=rlimit.profile\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 1 16sleep 1
17 17
diff --git a/test/environment/rlimit.exp b/test/environment/rlimit.exp
index 6fcb554a7..acc87277b 100755
--- a/test/environment/rlimit.exp
+++ b/test/environment/rlimit.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --rlimit-fsize=1024 --rlimit-nproc=1000 --rlimit-nofile=500 --rlimit-sigpending=200 --rlimit-as=1234567890\r" 11send -- "firejail --rlimit-fsize=1024 --rlimit-nproc=1000 --rlimit-nofile=500 --rlimit-sigpending=200 --rlimit-as=1234567890\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 1 16sleep 1
17 17
diff --git a/test/environment/shell-none.exp b/test/environment/shell-none.exp
index 507225326..512e2efc2 100755
--- a/test/environment/shell-none.exp
+++ b/test/environment/shell-none.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -24,7 +24,7 @@ after 100
24send -- "firejail --shell=none ls\r" 24send -- "firejail --shell=none ls\r"
25expect { 25expect {
26 timeout {puts "TESTING ERROR 2\n";exit} 26 timeout {puts "TESTING ERROR 2\n";exit}
27 "Child process initialized" 27 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
28} 28}
29expect { 29expect {
30 timeout {puts "TESTING ERROR 3\n";exit} 30 timeout {puts "TESTING ERROR 3\n";exit}
@@ -35,7 +35,7 @@ after 100
35send -- "firejail --profile=shell-none.profile ls\r" 35send -- "firejail --profile=shell-none.profile ls\r"
36expect { 36expect {
37 timeout {puts "TESTING ERROR 4\n";exit} 37 timeout {puts "TESTING ERROR 4\n";exit}
38 "Child process initialized" 38 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
39} 39}
40expect { 40expect {
41 timeout {puts "TESTING ERROR 5\n";exit} 41 timeout {puts "TESTING ERROR 5\n";exit}
diff --git a/test/environment/sound.exp b/test/environment/sound.exp
index e5fa27e77..7ee1c74d7 100755
--- a/test/environment/sound.exp
+++ b/test/environment/sound.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6 6
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --nosound speaker-test\r" 11send -- "firejail --nosound speaker-test\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 1\n";exit} 13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16expect { 16expect {
17 timeout {puts "TESTING ERROR 2\n";exit} 17 timeout {puts "TESTING ERROR 2\n";exit}
@@ -22,7 +22,7 @@ sleep 2
22send -- "firejail --nosound aplay -l\r" 22send -- "firejail --nosound aplay -l\r"
23expect { 23expect {
24 timeout {puts "TESTING ERROR 3\n";exit} 24 timeout {puts "TESTING ERROR 3\n";exit}
25 "Child process initialized" 25 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
26} 26}
27expect { 27expect {
28 timeout {puts "TESTING ERROR 4\n";exit} 28 timeout {puts "TESTING ERROR 4\n";exit}
@@ -39,7 +39,7 @@ sleep 2
39send -- "firejail --profile=sound.profile speaker-test\r" 39send -- "firejail --profile=sound.profile speaker-test\r"
40expect { 40expect {
41 timeout {puts "TESTING ERROR 11\n";exit} 41 timeout {puts "TESTING ERROR 11\n";exit}
42 "Child process initialized" 42 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
43} 43}
44expect { 44expect {
45 timeout {puts "TESTING ERROR 12\n";exit} 45 timeout {puts "TESTING ERROR 12\n";exit}
@@ -50,7 +50,7 @@ sleep 2
50send -- "firejail --profile=sound.profile aplay -l\r" 50send -- "firejail --profile=sound.profile aplay -l\r"
51expect { 51expect {
52 timeout {puts "TESTING ERROR 13\n";exit} 52 timeout {puts "TESTING ERROR 13\n";exit}
53 "Child process initialized" 53 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
54} 54}
55expect { 55expect {
56 timeout {puts "TESTING ERROR 14\n";exit} 56 timeout {puts "TESTING ERROR 14\n";exit}
@@ -67,7 +67,7 @@ sleep 2
67send -- "firejail aplay -l\r" 67send -- "firejail aplay -l\r"
68expect { 68expect {
69 timeout {puts "TESTING ERROR 23\n";exit} 69 timeout {puts "TESTING ERROR 23\n";exit}
70 "Child process initialized" 70 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
71} 71}
72expect { 72expect {
73 timeout {puts "TESTING ERROR 24\n";exit} 73 timeout {puts "TESTING ERROR 24\n";exit}
diff --git a/test/environment/timeout.exp b/test/environment/timeout.exp
index ea0dd67b7..b38881c81 100755
--- a/test/environment/timeout.exp
+++ b/test/environment/timeout.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "time firejail --timeout=00:00:05\r" 10send -- "time firejail --timeout=00:00:05\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
diff --git a/test/environment/umask.exp b/test/environment/umask.exp
index e1f520fcd..46bd80a92 100755
--- a/test/environment/umask.exp
+++ b/test/environment/umask.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --noprofile\r" 10send -- "firejail --noprofile\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
diff --git a/test/environment/zsh.exp b/test/environment/zsh.exp
index a750ac55c..9f871ea54 100755
--- a/test/environment/zsh.exp
+++ b/test/environment/zsh.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --private --shell=/bin/zsh\r" 11send -- "firejail --private --shell=/bin/zsh\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 1 16sleep 1
17 17
diff --git a/test/fcopy/cmdline.exp b/test/fcopy/cmdline.exp
index 00e44e489..91f18c332 100755
--- a/test/fcopy/cmdline.exp
+++ b/test/fcopy/cmdline.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -32,14 +32,22 @@ after 100
32send -- "fcopy f%oo1 foo2\r" 32send -- "fcopy f%oo1 foo2\r"
33expect { 33expect {
34 timeout {puts "TESTING ERROR 4\n";exit} 34 timeout {puts "TESTING ERROR 4\n";exit}
35 "invalid source file name" 35 "Error:"
36}
37expect {
38 timeout {puts "TESTING ERROR 5\n";exit}
39 "is an invalid filename"
36} 40}
37after 100 41after 100
38 42
39send -- "fcopy foo1 f,oo2\r" 43send -- "fcopy foo1 f,oo2\r"
40expect { 44expect {
41 timeout {puts "TESTING ERROR 5\n";exit} 45 timeout {puts "TESTING ERROR 6\n";exit}
42 "invalid dest file name" 46 "Error:"
47}
48expect {
49 timeout {puts "TESTING ERROR 7\n";exit}
50 "is an invalid filename"
43} 51}
44after 100 52after 100
45 53
diff --git a/test/fcopy/dircopy.exp b/test/fcopy/dircopy.exp
index 633d12d08..a779f80cd 100755
--- a/test/fcopy/dircopy.exp
+++ b/test/fcopy/dircopy.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6# 6#
@@ -12,9 +12,21 @@ match_max 100000
12 12
13send -- "rm -fr dest/*\r" 13send -- "rm -fr dest/*\r"
14after 100 14after 100
15send -- "cd src\r"
16after 100
17send -- "ln -s ../dircopy.exp dircopy.exp\r"
18after 100
19send -- "cd ..\r"
20after 100
15 21
16send -- "fcopy src dest\r" 22send -- "fcopy src dest\r"
17after 100 23after 100
24send -- "cd src\r"
25after 100
26send -- "ln -s ../dircopy.exp dircopy.exp\r"
27after 100
28send -- "cd ..\r"
29after 100
18 30
19send -- "find dest\r" 31send -- "find dest\r"
20expect { 32expect {
@@ -135,5 +147,7 @@ expect {
135 147
136send -- "rm -fr dest/*\r" 148send -- "rm -fr dest/*\r"
137after 100 149after 100
150send -- "rm -f src/dircopy.exp\r"
151after 100
138 152
139puts "\nall done\n" 153puts "\nall done\n"
diff --git a/test/fcopy/fcopy.sh b/test/fcopy/fcopy.sh
index 822f6a9cd..fca599889 100755
--- a/test/fcopy/fcopy.sh
+++ b/test/fcopy/fcopy.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
@@ -19,13 +19,14 @@ mkdir dest
19echo "TESTING: fcopy cmdline (test/fcopy/cmdline.exp)" 19echo "TESTING: fcopy cmdline (test/fcopy/cmdline.exp)"
20./cmdline.exp 20./cmdline.exp
21 21
22echo "TESTING: fcopy directory (test/fcopy/dircopy.exp)"
23./dircopy.exp
24
25echo "TESTING: fcopy file (test/fcopy/filecopy.exp)" 22echo "TESTING: fcopy file (test/fcopy/filecopy.exp)"
26./filecopy.exp 23./filecopy.exp
27 24
28echo "TESTING: fcopy link (test/fcopy/linkcopy.exp)" 25echo "TESTING: fcopy link (test/fcopy/linkcopy.exp)"
29./linkcopy.exp 26./linkcopy.exp
30 27
28echo "TESTING: fcopy directory (test/fcopy/dircopy.exp)"
29./dircopy.exp
30
31rm -fr dest/* 31rm -fr dest/*
32rm -f src/dircopy.exp \ No newline at end of file
diff --git a/test/fcopy/filecopy.exp b/test/fcopy/filecopy.exp
index fb911e222..155c1ce31 100755
--- a/test/fcopy/filecopy.exp
+++ b/test/fcopy/filecopy.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6# 6#
diff --git a/test/fcopy/linkcopy.exp b/test/fcopy/linkcopy.exp
index dbc33c6a7..7c085e552 100755
--- a/test/fcopy/linkcopy.exp
+++ b/test/fcopy/linkcopy.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6# 6#
@@ -12,6 +12,12 @@ match_max 100000
12 12
13send -- "rm -fr dest/*\r" 13send -- "rm -fr dest/*\r"
14after 100 14after 100
15send -- "cd src\r"
16after 100
17send -- "ln -s ../dircopy.exp dircopy.exp\r"
18after 100
19send -- "cd ..\r"
20after 100
15 21
16send -- "fcopy src/dircopy.exp dest\r" 22send -- "fcopy src/dircopy.exp dest\r"
17after 100 23after 100
@@ -19,7 +25,7 @@ after 100
19send -- "find dest\r" 25send -- "find dest\r"
20expect { 26expect {
21 timeout {puts "TESTING ERROR 0\n";exit} 27 timeout {puts "TESTING ERROR 0\n";exit}
22 "dest/" 28 "dest"
23} 29}
24expect { 30expect {
25 timeout {puts "TESTING ERROR 1\n";exit} 31 timeout {puts "TESTING ERROR 1\n";exit}
@@ -27,11 +33,11 @@ expect {
27} 33}
28after 100 34after 100
29 35
30
31send -- "ls -al dest\r" 36send -- "ls -al dest\r"
32expect { 37expect {
33 timeout {puts "TESTING ERROR 2\n";exit} 38 timeout {puts "TESTING ERROR 2\n";exit}
34 "lrwxrwxrwx" 39 "rwxr-xr-x" { puts "umask 0022\n" }
40 "rwxrwxr-x" { puts "umask 0002\n" }
35} 41}
36after 100 42after 100
37send -- "stty -echo\r" 43send -- "stty -echo\r"
@@ -52,5 +58,7 @@ expect {
52 58
53send -- "rm -fr dest/*\r" 59send -- "rm -fr dest/*\r"
54after 100 60after 100
61send -- "rm -f src/dircopy.exp\r"
62after 100
55 63
56puts "\nall done\n" 64puts "\nall done\n"
diff --git a/test/fcopy/src/dircopy.exp b/test/fcopy/src/dircopy.exp
deleted file mode 120000
index 2acf88f7b..000000000
--- a/test/fcopy/src/dircopy.exp
+++ /dev/null
@@ -1 +0,0 @@
1../dircopy.exp \ No newline at end of file
diff --git a/test/features/1.1.exp b/test/features/1.1.exp
index fe1e0f132..916a610a6 100755
--- a/test/features/1.1.exp
+++ b/test/features/1.1.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# disable /boot 6# disable /boot
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile\r" 18send -- "firejail --noprofile\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -40,7 +40,7 @@ if { $overlay == "overlay" } {
40 expect { 40 expect {
41 timeout {puts "TESTING ERROR 2\n";exit} 41 timeout {puts "TESTING ERROR 2\n";exit}
42 "overlay option is not available" {puts "grsecurity\n"; exit} 42 "overlay option is not available" {puts "grsecurity\n"; exit}
43 "Child process initialized" {puts "normal system\n"} 43 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
44 } 44 }
45 sleep 1 45 sleep 1
46 46
@@ -61,7 +61,7 @@ if { $chroot == "chroot" } {
61 send -- "firejail --noprofile --chroot=/tmp/chroot\r" 61 send -- "firejail --noprofile --chroot=/tmp/chroot\r"
62 expect { 62 expect {
63 timeout {puts "TESTING ERROR 4\n";exit} 63 timeout {puts "TESTING ERROR 4\n";exit}
64 "Child process initialized" 64 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
65 } 65 }
66 sleep 1 66 sleep 1
67 67
diff --git a/test/features/1.10.exp b/test/features/1.10.exp
index 5dd03ecef..53279f71e 100755
--- a/test/features/1.10.exp
+++ b/test/features/1.10.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# disable /selinux 6# disable /selinux
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile\r" 18send -- "firejail --noprofile\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -41,7 +41,7 @@ if { $overlay == "overlay" } {
41 expect { 41 expect {
42 timeout {puts "TESTING ERROR 2\n";exit} 42 timeout {puts "TESTING ERROR 2\n";exit}
43 "overlay option is not available" {puts "grsecurity\n"; exit} 43 "overlay option is not available" {puts "grsecurity\n"; exit}
44 "Child process initialized" {puts "normal system\n"} 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
45 } 45 }
46 sleep 1 46 sleep 1
47 47
@@ -63,7 +63,7 @@ if { $chroot == "chroot" } {
63 send -- "firejail --noprofile --chroot=/tmp/chroot\r" 63 send -- "firejail --noprofile --chroot=/tmp/chroot\r"
64 expect { 64 expect {
65 timeout {puts "TESTING ERROR 4\n";exit} 65 timeout {puts "TESTING ERROR 4\n";exit}
66 "Child process initialized" 66 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
67 } 67 }
68 sleep 1 68 sleep 1
69 69
diff --git a/test/features/1.2.exp b/test/features/1.2.exp
index f7a55b445..3043f0104 100755
--- a/test/features/1.2.exp
+++ b/test/features/1.2.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# new /proc 6# new /proc
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile\r" 18send -- "firejail --noprofile\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -64,7 +64,7 @@ if { $overlay == "overlay" } {
64 expect { 64 expect {
65 timeout {puts "TESTING ERROR 2\n";exit} 65 timeout {puts "TESTING ERROR 2\n";exit}
66 "overlay option is not available" {puts "grsecurity\n"; exit} 66 "overlay option is not available" {puts "grsecurity\n"; exit}
67 "Child process initialized" {puts "normal system\n"} 67 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
68 } 68 }
69 sleep 1 69 sleep 1
70 70
@@ -105,7 +105,7 @@ if { $chroot == "chroot" } {
105 send -- "firejail --noprofile --chroot=/tmp/chroot\r" 105 send -- "firejail --noprofile --chroot=/tmp/chroot\r"
106 expect { 106 expect {
107 timeout {puts "TESTING ERROR 4\n";exit} 107 timeout {puts "TESTING ERROR 4\n";exit}
108 "Child process initialized" 108 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
109 } 109 }
110 sleep 1 110 sleep 1
111 111
diff --git a/test/features/1.4.exp b/test/features/1.4.exp
index 66a8c1175..b7e8246a2 100755
--- a/test/features/1.4.exp
+++ b/test/features/1.4.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# mask other users 6# mask other users
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile\r" 18send -- "firejail --noprofile\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -53,7 +53,7 @@ if { $overlay == "overlay" } {
53 expect { 53 expect {
54 timeout {puts "TESTING ERROR 2\n";exit} 54 timeout {puts "TESTING ERROR 2\n";exit}
55 "overlay option is not available" {puts "grsecurity\n"; exit} 55 "overlay option is not available" {puts "grsecurity\n"; exit}
56 "Child process initialized" {puts "normal system\n"} 56 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
57 } 57 }
58 sleep 1 58 sleep 1
59 59
@@ -86,7 +86,7 @@ if { $chroot == "chroot" } {
86 send -- "firejail --noprofile --chroot=/tmp/chroot\r" 86 send -- "firejail --noprofile --chroot=/tmp/chroot\r"
87 expect { 87 expect {
88 timeout {puts "TESTING ERROR 4\n";exit} 88 timeout {puts "TESTING ERROR 4\n";exit}
89 "Child process initialized" 89 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
90 } 90 }
91 sleep 1 91 sleep 1
92 92
diff --git a/test/features/1.5.exp b/test/features/1.5.exp
index ba0aea220..cce8f490f 100755
--- a/test/features/1.5.exp
+++ b/test/features/1.5.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# PID namespace 6# PID namespace
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile\r" 18send -- "firejail --noprofile\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -40,7 +40,7 @@ if { $overlay == "overlay" } {
40 expect { 40 expect {
41 timeout {puts "TESTING ERROR 2\n";exit} 41 timeout {puts "TESTING ERROR 2\n";exit}
42 "overlay option is not available" {puts "grsecurity\n"; exit} 42 "overlay option is not available" {puts "grsecurity\n"; exit}
43 "Child process initialized" {puts "normal system\n"} 43 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
44 } 44 }
45 sleep 1 45 sleep 1
46 46
@@ -61,7 +61,7 @@ if { $chroot == "chroot" } {
61 send -- "firejail --noprofile --chroot=/tmp/chroot\r" 61 send -- "firejail --noprofile --chroot=/tmp/chroot\r"
62 expect { 62 expect {
63 timeout {puts "TESTING ERROR 4\n";exit} 63 timeout {puts "TESTING ERROR 4\n";exit}
64 "Child process initialized" 64 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
65 } 65 }
66 sleep 1 66 sleep 1
67 67
diff --git a/test/features/1.6.exp b/test/features/1.6.exp
index 89fa29de0..81da44c64 100755
--- a/test/features/1.6.exp
+++ b/test/features/1.6.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# new /var/log 6# new /var/log
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile\r" 18send -- "firejail --noprofile\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -40,7 +40,7 @@ if { $overlay == "overlay" } {
40 expect { 40 expect {
41 timeout {puts "TESTING ERROR 2\n";exit} 41 timeout {puts "TESTING ERROR 2\n";exit}
42 "overlay option is not available" {puts "grsecurity\n"; exit} 42 "overlay option is not available" {puts "grsecurity\n"; exit}
43 "Child process initialized" {puts "normal system\n"} 43 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
44 } 44 }
45 sleep 1 45 sleep 1
46 46
@@ -61,7 +61,7 @@ if { $chroot == "chroot" } {
61 send -- "firejail --noprofile --chroot=/tmp/chroot\r" 61 send -- "firejail --noprofile --chroot=/tmp/chroot\r"
62 expect { 62 expect {
63 timeout {puts "TESTING ERROR 4\n";exit} 63 timeout {puts "TESTING ERROR 4\n";exit}
64 "Child process initialized" 64 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
65 } 65 }
66 sleep 1 66 sleep 1
67 67
diff --git a/test/features/1.7.exp b/test/features/1.7.exp
index 3e9c0908f..a84b723de 100755
--- a/test/features/1.7.exp
+++ b/test/features/1.7.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# new /var/tmp 6# new /var/tmp
@@ -20,7 +20,7 @@ sleep 1
20send -- "firejail --noprofile\r" 20send -- "firejail --noprofile\r"
21expect { 21expect {
22 timeout {puts "TESTING ERROR 0\n";exit} 22 timeout {puts "TESTING ERROR 0\n";exit}
23 "Child process initialized" 23 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
24} 24}
25sleep 1 25sleep 1
26 26
@@ -42,7 +42,7 @@ if { $overlay == "overlay" } {
42 expect { 42 expect {
43 timeout {puts "TESTING ERROR 2\n";exit} 43 timeout {puts "TESTING ERROR 2\n";exit}
44 "overlay option is not available" {puts "grsecurity\n"; exit} 44 "overlay option is not available" {puts "grsecurity\n"; exit}
45 "Child process initialized" {puts "normal system\n"} 45 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
46 } 46 }
47 sleep 1 47 sleep 1
48 48
@@ -63,7 +63,7 @@ if { $chroot == "chroot" } {
63 send -- "firejail --noprofile --chroot=/tmp/chroot\r" 63 send -- "firejail --noprofile --chroot=/tmp/chroot\r"
64 expect { 64 expect {
65 timeout {puts "TESTING ERROR 4\n";exit} 65 timeout {puts "TESTING ERROR 4\n";exit}
66 "Child process initialized" 66 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
67 } 67 }
68 sleep 1 68 sleep 1
69 69
diff --git a/test/features/1.8.exp b/test/features/1.8.exp
index 15936c2fb..5f7b0cdbc 100755
--- a/test/features/1.8.exp
+++ b/test/features/1.8.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# disable /etc/firejail and ~/.config/firejail 6# disable /etc/firejail and ~/.config/firejail
@@ -19,7 +19,7 @@ sleep 1
19send -- "firejail --noprofile\r" 19send -- "firejail --noprofile\r"
20expect { 20expect {
21 timeout {puts "TESTING ERROR 0\n";exit} 21 timeout {puts "TESTING ERROR 0\n";exit}
22 "Child process initialized" 22 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
23} 23}
24sleep 1 24sleep 1
25 25
@@ -71,7 +71,7 @@ if { $overlay == "overlay" } {
71 expect { 71 expect {
72 timeout {puts "TESTING ERROR 2\n";exit} 72 timeout {puts "TESTING ERROR 2\n";exit}
73 "overlay option is not available" {puts "grsecurity\n"; exit} 73 "overlay option is not available" {puts "grsecurity\n"; exit}
74 "Child process initialized" {puts "normal system\n"} 74 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
75 } 75 }
76 sleep 1 76 sleep 1
77 send -- "ls ~/.config/firejail\r" 77 send -- "ls ~/.config/firejail\r"
@@ -122,7 +122,7 @@ if { $chroot == "chroot" } {
122 send -- "firejail --noprofile --chroot=/tmp/chroot\r" 122 send -- "firejail --noprofile --chroot=/tmp/chroot\r"
123 expect { 123 expect {
124 timeout {puts "TESTING ERROR 4\n";exit} 124 timeout {puts "TESTING ERROR 4\n";exit}
125 "Child process initialized" 125 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
126 } 126 }
127 sleep 1 127 sleep 1
128 send -- "ls ~/.config/firejail\r" 128 send -- "ls ~/.config/firejail\r"
diff --git a/test/features/2.1.exp b/test/features/2.1.exp
index 6e741a1c2..b56cbc135 100755
--- a/test/features/2.1.exp
+++ b/test/features/2.1.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# hostname 6# hostname
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile --hostname=bingo\r" 18send -- "firejail --noprofile --hostname=bingo\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -56,7 +56,7 @@ if { $overlay == "overlay" } {
56 expect { 56 expect {
57 timeout {puts "TESTING ERROR 2\n";exit} 57 timeout {puts "TESTING ERROR 2\n";exit}
58 "overlay option is not available" {puts "grsecurity\n"; exit} 58 "overlay option is not available" {puts "grsecurity\n"; exit}
59 "Child process initialized" {puts "normal system\n"} 59 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
60 } 60 }
61 sleep 1 61 sleep 1
62 62
@@ -93,7 +93,7 @@ if { $chroot == "chroot" } {
93 send -- "firejail --noprofile --hostname=bingo --chroot=/tmp/chroot\r" 93 send -- "firejail --noprofile --hostname=bingo --chroot=/tmp/chroot\r"
94 expect { 94 expect {
95 timeout {puts "TESTING ERROR 4\n";exit} 95 timeout {puts "TESTING ERROR 4\n";exit}
96 "Child process initialized" 96 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
97 } 97 }
98 sleep 1 98 sleep 1
99 99
diff --git a/test/features/2.2.exp b/test/features/2.2.exp
index 3f30d0bad..378bd529a 100755
--- a/test/features/2.2.exp
+++ b/test/features/2.2.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# DNS 6# DNS
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile --dns=4.2.2.1\r" 18send -- "firejail --noprofile --dns=4.2.2.1\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -48,7 +48,7 @@ if { $overlay == "overlay" } {
48 expect { 48 expect {
49 timeout {puts "TESTING ERROR 2\n";exit} 49 timeout {puts "TESTING ERROR 2\n";exit}
50 "overlay option is not available" {puts "grsecurity\n"; exit} 50 "overlay option is not available" {puts "grsecurity\n"; exit}
51 "Child process initialized" {puts "normal system\n"} 51 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
52 } 52 }
53 sleep 1 53 sleep 1
54 54
@@ -77,7 +77,7 @@ if { $chroot == "chroot" } {
77 send -- "firejail --noprofile --dns=4.2.2.1 --chroot=/tmp/chroot\r" 77 send -- "firejail --noprofile --dns=4.2.2.1 --chroot=/tmp/chroot\r"
78 expect { 78 expect {
79 timeout {puts "TESTING ERROR 4\n";exit} 79 timeout {puts "TESTING ERROR 4\n";exit}
80 "Child process initialized" 80 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
81 } 81 }
82 sleep 1 82 sleep 1
83 83
diff --git a/test/features/2.3.exp b/test/features/2.3.exp
index 6c520fdba..5a188ccc3 100755
--- a/test/features/2.3.exp
+++ b/test/features/2.3.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# mac-vlan 6# mac-vlan
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile --net=eth0 --dns=8.8.8.8 --dns=8.8.4.4\r" 18send -- "firejail --noprofile --net=eth0 --dns=8.8.8.8 --dns=8.8.4.4\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -62,7 +62,7 @@ sleep 3
62send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --dns=8.8.8.8 --dns=8.8.4.4\r" 62send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --dns=8.8.8.8 --dns=8.8.4.4\r"
63expect { 63expect {
64 timeout {puts "TESTING ERROR 0\n";exit} 64 timeout {puts "TESTING ERROR 0\n";exit}
65 "Child process initialized" 65 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
66} 66}
67sleep 1 67sleep 1
68 68
@@ -111,7 +111,7 @@ if { $overlay == "overlay" } {
111 expect { 111 expect {
112 timeout {puts "TESTING ERROR 2\n";exit} 112 timeout {puts "TESTING ERROR 2\n";exit}
113 "overlay option is not available" {puts "grsecurity\n"; exit} 113 "overlay option is not available" {puts "grsecurity\n"; exit}
114 "Child process initialized" {puts "normal system\n"} 114 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
115 } 115 }
116 sleep 1 116 sleep 1
117 117
@@ -155,7 +155,7 @@ if { $overlay == "overlay" } {
155 send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --overlay --dns=8.8.8.8 --dns=8.8.4.4\r" 155 send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --overlay --dns=8.8.8.8 --dns=8.8.4.4\r"
156 expect { 156 expect {
157 timeout {puts "TESTING ERROR 2\n";exit} 157 timeout {puts "TESTING ERROR 2\n";exit}
158 "Child process initialized" 158 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
159 } 159 }
160 sleep 1 160 sleep 1
161 161
@@ -205,7 +205,7 @@ if { $chroot == "chroot" } {
205 send -- "firejail --noprofile --net=eth0 --chroot=/tmp/chroot --dns=8.8.8.8 --dns=8.8.4.4\r" 205 send -- "firejail --noprofile --net=eth0 --chroot=/tmp/chroot --dns=8.8.8.8 --dns=8.8.4.4\r"
206 expect { 206 expect {
207 timeout {puts "TESTING ERROR 4\n";exit} 207 timeout {puts "TESTING ERROR 4\n";exit}
208 "Child process initialized" 208 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
209 } 209 }
210 sleep 1 210 sleep 1
211 211
@@ -249,7 +249,7 @@ if { $chroot == "chroot" } {
249 send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --chroot=/tmp/chroot --dns=8.8.8.8 --dns=8.8.4.4\r" 249 send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --chroot=/tmp/chroot --dns=8.8.8.8 --dns=8.8.4.4\r"
250 expect { 250 expect {
251 timeout {puts "TESTING ERROR 4\n";exit} 251 timeout {puts "TESTING ERROR 4\n";exit}
252 "Child process initialized" 252 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
253 } 253 }
254 sleep 1 254 sleep 1
255 255
diff --git a/test/features/2.4.exp b/test/features/2.4.exp
index 74b7881f0..15159c9b7 100755
--- a/test/features/2.4.exp
+++ b/test/features/2.4.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# bridge 6# bridge
@@ -19,7 +19,7 @@ set chroot [lindex $argv 1]
19send -- "firejail --noprofile --net=br0\r" 19send -- "firejail --noprofile --net=br0\r"
20expect { 20expect {
21 timeout {puts "TESTING ERROR 0\n";exit} 21 timeout {puts "TESTING ERROR 0\n";exit}
22 "Child process initialized" 22 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
23} 23}
24sleep 1 24sleep 1
25 25
@@ -56,7 +56,7 @@ sleep 1
56send -- "firejail --noprofile --net=br0 --ip=10.10.20.4\r" 56send -- "firejail --noprofile --net=br0 --ip=10.10.20.4\r"
57expect { 57expect {
58 timeout {puts "TESTING ERROR 0\n";exit} 58 timeout {puts "TESTING ERROR 0\n";exit}
59 "Child process initialized" 59 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
60} 60}
61sleep 1 61sleep 1
62 62
@@ -99,7 +99,7 @@ if { $overlay == "overlay" } {
99 expect { 99 expect {
100 timeout {puts "TESTING ERROR 2\n";exit} 100 timeout {puts "TESTING ERROR 2\n";exit}
101 "overlay option is not available" {puts "grsecurity\n"; exit} 101 "overlay option is not available" {puts "grsecurity\n"; exit}
102 "Child process initialized" {puts "normal system\n"} 102 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
103 } 103 }
104 sleep 1 104 sleep 1
105 105
@@ -136,7 +136,7 @@ if { $overlay == "overlay" } {
136 send -- "firejail --noprofile --net=br0 --ip=10.10.20.4 --overlay\r" 136 send -- "firejail --noprofile --net=br0 --ip=10.10.20.4 --overlay\r"
137 expect { 137 expect {
138 timeout {puts "TESTING ERROR 2\n";exit} 138 timeout {puts "TESTING ERROR 2\n";exit}
139 "Child process initialized" 139 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
140 } 140 }
141 sleep 1 141 sleep 1
142 142
@@ -179,7 +179,7 @@ if { $chroot == "chroot" } {
179 send -- "firejail --noprofile --net=br0 --chroot=/tmp/chroot\r" 179 send -- "firejail --noprofile --net=br0 --chroot=/tmp/chroot\r"
180 expect { 180 expect {
181 timeout {puts "TESTING ERROR 4\n";exit} 181 timeout {puts "TESTING ERROR 4\n";exit}
182 "Child process initialized" 182 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
183 } 183 }
184 sleep 1 184 sleep 1
185 185
@@ -208,7 +208,7 @@ if { $chroot == "chroot" } {
208 send -- "firejail --noprofile --net=br0 --ip=10.10.20.4 --chroot=/tmp/chroot\r" 208 send -- "firejail --noprofile --net=br0 --ip=10.10.20.4 --chroot=/tmp/chroot\r"
209 expect { 209 expect {
210 timeout {puts "TESTING ERROR 4\n";exit} 210 timeout {puts "TESTING ERROR 4\n";exit}
211 "Child process initialized" 211 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
212 } 212 }
213 sleep 1 213 sleep 1
214 214
diff --git a/test/features/2.5.exp b/test/features/2.5.exp
index bc3e44e8f..2995d34f7 100755
--- a/test/features/2.5.exp
+++ b/test/features/2.5.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# interface 6# interface
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile --interface=eth0.5\r" 18send -- "firejail --noprofile --interface=eth0.5\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -51,7 +51,7 @@ if { $overlay == "overlay" } {
51 expect { 51 expect {
52 timeout {puts "TESTING ERROR 2\n";exit} 52 timeout {puts "TESTING ERROR 2\n";exit}
53 "overlay option is not available" {puts "grsecurity\n"; exit} 53 "overlay option is not available" {puts "grsecurity\n"; exit}
54 "Child process initialized" {puts "normal system\n"} 54 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
55 } 55 }
56 sleep 1 56 sleep 1
57 57
@@ -84,7 +84,7 @@ if { $chroot == "chroot" } {
84 send -- "firejail --noprofile --chroot=/tmp/chroot --interface=eth0.7\r" 84 send -- "firejail --noprofile --chroot=/tmp/chroot --interface=eth0.7\r"
85 expect { 85 expect {
86 timeout {puts "TESTING ERROR 4\n";exit} 86 timeout {puts "TESTING ERROR 4\n";exit}
87 "Child process initialized" 87 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
88 } 88 }
89 sleep 1 89 sleep 1
90 90
diff --git a/test/features/2.6.exp b/test/features/2.6.exp
index 7c763e6f1..e8cd780ee 100755
--- a/test/features/2.6.exp
+++ b/test/features/2.6.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# default gateway 6# default gateway
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile --net=eth0 --defaultgw=192.168.1.10 --protocol=unix,inet,netlink\r" 18send -- "firejail --noprofile --net=eth0 --defaultgw=192.168.1.10 --protocol=unix,inet,netlink\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -39,7 +39,7 @@ if { $overlay == "overlay" } {
39 expect { 39 expect {
40 timeout {puts "TESTING ERROR 2\n";exit} 40 timeout {puts "TESTING ERROR 2\n";exit}
41 "overlay option is not available" {puts "grsecurity\n"; exit} 41 "overlay option is not available" {puts "grsecurity\n"; exit}
42 "Child process initialized" {puts "normal system\n"} 42 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
43 } 43 }
44 sleep 1 44 sleep 1
45 45
@@ -60,7 +60,7 @@ if { $chroot == "chroot" } {
60 send -- "firejail --noprofile --chroot=/tmp/chroot --net=eth0 --defaultgw=192.168.1.10 --protocol=unix,inet,netlink\r" 60 send -- "firejail --noprofile --chroot=/tmp/chroot --net=eth0 --defaultgw=192.168.1.10 --protocol=unix,inet,netlink\r"
61 expect { 61 expect {
62 timeout {puts "TESTING ERROR 4\n";exit} 62 timeout {puts "TESTING ERROR 4\n";exit}
63 "Child process initialized" 63 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
64 } 64 }
65 sleep 1 65 sleep 1
66 66
diff --git a/test/features/3.1.exp b/test/features/3.1.exp
index 6ba56517a..95d1d609b 100755
--- a/test/features/3.1.exp
+++ b/test/features/3.1.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# private 6# private
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile --private\r" 18send -- "firejail --noprofile --private\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -70,7 +70,7 @@ if { $overlay == "overlay" } {
70 expect { 70 expect {
71 timeout {puts "TESTING ERROR 2\n";exit} 71 timeout {puts "TESTING ERROR 2\n";exit}
72 "overlay option is not available" {puts "grsecurity\n"; exit} 72 "overlay option is not available" {puts "grsecurity\n"; exit}
73 "Child process initialized" {puts "normal system\n"} 73 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
74 } 74 }
75 sleep 1 75 sleep 1
76 76
@@ -120,7 +120,7 @@ if { $chroot == "chroot" } {
120 send -- "firejail --noprofile --chroot=/tmp/chroot --private\r" 120 send -- "firejail --noprofile --chroot=/tmp/chroot --private\r"
121 expect { 121 expect {
122 timeout {puts "TESTING ERROR 4\n";exit} 122 timeout {puts "TESTING ERROR 4\n";exit}
123 "Child process initialized" 123 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
124 } 124 }
125 sleep 1 125 sleep 1
126 126
diff --git a/test/features/3.10.exp b/test/features/3.10.exp
index 4797c765b..5d4414f40 100755
--- a/test/features/3.10.exp
+++ b/test/features/3.10.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# whitelist tmp 6# whitelist tmp
@@ -22,7 +22,7 @@ sleep 1
22send -- "firejail --noprofile --whitelist=/tmp/test1dir\r" 22send -- "firejail --noprofile --whitelist=/tmp/test1dir\r"
23expect { 23expect {
24 timeout {puts "TESTING ERROR 0\n";exit} 24 timeout {puts "TESTING ERROR 0\n";exit}
25 "Child process initialized" 25 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
26} 26}
27sleep 1 27sleep 1
28 28
@@ -78,7 +78,7 @@ if { $overlay == "overlay" } {
78 expect { 78 expect {
79 timeout {puts "TESTING ERROR 2\n";exit} 79 timeout {puts "TESTING ERROR 2\n";exit}
80 "overlay option is not available" {puts "grsecurity\n"; exit} 80 "overlay option is not available" {puts "grsecurity\n"; exit}
81 "Child process initialized" {puts "normal system\n"} 81 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
82 } 82 }
83 sleep 1 83 sleep 1
84 84
@@ -136,7 +136,7 @@ if { $chroot == "chroot" } {
136 send -- "firejail --noprofile --chroot=/tmp/chroot --whitelist=/tmp/test1dir\r" 136 send -- "firejail --noprofile --chroot=/tmp/chroot --whitelist=/tmp/test1dir\r"
137 expect { 137 expect {
138 timeout {puts "TESTING ERROR 4\n";exit} 138 timeout {puts "TESTING ERROR 4\n";exit}
139 "Child process initialized" 139 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
140 } 140 }
141 sleep 1 141 sleep 1
142 142
diff --git a/test/features/3.11.exp b/test/features/3.11.exp
index b26d7b888..8287f9dbf 100755
--- a/test/features/3.11.exp
+++ b/test/features/3.11.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# mkdir 6# mkdir
@@ -21,7 +21,7 @@ sleep 1
21send -- "firejail --profile=3.11.profile\r" 21send -- "firejail --profile=3.11.profile\r"
22expect { 22expect {
23 timeout {puts "TESTING ERROR 0\n";exit} 23 timeout {puts "TESTING ERROR 0\n";exit}
24 "Child process initialized" 24 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
25} 25}
26sleep 1 26sleep 1
27 27
@@ -73,7 +73,7 @@ if { $overlay == "overlay" } {
73 expect { 73 expect {
74 timeout {puts "TESTING ERROR 10\n";exit} 74 timeout {puts "TESTING ERROR 10\n";exit}
75 "overlay option is not available" {puts "grsecurity\n"; exit} 75 "overlay option is not available" {puts "grsecurity\n"; exit}
76 "Child process initialized" {puts "normal system\n"} 76 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
77 } 77 }
78 sleep 1 78 sleep 1
79 79
@@ -127,7 +127,7 @@ if { $chroot == "chroot" } {
127 send -- "firejail --profile=3.11.profile\r" 127 send -- "firejail --profile=3.11.profile\r"
128 expect { 128 expect {
129 timeout {puts "TESTING ERROR 20\n";exit} 129 timeout {puts "TESTING ERROR 20\n";exit}
130 "Child process initialized" 130 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
131 } 131 }
132 sleep 1 132 sleep 1
133 133
diff --git a/test/features/3.2.exp b/test/features/3.2.exp
index df73b9786..9af0513ea 100755
--- a/test/features/3.2.exp
+++ b/test/features/3.2.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# read-only 6# read-only
@@ -20,7 +20,7 @@ sleep 1
20send -- "firejail --noprofile --read-only=/home/netblue/.config\r" 20send -- "firejail --noprofile --read-only=/home/netblue/.config\r"
21expect { 21expect {
22 timeout {puts "TESTING ERROR 0\n";exit} 22 timeout {puts "TESTING ERROR 0\n";exit}
23 "Child process initialized" 23 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
24} 24}
25sleep 1 25sleep 1
26 26
@@ -41,7 +41,7 @@ if { $overlay == "overlay" } {
41 expect { 41 expect {
42 timeout {puts "TESTING ERROR 2\n";exit} 42 timeout {puts "TESTING ERROR 2\n";exit}
43 "overlay option is not available" {puts "grsecurity\n"; exit} 43 "overlay option is not available" {puts "grsecurity\n"; exit}
44 "Child process initialized" {puts "normal system\n"} 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
45 } 45 }
46 sleep 1 46 sleep 1
47 47
@@ -64,7 +64,7 @@ if { $chroot == "chroot" } {
64 send -- "firejail --noprofile --chroot=/tmp/chroot --read-only=/home/netblue/.config\r" 64 send -- "firejail --noprofile --chroot=/tmp/chroot --read-only=/home/netblue/.config\r"
65 expect { 65 expect {
66 timeout {puts "TESTING ERROR 4\n";exit} 66 timeout {puts "TESTING ERROR 4\n";exit}
67 "Child process initialized" 67 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
68 } 68 }
69 sleep 1 69 sleep 1
70 70
diff --git a/test/features/3.3.exp b/test/features/3.3.exp
index 499718dbd..71b6f70db 100755
--- a/test/features/3.3.exp
+++ b/test/features/3.3.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# blacklist 6# blacklist
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile --blacklist=/home/netblue/.config\r" 18send -- "firejail --noprofile --blacklist=/home/netblue/.config\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -40,7 +40,7 @@ if { $overlay == "overlay" } {
40 expect { 40 expect {
41 timeout {puts "TESTING ERROR 2\n";exit} 41 timeout {puts "TESTING ERROR 2\n";exit}
42 "overlay option is not available" {puts "grsecurity\n"; exit} 42 "overlay option is not available" {puts "grsecurity\n"; exit}
43 "Child process initialized" {puts "normal system\n"} 43 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
44 } 44 }
45 sleep 1 45 sleep 1
46 46
@@ -61,7 +61,7 @@ if { $chroot == "chroot" } {
61 send -- "firejail --noprofile --chroot=/tmp/chroot --blacklist=/home/netblue/.config\r" 61 send -- "firejail --noprofile --chroot=/tmp/chroot --blacklist=/home/netblue/.config\r"
62 expect { 62 expect {
63 timeout {puts "TESTING ERROR 4\n";exit} 63 timeout {puts "TESTING ERROR 4\n";exit}
64 "Child process initialized" 64 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
65 } 65 }
66 sleep 1 66 sleep 1
67 67
diff --git a/test/features/3.4.exp b/test/features/3.4.exp
index e59ff8a38..d3f894da2 100755
--- a/test/features/3.4.exp
+++ b/test/features/3.4.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# whitelist home 6# whitelist home
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile --whitelist=/home/netblue/.config\r" 18send -- "firejail --noprofile --whitelist=/home/netblue/.config\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -83,7 +83,7 @@ if { $overlay == "overlay" } {
83 expect { 83 expect {
84 timeout {puts "TESTING ERROR 2\n";exit} 84 timeout {puts "TESTING ERROR 2\n";exit}
85 "overlay option is not available" {puts "grsecurity\n"; exit} 85 "overlay option is not available" {puts "grsecurity\n"; exit}
86 "Child process initialized" {puts "normal system\n"} 86 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
87 } 87 }
88 sleep 1 88 sleep 1
89 89
@@ -147,7 +147,7 @@ if { $chroot == "chroot" } {
147 send -- "firejail --noprofile --chroot=/tmp/chroot --whitelist=/home/netblue/.config\r" 147 send -- "firejail --noprofile --chroot=/tmp/chroot --whitelist=/home/netblue/.config\r"
148 expect { 148 expect {
149 timeout {puts "TESTING ERROR 4\n";exit} 149 timeout {puts "TESTING ERROR 4\n";exit}
150 "Child process initialized" 150 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
151 } 151 }
152 sleep 1 152 sleep 1
153 153
diff --git a/test/features/3.5.exp b/test/features/3.5.exp
index 8c37aebb3..c19680d41 100755
--- a/test/features/3.5.exp
+++ b/test/features/3.5.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# private-dev 6# private-dev
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile --private-dev\r" 18send -- "firejail --noprofile --private-dev\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -41,7 +41,7 @@ if { $overlay == "overlay" } {
41 expect { 41 expect {
42 timeout {puts "TESTING ERROR 2\n";exit} 42 timeout {puts "TESTING ERROR 2\n";exit}
43 "overlay option is not available" {puts "grsecurity\n"; exit} 43 "overlay option is not available" {puts "grsecurity\n"; exit}
44 "Child process initialized" {puts "normal system\n"} 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
45 } 45 }
46 sleep 1 46 sleep 1
47 47
@@ -64,7 +64,7 @@ if { $chroot == "chroot" } {
64 send -- "firejail --noprofile --chroot=/tmp/chroot --private-dev\r" 64 send -- "firejail --noprofile --chroot=/tmp/chroot --private-dev\r"
65 expect { 65 expect {
66 timeout {puts "TESTING ERROR 4\n";exit} 66 timeout {puts "TESTING ERROR 4\n";exit}
67 "Child process initialized" 67 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
68 } 68 }
69 sleep 1 69 sleep 1
70 70
diff --git a/test/features/3.6.exp b/test/features/3.6.exp
index 0149a04cd..31978e764 100755
--- a/test/features/3.6.exp
+++ b/test/features/3.6.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# private-etc 6# private-etc
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile --private-etc=group,hostname,hosts,nsswitch.conf,passwd,resolv.conf,skel\r" 18send -- "firejail --noprofile --private-etc=group,hostname,hosts,nsswitch.conf,passwd,resolv.conf,skel\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -40,7 +40,7 @@ if { $overlay == "overlay" } {
40 expect { 40 expect {
41 timeout {puts "TESTING ERROR 2\n";exit} 41 timeout {puts "TESTING ERROR 2\n";exit}
42 "overlay option is not available" {puts "grsecurity\n"; exit} 42 "overlay option is not available" {puts "grsecurity\n"; exit}
43 "Child process initialized" {puts "normal system\n"} 43 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
44 } 44 }
45 sleep 1 45 sleep 1
46 46
@@ -68,7 +68,7 @@ if { $chroot == "chroot" } {
68 expect { 68 expect {
69 timeout {puts "TESTING ERROR 5\n";exit} 69 timeout {puts "TESTING ERROR 5\n";exit}
70 "chroot option is not available" {puts "grsecurity\n"; exit} 70 "chroot option is not available" {puts "grsecurity\n"; exit}
71 "Child process initialized" 71 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
72 } 72 }
73 sleep 1 73 sleep 1
74 74
diff --git a/test/features/3.7.exp b/test/features/3.7.exp
index 9d3e7265c..4a0cb0d79 100755
--- a/test/features/3.7.exp
+++ b/test/features/3.7.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# private-tmp 6# private-tmp
@@ -22,7 +22,7 @@ sleep 1
22send -- "firejail --noprofile --private-tmp\r" 22send -- "firejail --noprofile --private-tmp\r"
23expect { 23expect {
24 timeout {puts "TESTING ERROR 0\n";exit} 24 timeout {puts "TESTING ERROR 0\n";exit}
25 "Child process initialized" 25 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
26} 26}
27sleep 1 27sleep 1
28 28
@@ -49,7 +49,7 @@ if { $overlay == "overlay" } {
49 expect { 49 expect {
50 timeout {puts "TESTING ERROR 2\n";exit} 50 timeout {puts "TESTING ERROR 2\n";exit}
51 "overlay option is not available" {puts "grsecurity\n"; exit} 51 "overlay option is not available" {puts "grsecurity\n"; exit}
52 "Child process initialized" {puts "normal system\n"} 52 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
53 } 53 }
54 sleep 1 54 sleep 1
55 55
@@ -76,7 +76,7 @@ if { $chroot == "chroot" } {
76 send -- "firejail --noprofile --chroot=/tmp/chroot --private-tmp\r" 76 send -- "firejail --noprofile --chroot=/tmp/chroot --private-tmp\r"
77 expect { 77 expect {
78 timeout {puts "TESTING ERROR 4\n";exit} 78 timeout {puts "TESTING ERROR 4\n";exit}
79 "Child process initialized" 79 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
80 } 80 }
81 sleep 1 81 sleep 1
82 82
diff --git a/test/features/3.8.exp b/test/features/3.8.exp
index 5546ef15b..0a53599a9 100755
--- a/test/features/3.8.exp
+++ b/test/features/3.8.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# private-bin 6# private-bin
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile --private-bin=bash,cat,cp,ls,wc\r" 18send -- "firejail --noprofile --private-bin=bash,cat,cp,ls,wc\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -41,7 +41,7 @@ if { $overlay == "overlay" } {
41 expect { 41 expect {
42 timeout {puts "TESTING ERROR 2\n";exit} 42 timeout {puts "TESTING ERROR 2\n";exit}
43 "overlay option is not available" {puts "grsecurity\n"; exit} 43 "overlay option is not available" {puts "grsecurity\n"; exit}
44 "Child process initialized" {puts "normal system\n"} 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
45 } 45 }
46 sleep 1 46 sleep 1
47 47
@@ -68,7 +68,7 @@ if { $chroot == "chroot" } {
68 } 68 }
69 expect { 69 expect {
70 timeout {puts "TESTING ERROR 5\n";exit} 70 timeout {puts "TESTING ERROR 5\n";exit}
71 "Child process initialized" 71 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
72 } 72 }
73 sleep 1 73 sleep 1
74 74
diff --git a/test/features/3.9.exp b/test/features/3.9.exp
index 6029160a6..7d843e7cc 100755
--- a/test/features/3.9.exp
+++ b/test/features/3.9.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# whitelist dev 6# whitelist dev
@@ -18,7 +18,7 @@ set chroot [lindex $argv 1]
18send -- "firejail --noprofile --whitelist=/dev/tty --whitelist=/dev/null\r" 18send -- "firejail --noprofile --whitelist=/dev/tty --whitelist=/dev/null\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -42,7 +42,7 @@ if { $overlay == "overlay" } {
42 expect { 42 expect {
43 timeout {puts "TESTING ERROR 2\n";exit} 43 timeout {puts "TESTING ERROR 2\n";exit}
44 "overlay option is not available" {puts "grsecurity\n"; exit} 44 "overlay option is not available" {puts "grsecurity\n"; exit}
45 "Child process initialized" {puts "normal system\n"} 45 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
46 } 46 }
47 sleep 1 47 sleep 1
48 48
@@ -65,7 +65,7 @@ if { $chroot == "chroot" } {
65 send -- "firejail --noprofile --chroot=/tmp/chroot --whitelist=/dev/tty --whitelist=/dev/null\r" 65 send -- "firejail --noprofile --chroot=/tmp/chroot --whitelist=/dev/tty --whitelist=/dev/null\r"
66 expect { 66 expect {
67 timeout {puts "TESTING ERROR 4\n";exit} 67 timeout {puts "TESTING ERROR 4\n";exit}
68 "Child process initialized" 68 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
69 } 69 }
70 sleep 1 70 sleep 1
71 71
diff --git a/test/features/test.sh b/test/features/test.sh
index 392e6c159..b507c6d37 100755
--- a/test/features/test.sh
+++ b/test/features/test.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export LC_ALL=C 6export LC_ALL=C
diff --git a/test/filters/apparmor.exp b/test/filters/apparmor.exp
index f20326fe0..13ce4dd06 100755
--- a/test/filters/apparmor.exp
+++ b/test/filters/apparmor.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=test1 --apparmor\r" 10send -- "firejail --name=test1 --apparmor\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
@@ -18,7 +18,7 @@ spawn $env(SHELL)
18send -- "firejail --name=test2 --apparmor\r" 18send -- "firejail --name=test2 --apparmor\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 1\n";exit} 20 timeout {puts "TESTING ERROR 1\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
diff --git a/test/filters/caps-join.exp b/test/filters/caps-join.exp
index 4f3a2832d..921d6b695 100755
--- a/test/filters/caps-join.exp
+++ b/test/filters/caps-join.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -20,7 +20,7 @@ set spawn_id $id1
20send -- "firejail --name=jointesting\r" 20send -- "firejail --name=jointesting\r"
21expect { 21expect {
22 timeout {puts "TESTING ERROR 0\n";exit} 22 timeout {puts "TESTING ERROR 0\n";exit}
23 "Child process initialized" 23 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
24} 24}
25sleep 1 25sleep 1
26 26
@@ -44,7 +44,7 @@ set spawn_id $id1
44send -- "firejail --name=jointesting --noprofile\r" 44send -- "firejail --name=jointesting --noprofile\r"
45expect { 45expect {
46 timeout {puts "TESTING ERROR 10\n";exit} 46 timeout {puts "TESTING ERROR 10\n";exit}
47 "Child process initialized" 47 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
48} 48}
49sleep 1 49sleep 1
50 50
@@ -76,7 +76,7 @@ set spawn_id $id1
76send -- "firejail --name=jointesting --noprofile --caps.keep=chown,fowner\r" 76send -- "firejail --name=jointesting --noprofile --caps.keep=chown,fowner\r"
77expect { 77expect {
78 timeout {puts "TESTING ERROR20\n";exit} 78 timeout {puts "TESTING ERROR20\n";exit}
79 "Child process initialized" 79 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
80} 80}
81sleep 1 81sleep 1
82 82
diff --git a/test/filters/caps-print.exp b/test/filters/caps-print.exp
index e8465aee1..f4f2fc7ca 100755
--- a/test/filters/caps-print.exp
+++ b/test/filters/caps-print.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -42,7 +42,7 @@ expect {
42} 42}
43expect { 43expect {
44 timeout {puts "TESTING ERROR 8\n";exit} 44 timeout {puts "TESTING ERROR 8\n";exit}
45 "Child process initialized" 45 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
46} 46}
47sleep 1 47sleep 1
48 48
diff --git a/test/filters/caps.exp b/test/filters/caps.exp
index 8776e83d4..29437beea 100755
--- a/test/filters/caps.exp
+++ b/test/filters/caps.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --caps.keep=chown,fowner --noprofile\r" 10send -- "firejail --caps.keep=chown,fowner --noprofile\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15after 100 15after 100
16 16
@@ -29,7 +29,7 @@ sleep 1
29send -- "firejail --caps.drop=all --noprofile\r" 29send -- "firejail --caps.drop=all --noprofile\r"
30expect { 30expect {
31 timeout {puts "TESTING ERROR 4\n";exit} 31 timeout {puts "TESTING ERROR 4\n";exit}
32 "Child process initialized" 32 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
33} 33}
34after 100 34after 100
35 35
@@ -48,7 +48,7 @@ sleep 1
48send -- "firejail --caps.drop=chown,dac_override,dac_read_search,fowner --noprofile\r" 48send -- "firejail --caps.drop=chown,dac_override,dac_read_search,fowner --noprofile\r"
49expect { 49expect {
50 timeout {puts "TESTING ERROR 7\n";exit} 50 timeout {puts "TESTING ERROR 7\n";exit}
51 "Child process initialized" 51 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
52} 52}
53after 100 53after 100
54 54
@@ -81,7 +81,7 @@ expect {
81expect { 81expect {
82 timeout {puts "TESTING ERROR 13\n";exit} 82 timeout {puts "TESTING ERROR 13\n";exit}
83 "Drop CAP_" {puts "TESTING ERROR 14\n";exit} 83 "Drop CAP_" {puts "TESTING ERROR 14\n";exit}
84 "Child process initialized" 84 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
85} 85}
86after 100 86after 100
87send -- "exit\r" 87send -- "exit\r"
@@ -93,7 +93,7 @@ sleep 1
93#send -- "firejail --profile=caps2.profile\r" 93#send -- "firejail --profile=caps2.profile\r"
94#expect { 94#expect {
95# timeout {puts "TESTING ERROR 15\n";exit} 95# timeout {puts "TESTING ERROR 15\n";exit}
96# "Child process initialized" 96# -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
97#} 97#}
98#after 100 98#after 100
99# 99#
@@ -113,7 +113,7 @@ sleep 1
113send -- "firejail --profile=caps3.profile\r" 113send -- "firejail --profile=caps3.profile\r"
114expect { 114expect {
115 timeout {puts "TESTING ERROR 18\n";exit} 115 timeout {puts "TESTING ERROR 18\n";exit}
116 "Child process initialized" 116 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
117} 117}
118after 100 118after 100
119 119
diff --git a/test/filters/debug.exp b/test/filters/debug.exp
index b2ca95191..769c03273 100755
--- a/test/filters/debug.exp
+++ b/test/filters/debug.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/filters/filters.sh b/test/filters/filters.sh
index a9f06b60a..04d7080d6 100755
--- a/test/filters/filters.sh
+++ b/test/filters/filters.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
@@ -33,8 +33,12 @@ fi
33echo "TESTING: debug options (test/filters/debug.exp)" 33echo "TESTING: debug options (test/filters/debug.exp)"
34./debug.exp 34./debug.exp
35 35
36echo "TESTING: seccomp run files (test/filters/seccomp-run-files.exp)" 36if [ "$(uname -m)" = "x86_64" ]; then
37./seccomp-run-files.exp 37 echo "TESTING: seccomp run files (test/filters/seccomp-run-files.exp)"
38 ./seccomp-run-files.exp
39else
40 echo "TESTING SKIP: seccomp-run-files test implemented only for x86_64."
41fi
38 42
39echo "TESTING: seccomp postexec (test/filters/seccomp-postexec.exp)" 43echo "TESTING: seccomp postexec (test/filters/seccomp-postexec.exp)"
40./seccomp-postexec.exp 44./seccomp-postexec.exp
@@ -111,14 +115,11 @@ echo "TESTING: seccomp chmod profile - seccomp lists (test/filters/seccomp-chmod
111echo "TESTING: seccomp empty (test/filters/seccomp-empty.exp)" 115echo "TESTING: seccomp empty (test/filters/seccomp-empty.exp)"
112./seccomp-empty.exp 116./seccomp-empty.exp
113 117
114echo "TESTING: seccomp numeric (test/filters/seccomp-numeric.exp)"
115./seccomp-numeric.exp
116
117if [ "$(uname -m)" = "x86_64" ]; then 118if [ "$(uname -m)" = "x86_64" ]; then
118 echo "TESTING: seccomp dual filter (test/filters/seccomp-dualfilter.exp)" 119 echo "TESTING: seccomp numeric (test/filters/seccomp-numeric.exp)"
119 ./seccomp-dualfilter.exp 120 ./seccomp-numeric.exp
120else 121else
121 echo "TESTING SKIP: seccomp dual, not running on x86_64" 122 echo "TESTING SKIP: seccomp numeric test implemented only for x86_64"
122fi 123fi
123 124
124if [ "$(uname -m)" = "x86_64" ]; then 125if [ "$(uname -m)" = "x86_64" ]; then
diff --git a/test/filters/fseccomp.exp b/test/filters/fseccomp.exp
index 59f812d6d..ff0179a1c 100755
--- a/test/filters/fseccomp.exp
+++ b/test/filters/fseccomp.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -111,7 +111,7 @@ expect {
111} 111}
112expect { 112expect {
113 timeout {puts "TESTING ERROR 9.3\n";exit} 113 timeout {puts "TESTING ERROR 9.3\n";exit}
114 "ret KILL" 114 "ret ERRNO"
115} 115}
116 116
117 117
diff --git a/test/filters/memwrexe b/test/filters/memwrexe
index 669f0d320..1173cdc07 100755
--- a/test/filters/memwrexe
+++ b/test/filters/memwrexe
Binary files differ
diff --git a/test/filters/memwrexe-32 b/test/filters/memwrexe-32
index 70c98b796..bdf71dcb4 100755
--- a/test/filters/memwrexe-32
+++ b/test/filters/memwrexe-32
Binary files differ
diff --git a/test/filters/memwrexe-32.exp b/test/filters/memwrexe-32.exp
index 1aeaacc82..211052514 100755
--- a/test/filters/memwrexe-32.exp
+++ b/test/filters/memwrexe-32.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --memory-deny-write-execute ./memwrexe-32 mmap\r" 10send -- "firejail --memory-deny-write-execute ./memwrexe-32 mmap\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
@@ -22,7 +22,7 @@ after 100
22send -- "firejail --memory-deny-write-execute ./memwrexe-32 mprotect\r" 22send -- "firejail --memory-deny-write-execute ./memwrexe-32 mprotect\r"
23expect { 23expect {
24 timeout {puts "TESTING ERROR 10\n";exit} 24 timeout {puts "TESTING ERROR 10\n";exit}
25 "Child process initialized" 25 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
26} 26}
27expect { 27expect {
28 timeout {puts "TESTING ERROR 11\n";exit} 28 timeout {puts "TESTING ERROR 11\n";exit}
@@ -34,7 +34,7 @@ after 100
34send -- "firejail --memory-deny-write-execute ./memwrexe-32 memfd_create\r" 34send -- "firejail --memory-deny-write-execute ./memwrexe-32 memfd_create\r"
35expect { 35expect {
36 timeout {puts "TESTING ERROR 20\n";exit} 36 timeout {puts "TESTING ERROR 20\n";exit}
37 "Child process initialized" 37 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
38} 38}
39expect { 39expect {
40 timeout {puts "TESTING ERROR 21\n";exit} 40 timeout {puts "TESTING ERROR 21\n";exit}
diff --git a/test/filters/memwrexe.c b/test/filters/memwrexe.c
index 4fbf05f78..042c31086 100644
--- a/test/filters/memwrexe.c
+++ b/test/filters/memwrexe.c
@@ -1,5 +1,5 @@
1// This file is part of Firejail project 1// This file is part of Firejail project
2// Copyright (C) 2014-2021 Firejail Authors 2// Copyright (C) 2014-2022 Firejail Authors
3// License GPL v2 3// License GPL v2
4 4
5#include <stdio.h> 5#include <stdio.h>
@@ -42,6 +42,11 @@ int main(int argc, char **argv) {
42 } 42 }
43 43
44 void *p = mmap (0, size, PROT_WRITE|PROT_READ|PROT_EXEC, MAP_SHARED, fd, 0); 44 void *p = mmap (0, size, PROT_WRITE|PROT_READ|PROT_EXEC, MAP_SHARED, fd, 0);
45 if (p == MAP_FAILED) {
46 printf("mmap failed\n");
47 return 0;
48 }
49
45 printf("mmap successful\n"); 50 printf("mmap successful\n");
46 51
47 // wait for expect to timeout 52 // wait for expect to timeout
@@ -70,7 +75,12 @@ int main(int argc, char **argv) {
70 return 1; 75 return 1;
71 } 76 }
72 77
73 mprotect(p, size, PROT_READ|PROT_WRITE|PROT_EXEC); 78 int rv = mprotect(p, size, PROT_READ|PROT_WRITE|PROT_EXEC);
79 if (rv) {
80 printf("mprotect failed\n");
81 return 1;
82 }
83
74 printf("mprotect successful\n"); 84 printf("mprotect successful\n");
75 85
76 // wait for expect to timeout 86 // wait for expect to timeout
@@ -82,7 +92,7 @@ int main(int argc, char **argv) {
82 else if (strcmp(argv[1], "memfd_create") == 0) { 92 else if (strcmp(argv[1], "memfd_create") == 0) {
83 int fd = syscall(SYS_memfd_create, "memfd_create", 0); 93 int fd = syscall(SYS_memfd_create, "memfd_create", 0);
84 if (fd == -1) { 94 if (fd == -1) {
85 fprintf(stderr, "TESTING ERROR: cannot run memfd_create test\n"); 95 printf("memfd_create failed\n");
86 return 1; 96 return 1;
87 } 97 }
88 printf("memfd_create successful\n"); 98 printf("memfd_create successful\n");
diff --git a/test/filters/memwrexe.exp b/test/filters/memwrexe.exp
index 2b170803c..950acbf50 100755
--- a/test/filters/memwrexe.exp
+++ b/test/filters/memwrexe.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --memory-deny-write-execute ./memwrexe mmap\r" 10send -- "firejail --memory-deny-write-execute ./memwrexe mmap\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
@@ -22,7 +22,7 @@ after 100
22send -- "firejail --memory-deny-write-execute ./memwrexe mprotect\r" 22send -- "firejail --memory-deny-write-execute ./memwrexe mprotect\r"
23expect { 23expect {
24 timeout {puts "TESTING ERROR 10\n";exit} 24 timeout {puts "TESTING ERROR 10\n";exit}
25 "Child process initialized" 25 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
26} 26}
27expect { 27expect {
28 timeout {puts "TESTING ERROR 11\n";exit} 28 timeout {puts "TESTING ERROR 11\n";exit}
@@ -34,7 +34,7 @@ after 100
34send -- "firejail --memory-deny-write-execute ./memwrexe memfd_create\r" 34send -- "firejail --memory-deny-write-execute ./memwrexe memfd_create\r"
35expect { 35expect {
36 timeout {puts "TESTING ERROR 20\n";exit} 36 timeout {puts "TESTING ERROR 20\n";exit}
37 "Child process initialized" 37 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
38} 38}
39expect { 39expect {
40 timeout {puts "TESTING ERROR 21\n";exit} 40 timeout {puts "TESTING ERROR 21\n";exit}
diff --git a/test/filters/noroot.exp b/test/filters/noroot.exp
index 64f72f610..66e1e4e27 100755
--- a/test/filters/noroot.exp
+++ b/test/filters/noroot.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=test --noroot --noprofile\r" 10send -- "firejail --name=test --noroot --noprofile\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
@@ -72,7 +72,7 @@ expect {
72send -- "cat /proc/self/gid_map | wc -l\r" 72send -- "cat /proc/self/gid_map | wc -l\r"
73expect { 73expect {
74 timeout {puts "TESTING ERROR 12\n";exit} 74 timeout {puts "TESTING ERROR 12\n";exit}
75 "5" 75 "9"
76} 76}
77 77
78 78
@@ -104,7 +104,7 @@ expect {
104send -- "cat /proc/self/gid_map | wc -l\r" 104send -- "cat /proc/self/gid_map | wc -l\r"
105expect { 105expect {
106 timeout {puts "TESTING ERROR 17\n";exit} 106 timeout {puts "TESTING ERROR 17\n";exit}
107 "5" 107 "9"
108} 108}
109 109
110# check seccomp disabled and all caps enabled 110# check seccomp disabled and all caps enabled
diff --git a/test/filters/protocol.exp b/test/filters/protocol.exp
index 071460e4c..cbc7fdc1a 100755
--- a/test/filters/protocol.exp
+++ b/test/filters/protocol.exp
@@ -1,185 +1,44 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "firejail --noprofile --protocol=unix ./syscall_test socket\r" 10send -- "firejail --noprofile --protocol=unix --debug\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Permission denied" {puts "TESTING SKIP: permission denied\n"; exit} 13 "0009: 20 00 00 00000000 ld data.syscall-number"
14 "Child process initialized"
15} 14}
16expect { 15expect {
17 timeout {puts "TESTING ERROR 1.1\n";exit}
18 "Permission denied" {puts "TESTING SKIP: permission denied\n"; exit}
19 "socket AF_INET"
20}
21expect {
22 timeout {puts "TESTING ERROR 1.2\n";exit}
23 "Operation not supported"
24}
25expect {
26 timeout {puts "TESTING ERROR 1.3\n";exit}
27 "socket AF_INET6"
28}
29expect {
30 timeout {puts "TESTING ERROR 1.4\n";exit}
31 "Operation not supported"
32}
33expect {
34 timeout {puts "TESTING ERROR 1.5\n";exit}
35 "socket AF_NETLINK"
36}
37expect {
38 timeout {puts "TESTING ERROR 1.6\n";exit}
39 "Operation not supported"
40}
41expect {
42 timeout {puts "TESTING ERROR 1.7\n";exit}
43 "socket AF_UNIX"
44}
45expect {
46 timeout {puts "TESTING ERROR 1.8\n";exit}
47 "socket AF_PACKETX"
48}
49expect {
50 timeout {puts "TESTING ERROR 1.9\n";exit}
51 "Operation not supported"
52}
53sleep 1
54
55send -- "firejail --noprofile --protocol=inet6,packet ./syscall_test socket\r"
56expect {
57 timeout {puts "TESTING ERROR 2\n";exit} 16 timeout {puts "TESTING ERROR 2\n";exit}
58 "Child process initialized" 17 "000a: 15 01 00 00000029 jeq socket 000c (false 000b)"
59}
60expect {
61 timeout {puts "TESTING ERROR 2.1\n";exit}
62 "socket AF_INET"
63}
64expect {
65 timeout {puts "TESTING ERROR 2.2\n";exit}
66 "Operation not supported"
67}
68expect {
69 timeout {puts "TESTING ERROR 2.3\n";exit}
70 "socket AF_INET6"
71}
72expect {
73 timeout {puts "TESTING ERROR 2.4\n";exit}
74 "socket AF_NETLINK"
75}
76expect {
77 timeout {puts "TESTING ERROR 2.5\n";exit}
78 "Operation not supported"
79}
80expect {
81 timeout {puts "TESTING ERROR 2.6\n";exit}
82 "socket AF_UNIX"
83}
84expect {
85 timeout {puts "TESTING ERROR 2.7\n";exit}
86 "Operation not supported"
87}
88expect {
89 timeout {puts "TESTING ERROR 2.8\n";exit}
90 "socket AF_PACKETX"
91}
92expect {
93 timeout {puts "TESTING ERROR 2.9\n";exit}
94 "after socket"
95} 18}
96sleep 1
97
98# profile testing
99send -- "firejail --profile=protocol1.profile ./syscall_test socket\r"
100expect { 19expect {
101 timeout {puts "TESTING ERROR 3\n";exit} 20 timeout {puts "TESTING ERROR 3\n";exit}
102 "Child process initialized" 21 "000b: 06 00 00 7fff0000 ret ALLOW"
103}
104expect {
105 timeout {puts "TESTING ERROR 3.1\n";exit}
106 "socket AF_INET"
107}
108expect {
109 timeout {puts "TESTING ERROR 3.2\n";exit}
110 "Operation not supported"
111}
112expect {
113 timeout {puts "TESTING ERROR 3.3\n";exit}
114 "socket AF_INET6"
115}
116expect {
117 timeout {puts "TESTING ERROR 3.4\n";exit}
118 "Operation not supported"
119}
120expect {
121 timeout {puts "TESTING ERROR 3.5\n";exit}
122 "socket AF_NETLINK"
123}
124expect {
125 timeout {puts "TESTING ERROR 3.6\n";exit}
126 "Operation not supported"
127}
128expect {
129 timeout {puts "TESTING ERROR 3.7\n";exit}
130 "socket AF_UNIX"
131}
132expect {
133 timeout {puts "TESTING ERROR 3.8\n";exit}
134 "socket AF_PACKETX"
135} 22}
136expect { 23expect {
137 timeout {puts "TESTING ERROR 3.9\n";exit}
138 "Operation not supported"
139}
140sleep 1
141
142send -- "firejail --profile=protocol2.profile ./syscall_test socket\r"
143expect {
144 timeout {puts "TESTING ERROR 4\n";exit} 24 timeout {puts "TESTING ERROR 4\n";exit}
145 "Child process initialized" 25 "000c: 20 00 00 00000010 ld data.args"
146}
147expect {
148 timeout {puts "TESTING ERROR 4.1\n";exit}
149 "socket AF_INET"
150}
151expect {
152 timeout {puts "TESTING ERROR 4.2\n";exit}
153 "Operation not supported"
154}
155expect {
156 timeout {puts "TESTING ERROR 4.3\n";exit}
157 "socket AF_INET6"
158} 26}
159expect { 27expect {
160 timeout {puts "TESTING ERROR 4.4\n";exit} 28 timeout {puts "TESTING ERROR 5\n";exit}
161 "socket AF_NETLINK" 29 "000d: 15 00 01 00000001 jeq 1 000e (false 000f)"
162} 30}
163expect { 31expect {
164 timeout {puts "TESTING ERROR 4.5\n";exit} 32 timeout {puts "TESTING ERROR 6\n";exit}
165 "Operation not supported" 33 "000e: 06 00 00 7fff0000 ret ALLOW"
34 ""
166} 35}
167expect { 36expect {
168 timeout {puts "TESTING ERROR 4.6\n";exit} 37 timeout {puts "TESTING ERROR 7\n";exit}
169 "socket AF_UNIX" 38 "000f: 06 00 00 0005005f ret ERRNO(95)"
170} 39}
171expect {
172 timeout {puts "TESTING ERROR 4.7\n";exit}
173 "Operation not supported"
174}
175expect {
176 timeout {puts "TESTING ERROR 4.8\n";exit}
177 "socket AF_PACKETX"
178}
179expect {
180 timeout {puts "TESTING ERROR 4.9\n";exit}
181 "after socket"
182}
183after 100
184 40
41after 100
42send -- "exit\r"
43after 100
185puts "\nall done\n" 44puts "\nall done\n"
diff --git a/test/filters/seccomp-bad-empty.exp b/test/filters/seccomp-bad-empty.exp
index 5e7c8e1b5..484dc32a9 100755
--- a/test/filters/seccomp-bad-empty.exp
+++ b/test/filters/seccomp-bad-empty.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/filters/seccomp-chmod-profile.exp b/test/filters/seccomp-chmod-profile.exp
index 5587e056c..ac16015cd 100755
--- a/test/filters/seccomp-chmod-profile.exp
+++ b/test/filters/seccomp-chmod-profile.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --profile=seccomp.profile --private\r" 10send -- "firejail --profile=seccomp.profile --private\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
diff --git a/test/filters/seccomp-chmod.exp b/test/filters/seccomp-chmod.exp
index 0d01d4ff2..913ea18a7 100755
--- a/test/filters/seccomp-chmod.exp
+++ b/test/filters/seccomp-chmod.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --seccomp=chmod,fchmod,fchmodat --private\r" 10send -- "firejail --seccomp=chmod,fchmod,fchmodat --private\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
diff --git a/test/filters/seccomp-chown.exp b/test/filters/seccomp-chown.exp
index 0a19229b4..be6c13e2d 100755
--- a/test/filters/seccomp-chown.exp
+++ b/test/filters/seccomp-chown.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --seccomp=chown,fchown,fchownat,lchown --private\r" 10send -- "firejail --seccomp=chown,fchown,fchownat,lchown --private\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
diff --git a/test/filters/seccomp-debug-32.exp b/test/filters/seccomp-debug-32.exp
index 677ca4e30..71d653c1f 100755
--- a/test/filters/seccomp-debug-32.exp
+++ b/test/filters/seccomp-debug-32.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -13,19 +13,15 @@ after 100
13send -- "firejail --debug sleep 1; echo done\r" 13send -- "firejail --debug sleep 1; echo done\r"
14expect { 14expect {
15 timeout {puts "TESTING ERROR 0\n";exit} 15 timeout {puts "TESTING ERROR 0\n";exit}
16 "SECCOMP Filter" 16 "seccomp entries in /run/firejail/mnt/seccomp/seccomp"
17}
18expect {
19 timeout {puts "TESTING ERROR 1\n";exit}
20 "BLACKLIST"
21} 17}
22expect { 18expect {
23 timeout {puts "TESTING ERROR 2\n";exit} 19 timeout {puts "TESTING ERROR 2\n";exit}
24 "open_by_handle_at" 20 "jeq open_by_handle_at"
25} 21}
26expect { 22expect {
27 timeout {puts "TESTING ERROR 3\n";exit} 23 timeout {puts "TESTING ERROR 3\n";exit}
28 "Child process initialized" 24 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
29} 25}
30expect { 26expect {
31 timeout {puts "TESTING ERROR 4\n";exit} 27 timeout {puts "TESTING ERROR 4\n";exit}
@@ -34,58 +30,30 @@ expect {
34after 100 30after 100
35 31
36 32
37# i686 architecture 33# 64 bit architecture - ignore seccomp
38send -- "firejail --debug sleep 1; echo done\r"
39expect {
40 timeout {puts "TESTING ERROR 5\n";exit}
41 "Child process initialized"
42}
43expect {
44 timeout {puts "TESTING ERROR 6\n";exit}
45 "Installing /run/firejail/mnt/seccomp seccomp filter"
46}
47expect {
48 timeout {puts "TESTING ERROR 7\n";exit}
49 "Installing /run/firejail/mnt/seccomp.64 seccomp filter"
50}
51expect {
52 timeout {puts "TESTING ERROR 9\n";exit}
53 "done"
54}
55after 100
56
57# i686 architecture - ignore seccomp
58send -- "firejail --debug --ignore=seccomp sleep 1; echo done\r" 34send -- "firejail --debug --ignore=seccomp sleep 1; echo done\r"
59expect { 35expect {
60 timeout {puts "TESTING ERROR 10\n";exit} 36 timeout {puts "TESTING ERROR 10\n";exit}
61 "Installing /run/firejail/mnt/seccomp seccomp filter" {puts "TESTING ERROR 11\n";exit} 37 "Installing /run/firejail/mnt/seccomp/seccomp seccomp filter" {puts "TESTING ERROR 11\n";exit}
62 "Installing /run/firejail/mnt/seccomp.64 seccomp filter" {puts "TESTING ERROR 12\n";exit} 38 "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 12\n";exit}
63 "Child process initialized" 39 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
64} 40}
65expect { 41expect {
66 timeout {puts "TESTING ERROR 13\n";exit} 42 timeout {puts "TESTING ERROR 16\n";exit}
67 "Installing /run/firejail/mnt/seccomp seccomp filter" {puts "TESTING ERROR 14\n";exit}
68 "Installing /run/firejail/mnt/seccomp.64 seccomp filter" {puts "TESTING ERROR 15\n";exit}
69 "done" 43 "done"
70} 44}
71after 100 45after 100
72 46
73# i686 architecture - ignore protocol 47# 64 bit architecture - ignore protocol
74send -- "firejail --debug --ignore=protocol sleep 1; echo done\r" 48send -- "firejail --debug --ignore=protocol sleep 1; echo done\r"
75expect { 49expect {
76 timeout {puts "TESTING ERROR 17\n";exit} 50 timeout {puts "TESTING ERROR 17\n";exit}
77 "Installing /run/firejail/mnt/seccomp.protocol seccomp filter" {puts "TESTING ERROR 18\n";exit} 51 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
78 "Child process initialized"
79} 52}
80expect { 53expect {
81 timeout {puts "TESTING ERROR 19\n";exit} 54 timeout {puts "TESTING ERROR 19\n";exit}
82 "Installing /run/firejail/mnt/seccomp.protocol seccomp filter" {puts "TESTING ERROR 20\n";exit} 55 "Installing /run/firejail/mnt/seccomp/seccomp.protocol seccomp filter" {puts "TESTING ERROR 20\n";exit}
83 "Installing /run/firejail/mnt/seccomp seccomp filter" 56 "Installing /run/firejail/mnt/seccomp/seccomp seccomp filter"
84}
85expect {
86 timeout {puts "TESTING ERROR 21\n";exit}
87 "Installing /run/firejail/mnt/seccomp.protocol seccomp filter" {puts "TESTING ERROR 22\n";exit}
88 "Installing /run/firejail/mnt/seccomp.64 seccomp filter"
89} 57}
90expect { 58expect {
91 timeout {puts "TESTING ERROR 23\n";exit} 59 timeout {puts "TESTING ERROR 23\n";exit}
@@ -97,11 +65,11 @@ after 100
97send -- "firejail --debug --memory-deny-write-execute sleep 1; echo done\r" 65send -- "firejail --debug --memory-deny-write-execute sleep 1; echo done\r"
98expect { 66expect {
99 timeout {puts "TESTING ERROR 24\n";exit} 67 timeout {puts "TESTING ERROR 24\n";exit}
100 "Child process initialized" 68 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
101} 69}
102expect { 70expect {
103 timeout {puts "TESTING ERROR 25\n";exit} 71 timeout {puts "TESTING ERROR 25\n";exit}
104 "Installing /run/firejail/mnt/seccomp.mdwx seccomp filter" 72 "Installing /run/firejail/mnt/seccomp/seccomp.mdwx seccomp filter"
105} 73}
106expect { 74expect {
107 timeout {puts "TESTING ERROR 26\n";exit} 75 timeout {puts "TESTING ERROR 26\n";exit}
@@ -109,17 +77,22 @@ expect {
109} 77}
110 78
111 79
112# i686 architecture - seccomp.block-secondary 80# 64 bit architecture - seccomp.block-secondary
113send -- "firejail --debug --seccomp.block-secondary sleep 1; echo done\r" 81send -- "firejail --debug --seccomp.block-secondary sleep 1; echo done\r"
114expect { 82expect {
115 timeout {puts "TESTING ERROR 27\n";exit} 83 timeout {puts "TESTING ERROR 27\n";exit}
116 "Installing /run/firejail/mnt/seccomp.64 seccomp filter" {puts "TESTING ERROR 28\n";exit} 84 "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 28\n";exit}
117 "Child process initialized" 85 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
118} 86}
119expect { 87expect {
120 timeout {puts "TESTING ERROR 29\n";exit} 88 timeout {puts "TESTING ERROR 29\n";exit}
121 "Installing /run/firejail/mnt/seccomp.64 seccomp filter" {puts "TESTING ERROR 30\n";exit} 89 "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 30\n";exit}
122 "Installing /run/firejail/mnt/seccomp seccomp filter" 90 "Installing /run/firejail/mnt/seccomp/seccomp seccomp filter"
91}
92expect {
93 timeout {puts "TESTING ERROR 31\n";exit}
94 "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 32\n";exit}
95 "Installing /run/firejail/mnt/seccomp/seccomp.protocol seccomp filter"
123} 96}
124expect { 97expect {
125 timeout {puts "TESTING ERROR 33\n";exit} 98 timeout {puts "TESTING ERROR 33\n";exit}
@@ -127,17 +100,17 @@ expect {
127} 100}
128after 100 101after 100
129 102
130# i686 architecture - seccomp.block-secondary, profile 103# 64 bit architecture - seccomp.block-secondary, profile
131send -- "firejail --debug --profile=block-secondary.profile sleep 1; echo done\r" 104send -- "firejail --debug --profile=block-secondary.profile sleep 1; echo done\r"
132expect { 105expect {
133 timeout {puts "TESTING ERROR 33\n";exit} 106 timeout {puts "TESTING ERROR 33\n";exit}
134 "Installing /run/firejail/mnt/seccomp.64 seccomp filter" {puts "TESTING ERROR 34\n";exit} 107 "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 34\n";exit}
135 "Child process initialized" 108 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
136} 109}
137expect { 110expect {
138 timeout {puts "TESTING ERROR 35\n";exit} 111 timeout {puts "TESTING ERROR 35\n";exit}
139 "Installing /run/firejail/mnt/seccomp.64 seccomp filter" {puts "TESTING ERROR 35\n";exit} 112 "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 35\n";exit}
140 "Installing /run/firejail/mnt/seccomp seccomp filter" 113 "Installing /run/firejail/mnt/seccomp/seccomp seccomp filter"
141} 114}
142expect { 115expect {
143 timeout {puts "TESTING ERROR 37\n";exit} 116 timeout {puts "TESTING ERROR 37\n";exit}
diff --git a/test/filters/seccomp-debug.exp b/test/filters/seccomp-debug.exp
index 852abf822..b4a9e158d 100755
--- a/test/filters/seccomp-debug.exp
+++ b/test/filters/seccomp-debug.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -21,7 +21,7 @@ expect {
21} 21}
22expect { 22expect {
23 timeout {puts "TESTING ERROR 3\n";exit} 23 timeout {puts "TESTING ERROR 3\n";exit}
24 "Child process initialized" 24 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
25} 25}
26expect { 26expect {
27 timeout {puts "TESTING ERROR 4\n";exit} 27 timeout {puts "TESTING ERROR 4\n";exit}
@@ -34,7 +34,7 @@ after 100
34send -- "firejail --debug sleep 1; echo done\r" 34send -- "firejail --debug sleep 1; echo done\r"
35expect { 35expect {
36 timeout {puts "TESTING ERROR 5\n";exit} 36 timeout {puts "TESTING ERROR 5\n";exit}
37 "Child process initialized" 37 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
38} 38}
39expect { 39expect {
40 timeout {puts "TESTING ERROR 6\n";exit} 40 timeout {puts "TESTING ERROR 6\n";exit}
@@ -60,7 +60,7 @@ expect {
60 timeout {puts "TESTING ERROR 10\n";exit} 60 timeout {puts "TESTING ERROR 10\n";exit}
61 "Installing /run/firejail/mnt/seccomp/seccomp seccomp filter" {puts "TESTING ERROR 11\n";exit} 61 "Installing /run/firejail/mnt/seccomp/seccomp seccomp filter" {puts "TESTING ERROR 11\n";exit}
62 "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 12\n";exit} 62 "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 12\n";exit}
63 "Child process initialized" 63 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
64} 64}
65expect { 65expect {
66 timeout {puts "TESTING ERROR 13\n";exit} 66 timeout {puts "TESTING ERROR 13\n";exit}
@@ -79,7 +79,7 @@ send -- "firejail --debug --ignore=protocol sleep 1; echo done\r"
79expect { 79expect {
80 timeout {puts "TESTING ERROR 17\n";exit} 80 timeout {puts "TESTING ERROR 17\n";exit}
81 "Installing /run/firejail/mnt/seccomp/seccomp.protocol seccomp filter" {puts "TESTING ERROR 18\n";exit} 81 "Installing /run/firejail/mnt/seccomp/seccomp.protocol seccomp filter" {puts "TESTING ERROR 18\n";exit}
82 "Child process initialized" 82 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
83} 83}
84expect { 84expect {
85 timeout {puts "TESTING ERROR 19\n";exit} 85 timeout {puts "TESTING ERROR 19\n";exit}
@@ -101,7 +101,7 @@ after 100
101send -- "firejail --debug --memory-deny-write-execute sleep 1; echo done\r" 101send -- "firejail --debug --memory-deny-write-execute sleep 1; echo done\r"
102expect { 102expect {
103 timeout {puts "TESTING ERROR 24\n";exit} 103 timeout {puts "TESTING ERROR 24\n";exit}
104 "Child process initialized" 104 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
105} 105}
106expect { 106expect {
107 timeout {puts "TESTING ERROR 25\n";exit} 107 timeout {puts "TESTING ERROR 25\n";exit}
@@ -118,7 +118,7 @@ send -- "firejail --debug --seccomp.block-secondary sleep 1; echo done\r"
118expect { 118expect {
119 timeout {puts "TESTING ERROR 27\n";exit} 119 timeout {puts "TESTING ERROR 27\n";exit}
120 "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 28\n";exit} 120 "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 28\n";exit}
121 "Child process initialized" 121 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
122} 122}
123expect { 123expect {
124 timeout {puts "TESTING ERROR 29\n";exit} 124 timeout {puts "TESTING ERROR 29\n";exit}
@@ -141,7 +141,7 @@ send -- "firejail --debug --profile=block-secondary.profile sleep 1; echo done\
141expect { 141expect {
142 timeout {puts "TESTING ERROR 33\n";exit} 142 timeout {puts "TESTING ERROR 33\n";exit}
143 "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 34\n";exit} 143 "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 34\n";exit}
144 "Child process initialized" 144 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
145} 145}
146expect { 146expect {
147 timeout {puts "TESTING ERROR 35\n";exit} 147 timeout {puts "TESTING ERROR 35\n";exit}
diff --git a/test/filters/seccomp-dualfilter.exp b/test/filters/seccomp-dualfilter.exp
deleted file mode 100755
index e655be848..000000000
--- a/test/filters/seccomp-dualfilter.exp
+++ /dev/null
@@ -1,55 +0,0 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors
4# License GPL v2
5
6set timeout 1
7spawn $env(SHELL)
8match_max 100000
9
10send -- "./syscall_test\r"
11expect {
12 timeout {puts "\nTESTING SKIP: 64-bit support missing\n";exit}
13 "Usage"
14}
15
16send -- "./syscall_test32\r"
17expect {
18 timeout {puts "\nTESTING SKIP: 32-bit support missing\n";exit}
19 "Usage"
20}
21
22set timeout 10
23send -- "firejail ./syscall_test mount\r"
24expect {
25 timeout {puts "TESTING ERROR 0\n";exit}
26 "Child process initialized"
27}
28expect {
29 timeout {puts "TESTING ERROR 1\n";exit}
30 "before mount"
31}
32expect {
33 timeout {puts "TESTING ERROR 2\n";exit}
34 "after mount" {puts "TESTING ERROR 3\n";exit}
35 "Parent is shutting down"
36}
37sleep 1
38
39send -- "firejail ./syscall_test32 mount\r"
40expect {
41 timeout {puts "TESTING ERROR 4\n";exit}
42 "Child process initialized"
43}
44expect {
45 timeout {puts "TESTING ERROR 5\n";exit}
46 "before mount"
47}
48expect {
49 timeout {puts "TESTING ERROR 6\n";exit}
50 "after mount" {puts "TESTING ERROR 7\n";exit}
51 "Parent is shutting down"
52}
53
54after 100
55puts "\nall done\n"
diff --git a/test/filters/seccomp-empty.exp b/test/filters/seccomp-empty.exp
index 3baa7f0c6..7a5597727 100755
--- a/test/filters/seccomp-empty.exp
+++ b/test/filters/seccomp-empty.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -42,7 +42,7 @@ expect {
42} 42}
43expect { 43expect {
44 timeout {puts "TESTING ERROR 0.7\n";exit} 44 timeout {puts "TESTING ERROR 0.7\n";exit}
45 "Child process initialized" 45 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
46} 46}
47sleep 2 47sleep 2
48send -- "exit\r" 48send -- "exit\r"
@@ -78,7 +78,7 @@ expect {
78} 78}
79expect { 79expect {
80 timeout {puts "TESTING ERROR 1.7\n";exit} 80 timeout {puts "TESTING ERROR 1.7\n";exit}
81 "Child process initialized" 81 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
82} 82}
83sleep 2 83sleep 2
84send -- "exit\r" 84send -- "exit\r"
@@ -120,7 +120,7 @@ expect {
120} 120}
121expect { 121expect {
122 timeout {puts "TESTING ERROR 2.7\n";exit} 122 timeout {puts "TESTING ERROR 2.7\n";exit}
123 "Child process initialized" 123 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
124} 124}
125sleep 2 125sleep 2
126send -- "exit\r" 126send -- "exit\r"
@@ -156,7 +156,7 @@ expect {
156} 156}
157expect { 157expect {
158 timeout {puts "TESTING ERROR 3.7\n";exit} 158 timeout {puts "TESTING ERROR 3.7\n";exit}
159 "Child process initialized" 159 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
160} 160}
161sleep 2 161sleep 2
162send -- "exit\r" 162send -- "exit\r"
diff --git a/test/filters/seccomp-errno.exp b/test/filters/seccomp-errno.exp
index 6c7c63e88..f5e9ff402 100755
--- a/test/filters/seccomp-errno.exp
+++ b/test/filters/seccomp-errno.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -31,7 +31,7 @@ sleep 1
31send -- "firejail --seccomp=unlinkat:ENOENT,mkdir:ENOENT\r" 31send -- "firejail --seccomp=unlinkat:ENOENT,mkdir:ENOENT\r"
32expect { 32expect {
33 timeout {puts "TESTING ERROR 3\n";exit} 33 timeout {puts "TESTING ERROR 3\n";exit}
34 "Child process initialized" 34 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
35} 35}
36sleep 1 36sleep 1
37send -- "rm seccomp-test-file\r" 37send -- "rm seccomp-test-file\r"
diff --git a/test/filters/seccomp-join.exp b/test/filters/seccomp-join.exp
index 9a8767ed7..1e62e75e7 100755
--- a/test/filters/seccomp-join.exp
+++ b/test/filters/seccomp-join.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/filters/seccomp-numeric.exp b/test/filters/seccomp-numeric.exp
index 59fc26884..fa1d8ada9 100755
--- a/test/filters/seccomp-numeric.exp
+++ b/test/filters/seccomp-numeric.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/filters/seccomp-postexec.exp b/test/filters/seccomp-postexec.exp
index 18263520a..1d4166067 100755
--- a/test/filters/seccomp-postexec.exp
+++ b/test/filters/seccomp-postexec.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,20 +14,17 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "data.architecture"
18}
19expect {
20 timeout {puts "TESTING ERROR 2\n";exit}
21 "monitoring pid" 17 "monitoring pid"
22} 18}
19sleep 1
20
21send -- "ls\r"
23expect { 22expect {
24 timeout {puts "TESTING ERROR 3\n";exit} 23 timeout {puts "TESTING ERROR 2\n";exit}
25 "Sandbox monitor: waitpid" 24 "not permitted"
26}
27expect {
28 timeout {puts "TESTING ERROR 4\n";exit}
29 "Parent is shutting down"
30} 25}
31sleep 1
32 26
27
28send -- "exit\r"
29after 100
33puts "all done\n" 30puts "all done\n"
diff --git a/test/filters/seccomp-ptrace.exp b/test/filters/seccomp-ptrace.exp
index ec8ab615c..9bde7355f 100755
--- a/test/filters/seccomp-ptrace.exp
+++ b/test/filters/seccomp-ptrace.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,15 +10,14 @@ match_max 100000
10send -- "firejail --noprofile --seccomp\r" 10send -- "firejail --noprofile --seccomp\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
17send -- "strace ls\r" 17send -- "strace ls\r"
18expect { 18expect {
19 timeout {puts "TESTING ERROR 1\n";exit} 19 timeout {puts "TESTING ERROR 1\n";exit}
20 "Bad system call" {puts "version 1\n";} 20 "not permitted"
21 " unexpected signal 31" {puts "version 2\n"}
22} 21}
23 22
24send -- "exit\r" 23send -- "exit\r"
diff --git a/test/filters/seccomp-run-files.exp b/test/filters/seccomp-run-files.exp
index 1e3827f0f..59a576c20 100755
--- a/test/filters/seccomp-run-files.exp
+++ b/test/filters/seccomp-run-files.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/filters/seccomp-su.exp b/test/filters/seccomp-su.exp
index 4bd8b5e93..d204a4295 100755
--- a/test/filters/seccomp-su.exp
+++ b/test/filters/seccomp-su.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --noprofile --seccomp\r" 10send -- "firejail --noprofile --seccomp\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
diff --git a/test/filters/syscall_test b/test/filters/syscall_test
deleted file mode 100755
index bf29c5b99..000000000
--- a/test/filters/syscall_test
+++ /dev/null
Binary files differ
diff --git a/test/filters/syscall_test.c b/test/filters/syscall_test.c
deleted file mode 100644
index 55ee31afb..000000000
--- a/test/filters/syscall_test.c
+++ /dev/null
@@ -1,82 +0,0 @@
1// This file is part of Firejail project
2// Copyright (C) 2014-2021 Firejail Authors
3// License GPL v2
4
5#include <stdlib.h>
6#include <stdio.h>
7#include <unistd.h>
8#include <sys/types.h>
9#include <sys/socket.h>
10#include <linux/netlink.h>
11#include <net/ethernet.h>
12#include <sys/mount.h>
13
14int main(int argc, char **argv) {
15 if (argc != 2) {
16 printf("Usage: test [sleep|socket|mkdir|mount]\n");
17 return 1;
18 }
19
20 if (strcmp(argv[1], "sleep") == 0) {
21 printf("before sleep\n");
22 sleep(1);
23 printf("after sleep\n");
24 }
25 else if (strcmp(argv[1], "socket") == 0) {
26 int sock;
27
28 printf("testing socket AF_INET\n");
29 if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
30 perror("socket");
31 }
32 else
33 close(sock);
34
35 printf("testing socket AF_INET6\n");
36 if ((sock = socket(AF_INET6, SOCK_STREAM, 0)) < 0) {
37 perror("socket");
38 }
39 else
40 close(sock);
41
42 printf("testing socket AF_NETLINK\n");
43 if ((sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) < 0) {
44 perror("socket");
45 }
46 else
47 close(sock);
48
49 printf("testing socket AF_UNIX\n");
50 if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
51 perror("socket");
52 }
53 else
54 close(sock);
55
56 // root needed to be able to handle this
57 printf("testing socket AF_PACKETX\n");
58 if ((sock = socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_ARP))) < 0) {
59 perror("socket");
60 }
61 else
62 close(sock);
63 printf("after socket\n");
64 }
65 else if (strcmp(argv[1], "mkdir") == 0) {
66 printf("before mkdir\n");
67 mkdir("tmp", 0777);
68 printf("after mkdir\n");
69 }
70 else if (strcmp(argv[1], "mount") == 0) {
71 printf("before mount\n");
72 if (mount("tmpfs", "/tmp", "tmpfs", MS_NOSUID | MS_STRICTATIME, "mode=755,gid=0") < 0) {
73 perror("mount");
74 }
75 printf("after mount\n");
76 }
77 else {
78 fprintf(stderr, "Error: invalid argument\n");
79 return 1;
80 }
81 return 0;
82}
diff --git a/test/filters/syscall_test32 b/test/filters/syscall_test32
deleted file mode 100755
index 8d72f58c4..000000000
--- a/test/filters/syscall_test32
+++ /dev/null
Binary files differ
diff --git a/test/fnetfilter/cmdline.exp b/test/fnetfilter/cmdline.exp
index 16e8ccb81..514d3f890 100755
--- a/test/fnetfilter/cmdline.exp
+++ b/test/fnetfilter/cmdline.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/fnetfilter/copy.exp b/test/fnetfilter/copy.exp
index 6c672141f..b03b3e19b 100755
--- a/test/fnetfilter/copy.exp
+++ b/test/fnetfilter/copy.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/fnetfilter/default.exp b/test/fnetfilter/default.exp
index fee9fb5f3..545837cc1 100755
--- a/test/fnetfilter/default.exp
+++ b/test/fnetfilter/default.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -31,9 +31,14 @@ after 100
31send -- "fnetfilter test1.net,33\r" 31send -- "fnetfilter test1.net,33\r"
32expect { 32expect {
33 timeout {puts "TESTING ERROR 4\n";exit} 33 timeout {puts "TESTING ERROR 4\n";exit}
34 "cannot open test1.net,33" 34 "Error:"
35}
36expect {
37 timeout {puts "TESTING ERROR 5\n";exit}
38 "is an invalid filename"
35} 39}
36after 100 40after 100
41
37send -- "rm outfile\r" 42send -- "rm outfile\r"
38after 100 43after 100
39 44
diff --git a/test/fnetfilter/fnetfilter.sh b/test/fnetfilter/fnetfilter.sh
index 9fac92d39..9ad822753 100755
--- a/test/fnetfilter/fnetfilter.sh
+++ b/test/fnetfilter/fnetfilter.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
diff --git a/test/fnetfilter/template.exp b/test/fnetfilter/template.exp
index 0ff09a024..2c5dba920 100755
--- a/test/fnetfilter/template.exp
+++ b/test/fnetfilter/template.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -66,13 +66,17 @@ after 100
66send -- "fnetfilter test2.net,icmp-type,destination-unreachable,time-exceeded,echo-request\r" 66send -- "fnetfilter test2.net,icmp-type,destination-unreachable,time-exceeded,echo-request\r"
67expect { 67expect {
68 timeout {puts "TESTING ERROR 12\n";exit} 68 timeout {puts "TESTING ERROR 12\n";exit}
69 "cannot open test2.net," 69 "Error:"
70}
71expect {
72 timeout {puts "TESTING ERROR 13\n";exit}
73 "is an invalid filename"
70} 74}
71after 100 75after 100
72 76
73send -- "fnetfilter test3.net,44 outfile\r" 77send -- "fnetfilter test3.net,44 outfile\r"
74expect { 78expect {
75 timeout {puts "TESTING ERROR 13\n";exit} 79 timeout {puts "TESTING ERROR 14\n";exit}
76 "invalid template argument on line 1" 80 "invalid template argument on line 1"
77} 81}
78after 100 82after 100
diff --git a/test/fs/fs.sh b/test/fs/fs.sh
index 591fc1a06..b49e447b7 100755
--- a/test/fs/fs.sh
+++ b/test/fs/fs.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
@@ -10,20 +10,26 @@ export LC_ALL=C
10# These directories are required by some tests: 10# These directories are required by some tests:
11mkdir -p ~/Desktop ~/Documents ~/Downloads ~/Music ~/Pictures ~/Videos 11mkdir -p ~/Desktop ~/Documents ~/Downloads ~/Music ~/Pictures ~/Videos
12 12
13echo "TESTING: tab completion (test/fs/tab.exp)"
14./tab.exp
15
13rm -fr ~/_firejail_test_* 16rm -fr ~/_firejail_test_*
14echo "TESTING: mkdir/mkfile (test/fs/mkdir_mkfile.exp)" 17echo "TESTING: mkdir/mkfile (test/fs/mkdir_mkfile.exp)"
15./mkdir_mkfile.exp 18./mkdir_mkfile.exp
16rm -fr ~/_firejail_test_* 19rm -fr ~/_firejail_test_*
17 20
18mkdir ~/_firejail_test_dir 21echo "TESTING: recursive mkdir (test/fs/mkdir.exp)"
19touch ~/_firejail_test_dir/a 22./mkdir.exp
20mkdir ~/_firejail_test_dir/test1 23rm -fr ~/_firejail_test_*
21touch ~/_firejail_test_dir/test1/b 24rm -fr /tmp/_firejail_test_*
25
22echo "TESTING: read/write (test/fs/read-write.exp)" 26echo "TESTING: read/write (test/fs/read-write.exp)"
23./read-write.exp 27./read-write.exp
28rm -fr ~/_firejail_test_dir
29
24echo "TESTING: whitelist readonly (test/fs/whitelist-readonly.exp)" 30echo "TESTING: whitelist readonly (test/fs/whitelist-readonly.exp)"
25./whitelist-readonly.exp 31./whitelist-readonly.exp
26rm -fr ~/_firejail_test_* 32rm -f ~/_firejail_test_dir
27 33
28echo "TESTING: /sys/fs access (test/fs/sys_fs.exp)" 34echo "TESTING: /sys/fs access (test/fs/sys_fs.exp)"
29./sys_fs.exp 35./sys_fs.exp
@@ -37,16 +43,23 @@ fi
37 43
38echo "TESTING: read/write /var/tmp (test/fs/fs_var_tmp.exp)" 44echo "TESTING: read/write /var/tmp (test/fs/fs_var_tmp.exp)"
39./fs_var_tmp.exp 45./fs_var_tmp.exp
46rm -f /var/tmp/_firejail_test_file
40 47
41echo "TESTING: private-lib (test/fs/private-lib.exp)" 48if [ "$(uname -m)" = "x86_64" ]; then
42./private-lib.exp 49 echo "TESTING: private-lib (test/fs/private-lib.exp)"
50 ./private-lib.exp
51else
52 echo "TESTING SKIP: private-lib test implemented only for x86_64."
53fi
43 54
44echo "TESTING: read/write /var/lock (test/fs/fs_var_lock.exp)" 55echo "TESTING: read/write /var/lock (test/fs/fs_var_lock.exp)"
45./fs_var_lock.exp 56./fs_var_lock.exp
57rm -f /var/lock/_firejail_test_file
46 58
47if [ -w /dev/shm ]; then 59if [ -w /dev/shm ]; then
48 echo "TESTING: read/write /dev/shm (test/fs/fs_dev_shm.exp)" 60 echo "TESTING: read/write /dev/shm (test/fs/fs_dev_shm.exp)"
49 ./fs_dev_shm.exp 61 ./fs_dev_shm.exp
62 rm -f /dev/shm/_firejail_test_file
50else 63else
51 echo "TESTING SKIP: /dev/shm not writable" 64 echo "TESTING SKIP: /dev/shm not writable"
52fi 65fi
@@ -56,12 +69,23 @@ echo "TESTING: private (test/fs/private.exp)"
56 69
57echo "TESTING: private home (test/fs/private-home.exp)" 70echo "TESTING: private home (test/fs/private-home.exp)"
58./private-home.exp 71./private-home.exp
72rm -f ~/_firejail_test_file1
73rm -f ~/_firejail_test_file2
74rm -fr ~/_firejail_test_dir1
75rm -f ~/_firejail_test_link1
76rm -f ~/_firejail_test_link2
59 77
60echo "TESTING: private home dir (test/fs/private-home-dir.exp)" 78echo "TESTING: private home dir (test/fs/private-home-dir.exp)"
61./private-home-dir.exp 79./private-home-dir.exp
80rm -fr ~/_firejail_test_dir1
62 81
63echo "TESTING: private home dir same as user home (test/fs/private-homedir.exp)" 82echo "TESTING: private home dir same as user home (test/fs/private-homedir.exp)"
64./private-homedir.exp 83./private-homedir.exp
84rm -f ~/_firejail_test_file1
85rm -f ~/_firejail_test_file2
86rm -fr ~/_firejail_test_dir1
87rm -f ~/_firejail_test_link1
88rm -f ~/_firejail_test_link2
65 89
66echo "TESTING: private-etc (test/fs/private-etc.exp)" 90echo "TESTING: private-etc (test/fs/private-etc.exp)"
67./private-etc.exp 91./private-etc.exp
@@ -74,6 +98,7 @@ echo "TESTING: private-bin (test/fs/private-bin.exp)"
74 98
75echo "TESTING: private-cache (test/fs/private-cache.exp)" 99echo "TESTING: private-cache (test/fs/private-cache.exp)"
76./private-cache.exp 100./private-cache.exp
101rm -f ~/.cache/abcdefg
77 102
78echo "TESTING: private-cwd (test/fs/private-cwd.exp)" 103echo "TESTING: private-cwd (test/fs/private-cwd.exp)"
79./private-cwd.exp 104./private-cwd.exp
@@ -83,6 +108,12 @@ echo "TESTING: macros (test/fs/macro.exp)"
83 108
84echo "TESTING: whitelist empty (test/fs/whitelist-empty.exp)" 109echo "TESTING: whitelist empty (test/fs/whitelist-empty.exp)"
85./whitelist-empty.exp 110./whitelist-empty.exp
111rm -f ~/Videos/_firejail_test_fil
112rm -f ~/Pictures/_firejail_test_file
113rm -f ~/Music/_firejail_test_file
114rm -f ~/Downloads/_firejail_test_file
115rm -f ~/Documents/_firejail_test_file
116rm -f ~/Desktop/_firejail_test_file
86 117
87echo "TESTING: private whitelist (test/fs/private-whitelist.exp)" 118echo "TESTING: private whitelist (test/fs/private-whitelist.exp)"
88./private-whitelist.exp 119./private-whitelist.exp
@@ -95,9 +126,11 @@ echo "TESTING: blacklist directory (test/fs/option_blacklist.exp)"
95 126
96echo "TESTING: blacklist file (test/fs/option_blacklist_file.exp)" 127echo "TESTING: blacklist file (test/fs/option_blacklist_file.exp)"
97./option_blacklist_file.exp 128./option_blacklist_file.exp
129rm -fr ~/_firejail_test_dir
98 130
99echo "TESTING: blacklist glob (test/fs/option_blacklist_glob.exp)" 131echo "TESTING: blacklist glob (test/fs/option_blacklist_glob.exp)"
100./option_blacklist_glob.exp 132./option_blacklist_glob.exp
133rm -fr ~/_firejail_test_dir
101 134
102echo "TESTING: noblacklist blacklist noexec (test/fs/noblacklist-blacklist-noexec.exp)" 135echo "TESTING: noblacklist blacklist noexec (test/fs/noblacklist-blacklist-noexec.exp)"
103./noblacklist-blacklist-noexec.exp 136./noblacklist-blacklist-noexec.exp
@@ -108,14 +141,13 @@ echo "TESTING: noblacklist blacklist readonly (test/fs/noblacklist-blacklist-rea
108echo "TESTING: bind as user (test/fs/option_bind_user.exp)" 141echo "TESTING: bind as user (test/fs/option_bind_user.exp)"
109./option_bind_user.exp 142./option_bind_user.exp
110 143
111echo "TESTING: recursive mkdir (test/fs/mkdir.exp)"
112./mkdir.exp
113
114echo "TESTING: double whitelist (test/fs/whitelist-double.exp)" 144echo "TESTING: double whitelist (test/fs/whitelist-double.exp)"
115./whitelist-double.exp 145./whitelist-double.exp
146rm -f /tmp/_firejail_test_file
116 147
117echo "TESTING: whitelist (test/fs/whitelist.exp)" 148echo "TESTING: whitelist (test/fs/whitelist.exp)"
118./whitelist.exp 149./whitelist.exp
150rm -fr ~/_firejail_test_*
119 151
120echo "TESTING: whitelist dev, var(test/fs/whitelist-dev.exp)" 152echo "TESTING: whitelist dev, var(test/fs/whitelist-dev.exp)"
121./whitelist-dev.exp 153./whitelist-dev.exp
@@ -131,6 +163,8 @@ echo "TESTING: fscheck --bind non root (test/fs/fscheck-bindnoroot.exp)"
131 163
132echo "TESTING: fscheck --tmpfs non root (test/fs/fscheck-tmpfs.exp)" 164echo "TESTING: fscheck --tmpfs non root (test/fs/fscheck-tmpfs.exp)"
133./fscheck-tmpfs.exp 165./fscheck-tmpfs.exp
166rm -fr ~/_firejail_test_dir
167rm -fr /tmp/_firejail_test_dir
134 168
135echo "TESTING: fscheck --private= (test/fs/fscheck-private.exp)" 169echo "TESTING: fscheck --private= (test/fs/fscheck-private.exp)"
136./fscheck-private.exp 170./fscheck-private.exp
@@ -139,10 +173,4 @@ echo "TESTING: fscheck --read-only= (test/fs/fscheck-readonly.exp)"
139./fscheck-readonly.exp 173./fscheck-readonly.exp
140 174
141#cleanup 175#cleanup
142rm -fr ~/fjtest-dir 176rm -fr ~/_firejail_test*
143rm -fr ~/fjtest-dir-lnk
144rm -f ~/fjtest-file
145rm -f ~/fjtest-file-lnk
146rm -f /tmp/fjtest-file
147rm -fr /tmp/fjtest-dir
148rm -fr ~/_firejail_test_*
diff --git a/test/fs/fs_dev_shm.exp b/test/fs/fs_dev_shm.exp
index 04e6e2383..5d57a8975 100755
--- a/test/fs/fs_dev_shm.exp
+++ b/test/fs/fs_dev_shm.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,18 +11,18 @@ match_max 100000
11send -- "firejail\r" 11send -- "firejail\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16after 100 16after 100
17send -- "stty -echo\r" 17send -- "stty -echo\r"
18 18
19send -- "echo mytest > /dev/shm/ttt;echo done\r" 19send -- "echo mytest > /dev/shm/_firejail_test_file;echo done\r"
20expect { 20expect {
21 timeout {puts "TESTING ERROR 1\n";exit} 21 timeout {puts "TESTING ERROR 1\n";exit}
22 "done" 22 "done"
23} 23}
24 24
25send -- "cat /dev/shm/ttt;echo done\r" 25send -- "cat /dev/shm/_firejail_test_file;echo done\r"
26expect { 26expect {
27 timeout {puts "TESTING ERROR 2\n";exit} 27 timeout {puts "TESTING ERROR 2\n";exit}
28 "mytest" 28 "mytest"
@@ -32,13 +32,13 @@ expect {
32 "done" 32 "done"
33} 33}
34 34
35send -- "rm /dev/shm/ttt;echo done\r" 35send -- "rm /dev/shm/_firejail_test_file;echo done\r"
36expect { 36expect {
37 timeout {puts "TESTING ERROR 4\n";exit} 37 timeout {puts "TESTING ERROR 4\n";exit}
38 "done" 38 "done"
39} 39}
40 40
41send -- "cat /dev/shm/ttt;echo done\r" 41send -- "cat /dev/shm/_firejail_test_file;echo done\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 5\n";exit} 43 timeout {puts "TESTING ERROR 5\n";exit}
44 "mytest" {puts "TESTING ERROR 6\n";exit} 44 "mytest" {puts "TESTING ERROR 6\n";exit}
@@ -52,18 +52,18 @@ sleep 1
52send -- "firejail\r" 52send -- "firejail\r"
53expect { 53expect {
54 timeout {puts "TESTING ERROR 7\n";exit} 54 timeout {puts "TESTING ERROR 7\n";exit}
55 "Child process initialized" 55 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
56} 56}
57after 100 57after 100
58send -- "stty -echo\r" 58send -- "stty -echo\r"
59 59
60send -- "echo mytest > /dev/shm/ttt;echo done\r" 60send -- "echo mytest > /dev/shm/_firejail_test_file;echo done\r"
61expect { 61expect {
62 timeout {puts "TESTING ERROR 8\n";exit} 62 timeout {puts "TESTING ERROR 8\n";exit}
63 "done" 63 "done"
64} 64}
65 65
66send -- "cat /dev/shm/ttt;echo done\r" 66send -- "cat /dev/shm/_firejail_test_file;echo done\r"
67expect { 67expect {
68 timeout {puts "TESTING ERROR 9\n";exit} 68 timeout {puts "TESTING ERROR 9\n";exit}
69 "mytest" 69 "mytest"
@@ -73,13 +73,13 @@ expect {
73 "done" 73 "done"
74} 74}
75 75
76send -- "rm /dev/shm/ttt;echo done\r" 76send -- "rm /dev/shm/_firejail_test_file;echo done\r"
77expect { 77expect {
78 timeout {puts "TESTING ERROR 11\n";exit} 78 timeout {puts "TESTING ERROR 11\n";exit}
79 "done" 79 "done"
80} 80}
81 81
82send -- "cat /dev/shm/ttt;echo done\r" 82send -- "cat /dev/shm/_firejail_test_file;echo done\r"
83expect { 83expect {
84 timeout {puts "TESTING ERROR 12\n";exit} 84 timeout {puts "TESTING ERROR 12\n";exit}
85 "mytest" {puts "TESTING ERROR 13\n";exit} 85 "mytest" {puts "TESTING ERROR 13\n";exit}
diff --git a/test/fs/fs_var_lock.exp b/test/fs/fs_var_lock.exp
index 3ea98c3e3..ce3eb836e 100755
--- a/test/fs/fs_var_lock.exp
+++ b/test/fs/fs_var_lock.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail\r" 11send -- "firejail\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16after 100 16after 100
17send -- "stty -echo\r" 17send -- "stty -echo\r"
@@ -53,7 +53,7 @@ sleep 1
53send -- "firejail\r" 53send -- "firejail\r"
54expect { 54expect {
55 timeout {puts "TESTING ERROR 7\n";exit} 55 timeout {puts "TESTING ERROR 7\n";exit}
56 "Child process initialized" 56 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
57} 57}
58after 100 58after 100
59send -- "stty -echo\r" 59send -- "stty -echo\r"
diff --git a/test/fs/fs_var_tmp.exp b/test/fs/fs_var_tmp.exp
index 004425719..8c2da085f 100755
--- a/test/fs/fs_var_tmp.exp
+++ b/test/fs/fs_var_tmp.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,18 +11,18 @@ match_max 100000
11send -- "firejail\r" 11send -- "firejail\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16after 100 16after 100
17send -- "stty -echo\r" 17send -- "stty -echo\r"
18 18
19send -- "echo mytest > /var/tmp/ttt;echo done\r" 19send -- "echo mytest > /var/tmp/_firejail_test_file;echo done\r"
20expect { 20expect {
21 timeout {puts "TESTING ERROR 1\n";exit} 21 timeout {puts "TESTING ERROR 1\n";exit}
22 "done" 22 "done"
23} 23}
24 24
25send -- "cat /var/tmp/ttt;echo done\r" 25send -- "cat /var/tmp/_firejail_test_file;echo done\r"
26expect { 26expect {
27 timeout {puts "TESTING ERROR 2\n";exit} 27 timeout {puts "TESTING ERROR 2\n";exit}
28 "mytest" 28 "mytest"
@@ -32,13 +32,13 @@ expect {
32 "done" 32 "done"
33} 33}
34 34
35send -- "rm /var/tmp/ttt;echo done\r" 35send -- "rm /var/tmp/_firejail_test_file;echo done\r"
36expect { 36expect {
37 timeout {puts "TESTING ERROR 4\n";exit} 37 timeout {puts "TESTING ERROR 4\n";exit}
38 "done" 38 "done"
39} 39}
40 40
41send -- "cat /var/tmp/ttt;echo done\r" 41send -- "cat /var/tmp/_firejail_test_file;echo done\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 5\n";exit} 43 timeout {puts "TESTING ERROR 5\n";exit}
44 "mytest" {puts "TESTING ERROR 6\n";exit} 44 "mytest" {puts "TESTING ERROR 6\n";exit}
@@ -53,18 +53,18 @@ sleep 1
53send -- "firejail\r" 53send -- "firejail\r"
54expect { 54expect {
55 timeout {puts "TESTING ERROR 7\n";exit} 55 timeout {puts "TESTING ERROR 7\n";exit}
56 "Child process initialized" 56 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
57} 57}
58after 100 58after 100
59send -- "stty -echo\r" 59send -- "stty -echo\r"
60 60
61send -- "echo mytest > /var/tmp/ttt;echo done\r" 61send -- "echo mytest > /var/tmp/_firejail_test_file;echo done\r"
62expect { 62expect {
63 timeout {puts "TESTING ERROR 8\n";exit} 63 timeout {puts "TESTING ERROR 8\n";exit}
64 "done" 64 "done"
65} 65}
66 66
67send -- "cat /var/tmp/ttt;echo done\r" 67send -- "cat /var/tmp/_firejail_test_file;echo done\r"
68expect { 68expect {
69 timeout {puts "TESTING ERROR 9\n";exit} 69 timeout {puts "TESTING ERROR 9\n";exit}
70 "mytest" 70 "mytest"
@@ -74,13 +74,13 @@ expect {
74 "done" 74 "done"
75} 75}
76 76
77send -- "rm /var/tmp/ttt;echo done\r" 77send -- "rm /var/tmp/_firejail_test_file;echo done\r"
78expect { 78expect {
79 timeout {puts "TESTING ERROR 11\n";exit} 79 timeout {puts "TESTING ERROR 11\n";exit}
80 "done" 80 "done"
81} 81}
82 82
83send -- "cat /var/tmp/ttt;echo done\r" 83send -- "cat /var/tmp/_firejail_test_file;echo done\r"
84expect { 84expect {
85 timeout {puts "TESTING ERROR 12\n";exit} 85 timeout {puts "TESTING ERROR 12\n";exit}
86 "mytest" {puts "TESTING ERROR 13\n";exit} 86 "mytest" {puts "TESTING ERROR 13\n";exit}
diff --git a/test/fs/fscheck-bindnoroot.exp b/test/fs/fscheck-bindnoroot.exp
index 53a3922ee..6142a270a 100755
--- a/test/fs/fscheck-bindnoroot.exp
+++ b/test/fs/fscheck-bindnoroot.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/fs/fscheck-private.exp b/test/fs/fscheck-private.exp
index ab39b43e1..0b3f41115 100755
--- a/test/fs/fscheck-private.exp
+++ b/test/fs/fscheck-private.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/fs/fscheck-readonly.exp b/test/fs/fscheck-readonly.exp
index 5d4821dea..6c58f41da 100755
--- a/test/fs/fscheck-readonly.exp
+++ b/test/fs/fscheck-readonly.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/fs/fscheck-tmpfs.exp b/test/fs/fscheck-tmpfs.exp
index 8dd08aa72..223bb63ba 100755
--- a/test/fs/fscheck-tmpfs.exp
+++ b/test/fs/fscheck-tmpfs.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -24,7 +24,7 @@ if { ! [file exists /tmp/fjtest-dir] } {
24send -- "firejail --noprofile --tmpfs=~/fjtest-dir\r" 24send -- "firejail --noprofile --tmpfs=~/fjtest-dir\r"
25expect { 25expect {
26 timeout {puts "TESTING ERROR 3\n";exit} 26 timeout {puts "TESTING ERROR 3\n";exit}
27 "Child process initialized" 27 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
28} 28}
29after 500 29after 500
30 30
@@ -41,7 +41,7 @@ after 500
41send -- "firejail --noprofile --tmpfs=/tmp/fjtest-dir\r" 41send -- "firejail --noprofile --tmpfs=/tmp/fjtest-dir\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 5\n";exit} 43 timeout {puts "TESTING ERROR 5\n";exit}
44 "Error" 44 "Warning: you are not allowed to mount a tmpfs"
45} 45}
46after 500 46after 500
47 47
diff --git a/test/fs/invalid_filename.exp b/test/fs/invalid_filename.exp
index 7c4797976..dd63bf647 100755
--- a/test/fs/invalid_filename.exp
+++ b/test/fs/invalid_filename.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/fs/kmsg.exp b/test/fs/kmsg.exp
index 209cb8d3b..e7d765bff 100755
--- a/test/fs/kmsg.exp
+++ b/test/fs/kmsg.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail\r" 10send -- "firejail\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
diff --git a/test/fs/macro.exp b/test/fs/macro.exp
index 45e892088..c01123f41 100755
--- a/test/fs/macro.exp
+++ b/test/fs/macro.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --profile=macro-whitelist.profile ls ~\r" 11send -- "firejail --profile=macro-whitelist.profile ls ~\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16expect { 16expect {
17 timeout {puts "TESTING ERROR 1\n";exit} 17 timeout {puts "TESTING ERROR 1\n";exit}
@@ -42,7 +42,7 @@ sleep 1
42send -- "firejail --profile=macro-blacklist.profile ls ~/Desktop\r" 42send -- "firejail --profile=macro-blacklist.profile ls ~/Desktop\r"
43expect { 43expect {
44 timeout {puts "TESTING ERROR 7\n";exit} 44 timeout {puts "TESTING ERROR 7\n";exit}
45 "Child process initialized" 45 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
46} 46}
47expect { 47expect {
48 timeout {puts "TESTING ERROR 8\n";exit} 48 timeout {puts "TESTING ERROR 8\n";exit}
@@ -53,7 +53,7 @@ sleep 1
53send -- "firejail --profile=macro-blacklist.profile ls ~/Documents\r" 53send -- "firejail --profile=macro-blacklist.profile ls ~/Documents\r"
54expect { 54expect {
55 timeout {puts "TESTING ERROR 9n";exit} 55 timeout {puts "TESTING ERROR 9n";exit}
56 "Child process initialized" 56 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
57} 57}
58expect { 58expect {
59 timeout {puts "TESTING ERROR 10\n";exit} 59 timeout {puts "TESTING ERROR 10\n";exit}
@@ -64,7 +64,7 @@ sleep 1
64send -- "firejail --profile=macro-blacklist.profile ls ~/Downloads\r" 64send -- "firejail --profile=macro-blacklist.profile ls ~/Downloads\r"
65expect { 65expect {
66 timeout {puts "TESTING ERROR 11n";exit} 66 timeout {puts "TESTING ERROR 11n";exit}
67 "Child process initialized" 67 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
68} 68}
69expect { 69expect {
70 timeout {puts "TESTING ERROR 12n";exit} 70 timeout {puts "TESTING ERROR 12n";exit}
@@ -75,7 +75,7 @@ sleep 1
75send -- "firejail --profile=macro-blacklist.profile ls ~/Music\r" 75send -- "firejail --profile=macro-blacklist.profile ls ~/Music\r"
76expect { 76expect {
77 timeout {puts "TESTING ERROR 13\n";exit} 77 timeout {puts "TESTING ERROR 13\n";exit}
78 "Child process initialized" 78 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
79} 79}
80expect { 80expect {
81 timeout {puts "TESTING ERROR 14\n";exit} 81 timeout {puts "TESTING ERROR 14\n";exit}
@@ -86,7 +86,7 @@ sleep 1
86send -- "firejail --profile=macro-blacklist.profile ls ~/Pictures\r" 86send -- "firejail --profile=macro-blacklist.profile ls ~/Pictures\r"
87expect { 87expect {
88 timeout {puts "TESTING ERROR 15\n";exit} 88 timeout {puts "TESTING ERROR 15\n";exit}
89 "Child process initialized" 89 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
90} 90}
91expect { 91expect {
92 timeout {puts "TESTING ERROR 16\n";exit} 92 timeout {puts "TESTING ERROR 16\n";exit}
@@ -97,7 +97,7 @@ sleep 1
97send -- "firejail --profile=macro-blacklist.profile ls ~/Videos\r" 97send -- "firejail --profile=macro-blacklist.profile ls ~/Videos\r"
98expect { 98expect {
99 timeout {puts "TESTING ERROR 17\n";exit} 99 timeout {puts "TESTING ERROR 17\n";exit}
100 "Child process initialized" 100 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
101} 101}
102expect { 102expect {
103 timeout {puts "TESTING ERROR 18\n";exit} 103 timeout {puts "TESTING ERROR 18\n";exit}
@@ -108,7 +108,7 @@ sleep 1
108send -- "firejail --profile=macro-readonly.profile touch ~/Desktop/blablabla\r" 108send -- "firejail --profile=macro-readonly.profile touch ~/Desktop/blablabla\r"
109expect { 109expect {
110 timeout {puts "TESTING ERROR 19\n";exit} 110 timeout {puts "TESTING ERROR 19\n";exit}
111 "Child process initialized" 111 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
112} 112}
113expect { 113expect {
114 timeout {puts "TESTING ERROR 20\n";exit} 114 timeout {puts "TESTING ERROR 20\n";exit}
@@ -119,7 +119,7 @@ sleep 1
119send -- "firejail --profile=macro-readonly.profile touch ~/Documents/blablabla\r" 119send -- "firejail --profile=macro-readonly.profile touch ~/Documents/blablabla\r"
120expect { 120expect {
121 timeout {puts "TESTING ERROR 21\n";exit} 121 timeout {puts "TESTING ERROR 21\n";exit}
122 "Child process initialized" 122 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
123} 123}
124expect { 124expect {
125 timeout {puts "TESTING ERROR 22\n";exit} 125 timeout {puts "TESTING ERROR 22\n";exit}
@@ -130,7 +130,7 @@ sleep 1
130send -- "firejail --profile=macro-readonly.profile touch ~/Downloads/blablabla\r" 130send -- "firejail --profile=macro-readonly.profile touch ~/Downloads/blablabla\r"
131expect { 131expect {
132 timeout {puts "TESTING ERROR 23\n";exit} 132 timeout {puts "TESTING ERROR 23\n";exit}
133 "Child process initialized" 133 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
134} 134}
135expect { 135expect {
136 timeout {puts "TESTING ERROR 24\n";exit} 136 timeout {puts "TESTING ERROR 24\n";exit}
@@ -141,7 +141,7 @@ sleep 1
141send -- "firejail --profile=macro-readonly.profile touch ~/Music/blablabla\r" 141send -- "firejail --profile=macro-readonly.profile touch ~/Music/blablabla\r"
142expect { 142expect {
143 timeout {puts "TESTING ERROR 25\n";exit} 143 timeout {puts "TESTING ERROR 25\n";exit}
144 "Child process initialized" 144 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
145} 145}
146expect { 146expect {
147 timeout {puts "TESTING ERROR 26\n";exit} 147 timeout {puts "TESTING ERROR 26\n";exit}
@@ -152,7 +152,7 @@ sleep 1
152send -- "firejail --profile=macro-readonly.profile touch ~/Pictures/blablabla\r" 152send -- "firejail --profile=macro-readonly.profile touch ~/Pictures/blablabla\r"
153expect { 153expect {
154 timeout {puts "TESTING ERROR 27\n";exit} 154 timeout {puts "TESTING ERROR 27\n";exit}
155 "Child process initialized" 155 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
156} 156}
157expect { 157expect {
158 timeout {puts "TESTING ERROR 28\n";exit} 158 timeout {puts "TESTING ERROR 28\n";exit}
@@ -163,7 +163,7 @@ sleep 1
163send -- "firejail --profile=macro-readonly.profile touch ~/Videos/blablabla\r" 163send -- "firejail --profile=macro-readonly.profile touch ~/Videos/blablabla\r"
164expect { 164expect {
165 timeout {puts "TESTING ERROR 29\n";exit} 165 timeout {puts "TESTING ERROR 29\n";exit}
166 "Child process initialized" 166 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
167} 167}
168expect { 168expect {
169 timeout {puts "TESTING ERROR 30\n";exit} 169 timeout {puts "TESTING ERROR 30\n";exit}
diff --git a/test/fs/mkdir.exp b/test/fs/mkdir.exp
index 8b787f114..b9e8d5ce4 100755
--- a/test/fs/mkdir.exp
+++ b/test/fs/mkdir.exp
@@ -1,40 +1,40 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 3 6set timeout 3
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "rm -fr ~/.firejail_test\r" 10send -- "rm -fr ~/_firejail_test_dir\r"
11after 100 11after 100
12 12
13send -- "firejail --profile=mkdir.profile find ~/.firejail_test\r" 13send -- "firejail --profile=mkdir.profile find ~/_firejail_test_dir\r"
14expect { 14expect {
15 timeout {puts "TESTING ERROR 1.1\n";exit} 15 timeout {puts "TESTING ERROR 1.1\n";exit}
16 ".firejail_test/a/b/c/d.txt" 16 "_firejail_test_dir/_firejail_test_file"
17} 17}
18send -- "rm -rf ~/.firejail_test\r" 18send -- "rm -rf ~/_firejail_test_dir\r"
19after 100 19after 100
20 20
21send -- "firejail --profile=mkdir.profile find /tmp/.firejail_test\r" 21send -- "firejail --profile=mkdir.profile find /tmp/_firejail_test_dir\r"
22expect { 22expect {
23 timeout {puts "TESTING ERROR 2.1\n";exit} 23 timeout {puts "TESTING ERROR 2.1\n";exit}
24 "/tmp/.firejail_test/a/b/c/d.txt" 24 "_firejail_test_dir/_firejail_test_file"
25} 25}
26send -- "rm -rf /tmp/.firejail_test\r" 26send -- "rm -rf /tmp/_firejail_test_dir\r"
27after 100 27after 100
28 28
29set UID [exec id -u] 29set UID [exec id -u]
30set fexist [file exist /run/user/$UID] 30set fexist [file exist /run/user/$UID]
31if { $fexist } { 31if { $fexist } {
32 send -- "firejail --profile=mkdir.profile find /run/user/$UID/.firejail_test\r" 32 send -- "firejail --profile=mkdir.profile find /run/user/$UID/_firejail_test_dir\r"
33 expect { 33 expect {
34 timeout {puts "TESTING ERROR 3.1\n";exit} 34 timeout {puts "TESTING ERROR 3.1\n";exit}
35 "/run/user/$UID/.firejail_test/a/b/c/d.txt" 35 "_firejail_test_dir/_firejail_test_file"
36 } 36 }
37 send -- "rm -rf /run/user/$UID/.firejail_test\r" 37 send -- "rm -rf /run/user/$UID/_firejail_test_dir\r"
38 after 100 38 after 100
39 39
40 40
diff --git a/test/fs/mkdir.profile b/test/fs/mkdir.profile
index 35c27c872..fba93f466 100644
--- a/test/fs/mkdir.profile
+++ b/test/fs/mkdir.profile
@@ -1,6 +1,6 @@
1mkdir ~/.firejail_test/a/b/c 1mkdir ~/_firejail_test_dir
2mkfile ~/.firejail_test/a/b/c/d.txt 2mkfile ~/_firejail_test_dir/_firejail_test_file
3mkdir /tmp/.firejail_test/a/b/c 3mkdir /tmp/_firejail_test_dir
4mkfile /tmp/.firejail_test/a/b/c/d.txt 4mkfile /tmp/_firejail_test_dir/_firejail_test_file
5mkdir ${RUNUSER}/.firejail_test/a/b/c 5mkdir ${RUNUSER}/_firejail_test_dir
6mkfile ${RUNUSER}/.firejail_test/a/b/c/d.txt 6mkfile ${RUNUSER}/_firejail_test_dir/_firejail_test_file
diff --git a/test/fs/mkdir_mkfile.exp b/test/fs/mkdir_mkfile.exp
index eddc6ebfb..c1dce58ea 100755
--- a/test/fs/mkdir_mkfile.exp
+++ b/test/fs/mkdir_mkfile.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -12,7 +12,7 @@ match_max 100000
12send -- "firejail --private --profile=mkdir_mkfile.profile\r" 12send -- "firejail --private --profile=mkdir_mkfile.profile\r"
13expect { 13expect {
14 timeout {puts "TESTING ERROR 0\n";exit} 14 timeout {puts "TESTING ERROR 0\n";exit}
15 "Child process initialized" 15 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
16} 16}
17sleep 1 17sleep 1
18 18
diff --git a/test/fs/noblacklist-blacklist-noexec.exp b/test/fs/noblacklist-blacklist-noexec.exp
index 9f5794a7d..3bc5e7c79 100755
--- a/test/fs/noblacklist-blacklist-noexec.exp
+++ b/test/fs/noblacklist-blacklist-noexec.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -12,7 +12,7 @@ set PWD $env(PWD)
12send -- "firejail --noprofile --noblacklist=$PWD --blacklist=$PWD --noexec=$PWD\r" 12send -- "firejail --noprofile --noblacklist=$PWD --blacklist=$PWD --noexec=$PWD\r"
13expect { 13expect {
14 timeout {puts "TESTING ERROR 0\n";exit} 14 timeout {puts "TESTING ERROR 0\n";exit}
15 "Child process initialized" 15 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
16} 16}
17sleep 1 17sleep 1
18 18
diff --git a/test/fs/noblacklist-blacklist-readonly.exp b/test/fs/noblacklist-blacklist-readonly.exp
index 558d3ac9c..b5d3ef045 100755
--- a/test/fs/noblacklist-blacklist-readonly.exp
+++ b/test/fs/noblacklist-blacklist-readonly.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --noprofile --noblacklist=~ --blacklist=~ --read-only=~\r" 11send -- "firejail --noprofile --noblacklist=~ --blacklist=~ --read-only=~\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 1 16sleep 1
17 17
diff --git a/test/fs/option_bind_user.exp b/test/fs/option_bind_user.exp
index 08b892121..c58c23d8c 100755
--- a/test/fs/option_bind_user.exp
+++ b/test/fs/option_bind_user.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/fs/option_blacklist.exp b/test/fs/option_blacklist.exp
index 6ee2b07ca..9e1533435 100755
--- a/test/fs/option_blacklist.exp
+++ b/test/fs/option_blacklist.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --blacklist=/var\r" 10send -- "firejail --blacklist=/var\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15after 100 15after 100
16send -- "stty -echo\r" 16send -- "stty -echo\r"
@@ -35,4 +35,4 @@ expect {
35} 35}
36after 100 36after 100
37 37
38puts "\n" 38puts "\nall done\n"
diff --git a/test/fs/option_blacklist_file.exp b/test/fs/option_blacklist_file.exp
index b0bcc741b..93284a140 100755
--- a/test/fs/option_blacklist_file.exp
+++ b/test/fs/option_blacklist_file.exp
@@ -1,22 +1,37 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "firejail --blacklist=/etc/passwd\r" 10send -- "mkdir ~/_firejail_test_dir\r"
11after 100
12send -- "touch ~/_firejail_test_dir/a\r"
13after 100
14
15send -- "firejail --blacklist=/etc/passwd --blacklist=~/_firejail_test_dir\r"
11expect { 16expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 17 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 18 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 19}
15sleep 1 20sleep 1
16 21
17send -- "cat /etc/passwd;echo done\r" 22send -- "cat /etc/passwd;echo done\r"
18expect { 23expect {
19 timeout {puts "TESTING ERROR 1\n";exit} 24 timeout {puts "TESTING ERROR 1\n";exit}
25 "No such file or directory"
26}
27expect {
28 timeout {puts "TESTING ERROR 2\n";exit}
29 "done"
30}
31after 100
32send -- "cat ~/_firejail_test_dir/a;echo done\r"
33expect {
34 timeout {puts "TESTING ERROR 1\n";exit}
20 "Permission denied" 35 "Permission denied"
21} 36}
22expect { 37expect {
@@ -25,4 +40,10 @@ expect {
25} 40}
26after 100 41after 100
27 42
28puts "\n" 43send -- "exit\r"
44sleep 1
45
46send -- "rm -fr ~/_firejail_test_dir\r"
47after 100
48
49puts "\nall done\n"
diff --git a/test/fs/option_blacklist_glob.exp b/test/fs/option_blacklist_glob.exp
index ee79eabf4..83b123a4b 100755
--- a/test/fs/option_blacklist_glob.exp
+++ b/test/fs/option_blacklist_glob.exp
@@ -1,32 +1,47 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "firejail --blacklist=testdir1/*\r" 10send -- "mkdir ~/_firejail_test_dir\r"
11after 100
12send -- "touch ~/_firejail_test_dir/a\r"
13after 100
14send -- "mkdir ~/_firejail_test_dir/test1\r"
15after 100
16send -- "touch ~/_firejail_test_dir/test1/b\r"
17after 100
18
19send -- "firejail --blacklist=~/_firejail_test_dir/*\r"
11expect { 20expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 21 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 22 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 23}
15sleep 1 24sleep 1
16send -- "cd testdir1\r" 25send -- "cd ~/_firejail_test_dir\r"
17sleep 1 26sleep 1
18 27
19send -- "cat .file\r" 28send -- "cat a\r"
20expect { 29expect {
21 timeout {puts "TESTING ERROR 1\n";exit} 30 timeout {puts "TESTING ERROR 1\n";exit}
22 "Permission denied" 31 "Permission denied"
23} 32}
24 33
25send -- "ls .directory\r" 34send -- "ls test1\r"
26expect { 35expect {
27 timeout {puts "TESTING ERROR 2\n";exit} 36 timeout {puts "TESTING ERROR 2\n";exit}
28 "Permission denied" 37 "Permission denied"
29} 38}
30after 100 39after 100
31 40
32puts "\n" 41send -- "exit\r"
42sleep 1
43
44send -- "rm -fr ~/_firejail_test_dir\r"
45after 100
46
47puts "\nall done\n"
diff --git a/test/fs/private-bin.exp b/test/fs/private-bin.exp
index b5d205780..e4b36e114 100755
--- a/test/fs/private-bin.exp
+++ b/test/fs/private-bin.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --private-bin=bash,ls,sh\r" 10send -- "firejail --private-bin=bash,ls,sh\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
@@ -40,7 +40,7 @@ sleep 1
40send -- "firejail --profile=private-bin.profile\r" 40send -- "firejail --profile=private-bin.profile\r"
41expect { 41expect {
42 timeout {puts "TESTING ERROR 7\n";exit} 42 timeout {puts "TESTING ERROR 7\n";exit}
43 "Child process initialized" 43 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
44} 44}
45sleep 1 45sleep 1
46 46
diff --git a/test/fs/private-cache.exp b/test/fs/private-cache.exp
index 3244c21c1..f21d799b4 100755
--- a/test/fs/private-cache.exp
+++ b/test/fs/private-cache.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -21,7 +21,7 @@ if { ! [file exists ~/.cache/abcdefg] } {
21send -- "firejail --noprofile --private-cache\r" 21send -- "firejail --noprofile --private-cache\r"
22expect { 22expect {
23 timeout {puts "TESTING ERROR 1\n";exit} 23 timeout {puts "TESTING ERROR 1\n";exit}
24 "Child process initialized" 24 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
25} 25}
26sleep 1 26sleep 1
27 27
diff --git a/test/fs/private-cwd.exp b/test/fs/private-cwd.exp
index 54804a6a6..77374e086 100755
--- a/test/fs/private-cwd.exp
+++ b/test/fs/private-cwd.exp
@@ -1,52 +1,54 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "cd /tmp\r" 10send -- "firejail --private-cwd pwd\r"
11after 100
12
13# testing profile and private
14send -- "firejail --private-cwd\r"
15expect { 11expect {
16 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 13 "$env(HOME)"
18} 14}
19sleep 1 15sleep 1
20 16
21send -- "pwd\r" 17send -- "firejail --private-cwd=/etc pwd\r"
22expect { 18expect {
23 timeout {puts "TESTING ERROR 1\n";exit} 19 timeout {puts "TESTING ERROR 2\n";exit}
24 "$env(HOME)" 20 "/etc"
25} 21}
26after 100
27
28send -- "exit\r"
29sleep 1 22sleep 1
30 23
31send -- "cd /\r" 24send -- "firejail --private --private-cwd=. pwd\r"
32after 100
33
34# testing profile and private
35send -- "firejail --private-cwd=/tmp\r"
36expect { 25expect {
37 timeout {puts "TESTING ERROR 3\n";exit} 26 timeout {puts "TESTING ERROR 3\n";exit}
38 "Child process initialized" 27 "invalid private working directory"
39} 28}
40sleep 1 29sleep 1
41 30
42send -- "pwd\r" 31after 100
32send -- "firejail --private-cwd='\${HOME}' pwd\r"
43expect { 33expect {
44 timeout {puts "TESTING ERROR 4\n";exit} 34 timeout {puts "TESTING ERROR 4\n";exit}
45 "/tmp" 35 "$env(HOME)"
46} 36}
47after 100 37sleep 1
48 38
49send -- "exit\r" 39after 100
40send -- "firejail --private-cwd=\"\${HOME}\" pwd\r"
41expect {
42 timeout {puts "TESTING ERROR 5\n";exit}
43 "$env(HOME)"
44}
50sleep 1 45sleep 1
51 46
47send -- "firejail --profile=private-cwd.profile pwd\r"
48expect {
49 timeout {puts "TESTING ERROR 6\n";exit}
50 "$env(HOME)"
51}
52after 100
53
52puts "all done\n" 54puts "all done\n"
diff --git a/test/fs/private-cwd.profile b/test/fs/private-cwd.profile
new file mode 100644
index 000000000..9dd97a8ac
--- /dev/null
+++ b/test/fs/private-cwd.profile
@@ -0,0 +1 @@
private-cwd ${HOME}
diff --git a/test/fs/private-etc-empty.exp b/test/fs/private-etc-empty.exp
index 9be18f9bd..6878a642c 100755
--- a/test/fs/private-etc-empty.exp
+++ b/test/fs/private-etc-empty.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --private-etc=blablabla\r" 10send -- "firejail --private-etc=blablabla\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
@@ -26,7 +26,7 @@ sleep 1
26send -- "firejail --profile=private-etc-empty.profile\r" 26send -- "firejail --profile=private-etc-empty.profile\r"
27expect { 27expect {
28 timeout {puts "TESTING ERROR 0\n";exit} 28 timeout {puts "TESTING ERROR 0\n";exit}
29 "Child process initialized" 29 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
30} 30}
31sleep 1 31sleep 1
32 32
diff --git a/test/fs/private-etc.exp b/test/fs/private-etc.exp
index c9a74f96e..f51fc5221 100755
--- a/test/fs/private-etc.exp
+++ b/test/fs/private-etc.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --private-etc=passwd,group,resolv.conf,X11\r" 11send -- "firejail --private-etc=passwd,group,resolv.conf,X11\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 1\n";exit} 13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 1 16sleep 1
17 17
@@ -64,9 +64,6 @@ expect {
64} 64}
65after 100 65after 100
66 66
67 67send -- "exit\r"
68
69
70
71after 100 68after 100
72puts "\nall done\n" 69puts "\nall done\n"
diff --git a/test/fs/private-home-dir.exp b/test/fs/private-home-dir.exp
index 75ac5aea5..e46d2b113 100755
--- a/test/fs/private-home-dir.exp
+++ b/test/fs/private-home-dir.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -21,16 +21,16 @@ if {[file exists ~/.Xauthority]} {
21 send -- "touch ~/.Xauthority\r" 21 send -- "touch ~/.Xauthority\r"
22} 22}
23after 100 23after 100
24send -- "rm -fr ~/_firejail_test_dir_\r" 24send -- "rm -fr ~/_firejail_test_dir1_\r"
25after 100 25after 100
26send -- "mkdir ~/_firejail_test_dir_\r" 26send -- "mkdir ~/_firejail_test_dir1_\r"
27sleep 1 27sleep 1
28 28
29# testing profile and private 29# testing profile and private
30send -- "firejail --private=~/_firejail_test_dir_\r" 30send -- "firejail --private=~/_firejail_test_dir1_\r"
31expect { 31expect {
32 timeout {puts "TESTING ERROR 0\n";exit} 32 timeout {puts "TESTING ERROR 0\n";exit}
33 "Child process initialized" 33 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
34} 34}
35sleep 1 35sleep 1
36 36
@@ -67,12 +67,12 @@ expect {
67 "private directory is not owned by the current user" 67 "private directory is not owned by the current user"
68} 68}
69sleep 1 69sleep 1
70send -- "mkdir ~/_firejail_test_dir_/test_dir_2\r" 70send -- "mkdir ~/_firejail_test_dir1_/test_dir_2\r"
71after 100 71after 100
72send -- "touch ~/_firejail_test_dir_/test_dir_2/testfile\r" 72send -- "touch ~/_firejail_test_dir1_/test_dir_2/testfile\r"
73sleep 1 73sleep 1
74 74
75send -- "firejail --debug --noprofile --blacklist=~/test_dir_2 --private=~/_firejail_test_dir_\r" 75send -- "firejail --debug --noprofile --blacklist=~/test_dir_2 --private=~/_firejail_test_dir1_\r"
76expect { 76expect {
77 timeout {puts "TESTING ERROR 10\n";exit} 77 timeout {puts "TESTING ERROR 10\n";exit}
78 "Disable" 78 "Disable"
@@ -83,7 +83,7 @@ expect {
83} 83}
84expect { 84expect {
85 timeout {puts "TESTING ERROR 12\n";exit} 85 timeout {puts "TESTING ERROR 12\n";exit}
86 "Child process initialized" 86 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
87} 87}
88 88
89sleep 1 89sleep 1
@@ -98,7 +98,8 @@ after 100
98send "exit\r" 98send "exit\r"
99sleep 1 99sleep 1
100 100
101send -- "rm -fr ~/_firejail_test_dir_\r" 101send -- "rm -fr ~/_firejail_test_dir1\r"
102after 100 102after 100
103 103
104
104puts "\nall done\n" 105puts "\nall done\n"
diff --git a/test/fs/private-home.exp b/test/fs/private-home.exp
index 2f297e93f..99456a211 100755
--- a/test/fs/private-home.exp
+++ b/test/fs/private-home.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -26,7 +26,7 @@ after 100
26send -- "firejail --private-home=_firejail_test_file1,_firejail_test_file2,_firejail_test_dir1\r" 26send -- "firejail --private-home=_firejail_test_file1,_firejail_test_file2,_firejail_test_dir1\r"
27expect { 27expect {
28 timeout {puts "TESTING ERROR 1\n";exit} 28 timeout {puts "TESTING ERROR 1\n";exit}
29 "Child process initialized" 29 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
30} 30}
31after 100 31after 100
32 32
@@ -86,7 +86,7 @@ after 100
86send -- "firejail --private-home=_firejail_test_link2\r" 86send -- "firejail --private-home=_firejail_test_link2\r"
87expect { 87expect {
88 timeout {puts "TESTING ERROR 10\n";exit} 88 timeout {puts "TESTING ERROR 10\n";exit}
89 "Child process initialized" 89 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
90} 90}
91after 100 91after 100
92send -- "file ~/_firejail_test_link2\r" 92send -- "file ~/_firejail_test_link2\r"
@@ -95,8 +95,19 @@ expect {
95 "broken symbolic link" 95 "broken symbolic link"
96} 96}
97send -- "exit\r" 97send -- "exit\r"
98sleep 1
98 99
99send -- "rm -f ~/_firejail_test*\r" 100send -- "echo cleanup\r"
101after 100
102send -- "rm -f ~/_firejail_test_file1\r"
103after 100
104send -- "rm -f ~/_firejail_test_file2\r"
105after 100
106send -- "rm -fr ~/_firejail_test_dir1\r"
107after 100
108send -- "rm -f ~/_firejail_test_link1\r"
109after 100
110send -- "rm -f ~/_firejail_test_link2\r"
100after 100 111after 100
101 112
102puts "\nall done\n" 113puts "\nall done\n"
diff --git a/test/fs/private-homedir.exp b/test/fs/private-homedir.exp
index 78fb705ec..0b4348514 100755
--- a/test/fs/private-homedir.exp
+++ b/test/fs/private-homedir.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --private=~\r" 10send -- "firejail --private=~\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15after 100 15after 100
16 16
diff --git a/test/fs/private-lib.exp b/test/fs/private-lib.exp
index f32affabb..5290def35 100755
--- a/test/fs/private-lib.exp
+++ b/test/fs/private-lib.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6 6
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --private-lib --private-bin=sh,bash,dash,ps,grep,ls,find,echo,stty \r" 11send -- "firejail --private-lib --private-bin=sh,bash,dash,ps,grep,ls,find,echo,stty \r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 1\n";exit} 13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16after 100 16after 100
17send -- "stty -echo\r" 17send -- "stty -echo\r"
diff --git a/test/fs/private-whitelist.exp b/test/fs/private-whitelist.exp
index 1879a3d54..48add880c 100755
--- a/test/fs/private-whitelist.exp
+++ b/test/fs/private-whitelist.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --private --whitelist=/tmp/.X11-unix\r" 10send -- "firejail --private --whitelist=/tmp/.X11-unix\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15after 100 15after 100
16 16
diff --git a/test/fs/private.exp b/test/fs/private.exp
index d4f7fc893..ff8e0c66e 100755
--- a/test/fs/private.exp
+++ b/test/fs/private.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -26,7 +26,7 @@ after 100
26send -- "firejail --private\r" 26send -- "firejail --private\r"
27expect { 27expect {
28 timeout {puts "TESTING ERROR 0\n";exit} 28 timeout {puts "TESTING ERROR 0\n";exit}
29 "Child process initialized" 29 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
30} 30}
31sleep 1 31sleep 1
32 32
diff --git a/test/fs/read-write.exp b/test/fs/read-write.exp
index ad51c2db1..f0ef0842c 100755
--- a/test/fs/read-write.exp
+++ b/test/fs/read-write.exp
@@ -1,17 +1,25 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "mkdir ~/_firejail_test_dir\r"
11after 100
12send -- "touch ~/_firejail_test_dir/a\r"
13after 100
14send -- "mkdir ~/_firejail_test_dir/test1\r"
15after 100
16send -- "touch ~/_firejail_test_dir/test1/b\r"
17after 100
10 18
11send -- "firejail --read-only=~/_firejail_test_dir --read-write=~/_firejail_test_dir/test1\r" 19send -- "firejail --read-only=~/_firejail_test_dir --read-write=~/_firejail_test_dir/test1\r"
12expect { 20expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 21 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 22 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 23}
16sleep 1 24sleep 1
17 25
@@ -32,4 +40,9 @@ expect {
32} 40}
33 41
34after 100 42after 100
43send -- "exit\r"
44sleep 1
45
46send -- "rm -fr ~/_firejail_test_dir\r"
47after 100
35puts "\nall done\n" 48puts "\nall done\n"
diff --git a/test/fs/sys_fs.exp b/test/fs/sys_fs.exp
index de7fadf6c..ce1fb04de 100755
--- a/test/fs/sys_fs.exp
+++ b/test/fs/sys_fs.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail\r" 10send -- "firejail\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
@@ -27,7 +27,7 @@ sleep 1
27send -- "firejail --noblacklist=/sys/fs\r" 27send -- "firejail --noblacklist=/sys/fs\r"
28expect { 28expect {
29 timeout {puts "TESTING ERROR 1\n";exit} 29 timeout {puts "TESTING ERROR 1\n";exit}
30 "Child process initialized" 30 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
31} 31}
32sleep 1 32sleep 1
33 33
diff --git a/test/fs/tab.exp b/test/fs/tab.exp
new file mode 100755
index 000000000..cc9e11ed5
--- /dev/null
+++ b/test/fs/tab.exp
@@ -0,0 +1,46 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10
11send -- "firejail --private ls -al\r"
12expect {
13 timeout {puts "TESTING ERROR 0\n";exit}
14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15}
16expect {
17 timeout {puts "TESTING ERROR 1\n";exit}
18 ".inputrc"
19}
20sleep 1
21
22send -- "firejail --private --tab ls -al\r"
23expect {
24 timeout {puts "TESTING ERROR 2\n";exit}
25 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
26}
27expect {
28 timeout {puts "TESTING ERROR 3\n";exit}
29 ".inputrc" {puts "TESTING ERROR 4\n";exit}
30 "Parent is shutting down"
31}
32sleep 1
33
34send -- "firejail --private --profile=tab.profile ls -al\r"
35expect {
36 timeout {puts "TESTING ERROR 5\n";exit}
37 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
38}
39expect {
40 timeout {puts "TESTING ERROR 6\n";exit}
41 ".inputrc" {puts "TESTING ERROR 7\n";exit}
42 "Parent is shutting down"
43}
44sleep 1
45
46puts "\nall done\n"
diff --git a/test/fs/tab.profile b/test/fs/tab.profile
new file mode 100644
index 000000000..8cc35a3d5
--- /dev/null
+++ b/test/fs/tab.profile
@@ -0,0 +1 @@
tab
diff --git a/test/fs/testdir1/.directory/file b/test/fs/testdir1/.directory/file
deleted file mode 100644
index e69de29bb..000000000
--- a/test/fs/testdir1/.directory/file
+++ /dev/null
diff --git a/test/fs/testdir1/.file b/test/fs/testdir1/.file
deleted file mode 100644
index e69de29bb..000000000
--- a/test/fs/testdir1/.file
+++ /dev/null
diff --git a/test/fs/testfile1 b/test/fs/testfile1
deleted file mode 100644
index e69de29bb..000000000
--- a/test/fs/testfile1
+++ /dev/null
diff --git a/test/fs/whitelist-dev.exp b/test/fs/whitelist-dev.exp
index ad5c54a9c..7459462f8 100755
--- a/test/fs/whitelist-dev.exp
+++ b/test/fs/whitelist-dev.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --whitelist=/dev/null --debug\r" 10send -- "firejail --whitelist=/dev/null --debug\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
@@ -26,7 +26,7 @@ sleep 1
26send -- "firejail --whitelist=/dev/null --whitelist=/dev/random\r" 26send -- "firejail --whitelist=/dev/null --whitelist=/dev/random\r"
27expect { 27expect {
28 timeout {puts "TESTING ERROR 2\n";exit} 28 timeout {puts "TESTING ERROR 2\n";exit}
29 "Child process initialized" 29 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
30} 30}
31sleep 1 31sleep 1
32 32
@@ -42,7 +42,7 @@ sleep 1
42send -- "firejail --private-dev --debug\r" 42send -- "firejail --private-dev --debug\r"
43expect { 43expect {
44 timeout {puts "TESTING ERROR 4\n";exit} 44 timeout {puts "TESTING ERROR 4\n";exit}
45 "Child process initialized" 45 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
46} 46}
47sleep 1 47sleep 1
48 48
@@ -61,6 +61,9 @@ expect {
61 "19" {puts "OK\n"} 61 "19" {puts "OK\n"}
62 "20" {puts "OK\n"} 62 "20" {puts "OK\n"}
63 "21" {puts "OK\n"} 63 "21" {puts "OK\n"}
64 "22" {puts "OK\n"}
65 "23" {puts "OK\n"}
66 "24" {puts "OK\n"}
64} 67}
65after 100 68after 100
66 69
@@ -94,7 +97,7 @@ if { $have_snd > 0 } {
94 send -- "firejail --private-dev --nosound ls /dev\r" 97 send -- "firejail --private-dev --nosound ls /dev\r"
95 expect { 98 expect {
96 timeout {puts "TESTING ERROR 7\n";exit} 99 timeout {puts "TESTING ERROR 7\n";exit}
97 "Child process initialized" 100 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
98 } 101 }
99 expect { 102 expect {
100 timeout {puts "TESTING ERROR 8\n";exit} 103 timeout {puts "TESTING ERROR 8\n";exit}
@@ -111,7 +114,7 @@ if { $have_dvd > 0 } {
111 send -- "firejail --private-dev --nodvd ls /dev\r" 114 send -- "firejail --private-dev --nodvd ls /dev\r"
112 expect { 115 expect {
113 timeout {puts "TESTING ERROR 10\n";exit} 116 timeout {puts "TESTING ERROR 10\n";exit}
114 "Child process initialized" 117 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
115 } 118 }
116 expect { 119 expect {
117 timeout {puts "TESTING ERROR 11\n";exit} 120 timeout {puts "TESTING ERROR 11\n";exit}
@@ -132,7 +135,7 @@ if { $have_dri > 0 } {
132 send -- "firejail --private-dev --no3d ls /dev\r" 135 send -- "firejail --private-dev --no3d ls /dev\r"
133 expect { 136 expect {
134 timeout {puts "TESTING ERROR 17\n";exit} 137 timeout {puts "TESTING ERROR 17\n";exit}
135 "Child process initialized" 138 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
136 } 139 }
137 expect { 140 expect {
138 timeout {puts "TESTING ERROR 18\n";exit} 141 timeout {puts "TESTING ERROR 18\n";exit}
diff --git a/test/fs/whitelist-double.exp b/test/fs/whitelist-double.exp
index 5ce9d8ad7..b3b48f2cd 100755
--- a/test/fs/whitelist-double.exp
+++ b/test/fs/whitelist-double.exp
@@ -1,23 +1,23 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "echo 123 > /tmp/firejal-deleteme\r" 10send -- "echo 123 > /tmp/_firejail_test_file\r"
11sleep 1 11sleep 1
12 12
13send -- "firejail --whitelist=/tmp/firejal-deleteme --whitelist=/tmp/firejal-deleteme\r" 13send -- "firejail --whitelist=/tmp/_firejail_test_file --whitelist=/tmp/_firejail_test_file\r"
14expect { 14expect {
15 timeout {puts "TESTING ERROR 0\n";exit} 15 timeout {puts "TESTING ERROR 0\n";exit}
16 "Child process initialized" 16 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
17} 17}
18sleep 1 18sleep 1
19 19
20send -- "cat /tmp/firejal-deleteme\r" 20send -- "cat /tmp/_firejail_test_file\r"
21expect { 21expect {
22 timeout {puts "TESTING ERROR 1\n";exit} 22 timeout {puts "TESTING ERROR 1\n";exit}
23 "123" 23 "123"
@@ -26,13 +26,13 @@ expect {
26send -- "exit\r" 26send -- "exit\r"
27sleep 1 27sleep 1
28 28
29send -- "cat /tmp/firejal-deleteme\r" 29send -- "cat /tmp/_firejail_test_file\r"
30expect { 30expect {
31 timeout {puts "TESTING ERROR 2\n";exit} 31 timeout {puts "TESTING ERROR 2\n";exit}
32 "123" 32 "123"
33} 33}
34 34
35send -- "rm -v /tmp/firejal-deleteme\r" 35send -- "rm -v /tmp/_firejail_test_file\r"
36expect { 36expect {
37 timeout {puts "TESTING ERROR 3\n";exit} 37 timeout {puts "TESTING ERROR 3\n";exit}
38 "removed" 38 "removed"
diff --git a/test/fs/whitelist-empty.exp b/test/fs/whitelist-empty.exp
index dbc04cf30..18d4561d6 100755
--- a/test/fs/whitelist-empty.exp
+++ b/test/fs/whitelist-empty.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 30 6set timeout 30
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --whitelist=~/blablabla --whitelist=/tmp/blablabla --whitelist=/media/blablabla --whitelist=/var/blablabla --whitelist=/dev/blablabla --whitelist=/opt/blablabla\r" 10send -- "firejail --whitelist=~/blablabla --whitelist=/tmp/blablabla --whitelist=/media/blablabla --whitelist=/var/blablabla --whitelist=/dev/blablabla --whitelist=/opt/blablabla\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
diff --git a/test/fs/whitelist-noexec.exp b/test/fs/whitelist-noexec.exp
index e1c39b66f..ba3ca4d92 100755
--- a/test/fs/whitelist-noexec.exp
+++ b/test/fs/whitelist-noexec.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -12,7 +12,7 @@ set PWD $env(PWD)
12send -- "firejail --noprofile --whitelist=$PWD --noexec=$PWD\r" 12send -- "firejail --noprofile --whitelist=$PWD --noexec=$PWD\r"
13expect { 13expect {
14 timeout {puts "TESTING ERROR 0\n";exit} 14 timeout {puts "TESTING ERROR 0\n";exit}
15 "Child process initialized" 15 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
16} 16}
17sleep 1 17sleep 1
18 18
diff --git a/test/fs/whitelist-readonly.exp b/test/fs/whitelist-readonly.exp
index e5c9cc400..676131ade 100755
--- a/test/fs/whitelist-readonly.exp
+++ b/test/fs/whitelist-readonly.exp
@@ -1,17 +1,25 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "mkdir ~/_firejail_test_dir\r"
11after 100
12send -- "touch ~/_firejail_test_dir/a\r"
13after 100
14send -- "mkdir ~/_firejail_test_dir/test1\r"
15after 100
16send -- "touch ~/_firejail_test_dir/test1/b\r"
17after 100
10 18
11send -- "firejail --noprofile --whitelist=~/_firejail_test_dir --read-only=~\r" 19send -- "firejail --noprofile --whitelist=~/_firejail_test_dir --read-only=~\r"
12expect { 20expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 21 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 22 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 23}
16sleep 1 24sleep 1
17 25
@@ -25,4 +33,6 @@ after 100
25send -- "exit\r" 33send -- "exit\r"
26sleep 1 34sleep 1
27 35
36send -- "rm -fr ~/_firejail_test_dir\r"
37after 100
28puts "\nall done\n" 38puts "\nall done\n"
diff --git a/test/fs/whitelist-whitespace.exp b/test/fs/whitelist-whitespace.exp
index 1b1c4c1cb..885b90f2a 100755
--- a/test/fs/whitelist-whitespace.exp
+++ b/test/fs/whitelist-whitespace.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -13,7 +13,7 @@ after 100
13send -- "firejail --noprofile --whitelist=~/filewith\\\ \\\ many\\\ whitespaces\\\ \r" 13send -- "firejail --noprofile --whitelist=~/filewith\\\ \\\ many\\\ whitespaces\\\ \r"
14expect { 14expect {
15 timeout {puts "TESTING ERROR 1\n";exit} 15 timeout {puts "TESTING ERROR 1\n";exit}
16 "Child process initialized" 16 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
17} 17}
18sleep 1 18sleep 1
19 19
diff --git a/test/fs/whitelist.exp b/test/fs/whitelist.exp
index 27ee2433e..8e98b9dfa 100755
--- a/test/fs/whitelist.exp
+++ b/test/fs/whitelist.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -16,10 +16,7 @@ send -- "rm ~/fjtest-file\r"
16after 200 16after 200
17send -- "rm ~/fjtest-file-lnk\r" 17send -- "rm ~/fjtest-file-lnk\r"
18after 200 18after 200
19send -- "rm /tmp/fjtest-file\r" 19
20after 200
21send -- "rm -fr /tmp/fjtest-dir\r"
22after 200
23 20
24 21
25# simple files and directories 22# simple files and directories
@@ -39,7 +36,7 @@ after 200
39send -- "firejail --whitelist=~/fjtest-file --whitelist=~/fjtest-dir --debug\r" 36send -- "firejail --whitelist=~/fjtest-file --whitelist=~/fjtest-dir --debug\r"
40expect { 37expect {
41 timeout {puts "TESTING ERROR 0\n";exit} 38 timeout {puts "TESTING ERROR 0\n";exit}
42 "Child process initialized" 39 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
43} 40}
44sleep 1 41sleep 1
45 42
@@ -76,7 +73,7 @@ sleep 1
76send -- "firejail --whitelist=~/fjtest-dir/fjtest-dir/fjtest-file\r" 73send -- "firejail --whitelist=~/fjtest-dir/fjtest-dir/fjtest-file\r"
77expect { 74expect {
78 timeout {puts "TESTING ERROR 10\n";exit} 75 timeout {puts "TESTING ERROR 10\n";exit}
79 "Child process initialized" 76 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
80} 77}
81sleep 1 78sleep 1
82 79
@@ -101,7 +98,7 @@ sleep 1
101send -- "firejail --whitelist=~/fjtest-file-lnk --whitelist=~/fjtest-dir-lnk\r" 98send -- "firejail --whitelist=~/fjtest-file-lnk --whitelist=~/fjtest-dir-lnk\r"
102expect { 99expect {
103 timeout {puts "TESTING ERROR 20\n";exit} 100 timeout {puts "TESTING ERROR 20\n";exit}
104 "Child process initialized" 101 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
105} 102}
106sleep 1 103sleep 1
107 104
@@ -149,63 +146,7 @@ expect {
149send -- "exit\r" 146send -- "exit\r"
150sleep 1 147sleep 1
151 148
152# symlinks outside home to a file we don't own
153send -- "rm ~/fjtest-file-lnk\r"
154after 200
155send -- "ln -s /etc/passwd ~/fjtest-file-lnk\r"
156after 200
157send -- "firejail --whitelist=~/fjtest-file-lnk --whitelist=~/fjtest-dir-lnk\r"
158expect {
159 timeout {puts "TESTING ERROR 30\n";exit}
160 "invalid whitelist path"
161}
162expect {
163 timeout {puts "TESTING ERROR 31\n";exit}
164 "cannot sync with peer"
165}
166sleep 1
167 149
168# symlinks outside home to a file we own
169send -- "rm -fr ~/fjtest-dir-lnk\r"
170after 200
171send -- "rm ~/fjtest-file-lnk\r"
172after 200
173send -- "echo 123 > /tmp/fjtest-file\r"
174after 200
175send -- "mkdir /tmp/fjtest-dir\r"
176after 200
177send -- "echo 123 > /tmp/fjtest-dir/fjtest-file\r"
178after 200
179send -- "ln -s /tmp/fjtest-file ~/fjtest-file-lnk\r"
180after 200
181send -- "ln -s /tmp/fjtest-dir ~/fjtest-dir-lnk\r"
182after 200
183send -- "firejail --whitelist=~/fjtest-file-lnk --whitelist=~/fjtest-dir-lnk\r"
184expect {
185 timeout {puts "TESTING ERROR 40\n";exit}
186 "Child process initialized"
187}
188sleep 1
189
190send -- "ls -l ~/ | grep -v total | wc -l\r"
191expect {
192 timeout {puts "TESTING ERROR 41\n";exit}
193 "2"
194}
195
196send -- "cat ~/fjtest-file-lnk\r"
197expect {
198 timeout {puts "TESTING ERROR 42\n";exit}
199 "123"
200}
201
202send -- "cat ~/fjtest-dir-lnk/fjtest-file\r"
203expect {
204 timeout {puts "TESTING ERROR 43\n";exit}
205 "123"
206}
207send -- "exit\r"
208sleep 1
209 150
210# cleanup 151# cleanup
211send -- "rm -fr ~/fjtest-dir\r" 152send -- "rm -fr ~/fjtest-dir\r"
@@ -216,10 +157,5 @@ send -- "rm ~/fjtest-file\r"
216after 200 157after 200
217send -- "rm ~/fjtest-file-lnk\r" 158send -- "rm ~/fjtest-file-lnk\r"
218after 200 159after 200
219send -- "rm /tmp/fjtest-file\r"
220after 200
221send -- "rm -fr /tmp/fjtest-dir\r"
222after 200
223
224 160
225puts "\nall done\n" 161puts "\nall done\n"
diff --git a/test/network/4bridges_arp.exp b/test/network/4bridges_arp.exp
index d608128f8..b7138851a 100755
--- a/test/network/4bridges_arp.exp
+++ b/test/network/4bridges_arp.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -27,7 +27,7 @@ expect {
27} 27}
28expect { 28expect {
29 timeout {puts "TESTING ERROR 0.4\n";exit} 29 timeout {puts "TESTING ERROR 0.4\n";exit}
30 "Child process initialized" 30 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
31} 31}
32sleep 1 32sleep 1
33send -- "exit\r" 33send -- "exit\r"
@@ -53,7 +53,7 @@ expect {
53} 53}
54expect { 54expect {
55 timeout {puts "TESTING ERROR 1.4\n";exit} 55 timeout {puts "TESTING ERROR 1.4\n";exit}
56 "Child process initialized" 56 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
57} 57}
58sleep 1 58sleep 1
59send -- "exit\r" 59send -- "exit\r"
@@ -80,7 +80,7 @@ expect {
80} 80}
81expect { 81expect {
82 timeout {puts "TESTING ERROR 2.4\n";exit} 82 timeout {puts "TESTING ERROR 2.4\n";exit}
83 "Child process initialized" 83 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
84} 84}
85sleep 1 85sleep 1
86send -- "exit\r" 86send -- "exit\r"
@@ -108,7 +108,7 @@ expect {
108} 108}
109expect { 109expect {
110 timeout {puts "TESTING ERROR 4\n";exit} 110 timeout {puts "TESTING ERROR 4\n";exit}
111 "Child process initialized" 111 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
112} 112}
113sleep 1 113sleep 1
114send -- "exit\r" 114send -- "exit\r"
@@ -137,7 +137,7 @@ expect {
137} 137}
138expect { 138expect {
139 timeout {puts "TESTING ERROR 9\n";exit} 139 timeout {puts "TESTING ERROR 9\n";exit}
140 "Child process initialized" 140 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
141} 141}
142sleep 1 142sleep 1
143 143
diff --git a/test/network/4bridges_ip.exp b/test/network/4bridges_ip.exp
index 586dfcba9..60e9d3bab 100755
--- a/test/network/4bridges_ip.exp
+++ b/test/network/4bridges_ip.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -27,7 +27,7 @@ expect {
27} 27}
28expect { 28expect {
29 timeout {puts "TESTING ERROR 0.4\n";exit} 29 timeout {puts "TESTING ERROR 0.4\n";exit}
30 "Child process initialized" 30 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
31} 31}
32sleep 1 32sleep 1
33send -- "exit\r" 33send -- "exit\r"
@@ -53,7 +53,7 @@ expect {
53} 53}
54expect { 54expect {
55 timeout {puts "TESTING ERROR 1.4\n";exit} 55 timeout {puts "TESTING ERROR 1.4\n";exit}
56 "Child process initialized" 56 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
57} 57}
58sleep 1 58sleep 1
59send -- "exit\r" 59send -- "exit\r"
@@ -80,7 +80,7 @@ expect {
80} 80}
81expect { 81expect {
82 timeout {puts "TESTING ERROR 2.4\n";exit} 82 timeout {puts "TESTING ERROR 2.4\n";exit}
83 "Child process initialized" 83 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
84} 84}
85sleep 1 85sleep 1
86send -- "exit\r" 86send -- "exit\r"
@@ -108,7 +108,7 @@ expect {
108} 108}
109expect { 109expect {
110 timeout {puts "TESTING ERROR 4\n";exit} 110 timeout {puts "TESTING ERROR 4\n";exit}
111 "Child process initialized" 111 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
112} 112}
113sleep 1 113sleep 1
114send -- "exit\r" 114send -- "exit\r"
@@ -137,7 +137,7 @@ expect {
137} 137}
138expect { 138expect {
139 timeout {puts "TESTING ERROR 9\n";exit} 139 timeout {puts "TESTING ERROR 9\n";exit}
140 "Child process initialized" 140 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
141} 141}
142 142
143# check default gateway 143# check default gateway
diff --git a/test/network/bandwidth.exp b/test/network/bandwidth.exp
index d73669ebe..1a27bc0bf 100755
--- a/test/network/bandwidth.exp
+++ b/test/network/bandwidth.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=test --net=br0\r" 10send -- "firejail --name=test --net=br0\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
diff --git a/test/network/configure b/test/network/configure
index f75e9b23f..2b7b257bc 100755
--- a/test/network/configure
+++ b/test/network/configure
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6brctl addbr br0 6brctl addbr br0
diff --git a/test/network/dns-print.exp b/test/network/dns-print.exp
index 5ee4c0d19..fd19b79ed 100755
--- a/test/network/dns-print.exp
+++ b/test/network/dns-print.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=test-dns --net=eth0 --dns=1.2.3.4 --dns=2.3.4.5 --dns=3.4.5.6\r" 10send -- "firejail --name=test-dns --net=eth0 --dns=1.2.3.4 --dns=2.3.4.5 --dns=3.4.5.6\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
diff --git a/test/network/firemon-arp.exp b/test/network/firemon-arp.exp
index 8e0a0b1b0..0e98b9f36 100755
--- a/test/network/firemon-arp.exp
+++ b/test/network/firemon-arp.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -17,7 +17,7 @@ match_max 100000
17send -- "firejail --name=test1\r" 17send -- "firejail --name=test1\r"
18expect { 18expect {
19 timeout {puts "TESTING ERROR 1\n";exit} 19 timeout {puts "TESTING ERROR 1\n";exit}
20 "Child process initialized" 20 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
21} 21}
22sleep 1 22sleep 1
23 23
@@ -25,7 +25,7 @@ spawn $env(SHELL)
25send -- "firejail --name=test2\r" 25send -- "firejail --name=test2\r"
26expect { 26expect {
27 timeout {puts "TESTING ERROR 2\n";exit} 27 timeout {puts "TESTING ERROR 2\n";exit}
28 "Child process initialized" 28 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
29} 29}
30sleep 1 30sleep 1
31 31
diff --git a/test/network/firemon-interfaces.exp b/test/network/firemon-interfaces.exp
index 494496a26..8eb9f4d87 100755
--- a/test/network/firemon-interfaces.exp
+++ b/test/network/firemon-interfaces.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --net=eth0 --name=test1\r" 10send -- "firejail --net=eth0 --name=test1\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 9\n";exit} 12 timeout {puts "TESTING ERROR 9\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
@@ -18,7 +18,7 @@ spawn $env(SHELL)
18send -- "firejail --net=eth0 --name=test2\r" 18send -- "firejail --net=eth0 --name=test2\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 9\n";exit} 20 timeout {puts "TESTING ERROR 9\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
diff --git a/test/network/firemon-route.exp b/test/network/firemon-route.exp
index a1ded08c1..4eea5c14c 100755
--- a/test/network/firemon-route.exp
+++ b/test/network/firemon-route.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=test1\r" 10send -- "firejail --name=test1\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
@@ -18,7 +18,7 @@ spawn $env(SHELL)
18send -- "firejail --name=test2\r" 18send -- "firejail --name=test2\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 1\n";exit} 20 timeout {puts "TESTING ERROR 1\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
diff --git a/test/network/hostname.exp b/test/network/hostname.exp
index 825f1f6cf..12266a170 100755
--- a/test/network/hostname.exp
+++ b/test/network/hostname.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --hostname=bingo --noprofile\r" 10send -- "firejail --hostname=bingo --noprofile\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16send -- "stty -echo\r" 16send -- "stty -echo\r"
diff --git a/test/network/interface.exp b/test/network/interface.exp
index 78178e233..7c3e39fea 100755
--- a/test/network/interface.exp
+++ b/test/network/interface.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5# 5#
6# interface 6# interface
@@ -20,7 +20,7 @@ set chroot [lindex $argv 1]
20send -- "firejail --noprofile --interface=eth0.5 --interface=eth0.6\r" 20send -- "firejail --noprofile --interface=eth0.5 --interface=eth0.6\r"
21expect { 21expect {
22 timeout {puts "TESTING ERROR 0\n";exit} 22 timeout {puts "TESTING ERROR 0\n";exit}
23 "Child process initialized" 23 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
24} 24}
25sleep 1 25sleep 1
26 26
diff --git a/test/network/ip6.exp b/test/network/ip6.exp
index ed29964c6..665081db7 100755
--- a/test/network/ip6.exp
+++ b/test/network/ip6.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -23,7 +23,7 @@ expect {
23} 23}
24expect { 24expect {
25 timeout {puts "TESTING ERROR 3\n";exit} 25 timeout {puts "TESTING ERROR 3\n";exit}
26 "Child process initialized" 26 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
27} 27}
28sleep 2 28sleep 2
29 29
@@ -64,7 +64,7 @@ expect {
64} 64}
65expect { 65expect {
66 timeout {puts "TESTING ERROR 13\n";exit} 66 timeout {puts "TESTING ERROR 13\n";exit}
67 "Child process initialized" 67 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
68} 68}
69sleep 2 69sleep 2
70 70
@@ -90,7 +90,7 @@ send -- "firejail --debug --netfilter6=ipv6.net\r"
90expect { 90expect {
91 timeout {puts "TESTING ERROR 11\n";exit} 91 timeout {puts "TESTING ERROR 11\n";exit}
92 "Installing IPv6 firewall" {puts "TESTING ERROR 12\n";exit} 92 "Installing IPv6 firewall" {puts "TESTING ERROR 12\n";exit}
93 "Child process initialized" 93 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
94} 94}
95after 100 95after 100
96send -- "exit\r" 96send -- "exit\r"
diff --git a/test/network/iprange.exp b/test/network/iprange.exp
index 2690a128a..d45ecaa40 100755
--- a/test/network/iprange.exp
+++ b/test/network/iprange.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -27,7 +27,7 @@ expect {
27} 27}
28expect { 28expect {
29 timeout {puts "TESTING ERROR 3\n";exit} 29 timeout {puts "TESTING ERROR 3\n";exit}
30 "Child process initialized" 30 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
31} 31}
32after 100 32after 100
33send -- "exit\r" 33send -- "exit\r"
@@ -53,7 +53,7 @@ expect {
53} 53}
54expect { 54expect {
55 timeout {puts "TESTING ERROR 8\n";exit} 55 timeout {puts "TESTING ERROR 8\n";exit}
56 "Child process initialized" 56 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
57} 57}
58after 100 58after 100
59send -- "exit\r" 59send -- "exit\r"
diff --git a/test/network/net_arp.exp b/test/network/net_arp.exp
index 84912cddd..dee4ac1c1 100755
--- a/test/network/net_arp.exp
+++ b/test/network/net_arp.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,27 +10,27 @@ match_max 100000
10send -- "firejail --net=br0 sleep 20 &\r" 10send -- "firejail --net=br0 sleep 20 &\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15send -- "firejail --net=br0 sleep 20 &\r" 15send -- "firejail --net=br0 sleep 20 &\r"
16expect { 16expect {
17 timeout {puts "TESTING ERROR 1\n";exit} 17 timeout {puts "TESTING ERROR 1\n";exit}
18 "Child process initialized" 18 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
19} 19}
20send -- "firejail --net=br0 sleep 20 &\r" 20send -- "firejail --net=br0 sleep 20 &\r"
21expect { 21expect {
22 timeout {puts "TESTING ERROR 2\n";exit} 22 timeout {puts "TESTING ERROR 2\n";exit}
23 "Child process initialized" 23 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
24} 24}
25send -- "firejail --net=br0 sleep 20 &\r" 25send -- "firejail --net=br0 sleep 20 &\r"
26expect { 26expect {
27 timeout {puts "TESTING ERROR 3\n";exit} 27 timeout {puts "TESTING ERROR 3\n";exit}
28 "Child process initialized" 28 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
29} 29}
30send -- "firejail --net=br0 sleep 20 &\r" 30send -- "firejail --net=br0 sleep 20 &\r"
31expect { 31expect {
32 timeout {puts "TESTING ERROR 4\n";exit} 32 timeout {puts "TESTING ERROR 4\n";exit}
33 "Child process initialized" 33 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
34} 34}
35 35
36# will fail 36# will fail
diff --git a/test/network/net_badip.exp b/test/network/net_badip.exp
index b09f4d192..b3fde5dc1 100755
--- a/test/network/net_badip.exp
+++ b/test/network/net_badip.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/network/net_defaultgw.exp b/test/network/net_defaultgw.exp
index 19dd94dbd..6a5a0b64e 100755
--- a/test/network/net_defaultgw.exp
+++ b/test/network/net_defaultgw.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -27,7 +27,7 @@ expect {
27} 27}
28expect { 28expect {
29 timeout {puts "TESTING ERROR 4\n";exit} 29 timeout {puts "TESTING ERROR 4\n";exit}
30 "Child process initialized" 30 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
31} 31}
32sleep 1 32sleep 1
33 33
diff --git a/test/network/net_defaultgw2.exp b/test/network/net_defaultgw2.exp
index 4f5864822..5d18571b6 100755
--- a/test/network/net_defaultgw2.exp
+++ b/test/network/net_defaultgw2.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -15,7 +15,7 @@ expect {
15} 15}
16expect { 16expect {
17 timeout {puts "TESTING ERROR 4\n";exit} 17 timeout {puts "TESTING ERROR 4\n";exit}
18 "Child process initialized" 18 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
19} 19}
20sleep 1 20sleep 1
21 21
diff --git a/test/network/net_defaultgw3.exp b/test/network/net_defaultgw3.exp
index dc3589c3c..708c37a47 100755
--- a/test/network/net_defaultgw3.exp
+++ b/test/network/net_defaultgw3.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/network/net_ip.exp b/test/network/net_ip.exp
index 098eed758..bdac67155 100755
--- a/test/network/net_ip.exp
+++ b/test/network/net_ip.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -27,7 +27,7 @@ expect {
27} 27}
28expect { 28expect {
29 timeout {puts "TESTING ERROR 4\n";exit} 29 timeout {puts "TESTING ERROR 4\n";exit}
30 "Child process initialized" 30 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
31} 31}
32sleep 1 32sleep 1
33send -- "exit\r" 33send -- "exit\r"
@@ -53,7 +53,7 @@ expect {
53} 53}
54expect { 54expect {
55 timeout {puts "TESTING ERROR 9\n";exit} 55 timeout {puts "TESTING ERROR 9\n";exit}
56 "Child process initialized" 56 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
57} 57}
58sleep 1 58sleep 1
59 59
diff --git a/test/network/net_local.exp b/test/network/net_local.exp
index d5d4170e8..6d02de089 100755
--- a/test/network/net_local.exp
+++ b/test/network/net_local.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -15,7 +15,7 @@ expect {
15} 15}
16expect { 16expect {
17 timeout {puts "TESTING ERROR 4\n";exit} 17 timeout {puts "TESTING ERROR 4\n";exit}
18 "Child process initialized" 18 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
19} 19}
20sleep 1 20sleep 1
21send -- "exit\r" 21send -- "exit\r"
@@ -25,7 +25,7 @@ sleep 1
25send -- "firejail --noprofile\r" 25send -- "firejail --noprofile\r"
26expect { 26expect {
27 timeout {puts "TESTING ERROR 9\n";exit} 27 timeout {puts "TESTING ERROR 9\n";exit}
28 "Child process initialized" 28 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
29} 29}
30sleep 1 30sleep 1
31 31
diff --git a/test/network/net_mac.exp b/test/network/net_mac.exp
index e067f604f..3bd871a06 100755
--- a/test/network/net_mac.exp
+++ b/test/network/net_mac.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -31,7 +31,7 @@ expect {
31} 31}
32expect { 32expect {
33 timeout {puts "TESTING ERROR 4\n";exit} 33 timeout {puts "TESTING ERROR 4\n";exit}
34 "Child process initialized" 34 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
35} 35}
36send -- "exit\r" 36send -- "exit\r"
37after 100 37after 100
diff --git a/test/network/net_macvlan2.exp b/test/network/net_macvlan2.exp
index 1f67f059e..abc6641bf 100755
--- a/test/network/net_macvlan2.exp
+++ b/test/network/net_macvlan2.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -30,7 +30,7 @@ expect {
30} 30}
31expect { 31expect {
32 timeout {puts "TESTING ERROR 0.6\n";exit} 32 timeout {puts "TESTING ERROR 0.6\n";exit}
33 "Child process initialized" 33 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
34} 34}
35after 100 35after 100
36send -- "exit\r" 36send -- "exit\r"
diff --git a/test/network/net_mtu.exp b/test/network/net_mtu.exp
index 439e05334..81c89e147 100755
--- a/test/network/net_mtu.exp
+++ b/test/network/net_mtu.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --net=br0 --mtu=1000 --noprofile\r" 11send -- "firejail --net=br0 --mtu=1000 --noprofile\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 1\n";exit} 13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 1 16sleep 1
17 17
diff --git a/test/network/net_netfilter.exp b/test/network/net_netfilter.exp
index 8a949c22b..eef4a145f 100755
--- a/test/network/net_netfilter.exp
+++ b/test/network/net_netfilter.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -27,7 +27,7 @@ expect {
27} 27}
28expect { 28expect {
29 timeout {puts "TESTING ERROR 4\n";exit} 29 timeout {puts "TESTING ERROR 4\n";exit}
30 "Child process initialized" 30 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
31} 31}
32sleep 1 32sleep 1
33send -- "exit\r" 33send -- "exit\r"
@@ -41,7 +41,7 @@ expect {
41 "Chain INPUT (policy DROP" {puts "TESTING ERROR 5.1\n";exit} 41 "Chain INPUT (policy DROP" {puts "TESTING ERROR 5.1\n";exit}
42 "ACCEPT all -- any any anywhere" {puts "TESTING ERROR 5.1\n";exit} 42 "ACCEPT all -- any any anywhere" {puts "TESTING ERROR 5.1\n";exit}
43 "ACCEPT icmp -- any any anywhere" {puts "TESTING ERROR 5.1\n";exit} 43 "ACCEPT icmp -- any any anywhere" {puts "TESTING ERROR 5.1\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 1 46sleep 1
47send -- "exit\r" 47send -- "exit\r"
@@ -55,7 +55,7 @@ expect {
55} 55}
56expect { 56expect {
57 timeout {puts "TESTING ERROR 6.1\n";exit} 57 timeout {puts "TESTING ERROR 6.1\n";exit}
58 "Child process initialized" 58 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
59} 59}
60sleep 1 60sleep 1
61send -- "ping -c 1 -w 3 10.10.20.1\r" 61send -- "ping -c 1 -w 3 10.10.20.1\r"
@@ -75,7 +75,7 @@ expect {
75} 75}
76expect { 76expect {
77 timeout {puts "TESTING ERROR 7.1\n";exit} 77 timeout {puts "TESTING ERROR 7.1\n";exit}
78 "Child process initialized" 78 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
79} 79}
80sleep 2 80sleep 2
81send -- "ping -c 1 -w 3 10.10.20.1\r" 81send -- "ping -c 1 -w 3 10.10.20.1\r"
diff --git a/test/network/net_noip.exp b/test/network/net_noip.exp
index 53b719f6c..11d12c3d3 100755
--- a/test/network/net_noip.exp
+++ b/test/network/net_noip.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -12,7 +12,7 @@ send -- "firejail --noprofile --net=br0 --ip=none\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "eth0" {puts "TESTING ERROR 1\n";exit} 14 "eth0" {puts "TESTING ERROR 1\n";exit}
15 "Child process initialized" 15 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
16} 16}
17sleep 1 17sleep 1
18send -- "bash\r" 18send -- "bash\r"
diff --git a/test/network/net_noip2.exp b/test/network/net_noip2.exp
index aa74d6ba8..09607d4b5 100755
--- a/test/network/net_noip2.exp
+++ b/test/network/net_noip2.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -12,7 +12,7 @@ send -- "firejail --noprofile --net=br1 --ip=none --defaultgw=10.10.30.78\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "eth0" {puts "TESTING ERROR 1\n";exit} 14 "eth0" {puts "TESTING ERROR 1\n";exit}
15 "Child process initialized" 15 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
16} 16}
17sleep 1 17sleep 1
18send -- "bash\r" 18send -- "bash\r"
diff --git a/test/network/net_none.exp b/test/network/net_none.exp
index c8787c342..32d7532ce 100755
--- a/test/network/net_none.exp
+++ b/test/network/net_none.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -12,7 +12,7 @@ send -- "firejail --net=none\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "eth0" {puts "TESTING ERROR 0.1\n";exit} 14 "eth0" {puts "TESTING ERROR 0.1\n";exit}
15 "Child process initialized" 15 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
16} 16}
17sleep 1 17sleep 1
18 18
@@ -47,7 +47,7 @@ send -- "firejail --profile=net_none.profile\r"
47expect { 47expect {
48 timeout {puts "TESTING ERROR 3\n";exit} 48 timeout {puts "TESTING ERROR 3\n";exit}
49 "eth0" {puts "TESTING ERROR 3.1\n";exit} 49 "eth0" {puts "TESTING ERROR 3.1\n";exit}
50 "Child process initialized" 50 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
51} 51}
52sleep 1 52sleep 1
53 53
diff --git a/test/network/net_profile.exp b/test/network/net_profile.exp
index e7c6530df..3d6f8fdbb 100755
--- a/test/network/net_profile.exp
+++ b/test/network/net_profile.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -31,7 +31,7 @@ expect {
31} 31}
32expect { 32expect {
33 timeout {puts "TESTING ERROR 0.4\n";exit} 33 timeout {puts "TESTING ERROR 0.4\n";exit}
34 "Child process initialized" 34 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
35} 35}
36sleep 1 36sleep 1
37 37
diff --git a/test/network/net_scan.exp b/test/network/net_scan.exp
index b9260925a..42dd74df0 100755
--- a/test/network/net_scan.exp
+++ b/test/network/net_scan.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -23,7 +23,7 @@ expect {
23} 23}
24expect { 24expect {
25 timeout {puts "TESTING ERROR 3\n";exit} 25 timeout {puts "TESTING ERROR 3\n";exit}
26 "Child process initialized" 26 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
27} 27}
28sleep 1 28sleep 1
29 29
@@ -43,7 +43,7 @@ expect {
43} 43}
44expect { 44expect {
45 timeout {puts "TESTING ERROR 7\n";exit} 45 timeout {puts "TESTING ERROR 7\n";exit}
46 "Child process initialized" 46 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
47} 47}
48sleep 1 48sleep 1
49 49
@@ -63,7 +63,7 @@ expect {
63} 63}
64expect { 64expect {
65 timeout {puts "TESTING ERROR 11\n";exit} 65 timeout {puts "TESTING ERROR 11\n";exit}
66 "Child process initialized" 66 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
67} 67}
68sleep 1 68sleep 1
69 69
diff --git a/test/network/net_unconfigured.exp b/test/network/net_unconfigured.exp
index d2b60d73c..92d7a33eb 100755
--- a/test/network/net_unconfigured.exp
+++ b/test/network/net_unconfigured.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -12,7 +12,7 @@ send -- "firejail --noprofile --net=br-unconfigured --ip=none\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "eth0" {puts "TESTING ERROR 1\n";exit} 14 "eth0" {puts "TESTING ERROR 1\n";exit}
15 "Child process initialized" 15 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
16} 16}
17sleep 1 17sleep 1
18send -- "bash\r" 18send -- "bash\r"
@@ -53,7 +53,7 @@ send -- "firejail --noprofile --net=br-unconfigured\r"
53expect { 53expect {
54 timeout {puts "TESTING ERROR 7\n";exit} 54 timeout {puts "TESTING ERROR 7\n";exit}
55 "eth0" {puts "TESTING ERROR 8\n";exit} 55 "eth0" {puts "TESTING ERROR 8\n";exit}
56 "Child process initialized" 56 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
57} 57}
58sleep 1 58sleep 1
59send -- "bash\r" 59send -- "bash\r"
@@ -93,7 +93,7 @@ send -- "firejail --noprofile --net=br-unconfigured --defaultgw=10.10.80.1\r"
93expect { 93expect {
94 timeout {puts "TESTING ERROR 14\n";exit} 94 timeout {puts "TESTING ERROR 14\n";exit}
95 "eth0" {puts "TESTING ERROR 15\n";exit} 95 "eth0" {puts "TESTING ERROR 15\n";exit}
96 "Child process initialized" 96 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
97} 97}
98sleep 1 98sleep 1
99send -- "bash\r" 99send -- "bash\r"
@@ -133,7 +133,7 @@ send -- "firejail --noprofile --net=br-unconfigured --ip=10.10.80.1 --defaultgw=
133expect { 133expect {
134 timeout {puts "TESTING ERROR 21\n";exit} 134 timeout {puts "TESTING ERROR 21\n";exit}
135 "eth0" {puts "TESTING ERROR 22\n";exit} 135 "eth0" {puts "TESTING ERROR 22\n";exit}
136 "Child process initialized" 136 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
137} 137}
138sleep 1 138sleep 1
139send -- "bash\r" 139send -- "bash\r"
@@ -180,7 +180,7 @@ expect {
180} 180}
181expect { 181expect {
182 timeout {puts "TESTING ERROR 30\n";exit} 182 timeout {puts "TESTING ERROR 30\n";exit}
183 "Child process initialized" 183 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
184} 184}
185sleep 1 185sleep 1
186send -- "bash\r" 186send -- "bash\r"
diff --git a/test/network/net_veth.exp b/test/network/net_veth.exp
index cd4e64e24..781cc194c 100755
--- a/test/network/net_veth.exp
+++ b/test/network/net_veth.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -42,7 +42,7 @@ expect {
42} 42}
43expect { 43expect {
44 timeout {puts "TESTING ERROR 9\n";exit} 44 timeout {puts "TESTING ERROR 9\n";exit}
45 "Child process initialized" 45 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
46} 46}
47sleep 1 47sleep 1
48send -- "exit\r" 48send -- "exit\r"
@@ -119,7 +119,7 @@ expect {
119} 119}
120expect { 120expect {
121 timeout {puts "TESTING ERROR 27\n";exit} 121 timeout {puts "TESTING ERROR 27\n";exit}
122 "Child process initialized" 122 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
123} 123}
124sleep 1 124sleep 1
125send -- "exit\r" 125send -- "exit\r"
diff --git a/test/network/netfilter-template.exp b/test/network/netfilter-template.exp
index dadea1430..ba09aaea7 100755
--- a/test/network/netfilter-template.exp
+++ b/test/network/netfilter-template.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -18,7 +18,7 @@ sleep 1
18send -- "firejail --net=br1 --ip=10.10.30.10 --name=test1 --netfilter=/etc/firejail/tcpserver.net,5555 ./tcpserver 5555\r" 18send -- "firejail --net=br1 --ip=10.10.30.10 --name=test1 --netfilter=/etc/firejail/tcpserver.net,5555 ./tcpserver 5555\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 1\n";exit} 20 timeout {puts "TESTING ERROR 1\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
diff --git a/test/network/netns.exp b/test/network/netns.exp
index 9ef4ed554..034f4736e 100755
--- a/test/network/netns.exp
+++ b/test/network/netns.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --netns=red --noprofile\r" 10send -- "firejail --netns=red --noprofile\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15after 100 15after 100
16 16
diff --git a/test/network/netstats.exp b/test/network/netstats.exp
index e15e2f42d..e06e6769d 100755
--- a/test/network/netstats.exp
+++ b/test/network/netstats.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --net=eth0 --name=test1\r" 10send -- "firejail --net=eth0 --name=test1\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 9\n";exit} 12 timeout {puts "TESTING ERROR 9\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
@@ -18,7 +18,7 @@ spawn $env(SHELL)
18send -- "firejail --net=eth0 --name=test2\r" 18send -- "firejail --net=eth0 --name=test2\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 9\n";exit} 20 timeout {puts "TESTING ERROR 9\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
diff --git a/test/network/network.sh b/test/network/network.sh
index 9f2b9e1cd..1f676ff50 100755
--- a/test/network/network.sh
+++ b/test/network/network.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
diff --git a/test/network/tcpserver.c b/test/network/tcpserver.c
index 72730b674..d2c0a6e5d 100644
--- a/test/network/tcpserver.c
+++ b/test/network/tcpserver.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2014-2021 Firejail Authors 2 * Copyright (C) 2014-2022 Firejail Authors
3 * 3 *
4 * This file is part of firejail project 4 * This file is part of firejail project
5 * 5 *
diff --git a/test/network/veth-name.exp b/test/network/veth-name.exp
index 1790381e3..1c9f23c54 100755
--- a/test/network/veth-name.exp
+++ b/test/network/veth-name.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -23,7 +23,7 @@ expect {
23} 23}
24expect { 24expect {
25 timeout {puts "TESTING ERROR 3\n";exit} 25 timeout {puts "TESTING ERROR 3\n";exit}
26 "Child process initialized" 26 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
27} 27}
28sleep 1 28sleep 1
29 29
@@ -55,7 +55,7 @@ expect {
55} 55}
56expect { 56expect {
57 timeout {puts "TESTING ERROR 9\n";exit} 57 timeout {puts "TESTING ERROR 9\n";exit}
58 "Child process initialized" 58 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
59} 59}
60sleep 1 60sleep 1
61 61
diff --git a/test/overlay/firefox-x11-xorg.exp b/test/overlay/firefox-x11-xorg.exp
index ecb9288b0..691e58437 100755
--- a/test/overlay/firefox-x11-xorg.exp
+++ b/test/overlay/firefox-x11-xorg.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -36,7 +36,7 @@ expect {
36send -- "firejail --overlay --name=blablabla\r" 36send -- "firejail --overlay --name=blablabla\r"
37expect { 37expect {
38 timeout {puts "TESTING ERROR 4\n";exit} 38 timeout {puts "TESTING ERROR 4\n";exit}
39 "Child process initialized" 39 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
40} 40}
41sleep 2 41sleep 2
42 42
diff --git a/test/overlay/firefox-x11.exp b/test/overlay/firefox-x11.exp
index 5b7b1bec3..96c6796bb 100755
--- a/test/overlay/firefox-x11.exp
+++ b/test/overlay/firefox-x11.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -36,7 +36,7 @@ expect {
36send -- "firejail --name=blablabla --overlay\r" 36send -- "firejail --name=blablabla --overlay\r"
37expect { 37expect {
38 timeout {puts "TESTING ERROR 4\n";exit} 38 timeout {puts "TESTING ERROR 4\n";exit}
39 "Child process initialized" 39 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
40} 40}
41sleep 2 41sleep 2
42 42
diff --git a/test/overlay/firefox.exp b/test/overlay/firefox.exp
index 25c6e5e07..eb7276f99 100755
--- a/test/overlay/firefox.exp
+++ b/test/overlay/firefox.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 10 19sleep 10
20 20
@@ -47,7 +47,7 @@ expect {
47send -- "firejail --name=blablabla --overlay\r" 47send -- "firejail --name=blablabla --overlay\r"
48expect { 48expect {
49 timeout {puts "TESTING ERROR 4\n";exit} 49 timeout {puts "TESTING ERROR 4\n";exit}
50 "Child process initialized" 50 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
51} 51}
52sleep 2 52sleep 2
53 53
diff --git a/test/overlay/fs-named.exp b/test/overlay/fs-named.exp
index df1dfc244..25762337b 100755
--- a/test/overlay/fs-named.exp
+++ b/test/overlay/fs-named.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -12,7 +12,7 @@ expect {
12 timeout {puts "TESTING ERROR 2\n";exit} 12 timeout {puts "TESTING ERROR 2\n";exit}
13 "not available for kernels older than 3.18" {puts "\nTESTING: overlayfs not available\n"; exit} 13 "not available for kernels older than 3.18" {puts "\nTESTING: overlayfs not available\n"; exit}
14 "Error: --overlay option is not available on Grsecurity systems" {puts "\nTESTING: overlayfs not available\n"; exit} 14 "Error: --overlay option is not available on Grsecurity systems" {puts "\nTESTING: overlayfs not available\n"; exit}
15 "Child process initialized" {puts "found\n"} 15 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "found\n"}
16} 16}
17sleep 1 17sleep 1
18send -- "stty -echo\r" 18send -- "stty -echo\r"
@@ -52,7 +52,7 @@ expect {
52 timeout {puts "TESTING ERROR 2\n";exit} 52 timeout {puts "TESTING ERROR 2\n";exit}
53 "not available for kernels older than 3.18" {puts "\nTESTING: overlayfs not available\n"; exit} 53 "not available for kernels older than 3.18" {puts "\nTESTING: overlayfs not available\n"; exit}
54 "Error: --overlay option is not available on Grsecurity systems" {puts "\nTESTING: overlayfs not available\n"; exit} 54 "Error: --overlay option is not available on Grsecurity systems" {puts "\nTESTING: overlayfs not available\n"; exit}
55 "Child process initialized" {puts "found\n"} 55 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "found\n"}
56} 56}
57sleep 1 57sleep 1
58 58
diff --git a/test/overlay/fs-tmpfs.exp b/test/overlay/fs-tmpfs.exp
index 5bd2b25fc..442a0fffa 100755
--- a/test/overlay/fs-tmpfs.exp
+++ b/test/overlay/fs-tmpfs.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -21,7 +21,7 @@ expect {
21 timeout {puts "TESTING ERROR 1\n";exit} 21 timeout {puts "TESTING ERROR 1\n";exit}
22 "not available for kernels older than 3.18" {puts "\nTESTING: overlayfs not available\n"; exit} 22 "not available for kernels older than 3.18" {puts "\nTESTING: overlayfs not available\n"; exit}
23 "Error: --overlay option is not available on Grsecurity systems" {puts "\nTESTING: overlayfs not available\n"; exit} 23 "Error: --overlay option is not available on Grsecurity systems" {puts "\nTESTING: overlayfs not available\n"; exit}
24 "Child process initialized" {puts "found\n"} 24 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "found\n"}
25} 25}
26sleep 1 26sleep 1
27send -- "stty -echo\r" 27send -- "stty -echo\r"
diff --git a/test/overlay/fs.exp b/test/overlay/fs.exp
index 3314e849d..21de942ec 100755
--- a/test/overlay/fs.exp
+++ b/test/overlay/fs.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -12,7 +12,7 @@ expect {
12 timeout {puts "TESTING ERROR 2\n";exit} 12 timeout {puts "TESTING ERROR 2\n";exit}
13 "not available for kernels older than 3.18" {puts "\nTESTING: overlayfs not available\n"; exit} 13 "not available for kernels older than 3.18" {puts "\nTESTING: overlayfs not available\n"; exit}
14 "Error: --overlay option is not available on Grsecurity systems" {puts "\nTESTING: overlayfs not available\n"; exit} 14 "Error: --overlay option is not available on Grsecurity systems" {puts "\nTESTING: overlayfs not available\n"; exit}
15 "Child process initialized" {puts "found\n"} 15 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "found\n"}
16} 16}
17sleep 1 17sleep 1
18 18
diff --git a/test/overlay/overlay.sh b/test/overlay/overlay.sh
index f1daba935..490b180e1 100755
--- a/test/overlay/overlay.sh
+++ b/test/overlay/overlay.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
diff --git a/test/private-lib/atril.exp b/test/private-lib/atril.exp
index 679799f02..cad118c0a 100755
--- a/test/private-lib/atril.exp
+++ b/test/private-lib/atril.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/private-lib/dig.exp b/test/private-lib/dig.exp
index 39f3f6d49..fd40cd48c 100755
--- a/test/private-lib/dig.exp
+++ b/test/private-lib/dig.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/private-lib/eog.exp b/test/private-lib/eog.exp
index ac6ecfff7..c4bfc0aa7 100755
--- a/test/private-lib/eog.exp
+++ b/test/private-lib/eog.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/private-lib/eom.exp b/test/private-lib/eom.exp
index 47e749712..a7709b0ec 100755
--- a/test/private-lib/eom.exp
+++ b/test/private-lib/eom.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/private-lib/evince.exp b/test/private-lib/evince.exp
index 1e270a2ef..8f54ee345 100755
--- a/test/private-lib/evince.exp
+++ b/test/private-lib/evince.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/private-lib/galculator.exp b/test/private-lib/galculator.exp
index 68ff9f834..4cf6b6a73 100755
--- a/test/private-lib/galculator.exp
+++ b/test/private-lib/galculator.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/private-lib/gedit.exp b/test/private-lib/gedit.exp
index 67be5c215..838ffad21 100755
--- a/test/private-lib/gedit.exp
+++ b/test/private-lib/gedit.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/private-lib/gnome-calculator.exp b/test/private-lib/gnome-calculator.exp
index 67712bd67..37e6b86cb 100755
--- a/test/private-lib/gnome-calculator.exp
+++ b/test/private-lib/gnome-calculator.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -16,7 +16,7 @@ expect {
16} 16}
17expect { 17expect {
18 timeout {puts "TESTING ERROR 1\n";exit} 18 timeout {puts "TESTING ERROR 1\n";exit}
19 "Child process initialized" 19 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
20} 20}
21sleep 3 21sleep 3
22 22
@@ -43,7 +43,7 @@ expect {
43send -- "firejail --name=blablabla\r" 43send -- "firejail --name=blablabla\r"
44expect { 44expect {
45 timeout {puts "TESTING ERROR 4\n";exit} 45 timeout {puts "TESTING ERROR 4\n";exit}
46 "Child process initialized" 46 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
47} 47}
48sleep 2 48sleep 2
49 49
diff --git a/test/private-lib/gnome-logs.exp b/test/private-lib/gnome-logs.exp
index f671effe4..3f0cc3544 100755
--- a/test/private-lib/gnome-logs.exp
+++ b/test/private-lib/gnome-logs.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/private-lib/gnome-nettool.exp b/test/private-lib/gnome-nettool.exp
index a68084776..3a08fe3df 100755
--- a/test/private-lib/gnome-nettool.exp
+++ b/test/private-lib/gnome-nettool.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/private-lib/gnome-system-log.exp b/test/private-lib/gnome-system-log.exp
index c3b1f2377..5ab819a89 100755
--- a/test/private-lib/gnome-system-log.exp
+++ b/test/private-lib/gnome-system-log.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/private-lib/gpicview.exp b/test/private-lib/gpicview.exp
index b438c6de3..ea0964787 100755
--- a/test/private-lib/gpicview.exp
+++ b/test/private-lib/gpicview.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/private-lib/leafpad.exp b/test/private-lib/leafpad.exp
index fbe8e284c..9e4dc7fed 100755
--- a/test/private-lib/leafpad.exp
+++ b/test/private-lib/leafpad.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/private-lib/mousepad.exp b/test/private-lib/mousepad.exp
index f47dfe464..9c7501473 100755
--- a/test/private-lib/mousepad.exp
+++ b/test/private-lib/mousepad.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/private-lib/pavucontrol.exp b/test/private-lib/pavucontrol.exp
index 7b8883ade..3aeda709a 100755
--- a/test/private-lib/pavucontrol.exp
+++ b/test/private-lib/pavucontrol.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/private-lib/pluma.exp b/test/private-lib/pluma.exp
index 99d4299fb..64cb16d5a 100755
--- a/test/private-lib/pluma.exp
+++ b/test/private-lib/pluma.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/private-lib/private-lib.sh b/test/private-lib/private-lib.sh
index a70c3fad6..d168c2b1b 100755
--- a/test/private-lib/private-lib.sh
+++ b/test/private-lib/private-lib.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3g 6export MALLOC_CHECK_=3g
diff --git a/test/private-lib/transmission-gtk.exp b/test/private-lib/transmission-gtk.exp
index 3c5402c81..0f297cc42 100755
--- a/test/private-lib/transmission-gtk.exp
+++ b/test/private-lib/transmission-gtk.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/private-lib/whois.exp b/test/private-lib/whois.exp
index 83dc54c76..29190253c 100755
--- a/test/private-lib/whois.exp
+++ b/test/private-lib/whois.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/private-lib/xcalc.exp b/test/private-lib/xcalc.exp
index 7cd74d3bd..e9c541684 100755
--- a/test/private-lib/xcalc.exp
+++ b/test/private-lib/xcalc.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 3 19sleep 3
20 20
@@ -41,7 +41,7 @@ expect {
41send -- "firejail --name=blablabla\r" 41send -- "firejail --name=blablabla\r"
42expect { 42expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
45} 45}
46sleep 2 46sleep 2
47 47
diff --git a/test/profiles/comment.profile b/test/profiles/comment.profile
new file mode 100644
index 000000000..4a907a408
--- /dev/null
+++ b/test/profiles/comment.profile
@@ -0,0 +1,3 @@
1# this is a comment
2net none # this is another comment
3private # some other comment
diff --git a/test/profiles/conditional.exp b/test/profiles/conditional.exp
index b06b983c1..40bae3878 100755
--- a/test/profiles/conditional.exp
+++ b/test/profiles/conditional.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ expect {
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19after 100 19after 100
20send -- "exit\r" 20send -- "exit\r"
@@ -24,7 +24,7 @@ send -- "firejail --debug --profile=cond1.profile\r"
24expect { 24expect {
25 timeout {puts "TESTING ERROR 2\n";exit} 25 timeout {puts "TESTING ERROR 2\n";exit}
26 "conditional HAS_NODBUS, private" {puts "TESTING ERROR 3\n";exit} 26 "conditional HAS_NODBUS, private" {puts "TESTING ERROR 3\n";exit}
27 "Child process initialized" 27 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
28} 28}
29after 100 29after 100
30send -- "exit\r" 30send -- "exit\r"
diff --git a/test/profiles/ignore.exp b/test/profiles/ignore.exp
index e7f210a46..df4337e1e 100755
--- a/test/profiles/ignore.exp
+++ b/test/profiles/ignore.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -17,7 +17,7 @@ send -- "firejail --debug --ignore=seccomp\r"
17expect { 17expect {
18 timeout {puts "TESTING ERROR 1\n";exit} 18 timeout {puts "TESTING ERROR 1\n";exit}
19 BLACKLIST {puts "TESTING ERROR 2\n";exit} 19 BLACKLIST {puts "TESTING ERROR 2\n";exit}
20 "Child process initialized" 20 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
21} 21}
22after 100 22after 100
23send -- "exit\r" 23send -- "exit\r"
@@ -26,7 +26,7 @@ sleep 1
26send -- "firejail --ignore=seccomp --ignore=shell --profile=ignore.profile \r" 26send -- "firejail --ignore=seccomp --ignore=shell --profile=ignore.profile \r"
27expect { 27expect {
28 timeout {puts "TESTING ERROR 3\n";exit} 28 timeout {puts "TESTING ERROR 3\n";exit}
29 "Child process initialized" 29 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
30} 30}
31after 100 31after 100
32 32
@@ -42,7 +42,7 @@ sleep 1
42send -- "firejail --ignore=private --ignore=shell --profile=ignore.profile \r" 42send -- "firejail --ignore=private --ignore=shell --profile=ignore.profile \r"
43expect { 43expect {
44 timeout {puts "TESTING ERROR 5\n";exit} 44 timeout {puts "TESTING ERROR 5\n";exit}
45 "Child process initialized" 45 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
46} 46}
47after 100 47after 100
48 48
@@ -59,7 +59,7 @@ send -- "firejail --debug --profile=ignore2.profile\r"
59expect { 59expect {
60 timeout {puts "TESTING ERROR 7\n";exit} 60 timeout {puts "TESTING ERROR 7\n";exit}
61 BLACKLIST {puts "TESTING ERROR 8\n";exit} 61 BLACKLIST {puts "TESTING ERROR 8\n";exit}
62 "Child process initialized" 62 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
63} 63}
64 64
65after 100 65after 100
@@ -69,7 +69,7 @@ sleep 1
69send -- "firejail --ignore=quiet --ignore=shell --profile=ignore.profile \r" 69send -- "firejail --ignore=quiet --ignore=shell --profile=ignore.profile \r"
70expect { 70expect {
71 timeout {puts "TESTING ERROR 9\n";exit} 71 timeout {puts "TESTING ERROR 9\n";exit}
72 "Child process initialized" 72 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
73} 73}
74after 100 74after 100
75 75
diff --git a/test/profiles/profile_appname.exp b/test/profiles/profile_appname.exp
index 240a44697..fce278b4c 100755
--- a/test/profiles/profile_appname.exp
+++ b/test/profiles/profile_appname.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/profiles/profile_comment.exp b/test/profiles/profile_comment.exp
new file mode 100755
index 000000000..73e92d864
--- /dev/null
+++ b/test/profiles/profile_comment.exp
@@ -0,0 +1,52 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "rm -fr /tmp/firejailtest*\r"
11send -- "rm -fr /tmp/firejail-strace*\r"
12send -- "rm -fr /tmp/firejail-trace*\r"
13sleep 1
14
15send -- "firejail --profile=comment.profile /usr/bin/true\r"
16expect {
17 timeout {puts "TESTING ERROR 0\n";exit}
18 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
19}
20expect {
21 timeout {puts "TESTING ERROR 1\n";exit}
22 "Parent is shutting down"
23}
24sleep 2
25
26send -- "firejail --build=/tmp/firejailtest.profile /usr/bin/true\r"
27sleep 1
28
29send -- "cat /tmp/firejailtest.profile\r"
30expect {
31 timeout {puts "TESTING ERROR 2\n";exit}
32 "seccomp"
33}
34after 100
35
36send -- "firejail --profile=/tmp/firejailtest.profile /usr/bin/true\r"
37expect {
38 timeout {puts "TESTING ERROR 3\n";exit}
39 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
40}
41expect {
42 timeout {puts "TESTING ERROR 4\n";exit}
43 "Parent is shutting down"
44}
45after 100
46
47send -- "rm -fr /tmp/firejailtest*\r"
48send -- "rm -fr /tmp/firejail-strace*\r"
49send -- "rm -fr /tmp/firejail-trace*\r"
50after 100
51
52puts "\nall done\n"
diff --git a/test/profiles/profile_followlnk.exp b/test/profiles/profile_followlnk.exp
index 0500eac35..112acbbc9 100755
--- a/test/profiles/profile_followlnk.exp
+++ b/test/profiles/profile_followlnk.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -16,7 +16,7 @@ sleep 1
16send -- "firejail --profile=readonly-lnk.profile\r" 16send -- "firejail --profile=readonly-lnk.profile\r"
17expect { 17expect {
18 timeout {puts "TESTING ERROR 0\n";exit} 18 timeout {puts "TESTING ERROR 0\n";exit}
19 "Child process initialized" 19 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
20} 20}
21 21
22send -- "ls > /tmp/firejailtestdirlnk/ttt\r" 22send -- "ls > /tmp/firejailtestdirlnk/ttt\r"
diff --git a/test/profiles/profile_noperm.exp b/test/profiles/profile_noperm.exp
index 609364389..c6a571473 100755
--- a/test/profiles/profile_noperm.exp
+++ b/test/profiles/profile_noperm.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/profiles/profile_readonly.exp b/test/profiles/profile_readonly.exp
index 2046cc297..4c1bcba89 100755
--- a/test/profiles/profile_readonly.exp
+++ b/test/profiles/profile_readonly.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ sleep 1
14send -- "firejail --profile=readonly.profile\r" 14send -- "firejail --profile=readonly.profile\r"
15expect { 15expect {
16 timeout {puts "TESTING ERROR 0\n";exit} 16 timeout {puts "TESTING ERROR 0\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 2 19sleep 2
20 20
diff --git a/test/profiles/profile_recursivity.exp b/test/profiles/profile_recursivity.exp
index c761a1039..a3d4843ab 100755
--- a/test/profiles/profile_recursivity.exp
+++ b/test/profiles/profile_recursivity.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/profiles/profile_syntax.exp b/test/profiles/profile_syntax.exp
index 258089a39..2bce76d83 100755
--- a/test/profiles/profile_syntax.exp
+++ b/test/profiles/profile_syntax.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --profile=test.profile\r" 10send -- "firejail --profile=test.profile\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15 15
16sleep 2 16sleep 2
@@ -22,7 +22,7 @@ expect {
22} 22}
23 23
24sleep 1 24sleep 1
25send -- "ls -l /etc/shadow\r" 25send -- "ls -l /dev/console\r"
26expect { 26expect {
27 timeout {puts "TESTING ERROR 3\n";exit} 27 timeout {puts "TESTING ERROR 3\n";exit}
28 "root root" 28 "root root"
diff --git a/test/profiles/profile_syntax2.exp b/test/profiles/profile_syntax2.exp
index e2ec20ca5..2ddaded88 100755
--- a/test/profiles/profile_syntax2.exp
+++ b/test/profiles/profile_syntax2.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/profiles/profiles.sh b/test/profiles/profiles.sh
index a5f74f2e2..ce2fa32c4 100755
--- a/test/profiles/profiles.sh
+++ b/test/profiles/profiles.sh
@@ -1,12 +1,15 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) 7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
8export LC_ALL=C 8export LC_ALL=C
9 9
10echo "TESTING: profile comments (test/profiles/profilecomment.exp)"
11./profile_comment.exp
12
10echo "TESTING: profile conditional (test/profiles/conditional.exp)" 13echo "TESTING: profile conditional (test/profiles/conditional.exp)"
11./conditional.exp 14./conditional.exp
12 15
diff --git a/test/profiles/test-profile.exp b/test/profiles/test-profile.exp
index 625cb6511..5f18695a7 100755
--- a/test/profiles/test-profile.exp
+++ b/test/profiles/test-profile.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/profiles/test.profile b/test/profiles/test.profile
index 26d6de849..27cb99606 100644
--- a/test/profiles/test.profile
+++ b/test/profiles/test.profile
@@ -1,5 +1,5 @@
1blacklist /sbin/iptables 1blacklist /sbin/iptables
2blacklist /etc/shadow 2blacklist /dev/console
3blacklist /bin/rmdir 3blacklist /bin/rmdir
4blacklist ${PATH}/umount 4blacklist ${PATH}/umount
5blacklist ${PATH}/mount 5blacklist ${PATH}/mount
diff --git a/test/root/apache2.exp b/test/root/apache2.exp
index 0b4b65dc7..a6b25de2f 100755
--- a/test/root/apache2.exp
+++ b/test/root/apache2.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 5 6set timeout 5
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=apache /etc/init.d/apache2 start\r" 10send -- "firejail --name=apache /etc/init.d/apache2 start\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
diff --git a/test/root/cgroup.exp b/test/root/cgroup.exp
index d24a39d07..9a1bbe161 100755
--- a/test/root/cgroup.exp
+++ b/test/root/cgroup.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -20,7 +20,7 @@ expect {
20send -- "firejail --name=\"join testing\" --cgroup=/sys/fs/cgroup/systemd/firejail/tasks\r" 20send -- "firejail --name=\"join testing\" --cgroup=/sys/fs/cgroup/systemd/firejail/tasks\r"
21expect { 21expect {
22 timeout {puts "TESTING ERROR 1\n";exit} 22 timeout {puts "TESTING ERROR 1\n";exit}
23 "Child process initialized" 23 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
24} 24}
25sleep 2 25sleep 2
26 26
@@ -37,14 +37,18 @@ expect {
37 timeout {puts "TESTING ERROR 3\n";exit} 37 timeout {puts "TESTING ERROR 3\n";exit}
38 "Switching to pid" 38 "Switching to pid"
39} 39}
40expect {
41 timeout {puts "TESTING ERROR 4\n";exit}
42 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
43}
40sleep 1 44sleep 1
41send -- "ps aux\r" 45send -- "ps aux\r"
42expect { 46expect {
43 timeout {puts "TESTING ERROR 4\n";exit} 47 timeout {puts "TESTING ERROR 5\n";exit}
44 "/bin/bash" 48 "/bin/bash"
45} 49}
46expect { 50expect {
47 timeout {puts "TESTING ERROR 5\n";exit} 51 timeout {puts "TESTING ERROR 6\n";exit}
48 "/bin/bash" 52 "/bin/bash"
49} 53}
50 54
@@ -53,7 +57,7 @@ after 100
53spawn $env(SHELL) 57spawn $env(SHELL)
54send -- "wc -l /sys/fs/cgroup/systemd/firejail/tasks\r" 58send -- "wc -l /sys/fs/cgroup/systemd/firejail/tasks\r"
55expect { 59expect {
56 timeout {puts "TESTING ERROR 6\n";exit} 60 timeout {puts "TESTING ERROR 7\n";exit}
57 "3" 61 "3"
58} 62}
59after 100 63after 100
diff --git a/test/root/checkcfg.exp b/test/root/checkcfg.exp
index 9a4c666e1..94d9e08fc 100755
--- a/test/root/checkcfg.exp
+++ b/test/root/checkcfg.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/root/firecfg.exp b/test/root/firecfg.exp
index 65ecefe5d..917cea90f 100755
--- a/test/root/firecfg.exp
+++ b/test/root/firecfg.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/root/firemon-events.exp b/test/root/firemon-events.exp
index 7bf51e2c8..8eab93a2a 100755
--- a/test/root/firemon-events.exp
+++ b/test/root/firemon-events.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -18,7 +18,7 @@ set firejail_id $spawn_id
18send -- "firejail\r" 18send -- "firejail\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0\n";exit} 20 timeout {puts "TESTING ERROR 0\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23 23
24# get messages on firemon 24# get messages on firemon
diff --git a/test/root/isc-dhcp.exp b/test/root/isc-dhcp.exp
index 4c468c3e8..20e5ef408 100755
--- a/test/root/isc-dhcp.exp
+++ b/test/root/isc-dhcp.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 5 6set timeout 5
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=dhcpd /etc/init.d/isc-dhcp-server start\r" 10send -- "firejail --name=dhcpd /etc/init.d/isc-dhcp-server start\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
diff --git a/test/root/join.exp b/test/root/join.exp
index d995d8aa5..291ee9115 100755
--- a/test/root/join.exp
+++ b/test/root/join.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --name=jointesting --cpu=0 --nice=2\r" 11send -- "firejail --name=jointesting --cpu=0 --nice=2\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 2 16sleep 2
17 17
@@ -21,14 +21,18 @@ expect {
21 timeout {puts "TESTING ERROR 1\n";exit} 21 timeout {puts "TESTING ERROR 1\n";exit}
22 "Switching to pid" 22 "Switching to pid"
23} 23}
24expect {
25 timeout {puts "TESTING ERROR 2\n";exit}
26 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
27}
24sleep 1 28sleep 1
25send -- "ps aux\r" 29send -- "ps aux\r"
26expect { 30expect {
27 timeout {puts "TESTING ERROR 2\n";exit} 31 timeout {puts "TESTING ERROR 3\n";exit}
28 "/bin/bash" 32 "/bin/bash"
29} 33}
30expect { 34expect {
31 timeout {puts "TESTING ERROR 3\n";exit} 35 timeout {puts "TESTING ERROR 4\n";exit}
32 "/bin/bash" 36 "/bin/bash"
33} 37}
34 38
@@ -36,15 +40,15 @@ send -- "exit\r"
36sleep 1 40sleep 1
37send -- "firejail --join-network=jointesting\r" 41send -- "firejail --join-network=jointesting\r"
38expect { 42expect {
39 timeout {puts "TESTING ERROR 4\n";exit} 43 timeout {puts "TESTING ERROR 5\n";exit}
40 "Child process initialized" 44 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
41} 45}
42send -- "exit\r" 46send -- "exit\r"
43sleep 1 47sleep 1
44send -- "firejail --join-filesystem=jointesting\r" 48send -- "firejail --join-filesystem=jointesting\r"
45expect { 49expect {
46 timeout {puts "TESTING ERROR 5\n";exit} 50 timeout {puts "TESTING ERROR 6\n";exit}
47 "Child process initialized" 51 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
48} 52}
49 53
50after 100 54after 100
diff --git a/test/root/login_nobody.exp b/test/root/login_nobody.exp
index 42d8fe013..9c0932196 100755
--- a/test/root/login_nobody.exp
+++ b/test/root/login_nobody.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "su - nobody -s /usr/bin/firejail\r" 11send -- "su - nobody -s /usr/bin/firejail\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16after 100 16after 100
17 17
diff --git a/test/root/nginx.exp b/test/root/nginx.exp
index 924ee8afd..40d8cb51e 100755
--- a/test/root/nginx.exp
+++ b/test/root/nginx.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 5 6set timeout 5
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=nginx /etc/init.d/nginx start\r" 10send -- "firejail --name=nginx /etc/init.d/nginx start\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
diff --git a/test/root/option_bind_directory.exp b/test/root/option_bind_directory.exp
index ac6421593..4fabf0cd8 100755
--- a/test/root/option_bind_directory.exp
+++ b/test/root/option_bind_directory.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --bind=/tmp/chroot,mntpoint\r" 10send -- "firejail --bind=/tmp/chroot,mntpoint\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
diff --git a/test/root/option_bind_file.exp b/test/root/option_bind_file.exp
index 6ead284a8..6c796a2b0 100755
--- a/test/root/option_bind_file.exp
+++ b/test/root/option_bind_file.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --bind=tmpfile,/etc/passwd\r" 10send -- "firejail --bind=tmpfile,/etc/passwd\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
diff --git a/test/root/option_tmpfs.exp b/test/root/option_tmpfs.exp
index 67a678c68..13820afe8 100755
--- a/test/root/option_tmpfs.exp
+++ b/test/root/option_tmpfs.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --tmpfs=/var\r" 10send -- "firejail --tmpfs=/var\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
diff --git a/test/root/private.exp b/test/root/private.exp
index 373bd6cef..70d0218fa 100755
--- a/test/root/private.exp
+++ b/test/root/private.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --private\r" 10send -- "firejail --private\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
@@ -42,7 +42,7 @@ after 100
42send -- "firejail --private-opt=firejail-test-file,firejail-test-dir --debug\r" 42send -- "firejail --private-opt=firejail-test-file,firejail-test-dir --debug\r"
43expect { 43expect {
44 timeout {puts "TESTING ERROR 3\n";exit} 44 timeout {puts "TESTING ERROR 3\n";exit}
45 "Child process initialized" 45 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
46} 46}
47sleep 1 47sleep 1
48 48
@@ -57,7 +57,7 @@ sleep 1
57send -- "firejail --whitelist=/opt/firejail-test-file --whitelist=/opt/firejail-test-dir --debug\r" 57send -- "firejail --whitelist=/opt/firejail-test-file --whitelist=/opt/firejail-test-dir --debug\r"
58expect { 58expect {
59 timeout {puts "TESTING ERROR 3.1\n";exit} 59 timeout {puts "TESTING ERROR 3.1\n";exit}
60 "Child process initialized" 60 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
61} 61}
62sleep 1 62sleep 1
63 63
@@ -80,7 +80,7 @@ after 100
80send -- "firejail --private-srv=firejail-test-file,firejail-test-dir --debug\r" 80send -- "firejail --private-srv=firejail-test-file,firejail-test-dir --debug\r"
81expect { 81expect {
82 timeout {puts "TESTING ERROR 5\n";exit} 82 timeout {puts "TESTING ERROR 5\n";exit}
83 "Child process initialized" 83 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
84} 84}
85sleep 1 85sleep 1
86 86
@@ -95,7 +95,7 @@ sleep 1
95send -- "firejail --whitelist=/srv/firejail-test-file --whitelist=/srv/firejail-test-dir --debug\r" 95send -- "firejail --whitelist=/srv/firejail-test-file --whitelist=/srv/firejail-test-dir --debug\r"
96expect { 96expect {
97 timeout {puts "TESTING ERROR 5.1\n";exit} 97 timeout {puts "TESTING ERROR 5.1\n";exit}
98 "Child process initialized" 98 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
99} 99}
100sleep 1 100sleep 1
101 101
diff --git a/test/root/profile_tmpfs.exp b/test/root/profile_tmpfs.exp
index 8a46d666e..fba63773f 100755
--- a/test/root/profile_tmpfs.exp
+++ b/test/root/profile_tmpfs.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --profile=tmpfs.profile\r" 10send -- "firejail --profile=tmpfs.profile\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
diff --git a/test/root/root.sh b/test/root/root.sh
index d6b60cb23..78a6619d7 100755
--- a/test/root/root.sh
+++ b/test/root/root.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6# set a new firejail config file 6# set a new firejail config file
diff --git a/test/root/seccomp-chmod.exp b/test/root/seccomp-chmod.exp
index d6f8b8bcc..ef0453548 100755
--- a/test/root/seccomp-chmod.exp
+++ b/test/root/seccomp-chmod.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --seccomp=chmod,fchmod,fchmodat --private\r" 10send -- "firejail --seccomp=chmod,fchmod,fchmodat --private\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
diff --git a/test/root/seccomp-chown.exp b/test/root/seccomp-chown.exp
index daf3a5d06..968a4bc96 100755
--- a/test/root/seccomp-chown.exp
+++ b/test/root/seccomp-chown.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --seccomp=chown,fchown,fchownat,lchown --private\r" 10send -- "firejail --seccomp=chown,fchown,fchownat,lchown --private\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
diff --git a/test/root/seccomp-umount.exp b/test/root/seccomp-umount.exp
index 0a7310fdd..b99ec30f7 100755
--- a/test/root/seccomp-umount.exp
+++ b/test/root/seccomp-umount.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --seccomp --noprofile\r" 10send -- "firejail --seccomp --noprofile\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
diff --git a/test/root/snmpd.exp b/test/root/snmpd.exp
index d1fc49967..510abfbad 100755
--- a/test/root/snmpd.exp
+++ b/test/root/snmpd.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 5 6set timeout 5
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=snmpd /etc/init.d/snmpd start\r" 10send -- "firejail --name=snmpd /etc/init.d/snmpd start\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
diff --git a/test/root/unbound.exp b/test/root/unbound.exp
index 710a95bf4..6440304b2 100755
--- a/test/root/unbound.exp
+++ b/test/root/unbound.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 5 6set timeout 5
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=unbound unbound\r" 10send -- "firejail --name=unbound unbound\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
diff --git a/test/root/whitelist.exp b/test/root/whitelist.exp
index 429a4153e..2397f6a90 100755
--- a/test/root/whitelist.exp
+++ b/test/root/whitelist.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -16,7 +16,7 @@ after 100
16send -- "firejail --whitelist=/mnt/firejail-test-file --whitelist=/mnt/firejail-test-dir --debug\r" 16send -- "firejail --whitelist=/mnt/firejail-test-file --whitelist=/mnt/firejail-test-dir --debug\r"
17expect { 17expect {
18 timeout {puts "TESTING ERROR 0\n";exit} 18 timeout {puts "TESTING ERROR 0\n";exit}
19 "Child process initialized" 19 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
20} 20}
21sleep 1 21sleep 1
22 22
@@ -39,7 +39,7 @@ after 100
39send -- "firejail --whitelist=/opt/firejail-test-file --whitelist=/opt/firejail-test-dir --debug\r" 39send -- "firejail --whitelist=/opt/firejail-test-file --whitelist=/opt/firejail-test-dir --debug\r"
40expect { 40expect {
41 timeout {puts "TESTING ERROR 2\n";exit} 41 timeout {puts "TESTING ERROR 2\n";exit}
42 "Child process initialized" 42 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
43} 43}
44sleep 1 44sleep 1
45 45
@@ -61,7 +61,7 @@ after 100
61send -- "firejail --whitelist=/media/firejail-test-file --whitelist=/media/firejail-test-dir --debug\r" 61send -- "firejail --whitelist=/media/firejail-test-file --whitelist=/media/firejail-test-dir --debug\r"
62expect { 62expect {
63 timeout {puts "TESTING ERROR 4\n";exit} 63 timeout {puts "TESTING ERROR 4\n";exit}
64 "Child process initialized" 64 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
65} 65}
66sleep 1 66sleep 1
67 67
@@ -78,7 +78,7 @@ sleep 1
78send -- "firejail --whitelist=/var/run --whitelist=/var/lock --debug\r" 78send -- "firejail --whitelist=/var/run --whitelist=/var/lock --debug\r"
79expect { 79expect {
80 timeout {puts "TESTING ERROR 6\n";exit} 80 timeout {puts "TESTING ERROR 6\n";exit}
81 "Child process initialized" 81 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
82} 82}
83sleep 1 83sleep 1
84 84
@@ -100,7 +100,7 @@ after 100
100send -- "firejail --whitelist=/srv/firejail-test-file --whitelist=/srv/firejail-test-dir --debug\r" 100send -- "firejail --whitelist=/srv/firejail-test-file --whitelist=/srv/firejail-test-dir --debug\r"
101expect { 101expect {
102 timeout {puts "TESTING ERROR 8\n";exit} 102 timeout {puts "TESTING ERROR 8\n";exit}
103 "Child process initialized" 103 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
104} 104}
105sleep 1 105sleep 1
106 106
diff --git a/test/ssh/login.exp b/test/ssh/login.exp
index 6a5086a77..5d6a6216b 100755
--- a/test/ssh/login.exp
+++ b/test/ssh/login.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "ssh firejail-test@0\r" 10send -- "ssh firejail-test@0\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" {puts "OK\n"} 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "OK\n"}
14 "an existing sandbox was detected" {puts "OK\n"} 14 "an existing sandbox was detected" {puts "OK\n"}
15} 15}
16sleep 1 16sleep 1
diff --git a/test/ssh/scp.exp b/test/ssh/scp.exp
index bca6a124f..13163564b 100755
--- a/test/ssh/scp.exp
+++ b/test/ssh/scp.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "ssh firejail-test@0\r" 10send -- "ssh firejail-test@0\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" {puts "OK\n"} 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "OK\n"}
14 "an existing sandbox was detected" {puts "OK\n"} 14 "an existing sandbox was detected" {puts "OK\n"}
15} 15}
16sleep 1 16sleep 1
@@ -33,7 +33,7 @@ sleep 1
33send -- "ssh firejail-test@0\r" 33send -- "ssh firejail-test@0\r"
34expect { 34expect {
35 timeout {puts "TESTING ERROR 2\n";exit} 35 timeout {puts "TESTING ERROR 2\n";exit}
36 "Child process initialized" {puts "OK\n"} 36 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "OK\n"}
37 "an existing sandbox was detected" {puts "OK\n"} 37 "an existing sandbox was detected" {puts "OK\n"}
38} 38}
39sleep 1 39sleep 1
diff --git a/test/ssh/sftp.exp b/test/ssh/sftp.exp
index 09d3c119e..01c1e7e04 100755
--- a/test/ssh/sftp.exp
+++ b/test/ssh/sftp.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "ssh firejail-test@0\r" 10send -- "ssh firejail-test@0\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" {puts "OK\n"} 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "OK\n"}
14 "an existing sandbox was detected" {puts "OK\n"} 14 "an existing sandbox was detected" {puts "OK\n"}
15} 15}
16sleep 1 16sleep 1
@@ -45,7 +45,7 @@ sleep 1
45send -- "ssh firejail-test@0\r" 45send -- "ssh firejail-test@0\r"
46expect { 46expect {
47 timeout {puts "TESTING ERROR 4\n";exit} 47 timeout {puts "TESTING ERROR 4\n";exit}
48 "Child process initialized" {puts "OK\n"} 48 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "OK\n"}
49 "an existing sandbox was detected" {puts "OK\n"} 49 "an existing sandbox was detected" {puts "OK\n"}
50} 50}
51sleep 1 51sleep 1
diff --git a/test/ssh/ssh.sh b/test/ssh/ssh.sh
index bdad8cf87..c0d545a55 100755
--- a/test/ssh/ssh.sh
+++ b/test/ssh/ssh.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
diff --git a/test/stress/blacklist.exp b/test/stress/blacklist.exp
index fae874b25..7d32ad114 100755
--- a/test/stress/blacklist.exp
+++ b/test/stress/blacklist.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ set i 1
14send -- "firejail --profile=blacklist.profile\r" 14send -- "firejail --profile=blacklist.profile\r"
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19 19
20while { $i <= $MAXi } { 20while { $i <= $MAXi } {
@@ -36,7 +36,7 @@ set i 1
36send -- "firejail --profile=noblacklist.profile\r" 36send -- "firejail --profile=noblacklist.profile\r"
37expect { 37expect {
38 timeout {puts "TESTING ERROR 1\n";exit} 38 timeout {puts "TESTING ERROR 1\n";exit}
39 "Child process initialized" 39 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
40} 40}
41 41
42while { $i <= $MAXi } { 42while { $i <= $MAXi } {
diff --git a/test/stress/env.exp b/test/stress/env.exp
index d69558114..5411819ec 100755
--- a/test/stress/env.exp
+++ b/test/stress/env.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --profile=env.profile\r" 11send -- "firejail --profile=env.profile\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 1\n";exit} 13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16 16
17send -- "env | grep FJSTRESS77\r" 17send -- "env | grep FJSTRESS77\r"
diff --git a/test/stress/net_macvlan.exp b/test/stress/net_macvlan.exp
index a535afa2a..f17067cbb 100755
--- a/test/stress/net_macvlan.exp
+++ b/test/stress/net_macvlan.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -15,7 +15,7 @@ while { $i <= $MAXi } {
15 send -- "firejail --net=eth0 --ip=192.168.1.$i\r" 15 send -- "firejail --net=eth0 --ip=192.168.1.$i\r"
16 expect { 16 expect {
17 timeout {puts "TESTING ERROR 0\n";exit} 17 timeout {puts "TESTING ERROR 0\n";exit}
18 "Child process initialized" 18 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
19 } 19 }
20 incr i 20 incr i
21 after 100 21 after 100
@@ -30,7 +30,7 @@ while { $i <= $MAXi } {
30 send -- "firejail --net=eth0 --iprange=192.168.1.201,192.168.1.220\r" 30 send -- "firejail --net=eth0 --iprange=192.168.1.201,192.168.1.220\r"
31 expect { 31 expect {
32 timeout {puts "TESTING ERROR 2\n";exit} 32 timeout {puts "TESTING ERROR 2\n";exit}
33 "Child process initialized" 33 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
34 } 34 }
35 puts "************ $i ******************\n" 35 puts "************ $i ******************\n"
36 incr i 36 incr i
diff --git a/test/stress/stress.sh b/test/stress/stress.sh
index d32ffe907..675cb0614 100755
--- a/test/stress/stress.sh
+++ b/test/stress/stress.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
diff --git a/test/sysutils/cpio.exp b/test/sysutils/cpio.exp
index 4230ba375..e4ab77525 100755
--- a/test/sysutils/cpio.exp
+++ b/test/sysutils/cpio.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/sysutils/file.exp b/test/sysutils/file.exp
index b97c0c283..dcc253dad 100755
--- a/test/sysutils/file.exp
+++ b/test/sysutils/file.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/sysutils/gzip.exp b/test/sysutils/gzip.exp
index be2222f06..75b51694c 100755
--- a/test/sysutils/gzip.exp
+++ b/test/sysutils/gzip.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/sysutils/less.exp b/test/sysutils/less.exp
index 265b0e474..e6698eab0 100755
--- a/test/sysutils/less.exp
+++ b/test/sysutils/less.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/sysutils/ping.exp b/test/sysutils/ping.exp
index fac4b2ac3..dd6073234 100755
--- a/test/sysutils/ping.exp
+++ b/test/sysutils/ping.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/sysutils/strings.exp b/test/sysutils/strings.exp
index 7c91fb78a..47b75accc 100755
--- a/test/sysutils/strings.exp
+++ b/test/sysutils/strings.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/sysutils/sysutils.sh b/test/sysutils/sysutils.sh
index 96962d324..a903c7c6b 100755
--- a/test/sysutils/sysutils.sh
+++ b/test/sysutils/sysutils.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
diff --git a/test/sysutils/tar.exp b/test/sysutils/tar.exp
index 60e05f847..ed68179f9 100755
--- a/test/sysutils/tar.exp
+++ b/test/sysutils/tar.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/sysutils/xz.exp b/test/sysutils/xz.exp
index 4c6fcea9d..9ee85cde4 100755
--- a/test/sysutils/xz.exp
+++ b/test/sysutils/xz.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 60 6set timeout 60
diff --git a/test/sysutils/xzdec.exp b/test/sysutils/xzdec.exp
index 737517d54..1b525e3bd 100755
--- a/test/sysutils/xzdec.exp
+++ b/test/sysutils/xzdec.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/utils/build.exp b/test/utils/build.exp
index cdc2f3b7b..a1f1d10fb 100755
--- a/test/utils/build.exp
+++ b/test/utils/build.exp
@@ -1,19 +1,19 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "echo testing > ~/firejail-test-file-7699\r" 10send -- "echo testing > ~/_firejail-test-file\r"
11after 100 11after 100
12 12
13send -- "firejail --build cat ~/firejail-test-file-7699\r" 13send -- "firejail --build cat ~/_firejail-test-file\r"
14expect { 14expect {
15 timeout {puts "TESTING ERROR 0\n";exit} 15 timeout {puts "TESTING ERROR 0\n";exit}
16 "whitelist $\{HOME\}/firejail-test-file-7699" 16 "whitelist $\{HOME\}/_firejail-test-file"
17} 17}
18expect { 18expect {
19 timeout {puts "TESTING ERROR 1\n";exit} 19 timeout {puts "TESTING ERROR 1\n";exit}
@@ -21,35 +21,35 @@ expect {
21} 21}
22expect { 22expect {
23 timeout {puts "TESTING ERROR 2\n";exit} 23 timeout {puts "TESTING ERROR 2\n";exit}
24 "blacklist /usr/share" 24 "include whitelist-usr-share-common.inc"
25} 25}
26expect { 26expect {
27 timeout {puts "TESTING ERROR 3\n";exit} 27 timeout {puts "TESTING ERROR 3\n";exit}
28 "blacklist /var" 28 "include whitelist-var-common.inc"
29} 29}
30expect { 30expect {
31 timeout {puts "TESTING ERROR 4\n";exit} 31 timeout {puts "TESTING ERROR 4\n";exit}
32 "private-bin cat," 32 "caps.drop all"
33} 33}
34expect { 34expect {
35 timeout {puts "TESTING ERROR 5\n";exit} 35 timeout {puts "TESTING ERROR 5\n";exit}
36 "private-dev" 36 "ipc-namespace"
37} 37}
38expect { 38expect {
39 timeout {puts "TESTING ERROR 6\n";exit} 39 timeout {puts "TESTING ERROR 6\n";exit}
40 "private-etc" 40 "netfilter"
41} 41}
42expect { 42expect {
43 timeout {puts "TESTING ERROR 7\n";exit} 43 timeout {puts "TESTING ERROR 7\n";exit}
44 "private-tmp" 44 "nonewprivs"
45} 45}
46expect { 46expect {
47 timeout {puts "TESTING ERROR 8\n";exit} 47 timeout {puts "TESTING ERROR 8\n";exit}
48 "caps.drop all" 48 "noroot"
49} 49}
50expect { 50expect {
51 timeout {puts "TESTING ERROR 9\n";exit} 51 timeout {puts "TESTING ERROR 9\n";exit}
52 "nonewprivs" 52 "net none"
53} 53}
54expect { 54expect {
55 timeout {puts "TESTING ERROR 10\n";exit} 55 timeout {puts "TESTING ERROR 10\n";exit}
@@ -57,15 +57,28 @@ expect {
57} 57}
58expect { 58expect {
59 timeout {puts "TESTING ERROR 11\n";exit} 59 timeout {puts "TESTING ERROR 11\n";exit}
60 "net none" 60 "shell none"
61}
62expect {
63 timeout {puts "TESTING ERROR 11\n";exit}
64 "private-bin cat,"
61} 65}
62expect { 66expect {
63 timeout {puts "TESTING ERROR 12\n";exit} 67 timeout {puts "TESTING ERROR 12\n";exit}
64 "shell none" 68 "private-dev"
69}
70expect {
71 timeout {puts "TESTING ERROR 13\n";exit}
72 "private-etc none"
73}
74expect {
75 timeout {puts "TESTING ERROR 14\n";exit}
76 "private-tmp"
65} 77}
66after 100 78after 100
67 79
68 80send -- "rm -f ~/_firejail-test-file\r"
81after 100
69 82
70send -- "firejail --build cat /etc/passwd\r" 83send -- "firejail --build cat /etc/passwd\r"
71expect { 84expect {
diff --git a/test/utils/caps-print.exp b/test/utils/caps-print.exp
index 6b6090476..b6ccd05d4 100755
--- a/test/utils/caps-print.exp
+++ b/test/utils/caps-print.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=test\r" 10send -- "firejail --name=test\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
diff --git a/test/utils/catchsignal-master.sh b/test/utils/catchsignal-master.sh
index 28e646ddb..881aac270 100755
--- a/test/utils/catchsignal-master.sh
+++ b/test/utils/catchsignal-master.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6./catchsignal.sh & 6./catchsignal.sh &
diff --git a/test/utils/catchsignal.sh b/test/utils/catchsignal.sh
index f7a501011..117179143 100755
--- a/test/utils/catchsignal.sh
+++ b/test/utils/catchsignal.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6_term() { 6_term() {
diff --git a/test/utils/catchsignal2.sh b/test/utils/catchsignal2.sh
index 9ba939ef4..1bd7852cd 100755
--- a/test/utils/catchsignal2.sh
+++ b/test/utils/catchsignal2.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6_term() { 6_term() {
diff --git a/test/utils/command.exp b/test/utils/command.exp
index 6cb52a7fa..5e15efc14 100755
--- a/test/utils/command.exp
+++ b/test/utils/command.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/utils/cpu-print.exp b/test/utils/cpu-print.exp
index e7d709cee..3e4d63f2a 100755
--- a/test/utils/cpu-print.exp
+++ b/test/utils/cpu-print.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=test --cpu=0\r" 10send -- "firejail --name=test --cpu=0\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16send -- "cat /proc/self/status | grep Cpus\r" 16send -- "cat /proc/self/status | grep Cpus\r"
@@ -30,7 +30,7 @@ sleep 1
30send -- "firejail --name=test --cpu=1\r" 30send -- "firejail --name=test --cpu=1\r"
31expect { 31expect {
32 timeout {puts "TESTING ERROR 3\n";exit} 32 timeout {puts "TESTING ERROR 3\n";exit}
33 "Child process initialized" 33 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
34} 34}
35sleep 1 35sleep 1
36 36
diff --git a/test/utils/dns-print.exp b/test/utils/dns-print.exp
index b3b732bee..c0cf2ff0f 100755
--- a/test/utils/dns-print.exp
+++ b/test/utils/dns-print.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=test --dns=1.2.3.4 --dns=::2\r" 10send -- "firejail --name=test --dns=1.2.3.4 --dns=::2\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
diff --git a/test/utils/firemon-caps.exp b/test/utils/firemon-caps.exp
index 837d08271..02b317341 100755
--- a/test/utils/firemon-caps.exp
+++ b/test/utils/firemon-caps.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=bingo1 --noprofile --caps\r" 10send -- "firejail --name=bingo1 --noprofile --caps\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
@@ -18,7 +18,7 @@ spawn $env(SHELL)
18send -- "firejail --name=bingo2 --noprofile\r" 18send -- "firejail --name=bingo2 --noprofile\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 1\n";exit} 20 timeout {puts "TESTING ERROR 1\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
@@ -26,7 +26,7 @@ spawn $env(SHELL)
26send -- "firejail --name=bingo3 --noprofile --caps.drop=all\r" 26send -- "firejail --name=bingo3 --noprofile --caps.drop=all\r"
27expect { 27expect {
28 timeout {puts "TESTING ERROR 2\n";exit} 28 timeout {puts "TESTING ERROR 2\n";exit}
29 "Child process initialized" 29 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
30} 30}
31sleep 1 31sleep 1
32 32
@@ -34,7 +34,7 @@ spawn $env(SHELL)
34send -- "firejail --noprofile --name=bingo4 --caps.drop=chown,kill\r" 34send -- "firejail --noprofile --name=bingo4 --caps.drop=chown,kill\r"
35expect { 35expect {
36 timeout {puts "TESTING ERROR 3\n";exit} 36 timeout {puts "TESTING ERROR 3\n";exit}
37 "Child process initialized" 37 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
38} 38}
39sleep 1 39sleep 1
40 40
@@ -42,7 +42,7 @@ spawn $env(SHELL)
42send -- "firejail --noprofile --name=bingo5 --caps.keep=chown,kill\r" 42send -- "firejail --noprofile --name=bingo5 --caps.keep=chown,kill\r"
43expect { 43expect {
44 timeout {puts "TESTING ERROR 4\n";exit} 44 timeout {puts "TESTING ERROR 4\n";exit}
45 "Child process initialized" 45 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
46} 46}
47sleep 1 47sleep 1
48 48
@@ -50,7 +50,7 @@ spawn $env(SHELL)
50send -- "firejail --name=bingo6 --profile=caps1.profile\r" 50send -- "firejail --name=bingo6 --profile=caps1.profile\r"
51expect { 51expect {
52 timeout {puts "TESTING ERROR 5\n";exit} 52 timeout {puts "TESTING ERROR 5\n";exit}
53 "Child process initialized" 53 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
54} 54}
55sleep 1 55sleep 1
56 56
@@ -58,7 +58,7 @@ spawn $env(SHELL)
58send -- "firejail --name=bingo7 --profile=caps2.profile\r" 58send -- "firejail --name=bingo7 --profile=caps2.profile\r"
59expect { 59expect {
60 timeout {puts "TESTING ERROR 0\n";exit} 60 timeout {puts "TESTING ERROR 0\n";exit}
61 "Child process initialized" 61 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
62} 62}
63sleep 1 63sleep 1
64 64
diff --git a/test/utils/firemon-cgroup.exp b/test/utils/firemon-cgroup.exp
index 3976b0c50..2dbc04a50 100755
--- a/test/utils/firemon-cgroup.exp
+++ b/test/utils/firemon-cgroup.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=test1\r" 10send -- "firejail --name=test1\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
@@ -18,7 +18,7 @@ spawn $env(SHELL)
18send -- "firejail --name=test2\r" 18send -- "firejail --name=test2\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 1\n";exit} 20 timeout {puts "TESTING ERROR 1\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
diff --git a/test/utils/firemon-cpu.exp b/test/utils/firemon-cpu.exp
index b410c764e..db5069ede 100755
--- a/test/utils/firemon-cpu.exp
+++ b/test/utils/firemon-cpu.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=test1\r" 10send -- "firejail --name=test1\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
@@ -18,7 +18,7 @@ spawn $env(SHELL)
18send -- "firejail --name=test2\r" 18send -- "firejail --name=test2\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 1\n";exit} 20 timeout {puts "TESTING ERROR 1\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
diff --git a/test/utils/firemon-interface.exp b/test/utils/firemon-interface.exp
index 0c358d129..7e4e5f0ae 100755
--- a/test/utils/firemon-interface.exp
+++ b/test/utils/firemon-interface.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/utils/firemon-name.exp b/test/utils/firemon-name.exp
index 57729d662..f8161cc81 100755
--- a/test/utils/firemon-name.exp
+++ b/test/utils/firemon-name.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=test\r" 10send -- "firejail --name=test\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
diff --git a/test/utils/firemon-seccomp.exp b/test/utils/firemon-seccomp.exp
index d35027827..7eb6f9168 100755
--- a/test/utils/firemon-seccomp.exp
+++ b/test/utils/firemon-seccomp.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --noprofile --name=bingo1 --seccomp\r" 10send -- "firejail --noprofile --name=bingo1 --seccomp\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
@@ -18,7 +18,7 @@ spawn $env(SHELL)
18send -- "firejail --noprofile --name=bingo2\r" 18send -- "firejail --noprofile --name=bingo2\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 0.1\n";exit} 20 timeout {puts "TESTING ERROR 0.1\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
diff --git a/test/utils/firemon-version.exp b/test/utils/firemon-version.exp
index 8e4e33ec0..81ab2e8b0 100755
--- a/test/utils/firemon-version.exp
+++ b/test/utils/firemon-version.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/utils/fs-print.exp b/test/utils/fs-print.exp
index 4b6eac391..536d59dbd 100755
--- a/test/utils/fs-print.exp
+++ b/test/utils/fs-print.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=test\r" 10send -- "firejail --name=test\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
diff --git a/test/utils/help.exp b/test/utils/help.exp
index 71bb5788c..4c5f46e8a 100755
--- a/test/utils/help.exp
+++ b/test/utils/help.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/utils/join-profile.exp b/test/utils/join-profile.exp
index d6fcc50d7..565010b82 100755
--- a/test/utils/join-profile.exp
+++ b/test/utils/join-profile.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --profile=name.profile\r" 11send -- "firejail --profile=name.profile\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 2 16sleep 2
17 17
@@ -21,14 +21,18 @@ expect {
21 timeout {puts "TESTING ERROR 1\n";exit} 21 timeout {puts "TESTING ERROR 1\n";exit}
22 "Switching to pid" 22 "Switching to pid"
23} 23}
24expect {
25 timeout {puts "TESTING ERROR 2\n";exit}
26 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
27}
24sleep 1 28sleep 1
25send -- "ps aux\r" 29send -- "ps aux\r"
26expect { 30expect {
27 timeout {puts "TESTING ERROR 2\n";exit} 31 timeout {puts "TESTING ERROR 3\n";exit}
28 "/bin/bash" 32 "/bin/bash"
29} 33}
30expect { 34expect {
31 timeout {puts "TESTING ERROR 3\n";exit} 35 timeout {puts "TESTING ERROR 4\n";exit}
32 "/bin/bash" 36 "/bin/bash"
33} 37}
34 38
diff --git a/test/utils/join.exp b/test/utils/join.exp
index 25dd31922..82decce51 100755
--- a/test/utils/join.exp
+++ b/test/utils/join.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --name=jointesting --cpu=0 --nice=2\r" 11send -- "firejail --name=jointesting --cpu=0 --nice=2\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 2 16sleep 2
17 17
@@ -26,17 +26,21 @@ after 100
26 26
27send -- "firejail --join=jointesting\r" 27send -- "firejail --join=jointesting\r"
28expect { 28expect {
29 timeout {puts "TESTING ERROR 1\n";exit} 29 timeout {puts "TESTING ERROR 2\n";exit}
30 "Switching to pid" 30 "Switching to pid"
31} 31}
32expect {
33 timeout {puts "TESTING ERROR 3\n";exit}
34 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
35}
32sleep 1 36sleep 1
33send -- "ps aux\r" 37send -- "ps aux\r"
34expect { 38expect {
35 timeout {puts "TESTING ERROR 2\n";exit} 39 timeout {puts "TESTING ERROR 4\n";exit}
36 "/bin/bash" 40 "/bin/bash"
37} 41}
38expect { 42expect {
39 timeout {puts "TESTING ERROR 3\n";exit} 43 timeout {puts "TESTING ERROR 5\n";exit}
40 "/bin/bash" 44 "/bin/bash"
41} 45}
42 46
@@ -44,13 +48,13 @@ send -- "exit\r"
44sleep 1 48sleep 1
45send -- "firejail --join-network=jointesting\r" 49send -- "firejail --join-network=jointesting\r"
46expect { 50expect {
47 timeout {puts "TESTING ERROR 4\n";exit} 51 timeout {puts "TESTING ERROR 6\n";exit}
48 "is only available to root user" 52 "is only available to root user"
49} 53}
50after 100 54after 100
51send -- "firejail --join-filesystem=jointesting\r" 55send -- "firejail --join-filesystem=jointesting\r"
52expect { 56expect {
53 timeout {puts "TESTING ERROR 5\n";exit} 57 timeout {puts "TESTING ERROR 7\n";exit}
54 "is only available to root user" 58 "is only available to root user"
55} 59}
56 60
diff --git a/test/utils/join2.exp b/test/utils/join2.exp
index dada97158..5f5a6bfe0 100755
--- a/test/utils/join2.exp
+++ b/test/utils/join2.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --name=\"join testing\"\r" 11send -- "firejail --name=\"join testing\"\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 2 16sleep 2
17 17
@@ -21,14 +21,18 @@ expect {
21 timeout {puts "TESTING ERROR 1\n";exit} 21 timeout {puts "TESTING ERROR 1\n";exit}
22 "Switching to pid" 22 "Switching to pid"
23} 23}
24expect {
25 timeout {puts "TESTING ERROR 2\n";exit}
26 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
27}
24sleep 1 28sleep 1
25send -- "ps aux\r" 29send -- "ps aux\r"
26expect { 30expect {
27 timeout {puts "TESTING ERROR 2\n";exit} 31 timeout {puts "TESTING ERROR 3\n";exit}
28 "/bin/bash" 32 "/bin/bash"
29} 33}
30expect { 34expect {
31 timeout {puts "TESTING ERROR 3\n";exit} 35 timeout {puts "TESTING ERROR 4\n";exit}
32 "/bin/bash" 36 "/bin/bash"
33} 37}
34 38
diff --git a/test/utils/join3.exp b/test/utils/join3.exp
index 305000e92..c771b924b 100755
--- a/test/utils/join3.exp
+++ b/test/utils/join3.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --name=join\\ testing\r" 11send -- "firejail --name=join\\ testing\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 2 16sleep 2
17 17
@@ -21,14 +21,18 @@ expect {
21 timeout {puts "TESTING ERROR 1\n";exit} 21 timeout {puts "TESTING ERROR 1\n";exit}
22 "Switching to pid" 22 "Switching to pid"
23} 23}
24expect {
25 timeout {puts "TESTING ERROR 2\n";exit}
26 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
27}
24sleep 1 28sleep 1
25send -- "ps aux\r" 29send -- "ps aux\r"
26expect { 30expect {
27 timeout {puts "TESTING ERROR 2\n";exit} 31 timeout {puts "TESTING ERROR 3\n";exit}
28 "/bin/bash" 32 "/bin/bash"
29} 33}
30expect { 34expect {
31 timeout {puts "TESTING ERROR 3\n";exit} 35 timeout {puts "TESTING ERROR 4\n";exit}
32 "/bin/bash" 36 "/bin/bash"
33} 37}
34 38
diff --git a/test/utils/join4.exp b/test/utils/join4.exp
index 8c5e91d68..cddf7ad18 100755
--- a/test/utils/join4.exp
+++ b/test/utils/join4.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --name=123test\r" 11send -- "firejail --name=123test\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 2 16sleep 2
17 17
@@ -21,14 +21,18 @@ expect {
21 timeout {puts "TESTING ERROR 1\n";exit} 21 timeout {puts "TESTING ERROR 1\n";exit}
22 "Switching to pid" 22 "Switching to pid"
23} 23}
24expect {
25 timeout {puts "TESTING ERROR 2\n";exit}
26 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
27}
24sleep 1 28sleep 1
25send -- "ps aux\r" 29send -- "ps aux\r"
26expect { 30expect {
27 timeout {puts "TESTING ERROR 2\n";exit} 31 timeout {puts "TESTING ERROR 3\n";exit}
28 "/bin/bash" 32 "/bin/bash"
29} 33}
30expect { 34expect {
31 timeout {puts "TESTING ERROR 3\n";exit} 35 timeout {puts "TESTING ERROR 4\n";exit}
32 "/bin/bash" 36 "/bin/bash"
33} 37}
34 38
diff --git a/test/utils/join5.exp b/test/utils/join5.exp
index 3d365944d..c0990ebf1 100755
--- a/test/utils/join5.exp
+++ b/test/utils/join5.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -9,8 +9,8 @@ match_max 100000
9 9
10send -- "firejail --name=test123 --profile=join5.profile\r" 10send -- "firejail --name=test123 --profile=join5.profile\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 5\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16spawn $env(SHELL) 16spawn $env(SHELL)
@@ -19,14 +19,18 @@ expect {
19 timeout {puts "TESTING ERROR 1\n";exit} 19 timeout {puts "TESTING ERROR 1\n";exit}
20 "Switching to pid" 20 "Switching to pid"
21} 21}
22expect {
23 timeout {puts "TESTING ERROR 2\n";exit}
24 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
25}
22sleep 1 26sleep 1
23send -- "ps aux\r" 27send -- "ps aux\r"
24expect { 28expect {
25 timeout {puts "TESTING ERROR 2\n";exit} 29 timeout {puts "TESTING ERROR 3\n";exit}
26 "/bin/bash" 30 "/bin/bash"
27} 31}
28expect { 32expect {
29 timeout {puts "TESTING ERROR 3\n";exit} 33 timeout {puts "TESTING ERROR 4\n";exit}
30 "/bin/bash" 34 "/bin/bash"
31} 35}
32 36
@@ -35,11 +39,11 @@ after 100
35 39
36send -- "firejail --protocol.print=test123\r" 40send -- "firejail --protocol.print=test123\r"
37expect { 41expect {
38 timeout {puts "TESTING ERROR 4\n";exit} 42 timeout {puts "TESTING ERROR 5\n";exit}
39 "Switching to pid" 43 "Switching to pid"
40} 44}
41expect { 45expect {
42 timeout {puts "TESTING ERROR 5\n";exit} 46 timeout {puts "TESTING ERROR 6\n";exit}
43 "unix" 47 "unix"
44} 48}
45 49
diff --git a/test/utils/list.exp b/test/utils/list.exp
index d7d39357d..30344e22a 100755
--- a/test/utils/list.exp
+++ b/test/utils/list.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail\r" 10send -- "firejail\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15after 100 15after 100
16 16
@@ -18,7 +18,7 @@ spawn $env(SHELL)
18send -- "firejail\r" 18send -- "firejail\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 1\n";exit} 20 timeout {puts "TESTING ERROR 1\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23after 100 23after 100
24 24
@@ -26,7 +26,7 @@ spawn $env(SHELL)
26send -- "firejail\r" 26send -- "firejail\r"
27expect { 27expect {
28 timeout {puts "TESTING ERROR 2\n";exit} 28 timeout {puts "TESTING ERROR 2\n";exit}
29 "Child process initialized" 29 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
30} 30}
31sleep 1 31sleep 1
32 32
diff --git a/test/utils/ls.exp b/test/utils/ls.exp
index 080bfdad2..6b6c67ede 100755
--- a/test/utils/ls.exp
+++ b/test/utils/ls.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -14,7 +14,7 @@ sleep 1
14send -- "firejail --private --name=test\r" 14send -- "firejail --private --name=test\r"
15expect { 15expect {
16 timeout {puts "TESTING ERROR 0\n";exit} 16 timeout {puts "TESTING ERROR 0\n";exit}
17 "Child process initialized" 17 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
18} 18}
19sleep 1 19sleep 1
20send -- "echo my_testing > ~/lstesting\r" 20send -- "echo my_testing > ~/lstesting\r"
diff --git a/test/utils/man.exp b/test/utils/man.exp
index 41f5a2ff8..3a0ca46d6 100755
--- a/test/utils/man.exp
+++ b/test/utils/man.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
diff --git a/test/utils/name.exp b/test/utils/name.exp
index 9e5367ba7..cd4465d41 100755
--- a/test/utils/name.exp
+++ b/test/utils/name.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --name=ftest\r" 11send -- "firejail --name=ftest\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16after 100 16after 100
17 17
@@ -19,7 +19,7 @@ spawn $env(SHELL)
19send -- "firejail --name=ftest\r" 19send -- "firejail --name=ftest\r"
20expect { 20expect {
21 timeout {puts "TESTING ERROR 1\n";exit} 21 timeout {puts "TESTING ERROR 1\n";exit}
22 "Child process initialized" 22 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
23} 23}
24after 100 24after 100
25 25
@@ -27,7 +27,7 @@ spawn $env(SHELL)
27send -- "firejail --name=ftest\r" 27send -- "firejail --name=ftest\r"
28expect { 28expect {
29 timeout {puts "TESTING ERROR 2\n";exit} 29 timeout {puts "TESTING ERROR 2\n";exit}
30 "Child process initialized" 30 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
31} 31}
32after 100 32after 100
33 33
@@ -35,7 +35,7 @@ spawn $env(SHELL)
35send -- "firejail --name=ftest\r" 35send -- "firejail --name=ftest\r"
36expect { 36expect {
37 timeout {puts "TESTING ERROR 3\n";exit} 37 timeout {puts "TESTING ERROR 3\n";exit}
38 "Child process initialized" 38 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
39} 39}
40after 100 40after 100
41 41
@@ -43,7 +43,7 @@ spawn $env(SHELL)
43send -- "firejail --name=ftest\r" 43send -- "firejail --name=ftest\r"
44expect { 44expect {
45 timeout {puts "TESTING ERROR 4\n";exit} 45 timeout {puts "TESTING ERROR 4\n";exit}
46 "Child process initialized" 46 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
47} 47}
48after 100 48after 100
49 49
@@ -51,7 +51,7 @@ spawn $env(SHELL)
51send -- "firejail --name=ftest\r" 51send -- "firejail --name=ftest\r"
52expect { 52expect {
53 timeout {puts "TESTING ERROR 5\n";exit} 53 timeout {puts "TESTING ERROR 5\n";exit}
54 "Child process initialized" 54 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
55} 55}
56after 100 56after 100
57 57
@@ -59,7 +59,7 @@ spawn $env(SHELL)
59send -- "firejail --name=ftest\r" 59send -- "firejail --name=ftest\r"
60expect { 60expect {
61 timeout {puts "TESTING ERROR 6\n";exit} 61 timeout {puts "TESTING ERROR 6\n";exit}
62 "Child process initialized" 62 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
63} 63}
64after 100 64after 100
65 65
@@ -67,7 +67,7 @@ spawn $env(SHELL)
67send -- "firejail --name=ftest\r" 67send -- "firejail --name=ftest\r"
68expect { 68expect {
69 timeout {puts "TESTING ERROR 7\n";exit} 69 timeout {puts "TESTING ERROR 7\n";exit}
70 "Child process initialized" 70 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
71} 71}
72after 100 72after 100
73 73
@@ -75,7 +75,7 @@ spawn $env(SHELL)
75send -- "firejail --name=ftest\r" 75send -- "firejail --name=ftest\r"
76expect { 76expect {
77 timeout {puts "TESTING ERROR 8\n";exit} 77 timeout {puts "TESTING ERROR 8\n";exit}
78 "Child process initialized" 78 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
79} 79}
80after 100 80after 100
81 81
@@ -83,7 +83,7 @@ spawn $env(SHELL)
83send -- "firejail --name=ftest\r" 83send -- "firejail --name=ftest\r"
84expect { 84expect {
85 timeout {puts "TESTING ERROR 9\n";exit} 85 timeout {puts "TESTING ERROR 9\n";exit}
86 "Child process initialized" 86 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
87} 87}
88after 100 88after 100
89 89
@@ -91,7 +91,7 @@ spawn $env(SHELL)
91send -- "firejail --name=ftest\r" 91send -- "firejail --name=ftest\r"
92expect { 92expect {
93 timeout {puts "TESTING ERROR 10\n";exit} 93 timeout {puts "TESTING ERROR 10\n";exit}
94 "Child process initialized" 94 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
95} 95}
96after 100 96after 100
97 97
@@ -99,7 +99,7 @@ spawn $env(SHELL)
99send -- "firejail --name=ftest\r" 99send -- "firejail --name=ftest\r"
100expect { 100expect {
101 timeout {puts "TESTING ERROR 11\n";exit} 101 timeout {puts "TESTING ERROR 11\n";exit}
102 "Child process initialized" 102 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
103} 103}
104after 100 104after 100
105 105
diff --git a/test/utils/profile_print.exp b/test/utils/profile_print.exp
index f8f6708bb..9b2d65d84 100755
--- a/test/utils/profile_print.exp
+++ b/test/utils/profile_print.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --name=ftest\r" 11send -- "firejail --name=ftest\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16after 100 16after 100
17 17
diff --git a/test/utils/protocol-print.exp b/test/utils/protocol-print.exp
index 1ed92ddd6..ca74b7fc9 100755
--- a/test/utils/protocol-print.exp
+++ b/test/utils/protocol-print.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=test\r" 10send -- "firejail --name=test\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
diff --git a/test/utils/seccomp-print.exp b/test/utils/seccomp-print.exp
index 86f1e9845..a9525ce2e 100755
--- a/test/utils/seccomp-print.exp
+++ b/test/utils/seccomp-print.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=test\r" 10send -- "firejail --name=test\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 2 15sleep 2
16 16
diff --git a/test/utils/shutdown.exp b/test/utils/shutdown.exp
index 35d2750db..3950e901c 100755
--- a/test/utils/shutdown.exp
+++ b/test/utils/shutdown.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 15 6set timeout 15
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --name=shutdowntesting\r" 11send -- "firejail --name=shutdowntesting\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16sleep 2 16sleep 2
17 17
diff --git a/test/utils/shutdown2.exp b/test/utils/shutdown2.exp
index 7eb3d516b..4dabf6c23 100755
--- a/test/utils/shutdown2.exp
+++ b/test/utils/shutdown2.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -12,7 +12,7 @@ set firstspawn $spawn_id
12send -- "firejail --name=shutdowntesting ./catchsignal.sh\r" 12send -- "firejail --name=shutdowntesting ./catchsignal.sh\r"
13expect { 13expect {
14 timeout {puts "TESTING ERROR 0\n";exit} 14 timeout {puts "TESTING ERROR 0\n";exit}
15 "Child process initialized" 15 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
16} 16}
17sleep 2 17sleep 2
18 18
diff --git a/test/utils/shutdown3.exp b/test/utils/shutdown3.exp
index a543bb9e5..8017d753d 100755
--- a/test/utils/shutdown3.exp
+++ b/test/utils/shutdown3.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -12,7 +12,7 @@ set firstspawn $spawn_id
12send -- "firejail --name=shutdowntesting ./catchsignal-master.sh\r" 12send -- "firejail --name=shutdowntesting ./catchsignal-master.sh\r"
13expect { 13expect {
14 timeout {puts "TESTING ERROR 0\n";exit} 14 timeout {puts "TESTING ERROR 0\n";exit}
15 "Child process initialized" 15 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
16} 16}
17sleep 2 17sleep 2
18 18
diff --git a/test/utils/shutdown4.exp b/test/utils/shutdown4.exp
index a9a3978ea..09db3f140 100755
--- a/test/utils/shutdown4.exp
+++ b/test/utils/shutdown4.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -12,7 +12,7 @@ set firstspawn $spawn_id
12send -- "firejail --name=shutdowntesting ./catchsignal2.sh\r" 12send -- "firejail --name=shutdowntesting ./catchsignal2.sh\r"
13expect { 13expect {
14 timeout {puts "TESTING ERROR 0\n";exit} 14 timeout {puts "TESTING ERROR 0\n";exit}
15 "Child process initialized" 15 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
16} 16}
17sleep 2 17sleep 2
18 18
diff --git a/test/utils/top.exp b/test/utils/top.exp
index 150011bba..402d7c2df 100755
--- a/test/utils/top.exp
+++ b/test/utils/top.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --name=test1\r" 10send -- "firejail --name=test1\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15sleep 1 15sleep 1
16 16
@@ -18,7 +18,7 @@ spawn $env(SHELL)
18send -- "firejail --name=test2\r" 18send -- "firejail --name=test2\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 1\n";exit} 20 timeout {puts "TESTING ERROR 1\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23sleep 1 23sleep 1
24 24
diff --git a/test/utils/trace.exp b/test/utils/trace.exp
index 3ed09565b..f14001c88 100755
--- a/test/utils/trace.exp
+++ b/test/utils/trace.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 30 6set timeout 30
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail --trace mkdir ttt\r" 10send -- "firejail --trace mkdir ttt\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 1\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
@@ -21,7 +21,7 @@ sleep 1
21send -- "firejail --trace rmdir ttt\r" 21send -- "firejail --trace rmdir ttt\r"
22expect { 22expect {
23 timeout {puts "TESTING ERROR 2\n";exit} 23 timeout {puts "TESTING ERROR 2\n";exit}
24 "Child process initialized" 24 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
25} 25}
26expect { 26expect {
27 timeout {puts "TESTING ERROR 3\n";exit} 27 timeout {puts "TESTING ERROR 3\n";exit}
@@ -32,7 +32,7 @@ sleep 1
32send -- "firejail --trace touch ttt\r" 32send -- "firejail --trace touch ttt\r"
33expect { 33expect {
34 timeout {puts "TESTING ERROR 4\n";exit} 34 timeout {puts "TESTING ERROR 4\n";exit}
35 "Child process initialized" 35 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
36} 36}
37expect { 37expect {
38 timeout {puts "TESTING ERROR 5\n";exit} 38 timeout {puts "TESTING ERROR 5\n";exit}
@@ -44,7 +44,7 @@ sleep 1
44send -- "firejail --trace rm ttt\r" 44send -- "firejail --trace rm ttt\r"
45expect { 45expect {
46 timeout {puts "TESTING ERROR 6\n";exit} 46 timeout {puts "TESTING ERROR 6\n";exit}
47 "Child process initialized" 47 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
48} 48}
49expect { 49expect {
50 timeout {puts "TESTING ERROR 7\n";exit} 50 timeout {puts "TESTING ERROR 7\n";exit}
@@ -55,7 +55,7 @@ sleep 1
55send -- "firejail --trace wget -q debian.org\r" 55send -- "firejail --trace wget -q debian.org\r"
56#expect { 56#expect {
57# timeout {puts "TESTING ERROR 8.1\n";exit} 57# timeout {puts "TESTING ERROR 8.1\n";exit}
58# "Child process initialized" 58# -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
59#} 59#}
60#expect { 60#expect {
61# timeout {puts "TESTING ERROR 8.2\n";exit} 61# timeout {puts "TESTING ERROR 8.2\n";exit}
@@ -86,7 +86,7 @@ sleep 1
86send -- "firejail --trace rm index.html\r" 86send -- "firejail --trace rm index.html\r"
87expect { 87expect {
88 timeout {puts "TESTING ERROR 9\n";exit} 88 timeout {puts "TESTING ERROR 9\n";exit}
89 "Child process initialized" 89 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
90} 90}
91expect { 91expect {
92 timeout {puts "TESTING ERROR 10\n";exit} 92 timeout {puts "TESTING ERROR 10\n";exit}
@@ -98,7 +98,7 @@ sleep 1
98send -- "firejail --trace\r" 98send -- "firejail --trace\r"
99expect { 99expect {
100 timeout {puts "TESTING ERROR 11\n";exit} 100 timeout {puts "TESTING ERROR 11\n";exit}
101 "Child process initialized" 101 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
102} 102}
103expect { 103expect {
104 timeout {puts "TESTING ERROR 12\n";exit} 104 timeout {puts "TESTING ERROR 12\n";exit}
diff --git a/test/utils/tree.exp b/test/utils/tree.exp
index ff834bec6..4b1f70bd2 100755
--- a/test/utils/tree.exp
+++ b/test/utils/tree.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
@@ -10,7 +10,7 @@ match_max 100000
10send -- "firejail\r" 10send -- "firejail\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14} 14}
15after 100 15after 100
16 16
@@ -18,7 +18,7 @@ spawn $env(SHELL)
18send -- "firejail\r" 18send -- "firejail\r"
19expect { 19expect {
20 timeout {puts "TESTING ERROR 1\n";exit} 20 timeout {puts "TESTING ERROR 1\n";exit}
21 "Child process initialized" 21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22} 22}
23after 100 23after 100
24 24
@@ -26,7 +26,7 @@ spawn $env(SHELL)
26send -- "firejail\r" 26send -- "firejail\r"
27expect { 27expect {
28 timeout {puts "TESTING ERROR 2\n";exit} 28 timeout {puts "TESTING ERROR 2\n";exit}
29 "Child process initialized" 29 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
30} 30}
31sleep 1 31sleep 1
32 32
diff --git a/test/utils/utils.sh b/test/utils/utils.sh
index c021d6287..18f749ed8 100755
--- a/test/utils/utils.sh
+++ b/test/utils/utils.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
@@ -15,8 +15,8 @@ export PATH="$PATH:/usr/lib/firejail:/usr/lib64/firejail"
15 15
16echo "TESTING: build (test/utils/build.exp)" 16echo "TESTING: build (test/utils/build.exp)"
17./build.exp 17./build.exp
18rm -f ~/firejail-test-file-7699 18rm -f ~/_firejail-test-file
19rm -f firejail-test-file-4388 19rm -f _firejail-test-file
20 20
21echo "TESTING: name (test/utils/name.exp)" 21echo "TESTING: name (test/utils/name.exp)"
22./name.exp 22./name.exp
diff --git a/test/utils/version.exp b/test/utils/version.exp
index be0d152b8..f010809f8 100755
--- a/test/utils/version.exp
+++ b/test/utils/version.exp
@@ -1,6 +1,6 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project 2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors 3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10