Crates.io | landlock |
lib.rs | landlock |
version | 0.4.1 |
source | src |
created_at | 2021-04-14 07:26:02.079539 |
updated_at | 2024-09-13 18:01:11.41007 |
description | Landlock LSM helpers |
homepage | https://landlock.io |
repository | https://github.com/landlock-lsm/rust-landlock |
max_upload_size | |
id | 383666 |
size | 170,535 |
Landlock is a security feature available since Linux 5.13. The goal is to enable to restrict ambient rights (e.g., global filesystem access) for a set of processes by creating safe security sandboxes as new security layers in addition to the existing system-wide access-controls. This kind of sandbox is expected to help mitigate the security impact of bugs, unexpected or malicious behaviors in applications. Landlock empowers any process, including unprivileged ones, to securely restrict themselves. More information about Landlock can be found in the official website.
This Rust crate provides a safe abstraction for the Landlock system calls along with some helpers.
This crate is especially useful to protect users' data by sandboxing:
A simple example can be found with the
path_beneath_rules()
helper.
More complex examples can be found with the
Ruleset
documentation
and the sandboxer example.