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

Renaud Métrich rmetrich at redhat.com
Fri Dec 3 14:36:52 UTC 2021


Please find attached my patch realigned with lastest master as of commit 
a8c50391d0e264e56be494f54803b8b5e655549d.

Renaud.

On 10/6/21 21:39, Renaud Métrich wrote:
> 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: 32660 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20211203/3e1c56c3/attachment.bin>
-------------- 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/20211203/3e1c56c3/attachment-0001.bin>


More information about the Strace-devel mailing list