From: Petr Lautrbach <lautrbach@redhat.com>
To: Dominick Grift <dominick.grift@defensec.nl>, selinux@vger.kernel.org
Subject: Re: possible regression with filecon equivalency
Date: Thu, 29 May 2025 18:14:30 +0200 [thread overview]
Message-ID: <878qmfbdi1.fsf@redhat.com> (raw)
In-Reply-To: <87ldqftsxd.fsf@defensec.nl>
Dominick Grift <dominick.grift@defensec.nl> writes:
> This worked a while ago:
>
> root@nimbus:~# cat >> /etc/selinux/dssp5-debian/contexts/files/file_contexts.subs_dist <<'EOF'
>> /foo /usr/bin
>> /sysroot/foo /usr/bin
>> EOF
>
> root@nimbus:~# matchpathcon -m dir /usr/bin
> /usr/bin sys.id:sys.role:exec.file:s0
> root@nimbus:~# matchpathcon -m dir /foo
> /foo sys.id:sys.role:exec.file:s0
> root@nimbus:~# matchpathcon -m dir /sysroot/foo
> /sysroot/foo sys.id:sys.role:unknown.file:s0
>
> What happened?
i've bisected it to
4d436e4bf80284ac3b645bad022a9757dbc2dd36 is the first bad commit
commit 4d436e4bf80284ac3b645bad022a9757dbc2dd36
Author: Christian Göttsche <cgzones@googlemail.com>
Date: Tue Nov 26 11:26:20 2024 +0100
libselinux: use vector instead of linked list for substitutions
Utilize cache locality for the substitutions by storing them in
contiguous memory instead of a linked list.
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
# cat /etc/selinux/targeted/contexts/files/file_contexts.subs
/new_root /
/new_root/foo /usr/bin
before 4d436e4bf80284ac3b645bad022a9757dbc2dd36:
# matchpathcon -m dir /new_root/foo
system_u:object_r:bin_t:s0
after
# matchpathcon -m dir /new_root/foo
/new_root/foo system_u:object_r:default_t:s0
>
> --
> gpg --locate-keys dominick.grift@defensec.nl (wkd)
> Key fingerprint = FCD2 3660 5D6B 9D27 7FC6 E0FF DA7E 521F 10F6 4098
> Dominick Grift
> Mastodon: @kcinimod@defensec.nl
prev parent reply other threads:[~2025-05-29 16:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-29 14:03 possible regression with filecon equivalency Dominick Grift
2025-05-29 14:18 ` Dominick Grift
2025-05-29 14:28 ` Dominick Grift
2025-05-29 16:14 ` Petr Lautrbach [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878qmfbdi1.fsf@redhat.com \
--to=lautrbach@redhat.com \
--cc=dominick.grift@defensec.nl \
--cc=selinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.