[libvirt] [PATCH 16/29] Convert HAVE_CAPNG to WITH_CAPNG

Daniel P. Berrange berrange at redhat.com
Thu Sep 20 15:01:30 UTC 2012


From: "Daniel P. Berrange" <berrange at redhat.com>

Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
---
 configure.ac             | 4 ++--
 src/lxc/lxc_container.c  | 4 ++--
 src/lxc/lxc_controller.c | 4 ++--
 src/util/command.c       | 4 ++--
 src/util/util.c          | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 28ec3e7..3ef0c7c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1464,9 +1464,9 @@ if test "$with_qemu" = "yes" && test "$with_capng" != "no"; then
 fi
 if test "$with_capng" = "yes"; then
   CAPNG_LIBS="-lcap-ng"
-  AC_DEFINE_UNQUOTED([HAVE_CAPNG], 1, [whether capng is available for privilege reduction])
+  AC_DEFINE_UNQUOTED([WITH_CAPNG], 1, [whether capng is available for privilege reduction])
 fi
-AM_CONDITIONAL([HAVE_CAPNG], [test "$with_capng" != "no"])
+AM_CONDITIONAL([WITH_CAPNG], [test "$with_capng" != "no"])
 AC_SUBST([CAPNG_CFLAGS])
 AC_SUBST([CAPNG_LIBS])
 
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 0ae46d7..37cf3d5 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -45,7 +45,7 @@
 /* For MS_MOVE */
 #include <linux/fs.h>
 
-#if HAVE_CAPNG
+#if WITH_CAPNG
 # include <cap-ng.h>
 #endif
 
@@ -1686,7 +1686,7 @@ static int lxcContainerSetupMounts(virDomainDefPtr vmDef,
  */
 static int lxcContainerDropCapabilities(bool keepReboot ATTRIBUTE_UNUSED)
 {
-#if HAVE_CAPNG
+#if WITH_CAPNG
     int ret;
 
     capng_get_caps_process();
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 9ab53d3..656adbe 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -43,7 +43,7 @@
 #include <sys/stat.h>
 #include <time.h>
 
-#if HAVE_CAPNG
+#if WITH_CAPNG
 # include <cap-ng.h>
 #endif
 
@@ -647,7 +647,7 @@ error:
 
 static int lxcControllerClearCapabilities(void)
 {
-#if HAVE_CAPNG
+#if WITH_CAPNG
     int ret;
 
     capng_clear(CAPNG_SELECT_BOTH);
diff --git a/src/util/command.c b/src/util/command.c
index 418b198..202f8e5 100644
--- a/src/util/command.c
+++ b/src/util/command.c
@@ -29,7 +29,7 @@
 #include <sys/wait.h>
 #include <fcntl.h>
 
-#if HAVE_CAPNG
+#if WITH_CAPNG
 # include <cap-ng.h>
 #endif
 
@@ -161,7 +161,7 @@ virCommandFDSet(int fd,
 
 static int virClearCapabilities(void) ATTRIBUTE_UNUSED;
 
-# if HAVE_CAPNG
+# if WITH_CAPNG
 static int virClearCapabilities(void)
 {
     int ret;
diff --git a/src/util/util.c b/src/util/util.c
index 8b1f0dc..ebda87e 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -58,7 +58,7 @@
 # include <pwd.h>
 # include <grp.h>
 #endif
-#if HAVE_CAPNG
+#if WITH_CAPNG
 # include <cap-ng.h>
 #endif
 #if defined HAVE_MNTENT_H && defined HAVE_GETMNTENT_R
-- 
1.7.11.4




More information about the libvir-list mailing list