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

lsm: exit early if the process already has install_t #262

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

ondrejbudai
Copy link
Contributor

There's no need to perform any additional steps if the bootc process already has install_t.

There's no need to perform any additional steps if the bootc process
already has install_t.

Signed-off-by: Ondřej Budai <[email protected]>
Copy link
Collaborator

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

// If the process already has install_t, exit early
if self_has_install_t()? {
return Ok(None);
}
selinux_ensure_install()?;
let current = std::fs::read_to_string("/proc/self/attr/current")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Totally optional followup, we could hoist this to a const)

@cgwalters cgwalters merged commit e5b5970 into containers:main Jan 16, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants