Skip to content

Commit

Permalink
Merge pull request #216 from rhatdan/main
Browse files Browse the repository at this point in the history
Show SELinux label on failure
  • Loading branch information
thaJeztah authored Aug 7, 2024
2 parents bb1ec25 + 5bdefc7 commit 44b3337
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go-selinux/selinux_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func lSetFileLabel(fpath string, label string) error {
break
}
if err != unix.EINTR {
return &os.PathError{Op: "lsetxattr", Path: fpath, Err: err}
return &os.PathError{Op: fmt.Sprintf("lsetxattr(label=%s)", label), Path: fpath, Err: err}
}
}

Expand All @@ -348,7 +348,7 @@ func setFileLabel(fpath string, label string) error {
break
}
if err != unix.EINTR {
return &os.PathError{Op: "setxattr", Path: fpath, Err: err}
return &os.PathError{Op: fmt.Sprintf("setxattr(label=%s)", label), Path: fpath, Err: err}
}
}

Expand Down

0 comments on commit 44b3337

Please sign in to comment.