-
Notifications
You must be signed in to change notification settings - Fork 570
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
Install provided profiles under LIBDIR/firejail-profiles #4871
Comments
I think |
systemd* and NetworkManager use |
According to FHS: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s11.html
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s06.html
|
FHS is getting outdated. Still, profiles probably shouldn't be shared across different architectures, even though they are text files. For example, system calls lists for seccomp may be different and white/blacklisting could refer to architecture dependent paths. |
@rusty-snake commented on Jan 20:
While overriding the upstream profiles with non-packaged files system-wide
If by "normally should not modify" you mean that .local files are the preferred Also, user story: The first thing I do when debugging profiles is to edit/comment things in Additionally, even if not editing the .profile file, currently I can simply do # opens firefox.local, firefox.profile
vim /etc/firejail/firefox.* To create a .local file: cd /etc/firejail
vim foo.{profile,local} To see only the local overrides: ls -l /etc/firejail/*.local This is the most important part to me, as having the profiles split across
While I agree that a user failing to provide important details on an issue is Maybe this could be mitigated by making it part of the issue template
Also, while I agree that users are less likely to modify files in /usr, putting
I think that this would make profiles less discoverable. Whatever is in /etc, I don't really expect to ever open anything on /usr/lib unless I want to debug /usr/share might contain documentation, but again, it's rare that I'll ever
I think having to deal with 2 different base directories for system
|
@topimiettinen commented on Jan 20:
If they are not to be shared by all architectures, then how would they be
Do you mean in the arguments to If
(Or whatever names are used for each arch in the kernel) And if
Well, there are already references to e.g.: /usr/lib64, which may not exist for |
Most of the system calls are common to all architectures, so in practice there shouldn't be a problem. System call lists also help. Using raw system call numbers (
That could work, or if the architecture specific system calls don't overlap, they could be ignored on other architectures.
Yes.
Yes, but there could be blacklists blocking some of |
@topimiettinen commented on Jan 22:
Yes; maybe this could be done automatically when handling if (arg_seccomp_block_secondary) {
#ifndef __AMD64__
profile_add("blacklist /usr/lib/x86_64-*");
#endif
#ifndef __ARMV7__
profile_add("blacklist /usr/lib/armv7-*");
#endif
// ...
} |
Good idea, though I'd make it a separate option. This wouldn't help if the profile files refer to the architecture dependent paths, for example |
@topimiettinen commented on Jan 24:
(Continued on #4879) |
rpmlint says
text files can be arch specific too ... Does lintian something like this? |
Lintian does not complain about "only non-binary" files in /usr/lib. I tested by installing the profiles in the firejail-profiles package into /usr/lib/firejail instead of /etc/firejail. (It has a warning for the other "direction": arch-dependent-file-in-usr-share; and it also currently complains about executables in /usr/lib (instead of libexec): executable-in-usr-lib) |
I think intuitively people expect to find configuration files in etc. A better alternative would be to create new folders in /etc/firejail . Some applications are annoyingly hiding some configuration files in var, so that you can't find them. for example something like this: /etc/firejail/profiles |
Just as another example, the recommended path for dbus policy files has recently moved in Debian from |
Any update on this? For the record, |
OT: Out of interest who is the winner? |
|
Is your feature request related to a problem? Please describe.
--debug
does not indicated this.Describe the solution you'd like
/usr/lib/firejail-profiles
(or to whatever --libdir is configured)./etc/firejail(-profiles)
. i.e. you can create/etc/firejail(-profiles)/firefox.profile
at it will not be overwritten.~/.config/firejail
(nothing changed)Describe alternatives you've considered
/usr/share
(i.e.--datadir
) but I think/usr/lib
is better for provided configurations.Additional context
The text was updated successfully, but these errors were encountered: