audit/audit-1.7.9-startup.patch

13 lines
559 B
Diff

diff -urp audit-1.7.9.orig/src/auditd.c audit-1.7.9/src/auditd.c
--- audit-1.7.9.orig/src/auditd.c 2008-10-25 08:25:39.000000000 -0400
+++ audit-1.7.9/src/auditd.c 2008-10-25 08:42:08.000000000 -0400
@@ -664,7 +664,7 @@ int main(int argc, char *argv[])
tell_parent(SUCCESS);
/* Depending on value of opt_startup (-s) set initial audit state */
- if (opt_startup != startup_nochange &&
+ if ((audit_is_enabled(fd) < 2) && opt_startup != startup_nochange &&
audit_set_enabled(fd, (int)opt_startup) < 0) {
char emsg[DEFAULT_BUF_SZ];
if (*subj)