Skip to content

Commit

Permalink
lsm: Clarify selinux mode being set
Browse files Browse the repository at this point in the history
This was helpful for me when reading the logs.

Signed-off-by: Colin Walters <[email protected]>
  • Loading branch information
cgwalters committed Nov 3, 2023
1 parent 1477166 commit b3fa8aa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/src/lsm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,14 @@ pub(crate) fn selinux_set_permissive(permissive: bool) -> Result<()> {
}
let mut f = std::fs::File::options().write(true).open(enforce_path)?;
f.write_all(if permissive { b"0" } else { b"1" })?;
tracing::debug!("Set SELinux permissive mode");
tracing::debug!(
"Set SELinux mode: {}",
if permissive {
"permissive"
} else {
"enforcing"
}
);
Ok(())
}

Expand Down

0 comments on commit b3fa8aa

Please sign in to comment.