]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix typos s/HAVE_SELINUX/WITH_SELINUX/
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 20 Mar 2013 13:06:04 +0000 (13:06 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 20 Mar 2013 13:23:40 +0000 (13:23 +0000)
The virNetSocket & virIdentity classes accidentally got some
conditionals using HAVE_SELINUX instead of WITH_SELINUX.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/rpc/virnetsocket.c
src/util/viridentity.c

index 68aca1b2e9679f92390f9e5788f3f8d8563b62d2..39504ac6e9248eb6fab0ef644328de475fdd1d56 100644 (file)
@@ -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)
 {
@@ -1169,7 +1169,7 @@ int virNetSocketGetSecurityContext(virNetSocketPtr sock,
 
     *context = NULL;
 
-    virMutexLock(&sock->lock);
+    virObjectLock(sock);
     if (getpeercon(sock->fd, &seccon) < 0) {
         if (errno == ENOSYS) {
             ret = 0;
@@ -1188,7 +1188,7 @@ int virNetSocketGetSecurityContext(virNetSocketPtr sock,
     ret = 0;
 cleanup:
     freecon(seccon);
-    virMutexUnlock(&sock->lock);
+    virObjectUnlock(sock);
     return ret;
 }
 #else
index 20921374f18be603d234f0c3e3c0b7a2f840e148..1d40972a6e78ec2fa8058083c79eb8033c978a6c 100644 (file)
@@ -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"));