mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3735] Wrong definition of macro paths from ~/.config/user-dirs.dirs if they are not in "$HOME". #2357
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#2357
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?
Originally created by @13ilya-old on GitHub (Nov 10, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3735
When I specify "blacklist ${DOCUMENTS}" in the config, I expect that the path to the documents directory assigned in my KDE will be blocked. But this only works if the path starts with $HOME. If this is not the case, for example (/Data/Documents) then "$HOME/Documents" is used instead.
cat ~/.config/user-dirs.dirs
XDG_DESKTOP_DIR="$HOME/Desktop/"
XDG_DOCUMENTS_DIR="/Data/Documents"
XDG_DOWNLOAD_DIR="$HOME/Downloads/"
XDG_MUSIC_DIR="/Data/Music"
XDG_PICTURES_DIR="/Data/Pictures"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_TEMPLATES_DIR="$HOME/"
XDG_VIDEOS_DIR="/Data/Video"
openSUSE Tumbleweed
KDE
firejail 0.9.64
@rusty-snake commented on GitHub (Nov 10, 2020):
It's not hardcoded, user-dirs.dirs is parsed.
However, user-dirs.dirs is not parse correctly. The code expects that the line for
${DOCUMENTS}starts withXDG_DOCUMENTS_DIR=\"$HOME/and the part after the/is then used relative tocfg.homedir.@13ilya-old commented on GitHub (Nov 10, 2020):
Your script also works for me.
But I'm not specifying the path in $HOME, but on another partition of the disk /Data.
And this is no longer processed, and instead of "/Data/Documents", "$HOME/Documents" is blocked.