mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH]selinux: load_policy script fix
Date: Thu, 30 May 2013 08:29:50 +0200	[thread overview]
Message-ID: <51A6F1DE.8030700@redhat.com> (raw)
In-Reply-To: <51a6ef54.GAPY7ltVyx5aFKm7%dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On 05/30/2013 08:19 AM, dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org wrote:
> chroot load_policy will use selinuxfs which should be mounted
> in $NEWROOT/sys/fs/selinux for Fedora 19, but because there's
> no $NEWROOT/sys/fs, so later process will fail.
> 
> Fixing this by bind mount /sys to $NEWROOT/sys.
> 
> Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  modules.d/98selinux/selinux-loadpolicy.sh |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> --- dracut.orig/modules.d/98selinux/selinux-loadpolicy.sh
> +++ dracut/modules.d/98selinux/selinux-loadpolicy.sh
> @@ -24,7 +24,8 @@ rd_load_policy()
>          local ret=0
>          local out
>          info "Loading SELinux policy"
> -        # load_policy does mount /proc and /selinux in
> +        mount -o bind /sys $NEWROOT/sys
> +        # load_policy does mount /proc and /sys/fs/selinux in
>          # libselinux,selinux_init_load_policy()
>          if [ -x "$NEWROOT/sbin/load_policy" ]; then
>              out=$(LANG=C chroot "$NEWROOT" /sbin/load_policy -i 2>&1)
> @@ -35,6 +36,8 @@ rd_load_policy()
>              ret=$?
>              info $out
>          fi
> +        umount $NEWROOT/sys/fs/selinux
> +        umount $NEWROOT/sys
>  
>          if [ "$SELINUX" = "disabled" ]; then
>              return 0;


Applied, thanks!


commit cf8b1b785366e0a7c2ae1b3781d66b0f99d6f8fe

      parent reply	other threads:[~2013-05-30  6:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30  6:19 [PATCH]selinux: load_policy script fix dyoung-H+wXaHxf7aLQT0dZR+AlfA
     [not found] ` <51a6ef54.GAPY7ltVyx5aFKm7%dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-30  6:29   ` Harald Hoyer [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=51A6F1DE.8030700@redhat.com \
    --to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox