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

Compatibility mode #58

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Compatibility mode #58

wants to merge 3 commits into from

Commits on Feb 21, 2024

  1. ruleset: Add Ruleset::new(CompatMode)

    WIP: This implementation works by leveraging CompatLevel that may need
    to be replaced.  We also need to remove the public set_compatibility().
    
    The use of new() might change because of future access right groups
    development.
    
    Signed-off-by: Mickaël Salaün <[email protected]>
    l0kod committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    44dbf93 View commit details
    Browse the repository at this point in the history
  2. access,fs: Add if_unmet() method

    WIP: Clean up the CompatLevel side and correctly handle PathBeneath's
    compat state.
    
    WIP: replacing disable_sandbox_if_unmet() with if_unmet(Consequence),
    which handles ReturnError.  Use case appliances handling a minimal
    kernel version that is known to support a specific set of Landlock
    features, but that might use a newer kernel and then opportunistically
    restrict processes furthermore.
    
    This is equivalent to call disable_sandbox_if_unmet(true) is equivalent
    to set_compatibility(CompatLevel::SoftRequirement) and
    disable_sandbox_if_unmet(false) is equivalent to
    set_compatibility(previous_compat_level).
    
    Signed-off-by: Mickaël Salaün <[email protected]>
    l0kod committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    92406d4 View commit details
    Browse the repository at this point in the history
  3. access: Wrap three BitFlags<A> into CompatAccess<A>

    TODO: Squash with previous commit that adds CompatArg
    
    Signed-off-by: Mickaël Salaün <[email protected]>
    l0kod committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    5d9510a View commit details
    Browse the repository at this point in the history