mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2505] new *-common includes #1631
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#1631
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 @smitsohu on GitHub (Mar 2, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2505
How about two more includes, one collecting various noexec directives in one place, and the other collecting some common whitelisting in /run/user/$UID?
A noexec-common.inc (or whatever the name) could for example look like
(adapted from a suggestion of @Vincent43) and go to all profiles that have an
apparmoroption currently. As this duplicates apparmor restrictions, there is obviously only limited value for people who run firejail with apparmor enabled. But for everyone else it could be an important addition.A simple whitelist-run-common.inc (or whatever the name)
should be sufficient for most of the programs. Some profiles (those with
writable-run-useroption) will need an extra linewhitelist ${RUNUSER}/gnupg.Btw, what usually doesn't work is
whitelist ${RUNUSER}/gvfs, because of the broken Firejail - FUSE interaction.@Vincent43 commented on GitHub (Mar 3, 2019):
I wonder if we could sneak-in those in
disable-common.incandwhitelist-common.inc.@smitsohu commented on GitHub (Mar 6, 2019):
Good question.
noexec ${HOME}andnoexec /dev/shmcan be problematic, I was a bit worried about breaking many profiles.Regarding the whitelisting in /run/user, I currently cannot really overlook the consequences of removing the gvfs mount point. From what I'm reading, Gnome media players or image managers might run into issues.
@Vincent43 commented on GitHub (Mar 6, 2019):
Ok. Let's introduce
noexec-common.incthen and use it to replacenoexecrules in app profiles gradually.@smitsohu commented on GitHub (Mar 11, 2019):
Or maybe
disable-exec.inc? We can call it from anywhere in the profile, so it could go to the disable-* block as well.@Vincent43 commented on GitHub (Mar 11, 2019):
Yes, it may fit better.
@Boruch-Baum commented on GitHub (Mar 19, 2019):
Is it possible to have a sort-of
whitelistcommand as an exception tonoexec? For example, here I have a solution for applying cpulimits to firejails, but it only works in that case because the default profile for firefox has the noexec line commented out; when the noexec line is active, the script in~/.local/bincan't be executed, even though it initiated the call to firejail!I'm sure there will be other examples of a limited number of executables of interest in
$HOMEfor a particular program, and that shouldn't be a deal-breaker for losing thenoexecfeature for the rest of$HOME. Maybe one example would bemutt, which calls in a strange mix of plug-ins and scripts, including indirectly calling scripts in one's$HOME. Also, thelessbrowser has options forlesspipeand highlighting that call in scripts local to$HOME, so any program that calls thelessbrowser will lose that functionality ifnoexec $HOMEis enabled.@Boruch-Baum commented on GitHub (Mar 19, 2019):
Another reason to support the idea of some sort of over-ride to
noexecis so that a local unprivileged user can put it in their personal~/.config/firejailprofile without having to edit anything in/etc/firejail. Also, let's say someone does perform the edit, ie. comments out anoexecline in/etc/firejail, won't the edit be over-written on the next package update? There would need to be some command suitable for/etc/firejail/foo.localin that case, which would have to be an over-ride.@Boruch-Baum commented on GitHub (Mar 19, 2019):
Maybe a way to implement my feature-request would be a tweak to
private-binwhich seems to create and mount a virtual/binto allow full path-names to over-ride the virtual remount performed bynoexec? I'm not familiar with the firejail internals so that's just an idea.@ghost commented on GitHub (Mar 19, 2019):
Maybe you're looking for the
ignoreoption, which is also still supported in the implementation of disable-exec.inc. For example, let's suppose /etc/firejail/foo.profile has thenoexec ${HOME}option (either in the 'old' form or via the newly introduced 'include disable-exec.inc' syntax). If a user puts something likeignore noexec ${HOME}in ~/.config/firejail/foo.local, that will always have precedence and already does what (I think) you describe. But if you mean a more granular exception (use noexec ${HOME} but ignore it for ~/.local/bin/foo only), I don't think that's possible (yet).Exactly, which is why all of the .profile files in /etc/firejail have comments inside to inform the (reading) user:
Is this what you're refering to by feature-request?
@Boruch-Baum commented on GitHub (Mar 19, 2019):
@glitsj16 : Yes, a more granular could allow users to do things like have personal wrapper scripts to launch firejail (see above my example for launching firefox with cpulimit), and have executables tie into personal plug-ins, (see above my example re: lessfilter, lesspipe, and it just occurred to me that midnight commander would also benefit).
Thanks for the advice about the
ignorecommand, which I had missed.@rusty-snake commented on GitHub (May 1, 2019):
I would suggest
whitelist-usr-share-common.inc@rusty-snake commented on GitHub (Jan 18, 2020):
disable-obsolete.incfor obsolete (EOL/EOS) software.(#3164)@rusty-snake commented on GitHub (Apr 1, 2020):
Should we close here?
@smitsohu commented on GitHub (Apr 2, 2020):
Let's close.