All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Vermeulen <sven.vermeulen@siphos.be>
To: Daniel J Walsh <dwalsh@redhat.com>
Cc: selinux@tycho.nsa.gov
Subject: Re: SELinux with initramfs
Date: Sat, 21 Jan 2012 20:24:48 +0100	[thread overview]
Message-ID: <20120121192447.GA5909@siphos.be> (raw)
In-Reply-To: <4F143862.9050107@redhat.com>

On Mon, Jan 16, 2012 at 09:46:58AM -0500, Daniel J Walsh wrote:
> In RHEL and Fedora, we relabel the parts of /dev that are created in
> the initramfs and restart udev so it is a child of init/systemd.

When do you relabel them? When I call setfiles before the load_policy, I get
an 'Operation not supported' on /dev as if it was a kernel that doesn't
support extended attributes on tmpfs (which isn't the case). Trying to call
it afterwards doesn't work, since the kernel_t domain doesn't allow
relabeling (I think, output is also missing since /dev/console is wrongly
labeled).

I'm quite close to have support for both putting the policy in the initramfs
itself (and call load_policy as one of the first things done on the
initramfs environment) and supporting booting in permissive mode and have a
switch to enforcing which can't be undone afterwards (goal is to boot in
enforcing).

The first support option probably allows for such a sane boot but requires
the policy to be in the initramfs. The other one allows us to boot properly
and I just toggle "setenforce 1" with the secure_mode_policyload boolean
enabled afterwards.

But both sound hackish - If I could only understand why I can't use setfiles
on /dev before calling load_policy...

Wkr,
	Sven Vermeulen

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2012-01-21 19:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-14 14:20 SELinux with initramfs Sven Vermeulen
2012-01-14 14:34 ` Sven Vermeulen
2012-01-14 15:46   ` Chris PeBenito
2012-01-16 14:46     ` Daniel J Walsh
2012-01-21 19:24       ` Sven Vermeulen [this message]
2012-01-23 18:16         ` Daniel J Walsh

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=20120121192447.GA5909@siphos.be \
    --to=sven.vermeulen@siphos.be \
    --cc=dwalsh@redhat.com \
    --cc=selinux@tycho.nsa.gov \
    /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.