[PATCH 09/29] Convert HAVE_AUDIT to WITH_AUDIT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 configure.ac        |  4 ++--
 src/util/viraudit.c | 14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index f173c63..dbef499 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1209,13 +1209,13 @@ if test "$with_audit" != "no" ; then
 
   if test "$with_audit" = "yes" ; then
     AUDIT_LIBS="$AUDIT_LIBS -laudit"
-    AC_DEFINE_UNQUOTED([HAVE_AUDIT], 1, [whether libaudit is available])
+    AC_DEFINE_UNQUOTED([WITH_AUDIT], 1, [whether libaudit is available])
   fi
 
   CFLAGS="$old_cflags"
   LIBS="$old_libs"
 fi
-AM_CONDITIONAL([HAVE_AUDIT], [test "$with_audit" = "yes"])
+AM_CONDITIONAL([WITH_AUDIT], [test "$with_audit" = "yes"])
 AC_SUBST([AUDIT_CFLAGS])
 AC_SUBST([AUDIT_LIBS])
 
diff --git a/src/util/viraudit.c b/src/util/viraudit.c
index 691d2f1..7a1dc4b 100644
--- a/src/util/viraudit.c
+++ b/src/util/viraudit.c
@@ -21,7 +21,7 @@
 
 #include <config.h>
 
-#ifdef HAVE_AUDIT
+#ifdef WITH_AUDIT
 # include <libaudit.h>
 #endif
 #include <stdio.h>
@@ -48,14 +48,14 @@
 
 #define VIR_FROM_THIS VIR_FROM_AUDIT
 
-#if HAVE_AUDIT
+#if WITH_AUDIT
 static int auditfd = -1;
 #endif
 static int auditlog = 0;
 
 int virAuditOpen(void)
 {
-#if HAVE_AUDIT
+#if WITH_AUDIT
     if ((auditfd = audit_open()) < 0) {
         virReportSystemError(errno, "%s", _("Unable to initialize audit layer"));
         return -1;
@@ -86,7 +86,7 @@ void virAuditSend(const char *file ATTRIBUTE_UNUSED, const char *func,
 
     /* Duplicate later checks, to short circuit & avoid printf overhead
      * when nothing is enabled */
-#if HAVE_AUDIT
+#if WITH_AUDIT
     if (!auditlog && auditfd < 0)
         return;
 #else
@@ -110,7 +110,7 @@ void virAuditSend(const char *file ATTRIBUTE_UNUSED, const char *func,
                           "success=no %s", str);
     }
 
-#if HAVE_AUDIT
+#if WITH_AUDIT
     if (auditfd < 0) {
         VIR_FREE(str);
         return;
@@ -138,14 +138,14 @@ void virAuditSend(const char *file ATTRIBUTE_UNUSED, const char *func,
 
 void virAuditClose(void)
 {
-#if HAVE_AUDIT
+#if WITH_AUDIT
     VIR_FORCE_CLOSE(auditfd);
 #endif
 }
 
 char *virAuditEncode(const char *key, const char *value)
 {
-#if HAVE_AUDIT
+#if WITH_AUDIT
     return audit_encode_nv_string(key, value, 0);
 #else
     char *str;
-- 
1.7.11.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]