mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 22:15:21 +00:00
Convert HAVE_SELINUX to WITH_SELINUX
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
bf1786b6d5
commit
63f18f3786
@ -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])
|
||||
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user