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

Init a selinux project #2800

Merged
merged 7 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace]
resolver = "2"
members = ["crates/*", "tests/contest/*", "tools/*"]
exclude = ["experiment/seccomp"]
exclude = ["experiment/seccomp", "experiment/selinux"]

[profile.release]
lto = true
102 changes: 102 additions & 0 deletions experiment/selinux/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions experiment/selinux/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "selinux"
version = "0.1.0"
description = "Library for selinux"
license-file = "../../LICENSE"
repository = "https://github.com/containers/youki"
homepage = "https://containers.github.io/youki"
readme = "README.md"
authors = ["youki team"]
edition = "2021"
autoexamples = true
keywords = ["youki", "container", "selinux"]

[dependencies]
nix = { version = "0.29.0", features = ["process", "fs"] }
thiserror = "1.0.61"
7 changes: 7 additions & 0 deletions experiment/selinux/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This is an experimental project in order to create selinux library in Rust.
Ref: https://github.com/containers/youki/issues/2718.
Reimplementation of (selinux)[https://github.com/opencontainers/selinux] in Rust.
Also selinux depends on xattr, but nix doesn't cover xattr function.
Therefore, this PR will implement xattr in Rust.

Please import and use this project.
2 changes: 2 additions & 0 deletions experiment/selinux/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pub mod selinux;
pub mod xattr;
Loading
Loading