Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look for config files in /usr/local/etc/firejail/ #6457

Closed
QUser534 opened this issue Sep 1, 2024 · 2 comments
Closed

Look for config files in /usr/local/etc/firejail/ #6457

QUser534 opened this issue Sep 1, 2024 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@QUser534
Copy link

QUser534 commented Sep 1, 2024

Is your feature request related to a problem? Please describe.

It is hard to manage a lot of custom profiles. The current solution of looking for profiles in ~/.config/firejail does not solve it because it is not system wide, so apps launched from another user will not use those profiles. For custom, multi-user profile management there should be another directory.

This approach allows much cleaner, system-wide profile changes that mixing a ton of new config files /etc/firejail. For example, to move all the custom changes to a new install requires just copy / pasting the /usr/local/etc/firejail directory

Serious errors can be created when creating profiles in "~./config/firejail" that do not exist outside. For example, a user may have profiles that blacklist private directories such as ~./Private. If one day they accidently run that app using "sudo" then the custom profile in ~/ would not be read and their /Private folder would be read.

My point being that in most use-cases it doesn't make sense to have profiles specific to one user that also is not blocked system-wide. And for these system-wide changes it makes more sense to have a system-wide custom directory to not clutter the /etc/firejail directory.

Describe the solution you'd like

Look for profiles in the following order:

~/.config/firejail
/usr/local/etc/firejail
/etc/firejail

@rusty-snake
Copy link
Collaborator

Duplicated of #4871

--

Also doubting that /usr/local is the right path.

  1. It conflict if firejail is installed from git with make install into /usr/local.
  2. Does not scale well for different filesystem layouts (e.g. guix) and is not the best/correct choice in file-hierachy/fhs/hier.

If one day they accidently run that app using "sudo" then the custom profile in ~/ would not be read and their /Private folder would be read.

If you accidental run apps using sudo you have a different problem in your op-sec. Also running a app using sudo may allow the app to undo a blacklist.

Also I do not think that this is inside of firejails generally to be assumed thread model given that firejail/firecfg does not stop you from running a program without it using e.g. it's full path.

for these system-wide changes it makes more sense to have a system-wide custom directory to not clutter the [default] directory.

Yes

My point being that in most use-cases it doesn't make sense to have profiles specific to one user that also is not blocked system-wide.

.locals: make sense on per-user basis
.profile: may or may not, there a different thing, the main focus of firejail are single.

@kmk3 kmk3 changed the title Look for config files in /usr/local/etc/firejail/ - better management of custom config Look for config files in /usr/local/etc/firejail/ Sep 1, 2024
@kmk3 kmk3 added the duplicate This issue or pull request already exists label Sep 2, 2024
@kmk3
Copy link
Collaborator

kmk3 commented Sep 2, 2024

Closing as a duplicate of #4871.

Regarding the path, the most appropriate place to put the profiles would
probably be in /usr/share:

Such as in /usr/share/firejail/profiles.

@kmk3 kmk3 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants
@kmk3 @rusty-snake @QUser534 and others