diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-08-12 16:31:06 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-08-12 17:23:58 +0100 |
commit | 2361905686c62b4163232139c3d390acd2c07916 (patch) | |
tree | 94f3810a9471541b9c47d8fad4bb99601c0c162d /appliance | |
parent | 8157503b09e24667ddab833c1d12dd643ceac71b (diff) | |
download | libguestfs-2361905686c62b4163232139c3d390acd2c07916.tar.gz libguestfs-2361905686c62b4163232139c3d390acd2c07916.tar.xz libguestfs-2361905686c62b4163232139c3d390acd2c07916.zip |
If using SELinux, mount /selinux in the appliance.
If selinux=1 on the Linux kernel command line, then we mount
/selinux in the appliance. We will also bind-mount this
directory into guests when we run commands.
Diffstat (limited to 'appliance')
-rwxr-xr-x | appliance/init | 4 | ||||
-rwxr-xr-x | appliance/make.sh.in | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/appliance/init b/appliance/init index b33a34cb..fe135b44 100755 --- a/appliance/init +++ b/appliance/init @@ -33,6 +33,10 @@ else modprobe virtio_net fi +if grep -sq selinux=1 /proc/cmdline; then + mount -t selinuxfs none /selinux +fi + modprobe dm_mod ||: ifconfig lo 127.0.0.1 diff --git a/appliance/make.sh.in b/appliance/make.sh.in index d76c961b..66bdebcf 100755 --- a/appliance/make.sh.in +++ b/appliance/make.sh.in @@ -47,6 +47,9 @@ if [ "@DIST@" = "REDHAT" ]; then # Create /tmp if it is missing. @FEBOOTSTRAP_RUN@ initramfs -- mkdir -p --mode=0777 /tmp + # Create /selinux if it is missing. + @FEBOOTSTRAP_RUN@ initramfs -- mkdir -p --mode=0755 /selinux + # Nuke some stuff. The kernel pulls mkinitrd and plymouth which pulls in # all of Python. Sheez. (cd initramfs && find -name '*plymouth*' -print0) | |