Fix typos s/HAVE_SELINUX/WITH_SELINUX/

The virNetSocket & virIdentity classes accidentally got some
conditionals using HAVE_SELINUX instead of WITH_SELINUX.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange
2013-03-20 13:23:40 +00:00
parent 4dceffadc9
commit f07f9733cb
2 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -40,7 +40,7 @@
#endif #endif
#include "c-ctype.h" #include "c-ctype.h"
#ifdef HAVE_SELINUX #ifdef WITH_SELINUX
# include <selinux/selinux.h> # include <selinux/selinux.h>
#endif #endif
@@ -1160,7 +1160,7 @@ int virNetSocketGetUNIXIdentity(virNetSocketPtr sock ATTRIBUTE_UNUSED,
} }
#endif #endif
#ifdef HAVE_SELINUX #ifdef WITH_SELINUX
int virNetSocketGetSecurityContext(virNetSocketPtr sock, int virNetSocketGetSecurityContext(virNetSocketPtr sock,
char **context) char **context)
{ {
@@ -1169,7 +1169,7 @@ int virNetSocketGetSecurityContext(virNetSocketPtr sock,
*context = NULL; *context = NULL;
virMutexLock(&sock->lock); virObjectLock(sock);
if (getpeercon(sock->fd, &seccon) < 0) { if (getpeercon(sock->fd, &seccon) < 0) {
if (errno == ENOSYS) { if (errno == ENOSYS) {
ret = 0; ret = 0;
@@ -1188,7 +1188,7 @@ int virNetSocketGetSecurityContext(virNetSocketPtr sock,
ret = 0; ret = 0;
cleanup: cleanup:
freecon(seccon); freecon(seccon);
virMutexUnlock(&sock->lock); virObjectUnlock(sock);
return ret; return ret;
} }
#else #else
+3 -3
View File
@@ -22,7 +22,7 @@
#include <config.h> #include <config.h>
#include <unistd.h> #include <unistd.h>
#if HAVE_SELINUX #if WITH_SELINUX
# include <selinux/selinux.h> # include <selinux/selinux.h>
#endif #endif
@@ -135,7 +135,7 @@ virIdentityPtr virIdentityGetSystem(void)
char *groupname = NULL; char *groupname = NULL;
char *seccontext = NULL; char *seccontext = NULL;
virIdentityPtr ret = NULL; virIdentityPtr ret = NULL;
#if HAVE_SELINUX #if WITH_SELINUX
security_context_t con; security_context_t con;
#endif #endif
@@ -144,7 +144,7 @@ virIdentityPtr virIdentityGetSystem(void)
if (!(groupname = virGetGroupName(getgid()))) if (!(groupname = virGetGroupName(getgid())))
goto cleanup; goto cleanup;
#if HAVE_SELINUX #if WITH_SELINUX
if (getcon(&con) < 0) { if (getcon(&con) < 0) {
virReportSystemError(errno, "%s", virReportSystemError(errno, "%s",
_("Unable to lookup SELinux process context")); _("Unable to lookup SELinux process context"));