Improve the SELinux heuristic to look for sestatus (#470)
This commit is contained in:
parent
69ce98eff5
commit
5a8526268d
|
@ -165,7 +165,7 @@ fn check_not_wsl1() -> Result<(), PlannerError> {
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn detect_selinux() -> Result<bool, PlannerError> {
|
async fn detect_selinux() -> Result<bool, PlannerError> {
|
||||||
if Path::new("/sys/fs/selinux").exists() {
|
if Path::new("/sys/fs/selinux").exists() && which("sestatus").is_ok() {
|
||||||
// We expect systems with SELinux to have the normal SELinux tools.
|
// We expect systems with SELinux to have the normal SELinux tools.
|
||||||
let has_semodule = which("semodule").is_ok();
|
let has_semodule = which("semodule").is_ok();
|
||||||
let has_restorecon = which("restorecon").is_ok();
|
let has_restorecon = which("restorecon").is_ok();
|
||||||
|
|
Loading…
Reference in a new issue