From: Daniel J Walsh <dwalsh@redhat.com>
To: SELinux <selinux@tycho.nsa.gov>
Subject: We need libselinux to lie...
Date: Tue, 22 Jun 2010 13:06:40 -0400 [thread overview]
Message-ID: <4C20EDA0.6050907@redhat.com> (raw)
When building packages within mock/livecd.
We really want the processes running within the chroot to not do SELinux
stuff.
We want libselinux to tell them that SELinux is disabled.
For example if we install selinux-policy package within a mock chroot or
livecd we do not want it to try to load_policy. Other rpms try chcon or
restorecon in post installs. These are get turned off if the tools
think SELinux is disabled. We are not doing this for security reasons.
We have been hacking this out, but replaceing $CHROOT/proc/filesystem
with a version that does not include filesystem, but we have found this
to require large privs for mock. (mount -o bind /tmp/filesystem
$CHROOT/proc/filesystem; requires mock_t to read /dev/loop which is
labeled fixed_disk_device_t)
We have considered playing tricks with libselinux.so but those seem a
little dangerous.
Eric has come up with an idea of adding a field to
$CHROOT/etc/selinux/config to tell is_selinux_enabled() to return false.
SPECIAL_ENABLED=force_off
Then mock could just set this flag in the config file and all apps would
think SELinux is disabled.
Does this seem reasonable?
--
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.
next reply other threads:[~2010-06-22 17:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-22 17:06 Daniel J Walsh [this message]
2010-06-22 17:34 ` We need libselinux to lie Chad Sellers
2010-06-22 17:39 ` Daniel J Walsh
2010-06-22 19:32 ` Stephen Smalley
2010-06-22 20:59 ` Daniel J Walsh
2010-06-23 12:46 ` Stephen Smalley
2010-06-23 8:03 ` Paul Howarth
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=4C20EDA0.6050907@redhat.com \
--to=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.