]> err.no Git - systemd/commitdiff
audit: initialize audit only if it is enabled
authorLennart Poettering <lennart@poettering.net>
Wed, 11 Aug 2010 15:52:01 +0000 (17:52 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 11 Aug 2010 15:52:01 +0000 (17:52 +0200)
src/manager.c

index 9c962ca8153a4168e23f918c7d5797d6e3f38dd0..a5b0ce002d1a0f292df4930504a7879345ffd1de 100644 (file)
@@ -251,8 +251,10 @@ int manager_new(ManagerRunningAs running_as, Manager **_m) {
         if ((r = bus_init(m)) < 0)
                 goto fail;
 
+#ifdef HAVE_AUDIT
         if ((m->audit_fd = audit_open()) < 0)
                 log_error("Failed to connect to audit log: %m");
+#endif
 
         *_m = m;
         return 0;