Skip to content

Commit

Permalink
Log as_path in lsm_label
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jeckersb committed Mar 12, 2024
1 parent e793d84 commit 5c68966
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/lsm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ fn selinux_label_for_path(target: &str) -> Result<String> {
#[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"))
Expand Down

0 comments on commit 5c68966

Please sign in to comment.