From: "Daniel P. Berrange" <berrange(a)redhat.com>
The virNetSocket & virIdentity classes accidentally got some
conditionals using HAVE_SELINUX instead of WITH_SELINUX.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
Pushed under trivial rule
---
src/rpc/virnetsocket.c | 4 ++--
src/util/viridentity.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index 68aca1b..c86a47a 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -40,7 +40,7 @@
#endif
#include "c-ctype.h"
-#ifdef HAVE_SELINUX
+#ifdef WITH_SELINUX
# include <selinux/selinux.h>
#endif
@@ -1160,7 +1160,7 @@ int virNetSocketGetUNIXIdentity(virNetSocketPtr sock
ATTRIBUTE_UNUSED,
}
#endif
-#ifdef HAVE_SELINUX
+#ifdef WITH_SELINUX
int virNetSocketGetSecurityContext(virNetSocketPtr sock,
char **context)
{
diff --git a/src/util/viridentity.c b/src/util/viridentity.c
index 2092137..1d40972 100644
--- a/src/util/viridentity.c
+++ b/src/util/viridentity.c
@@ -22,7 +22,7 @@
#include <config.h>
#include <unistd.h>
-#if HAVE_SELINUX
+#if WITH_SELINUX
# include <selinux/selinux.h>
#endif
@@ -135,7 +135,7 @@ virIdentityPtr virIdentityGetSystem(void)
char *groupname = NULL;
char *seccontext = NULL;
virIdentityPtr ret = NULL;
-#if HAVE_SELINUX
+#if WITH_SELINUX
security_context_t con;
#endif
@@ -144,7 +144,7 @@ virIdentityPtr virIdentityGetSystem(void)
if (!(groupname = virGetGroupName(getgid())))
goto cleanup;
-#if HAVE_SELINUX
+#if WITH_SELINUX
if (getcon(&con) < 0) {
virReportSystemError(errno, "%s",
_("Unable to lookup SELinux process context"));
--
1.8.1.4