mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[PR #4229] [MERGED] Whitelist2 #5070
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#5070
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/netblue30/firejail/pull/4229
Author: @smitsohu
Created: 5/1/2021
Status: ✅ Merged
Merged: 5/18/2021
Merged by: @netblue30
Base:
master← Head:whitelist2📝 Commits (5)
289d648enhance clean_pathname function923d7adintroduce safer_openat function5445d87add support for arbitrary whitelist directories14b104atweak9e7cad0add /run whitelist support📊 Changes
13 files changed (+540 additions, -976 deletions)
View changed files
📝
etc/firejail.config(+4 -0)📝
src/firejail/checkcfg.c(+26 -0)📝
src/firejail/chroot.c(+4 -4)📝
src/firejail/dbus.c(+1 -1)📝
src/firejail/firejail.h(+13 -16)📝
src/firejail/fs.c(+5 -5)📝
src/firejail/fs_home.c(+3 -3)📝
src/firejail/fs_whitelist.c(+436 -900)📝
src/firejail/pulseaudio.c(+1 -1)📝
src/firejail/restrict_users.c(+1 -1)📝
src/firejail/util.c(+41 -28)📝
src/firejail/x11.c(+5 -5)📝
src/include/rundefs.h(+0 -12)📄 Description
Somewhat experimental whitelist implementation. Fixes #2041.
All top level directories are allowed except /proc, /sys and /run. As an exception from the exception, /sys/module and /run/user/$UID are allowed. This way all profiles will continue to work. Another special case is /usr, where the subdirectories (like /usr/share) are top level directories for the purpose of whitelisting.
For now all restrictions regarding symbolic links are gone (and
follow-symlink-as-userfrom firejail.config is without effect). I'm not entirely sure if that is sustainable, but it can always be added back.Otherwise this implementation should be very close to the current one.
Maybe it would also make sense to reimplement private-lib as whitelist then, in order to prevent name collisions as in #3236
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.