All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antoine Tenart <atenart@kernel.org>
To: José Pekkarinen <jose.pekkarinen@unikie.com>, buildroot@buildroot.org
Cc: José Pekkarinen <jose.pekkarinen@unikie.com>
Subject: Re: [Buildroot] [PATCH] package/policycoreutils: Add service to handle selinux autorelabel
Date: Thu, 30 Sep 2021 10:58:42 +0200	[thread overview]
Message-ID: <163299232288.3047.15888178110434706206@kwain> (raw)
In-Reply-To: <20210907125841.509792-1-jose.pekkarinen@unikie.com>

Hello José,

Quoting José Pekkarinen (2021-09-07 14:58:41)
> This patch adds a system service to check whether the
> autorelabel via is requested or not, and produce the
> labeling of the system under the loaded final kernel,
> including automatically populated fs by the kernel.

I don't think this is the correct fix nor it can work across reboots
without relabelling the whole system each time. Relabelling the entire
system is usually done in distros when updating the policy but here in
Buildroot the policy is tied to a given image version and an update in
the policy should come with a new image.

Now, I'm not saying there is no issue. When using devtmpfs (otherwise
/dev is already labeled at build time) device nodes have a default label
that might not match the loaded policy. The labelling has to be done by
an userspace daemon, usually udev (but restorecond could work with the
right config). This is needed as new devices might appear later.

The issue here I believe is there is a gap between devtmpfs is mounted
and udev starts, while other daemons start accessing it. What is usually
done IIRC is to run restorecon on /dev right after it is mounted. If I'm
not mistaken systemd does something similar by default.

This needs investigation but I hope the above gave some pointers.

Thanks,
Antoine
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      parent reply	other threads:[~2021-09-30  8:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07 12:58 [Buildroot] [PATCH] package/policycoreutils: Add service to handle selinux autorelabel José Pekkarinen
2021-09-29 11:37 ` José Pekkarinen
2021-09-29 20:46   ` Arnout Vandecappelle
2021-09-30  8:58 ` Antoine Tenart [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=163299232288.3047.15888178110434706206@kwain \
    --to=atenart@kernel.org \
    --cc=buildroot@buildroot.org \
    --cc=jose.pekkarinen@unikie.com \
    /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.