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

landlock: move commands into profile and add landlock.enforce #6125

Merged
merged 4 commits into from
Dec 21, 2023

Conversation

kmk3
Copy link
Collaborator

@kmk3 kmk3 commented Dec 11, 2023

Changes:

  • Move commands from --landlock and --landlock.proc= into
    etc/inc/landlock-common.inc
  • Remove --landlock and --landlock.proc=
  • Add --landlock.enforce

Instead of hard-coding the default commands (and having a separate
command just for /proc), move them into a dedicated profile to make it
easier for users to interact with the entries (view, copy, add ignore
entries, etc).

Only enforce the Landlock commands if --landlock.enforce is supplied.
This allows safely adding Landlock commands to (upstream) profiles while
keeping their enforcement opt-in. It also makes it simpler to
effectively disable all Landlock commands, by using
--ignore=landlock.enforce.

Relates to #6078.

@kmk3 kmk3 added this to In progress in Release 0.9.74 via automation Dec 11, 2023
This includes macros such as `${HOME}` and `${RUNUSER}`, but not
`${PATH}`, which may expand to multiple strings.

Relates to netblue30#6078.
Avoid checking if Landlock is supported in ll_add_profile(), as it may
result in a warning being printed in ll_is_supported() in the next
commit.

Relates to netblue30#6078.
Changes:

* Move commands from --landlock and --landlock.proc= into
  etc/inc/landlock-common.inc
* Remove --landlock and --landlock.proc=
* Add --landlock.enforce

Instead of hard-coding the default commands (and having a separate
command just for /proc), move them into a dedicated profile to make it
easier for users to interact with the entries (view, copy, add ignore
entries, etc).

Only enforce the Landlock commands if --landlock.enforce is supplied.
This allows safely adding Landlock commands to (upstream) profiles while
keeping their enforcement opt-in.  It also makes it simpler to
effectively disable all Landlock commands, by using
`--ignore=landlock.enforce`.

Relates to netblue30#6078.
@netblue30 netblue30 merged commit c245fec into netblue30:master Dec 21, 2023
14 checks passed
@netblue30
Copy link
Owner

All merged, thanks!

@kmk3 kmk3 deleted the landlock-enforce branch January 4, 2024 00:33
kmk3 added a commit that referenced this pull request Jan 4, 2024
@kmk3 kmk3 moved this from In progress to Done (on RELNOTES) in Release 0.9.74 Jan 4, 2024
kmk3 added a commit that referenced this pull request Feb 12, 2024
This amends commit 760f50f ("landlock: move commands into profile and
add landlock.enforce", 2023-11-17) / PR #6125.

Misc: This was noticed on #6203.

Relates to #6078.
kmk3 added a commit to kmk3/firejail that referenced this pull request Mar 3, 2024
To reduce duplication.

Support for it was added on commit bf5a993 ("landlock: add support for
PATH macro", 2023-12-22).

See also commit 19e1082 ("landlock: expand simple macros in commands",
2023-11-11) / PR netblue30#6125.

Relates to netblue30#6078.
kmk3 added a commit that referenced this pull request Mar 8, 2024
To reduce duplication.

Support for it was added on commit bf5a993 ("landlock: add support for
PATH macro", 2023-12-22).

See also commit 19e1082 ("landlock: expand simple macros in commands",
2023-11-11) / PR #6125.

Relates to #6078.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Release 0.9.74
  
Done (on RELNOTES)
Development

Successfully merging this pull request may close these issues.

None yet

3 participants