mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2065] Freedesktop dirs whitelisting works from profile but not command line #1394
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#1394
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 @Fred-Barclay on GitHub (Jul 25, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2065
I'm seeing some interesting behavior when combining whitelist and ${DOCUMENTS}, ${DOWNLOADS}, and so on:
Using ${DOCUMENTS} exits immediately:
And specifying a subdirectory seems to fail to whitelist anything:
But using a profile with only
whitelist ${DOCUMENTS}works:There are similar results for ${DOWNLOADS}:
whitelist ${DOWNLOADS}works:It's worth noting that
echo ${DOCUMENTS}or ${DOWNLOADS} returns nothing.So as best I can tell -- and it may just be me doing something wrong -- whitelisting these directories from command line fails, but using a profile works.
I haven't tried blacklists or read-only yet.
@chiraag-nataraj commented on GitHub (Jul 25, 2018):
Try quoting the variable:
firejail --whitelist='${DOCUMENTS}'. Most likely there's shell-expansion happening, which meansfirejailnever receives the actual variable but instead whatever the shell expanded it to.