audit/audit-2.3.2-restart.patch

83 lines
3.2 KiB
Diff

diff -urN audit-2.3.1/init.d/auditd.condrestart audit-2.3.2/init.d/auditd.condrestart
--- audit-2.3.1/init.d/auditd.condrestart 1969-12-31 19:00:00.000000000 -0500
+++ audit-2.3.2/init.d/auditd.condrestart 2013-05-31 11:03:00.000000000 -0400
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Helper script to provide legacy auditd service options not
+# directly supported by systemd.
+
+/usr/libexec/initscripts/legacy-actions/auditd/restart
+RETVAL="$?"
+exit $RETVAL
diff -urN audit-2.3.1/init.d/auditd.restart audit-2.3.2/init.d/auditd.restart
--- audit-2.3.1/init.d/auditd.restart 1969-12-31 19:00:00.000000000 -0500
+++ audit-2.3.2/init.d/auditd.restart 2013-05-31 11:03:00.000000000 -0400
@@ -0,0 +1,13 @@
+#!/bin/sh
+# Helper script to provide legacy auditd service options not
+# directly supported by systemd.
+
+test -f /etc/audit/auditd.conf || exit 6
+
+/usr/libexec/initscripts/legacy-actions/auditd/stop
+
+echo "Redirecting start to /bin/systemctl start auditd.service"
+/bin/systemctl start auditd.service
+RETVAL="$?"
+
+exit $RETVAL
diff -urN audit-2.3.1/init.d/auditd.service audit-2.3.2/init.d/auditd.service
--- audit-2.3.1/init.d/auditd.service 2013-05-16 07:00:00.000000000 -0400
+++ audit-2.3.2/init.d/auditd.service 2013-05-31 11:03:00.000000000 -0400
@@ -4,6 +4,7 @@
After=local-fs.target
Conflicts=shutdown.target
Before=sysinit.target shutdown.target
+RefuseManualStop=yes
[Service]
ExecStart=/sbin/auditd -n
@@ -14,7 +15,6 @@
#ExecStartPost=-/sbin/augenrules --load
ExecStartPost=-/sbin/auditctl -R /etc/audit/audit.rules
ExecReload=/bin/kill -HUP $MAINPID
-RefuseManualStop=yes
[Install]
WantedBy=multi-user.target
diff -urN audit-2.3.1/init.d/Makefile.am audit-2.3.2/init.d/Makefile.am
--- audit-2.3.1/init.d/Makefile.am 2013-05-16 07:00:00.000000000 -0400
+++ audit-2.3.2/init.d/Makefile.am 2013-05-31 11:03:00.000000000 -0400
@@ -22,8 +22,8 @@
CONFIG_CLEAN_FILES = *.rej *.orig
EXTRA_DIST = auditd.init auditd.service auditd.sysconfig auditd.conf \
- audit.rules auditd.cron libaudit.conf audispd.conf \
- auditd.resume auditd.rotate auditd.stop augenrules
+ audit.rules auditd.cron libaudit.conf audispd.conf auditd.condrestart \
+ auditd.restart auditd.resume auditd.rotate auditd.stop augenrules
libconfig = libaudit.conf
dispconfig = audispd.conf
dispconfigdir = $(sysconfdir)/audisp
@@ -57,6 +57,8 @@
$(INSTALL_SCRIPT) -D -m 750 ${srcdir}/auditd.rotate ${DESTDIR}${legacydir}/rotate
$(INSTALL_SCRIPT) -D -m 750 ${srcdir}/auditd.resume ${DESTDIR}${legacydir}/resume
$(INSTALL_SCRIPT) -D -m 750 ${srcdir}/auditd.stop ${DESTDIR}${legacydir}/stop
+ $(INSTALL_SCRIPT) -D -m 750 ${srcdir}/auditd.restart ${DESTDIR}${legacydir}/restart
+ $(INSTALL_SCRIPT) -D -m 750 ${srcdir}/auditd.condrestart ${DESTDIR}${legacydir}/condrestart
else
$(INSTALL_SCRIPT) -D ${srcdir}/auditd.init ${DESTDIR}${initdir}/auditd
endif
@@ -68,6 +70,11 @@
rm ${DESTDIR}${sysconfdir}/${libconfig}
if ENABLE_SYSTEMD
rm ${DESTDIR}${initdir}/auditd.service
+ rm ${DESTDIR}${legacydir}/rotate
+ rm ${DESTDIR}${legacydir}/resume
+ rm ${DESTDIR}${legacydir}/stop
+ rm ${DESTDIR}${legacydir}/restart
+ rm ${DESTDIR}${legacydir}/condrestart
else
rm ${DESTDIR}${sysconfigdir}/auditd
rm ${DESTDIR}${initdir}/auditd