[libvirt] Patch to default selinuxfs mount point to /sys/fs/selinux

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Currently if you build on a machine that does not support SELinux we end up with the default mount point being /selinux, since this is moved to /sys/fs/selinux, we should start defaulting there. I believe this is causing a bug in libvirt-lxc when /selinux does not exists, even though /sys/fs/selinux exists. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlBl6F8ACgkQrlYvE4MpobPz0ACgxPdENx/KDtQY7YGT7BDXoLP3 AVIAoJwUvTib72U0VJ3dnVoGU0PYjMXZ =XU8L -----END PGP SIGNATURE-----

On 09/28/2012 12:11 PM, Daniel J Walsh wrote:
OpenPGP: *Attachments to this message have not been signed or encrypted*
Currently if you build on a machine that does not support SELinux we end up with the default mount point being /selinux, since this is moved to /sys/fs/selinux, we should start defaulting there.
The spec files are already doing this correctly, so this patch will only help someone doing a self-build rather than relying on a spec file, and only then if selinux is not mounted on the machine where the build is done, in relation to where the built binary is run.
+++ b/.gnulib @@ -1 +1 @@ -Subproject commit 440a1dbe523e37f206252cb034c3a62f26867e42 +Subproject commit dbd914496c99c52220e5f5ba4121d6cb55fb3beb
This should not be part of the patch.
diff --git a/configure.ac b/configure.ac index ae26de7..5cc5cbe 100644 --- a/configure.ac +++ b/configure.ac @@ -1455,11 +1455,10 @@ fi if test "$with_selinux" = "yes"; then AC_MSG_CHECKING([SELinux mount point]) if test "$with_selinux_mount" = "check" || test -z "$with_selinux_mount"; then - if test -d /sys/fs/selinux ; then - SELINUX_MOUNT=/sys/fs/selinux - else - SELINUX_MOUNT=/selinux - fi + SELINUX_MOUNT=/sys/fs/selinux + if ! test -d ${SELINUX_MOUNT} && test -d /selinux ; then + SELINUX_MOUNT=/selinux + fi else
ACK to this hunk, and I will push shortly. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Daniel J Walsh
-
Eric Blake