[PATCH] --secontext: Implement displaying of expected context upon mismatch

Renaud Métrich rmetrich at redhat.com
Wed Oct 6 19:39:02 UTC 2021


This patch add a new "mismatch" option to --secontext which enables to 
print the expected context extracted from SELinux database when it 
differs from current context.

This is very useful when troubleshooting SELinux issues.

Also available as a PR: https://github.com/strace/strace/pull/197

(and more details there).

Note: the code coverage is complete on my system running Fedora, but not 
on the CI because selabel_open()/selabel_lookup() isn't available in the 
provided libselinux library (which is known to return invalid contexts 
anyway).

I'm hence attaching my code coverage results as well for secontext.c and 
strace.c which are the 2 files modified.

Renaud.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Implement-displaying-of-expected-context-upon-mismat.patch
Type: text/x-patch
Size: 32708 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20211006/fa965aac/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20211006/fa965aac/attachment.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20211006/fa965aac/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20211006/fa965aac/attachment-0001.bin>


More information about the Strace-devel mailing list