mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #216] whitelist globbing #149
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#149
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 @curiosity-seeker on GitHub (Jan 10, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/216
I was trying to rewrite/streamline my Firejail profile for LibreOffice. One rule which I tried was
whitelist ~/*.odt
but that doesn't work. It does work, though, in the form
whitelist ~/Example.odt
So it seems that placeholders are not supported. This would be a very useful enhancement in Firejail, indeed!
@netblue30 commented on GitHub (Jan 10, 2016):
I'll implement it, thanks for the idea!
@curiosity-seeker commented on GitHub (Jan 10, 2016):
Great - thank you very much in advance!
BTW, it would be nice if one could add several file suffixes in one line if possible. Something like
whitelist ~/*.odt, *.doc, *.docx
or
whitelist ~/*.odt | *.doc | *.docx
just to keep the profile more readable.
@netblue30 commented on GitHub (Jan 10, 2016):
I'll try that one also.
@ghost commented on GitHub (Jan 31, 2016):
Maybe in Bash syntax:
whitelist ~/*.{odt,doc,docx}
@netblue30 commented on GitHub (Mar 6, 2016):
several similar requests to follow:
@netblue30 commented on GitHub (May 2, 2016):
Also allow {}
@vn971 commented on GitHub (May 13, 2016):
And
[]@msva commented on GitHub (Mar 5, 2017):
Any updates on this?
@june128 commented on GitHub (Oct 15, 2019):
I'm currently working on enhancing the Thunderbird profile, so that Thunderbird can set itself as the default mail-program (and other things).
Thunderbird needs to modify the
~/.config/mimeapps.list-file for that. It does that by first creating a file named~/.config/mimeapps.list.randomBit(whererandomBitare 6 random characters[a-zA-Z0-9]) and then renaming this temporary file to~/.config/mimeapps.listto make the change.For that enhancement to be done, whitelist globbing would be needed (I think).
@rusty-snake commented on GitHub (Oct 16, 2019):
@julianschacher #2874
EDIT:
To
whitelista file/dir it must be exists in the "normal" fs, thats whymkdir/mkfileis in the profiles.@june128 commented on GitHub (Oct 17, 2019):
@rusty-snake Thanks for the link! That's really an unfortunate issue.
@rusty-snake commented on GitHub (Apr 1, 2020):
601df2f@danielkrajnik commented on GitHub (Dec 18, 2021):
thanks, is it possible to use it resursively, that is all *.mp4 files in a directory and its subdirectories?
@rusty-snake commented on GitHub (Dec 19, 2021):
man 7 glob:@danielkrajnik commented on GitHub (Dec 19, 2021):
I see, so glibc doesn't provide a way to do it? Is there no other way to whitelist all files of specific format (e.g. *.mp4) in all subdirectories?
@rusty-snake commented on GitHub (Dec 19, 2021):
If the (sub)directory structure isn't to deep, you can
@danielkrajnik commented on GitHub (Dec 19, 2021):
Thanks, it is quite deep unfortunately (network mount). Ideally there would be a way to whitelist only certain files in such large directories rather than all of it.
@ghost commented on GitHub (Dec 19, 2021):
@danielkrajnik Maybe you could write a shell script from where you pre-select the (*.mp4) files you want to whitelist and bind mount them in a specific location. That way you can blacklist your network mount and only whitelist the new mount path. Have you tried that yet?
@rusty-snake commented on GitHub (Dec 19, 2021):
You can use find+xargs:
I'm not sure if you can perform injections with this command (spaces in filenames work), but if this is an untrusted network mount, you should check this.