mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2039] [enhancement] Allow more fine-grained ignore predicates #1377
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#1377
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 @chiraag-nataraj on GitHub (Jul 14, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2039
So right now, the way ignore works is that you use
ignore <predicate>and it ignores all predicates of that type. I'm wondering if we can fine-tune this a bit to select which specific instance of the predicate to ignore. As an example, in my profiles, I have acommon.incwhich does most of the common stuff. But occasionally, I need to ignore one or two predicates (otherwise the program will break). Two predicates I have in this file arenoexec ${HOME}andnoexec /tmp. I want to ignorenoexec /tmpwhile preservingnoexec ${HOME}. Of course, one way would be to split this up into two different files (or more) to allow more granularity in my imports. But the nice thing about the current system is that I just have one import command which is easy to remember. @netblue30, what would it take to ignore a specific instance of a predicate instead of every instance?@netblue30 commented on GitHub (Jul 15, 2018):
I kind of run into this problem all the time with the networking commands when I move profiles from one computer to another. The code for ignore is in profile.c. It is something very simple in this moment, if you have an idea we can expand it.
@chiraag-nataraj commented on GitHub (Jul 15, 2018):
@netblue30 How about matching the full line rather than just the predicate itself? That way, you can select specific instances of the predicate to ignore. If only the predicate is given, all instances are ignored (as is the current behavior).
@netblue30 commented on GitHub (Jul 17, 2018):
What if we add another option, --ignore-match? We can add it on top of the regular ignore code, and if we need we can always add more similar options.
@chiraag-nataraj commented on GitHub (Jul 21, 2018):
That seems like an okay idea. Personally, I don't see why we can't change the behavior of the current ignore predicate, but if this seems like a better idea to you, let's go with it :)
@startx2017 commented on GitHub (Jul 26, 2018):
I'll take over and implement it, unless you guys have already something going.
@startx2017 commented on GitHub (Aug 3, 2018):
Funny, the current code already allows ignoring full profile lines. Example:
In profile file use
I'll modify man pages.
@chiraag-nataraj commented on GitHub (Aug 6, 2018):
@startx2017 Oh man...let me try this now.
@chiraag-nataraj commented on GitHub (Aug 6, 2018):
Oh man, it does work! Awesome.