Closed qdii closed 4 months ago
@rusty-snake Added a commit that adds notpm
statement to all the profiles which contain private-dev
.
After this is committed, we should also update the Wiki: https://github.com/netblue30/firejail/wiki/Comparison-of-firejail-and-systemd's-hardening-options
Amended and force-pushed with alphabetical ordering.
There are some other missing changes:
notpm
to profile.cnotpm
to firejail-profile.5.in#notpm
to default.profile (keep it commented like #nou2f
for
consistency)make syntax
and commit the resulting changesSee commit 760f50f78 ("landlock: move commands into profile and add landlock.enforce", 2023-11-17) / PR #6125 for a recent example of a new command.
It looks like force-pushing is making other updates obsolete.
I'm not used to working on github
just yet, sorry.
This PR already makes substantial changes by adding the new command; leave the profile changes (other than the ones for default.profile and profile.template) for after this PR to make reviewing easier.
OK, reverted the long list of profile changes. I stored it in another branch to propose later.
In the parts of the code that are mostly alphabetically sorted (such as in the man pages), it makes sense to put
notpm
beforenotv
.But in some parts of the code, for whatever reason the multimedia-related options (
nosound
,noautopulse
,no3d
,notv
,nodvd
) are sorted together, so for consistency putnotpḿ
beforenou2f
, as was suggested in the previous review.That is:
notv
,nou2f
->notpm
,notv
,nou2f
nodvd
,nou2f
->nodvd
,notpm
,nou2f
OK, I see.
Also, avoid sorting things in this PR (especially in the same commit).
This sentence confuses me, because I interpreted the two previous paragraphs as a ask to actually sort these options in a certain way.
Or do you want to merge this PR, and do the sorting in a different one? I'm happy either way.
After this PR I might try to make these parts more consistent.
Also, avoid sorting things in this PR (especially in the same commit).
This sentence confuses me, because I interpreted the two previous paragraphs as a ask to actually sort these options in a certain way.
Sorry, I meant avoid sorting/moving existing lines while adding new lines at the same time, such as in these cases:
In general it seems better to avoid refactoring in PRs that just add a new thing, as they will mostly contain hunks that add new lines, which are easier to review. Hunks that sort lines might be wrong/inconsistent with how the sorting is done elsewhere (this applies to the first link above).
Or do you want to merge this PR, and do the sorting in a different one? I'm happy either way.
I fixed the sorting, squashed the commits, edited the commit message and force-pushed.
Let me know if there are any issues.
An ssh private key may be stored in a Trusted Platform Module (TPM) device and
private-dev
in ssh.profile currently breaks this use-case, as it does not keep tpm devices (see #6379).So add a new
notpm
command and keep tpm devices in /dev by default withprivate-dev
unlessnotpm
is used.Tested locally with:
Fixes #6379.