mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3412] Support bash like alias #2142
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#2142
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 @rusty-snake on GitHub (May 11, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3412
A
aliasstatement like in bash can be very handy.Example
Why?
Easier maintenance of profiles.
New command like
notrash(see #3081) can be implemented w/o touching C-code.Performance:
Firejail profile becoming harder to maintain a cross distros, getting new features (such as dbus). To deal with that we add more
include allow-*.inccommands.includewill always cause a disk I/O even for small things. If we now also adddbus-*.incfiles (see https://github.com/netblue30/firejail/pull/3406#issuecomment-625455112) which makes sense form the maintenance standpoint, we get more and more files to open just for a few lines.My firefox.profile has already 22 profiles included.
Alternatives
Instead of a new profile option we could also use a
aliasen.xml(or what ever the name/file-type is) in/etc/firejailand~/.config/firejail.@ghost commented on GitHub (May 11, 2020):
Personally I really like the aliases idea! Besides the already mentioned complexity/maintenance/performance issues, IMO we face a real need to come up with a syntax format that would also work on the command-line. Something like
firejail --notrash --dbus=notifications foois manageable and reasonably clear as to what it does exactly, which I can't say of the longer format.@rusty-snake commented on GitHub (May 12, 2020):
I was already thinking about splitting everything regarding the filesystem (blacklist, whitelist, disable-mnt, tmpfs, private-bin, ...) into a low-level-profile-language and a high-level one. Profiles would be written in the high-level-language which will have all things like notrash, nodesktop, private-gnupg (#2786), allusers, private-dev, .... Options like nonewprivs exists in both and are unchanged. The high-level-language would be parsed by a plugin/helper-program (which can be sandboxed, chrooted, setuid=nodboy, ...) which generated the low-level-commands (only blacklist, tmpfs (needs restrictions which paths can be tmpfsed[1]), bind (need restriction too), and nonewprivs, seccomp, mdwe, ...) which is then applied by firejail. This allows faster implementing of new options, less code running with uid=0,euid=nobody.
[1] example: tmpfs is always allowed in $HOME, for /etc only if nonewprivs is set, ...