Skip to content

Create usage examples that display more detailed errors #93

@n0toose

Description

@n0toose

After a century of debugging the following CI output and assuming that there was some sort of a problem with the untested (and comparatively undocumented) from_file function (leading to the creation of #92), I came to the conclusion that CompatLevel::HardRequirement actually fails on a self-hosted Ubuntu 22.04 LTS-based runner (which is supposedly supported) as Landlock is, actually, disabled on that system (perhaps because of a minor version update.

Image

In my opinion, what the following excerpt from the example does (and expresses)...

https://github.com/landlock-lsm/rust-landlock/blob/main/examples/sandboxer.rs#L133-L135

should be done when the user is trying to enforce a set of Landlock rulesets that will fail anyway because of CompatLevel::HardRequirement causing an "unrecoverable" incompatibility. Because weird things happen, and clear errors help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions