mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[PR #6504] [CLOSED] feature: create the link only if its endpoint is available #6045
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#6045
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/6504
Author: @i-pankrat
Created: 10/10/2024
Status: ❌ Closed
Base:
master← Head:delayed-links📝 Commits (1)
21e74bbfeature: create the link only if its endpoint is available📊 Changes
7 files changed (+258 additions, -17 deletions)
View changed files
📝
src/firejail/firejail.h(+15 -0)📝
src/firejail/fs.c(+2 -0)📝
src/firejail/fs_etc.c(+22 -7)📝
src/firejail/fs_whitelist.c(+5 -0)📝
src/firejail/profile.c(+116 -0)📝
src/firejail/sandbox.c(+19 -10)📝
src/firejail/util.c(+79 -0)📄 Description
This PR is intended to discuss the operation of the
--private-etcoption. Right now, for most files, a copy of the resolved file ((resolved path) is created in /etc. But this is not always a good way, as for example with the hardcoded value of/etc/mtab. But there are also files that in theory can be changed while the process is running in the sandbox. The process will not know about these changes until the sandbox is restarted, e.g.localtime,resolv.conf. If the time zone changes, localtime will change.localtime without sandbox on my machine:
localtime in sandbox on my machine:
Moreover, it is intuitively unexpected and seems unsafe that a link file in /etc/ is created if some intermediate link or resolved file is not available in the sandbox. I would expect firejail to send at least a warning or not just create a file in /etc/ in such a case. Example with localtime linked to /usr/share/zoneinfo/Europe/Moscow, /usr/share/zoneinfo is blacklisted and /etc/localtime is available:
The PR offers a solution to two problems:
I haven't fixed the tests yet. Let's discuss what you think about it.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.