Skip to contentSkip to conversation

Possible solution to possible regression

RFC PATCH Petr Lautrbach 2 participants 2 messages Jan 28, 2025 SELinux security module

lore
Share & tools
lore

Petr Lautrbach

author Acked-by
#0 lore raw
Quoted 5 lines · James Carter

As reported by Petr Lautrbach ([email protected]), commit d96f27bf7cb9 ("libsemanage: Preserve file context and ownership in policy store") can cause restorecon to use old data.

Here is a possible fix. It seems to work.

Works for me. Thanks!

Quoted 11 lines

James Carter (2):
libselinux: Close old selabel handle when setting a new one
libsemanage: Set new restorecon handle before doing restorecon

 libselinux/src/selinux_restorecon.c | 4 ++++
 libsemanage/src/semanage_store.c    | 5 +++++
 2 files changed, 9 insertions(+)
Signature · 1 line
2.48.1
#1 lore raw
Quoted 7 lines · Petr Lautrbach
Quoted 4 lines · James Carter

As reported by Petr Lautrbach ([email protected]), commit d96f27bf7cb9 ("libsemanage: Preserve file context and ownership in policy store") can cause restorecon to use old data.

Quoted 7 lines
Quoted 1 line

Here is a possible fix. It seems to work.

Works for me. Thanks!

I merged these two patches adding details above about the commit that caused the problem.

Thanks,
Jim

Quoted 12 lines
Quoted 11 lines

James Carter (2):
libselinux: Close old selabel handle when setting a new one
libsemanage: Set new restorecon handle before doing restorecon

 libselinux/src/selinux_restorecon.c | 4 ++++
 libsemanage/src/semanage_store.c    | 5 +++++
 2 files changed, 9 insertions(+)

--
2.48.1