From b3fa8aa1a32676a5cebe4bb4ae62f462acf5e22c Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 3 Nov 2023 17:52:30 -0400 Subject: [PATCH] lsm: Clarify selinux mode being set This was helpful for me when reading the logs. Signed-off-by: Colin Walters --- lib/src/lsm.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/src/lsm.rs b/lib/src/lsm.rs index a37f8f71f..c7328861f 100644 --- a/lib/src/lsm.rs +++ b/lib/src/lsm.rs @@ -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(()) }