All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Possible solution to possible regression
@ 2025-01-22 15:58 James Carter
  0 siblings, 0 replies; 3+ messages in thread
From: James Carter @ 2025-01-22 15:58 UTC (permalink / raw)
  To: selinux; +Cc: lautrbach, James Carter

As reported by Petr Lautrbach (lautrbach@redhat.com), 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.

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH 0/2] Possible solution to possible regression
@ 2025-01-28 13:39 Petr Lautrbach
  2025-01-28 16:54 ` James Carter
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Lautrbach @ 2025-01-28 13:39 UTC (permalink / raw)
  To: James Carter, selinux

James Carter <jwcart2@gmail.com> writes:

> As reported by Petr Lautrbach (lautrbach@redhat.com), 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!

Acked-by: Petr Lautrbach <lautrbach@redhat.com>

>
> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH 0/2] Possible solution to possible regression
  2025-01-28 13:39 [RFC PATCH 0/2] Possible solution to possible regression Petr Lautrbach
@ 2025-01-28 16:54 ` James Carter
  0 siblings, 0 replies; 3+ messages in thread
From: James Carter @ 2025-01-28 16:54 UTC (permalink / raw)
  To: Petr Lautrbach; +Cc: selinux

On Tue, Jan 28, 2025 at 8:39 AM Petr Lautrbach <lautrbach@redhat.com> wrote:
>
> James Carter <jwcart2@gmail.com> writes:
>
> > As reported by Petr Lautrbach (lautrbach@redhat.com), 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!
>
> Acked-by: Petr Lautrbach <lautrbach@redhat.com>
>

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

Thanks,
Jim

> >
> > 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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-28 16:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-28 13:39 [RFC PATCH 0/2] Possible solution to possible regression Petr Lautrbach
2025-01-28 16:54 ` James Carter
  -- strict thread matches above, loose matches on Subject: below --
2025-01-22 15:58 James Carter

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.