mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6460] Multi-command syntax to reduce boilerplate #3282
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#3282
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 @ghost on GitHub (Sep 2, 2024).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6460
Is your feature request related to a problem? Please describe.
Not creating directories can result in security issues, so oftentimes directories need to be created and this creates a lot of boilerplate profile code.
Example from seafile-applet.profile:
It would be nice to reduce this boilerplate by combining it into one directive.
Describe the solution you'd like
I propose either one of two things:
or
The
+I think works better because the optionblacklist-nologwould then becomeblacklist-mkdir-nolog. It is a bit cleaner to just haveblacklist-nolog+.@ghost commented on GitHub (Sep 2, 2024):
I guess the
+syntax wouldn't work because it could be a file too. So, I guesswhitelist-mkdirandwhitelist-mkfilewould be how to combine them.Perhaps a solution is to create a compact method of directive calling.
For example:
This says run mkdir with the given argument, then run whitelist with the given argument.
This is flexible so would be the same here:
It would not require creating a bunch new directives, but just changing how to parse them.
This seems like a small change to the syntax parser of profiles, but would reduce a lot of boilerplate.
@rusty-snake commented on GitHub (Sep 2, 2024):
Copy-pasta code with 20 hardcoded combination is simpler than extending parsing logic.
I like this, you can even
noblacklist+mkdir+whitelist.Previous discussion https://github.com/netblue30/firejail/issues/3447#issuecomment-683463663