All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vikram Ambrose <Vikram.Ambrose@windriver.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: SELinux@tycho.nsa.gov,
	"Christopher J. PeBenito" <cpebenito@tresys.com>,
	Joshua Brindle <jbrindle@tresys.com>,
	Chad Sellers <csellers@tresys.com>,
	Eric Paris <eparis@parisplace.org>
Subject: Re: SELinux Bootstrap - without chroot
Date: Mon, 16 Jun 2008 13:56:17 -0400	[thread overview]
Message-ID: <4856A941.9080300@windriver.com> (raw)
In-Reply-To: <1213639038.15523.141.camel@moss-spartans.epoch.ncsc.mil>

Stephen Smalley wrote:
> On Mon, 2008-06-16 at 12:49 -0400, Vikram Ambrose wrote:
>   
>> Without a chroot environment, How does one go about building/installing, 
>> well basically the entire process including the bootstrap in a self 
>> contained build directory?
>>
>> I have been playing with refpolicy. And from what I have learned, 
>> refpolicy allows you to define a LOCAL_ROOT but none of the selinux 
>> userspace tools allow you to make use of a folder other than 
>> /etc/selinux as that path is hard coded in all the source files.
>>
>> In essence I want to know how to build a policy and tar it up, extract 
>> it into a target rootfs and simply call "load_policy" to use it.
>>     
>
> I'm not sure LOCAL_ROOT is what you think it is; there is a DESTDIR
> definition though that gets used by the Fedora policy package build.
> Looks like there is even a TEST_TOOLCHAIN definition although I haven't
> used that one and it would have the same problems with libsemanage
> helpers that you ran into earlier.
>   
Yes sorry, i meant to say DESTDIR
> Note that they get installed to $DESTDIR/usr/share/selinux/$SELINUXTYPE
> by make install.  In Fedora, they are packaged as such, then when you
> install the package on the target host, they are unpacked
> to /usr/share/selinux/$SELINUXTYPE by the package manager and then a %
> post scriptlet runs semodule on them to install them under /etc/selinux
> and load them.
>
>   
In Fedora, does anaconda chroot into the sysroot and call semodule 
during installation?
> Options for you might include:
> 1) Run semodule_link and semodule_expand at build time to link and
> expand the modules to a kernel policy up front.  Then you can just put
> the files into place without running semodule later.
>   
I will investigate this option further, thank you.
> 2) Build monolithic policy instead of modular policy.  Then there is no
> intermediate step and no use of semodule*.
>
>   
I would like to use a modular build.
> You don't really want to load the policy on the build host, do you?
> That's not a good idea - it will disturb the functioning of the build
> host, and you still need to restart userspace to get everything into the
> right domain.
>
>   
No I dont want to load the policy on the build host, sorry for that 
confusion.


-- 
Vikram Ambrose | Linux Products Division | WindRiver Corporation


--
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:[~2008-06-16 17:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-16 16:49 SELinux Bootstrap - without chroot Vikram Ambrose
2008-06-16 17:57 ` Stephen Smalley
2008-06-16 17:56   ` Vikram Ambrose [this message]
2008-06-16 18:19     ` Stephen Smalley
2008-06-16 21:35       ` Vikram Ambrose
2008-06-17 12:38         ` Stephen Smalley
2008-06-17 13:52           ` Vikram Ambrose
2008-06-17 14:27             ` Stephen Smalley
2008-06-17 14:52               ` Vikram Ambrose
2008-06-17 16:43                 ` Stephen Smalley
2008-06-17 20:12                   ` Vikram Ambrose
2008-06-17 20:41                     ` Stephen Smalley

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=4856A941.9080300@windriver.com \
    --to=vikram.ambrose@windriver.com \
    --cc=SELinux@tycho.nsa.gov \
    --cc=cpebenito@tresys.com \
    --cc=csellers@tresys.com \
    --cc=eparis@parisplace.org \
    --cc=jbrindle@tresys.com \
    --cc=sds@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.