From 5c68966a480073f2f3a2bcd8b13a16c949c2b52d Mon Sep 17 00:00:00 2001 From: John Eckersberg Date: Tue, 12 Mar 2024 10:25:00 -0400 Subject: [PATCH] Log `as_path` in lsm_label This is what we're matching against to retrieve the context, not the target, so it's more useful for debugging to primarily see the `as_path` argument. Signed-off-by: John Eckersberg --- lib/src/lsm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/lsm.rs b/lib/src/lsm.rs index 9b9ae142..128b7fb6 100644 --- a/lib/src/lsm.rs +++ b/lib/src/lsm.rs @@ -155,7 +155,7 @@ fn selinux_label_for_path(target: &str) -> Result { #[context("Labeling {as_path}")] pub(crate) fn lsm_label(target: &Utf8Path, as_path: &Utf8Path, recurse: bool) -> Result<()> { let label = selinux_label_for_path(as_path.as_str())?; - tracing::debug!("Label for {target} is {label}"); + tracing::debug!("Label for {as_path} (target={target}) is {label}"); Task::new_quiet("chcon") .arg("-h") .args(recurse.then_some("-R"))