提交 63f18f37 编写于 作者: D Daniel P. Berrange

Convert HAVE_SELINUX to WITH_SELINUX

Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 bf1786b6
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册