[PATCH 01/28] Convert HAVE_SELINUX to WITH_SELINUX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 configure.ac                  | 4 ++--
 src/lxc/lxc_container.c       | 2 +-
 src/storage/storage_backend.c | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index f2b59ef..b50e329 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1291,12 +1291,12 @@ if test "$with_selinux" = "yes"; then
 
   SELINUX_LIBS="-lselinux"
   AC_DEFINE_UNQUOTED([SELINUX_MOUNT], ["$SELINUX_MOUNT"], [SELinux mount point])
-  AC_DEFINE_UNQUOTED([HAVE_SELINUX], 1, [whether basic SELinux functionality is available])
+  AC_DEFINE_UNQUOTED([WITH_SELINUX], 1, [whether basic SELinux functionality is available])
   dnl We prefer to use <selinux/label.h> and selabel_open, but can fall
   dnl back to matchpathcon for the sake of RHEL 5's version of libselinux.
   AC_CHECK_HEADERS([selinux/label.h])
 fi
-AM_CONDITIONAL([HAVE_SELINUX], [test "$with_selinux" != "no"])
+AM_CONDITIONAL([WITH_SELINUX], [test "$with_selinux" != "no"])
 AC_SUBST([SELINUX_CFLAGS])
 AC_SUBST([SELINUX_LIBS])
 
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 9f22923..ee1d676 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -524,7 +524,7 @@ static int lxcContainerMountBasicFS(bool pivotRoot,
         { "/proc/sys", "/proc/sys", NULL, NULL, MS_BIND|MS_REMOUNT|MS_RDONLY },
         { "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV },
         { "sysfs", "/sys", "sysfs", NULL, MS_BIND|MS_REMOUNT|MS_RDONLY },
-#if HAVE_SELINUX
+#if WITH_SELINUX
         { SELINUX_MOUNT, SELINUX_MOUNT, "selinuxfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV },
         { SELINUX_MOUNT, SELINUX_MOUNT, NULL, NULL, MS_BIND|MS_REMOUNT|MS_RDONLY },
 #endif
diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index df79b28..c2c4c51 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -41,7 +41,7 @@
 # include <linux/fs.h>
 #endif
 
-#if HAVE_SELINUX
+#if WITH_SELINUX
 # include <selinux/selinux.h>
 #endif
 
@@ -1177,7 +1177,7 @@ virStorageBackendUpdateVolTargetInfoFD(virStorageVolTargetPtr target,
                                        unsigned long long *capacity)
 {
     struct stat sb;
-#if HAVE_SELINUX
+#if WITH_SELINUX
     security_context_t filecon = NULL;
 #endif
 
@@ -1241,7 +1241,7 @@ virStorageBackendUpdateVolTargetInfoFD(virStorageVolTargetPtr target,
 
     VIR_FREE(target->perms.label);
 
-#if HAVE_SELINUX
+#if WITH_SELINUX
     /* XXX: make this a security driver call */
     if (fgetfilecon_raw(fd, &filecon) == -1) {
         if (errno != ENODATA && errno != ENOTSUP) {
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]