All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: <joe@deserted.net>, <xin.ouyang@windriver.com>, <yocto@yoctoproject.org>
Subject: [meta-selinux][PATCH] audit: Fix lack of a default audit.rules
Date: Fri, 4 Apr 2014 18:09:32 -0500	[thread overview]
Message-ID: <1396652972-28046-1-git-send-email-mark.hatle@windriver.com> (raw)

Various components were failing, and upon investigation it was noted
that the audit.rules file referenced by the initscript wasn't available.

There was however a copy under the rules.d directory.  Investigating
the audit.spec file (which in the upstream source) showed that it was
expected that the version in the rules.d should be copied into
/etc/audit.

Do this and correct the systemd services file to use the same file.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 recipes-security/audit/audit/auditd.service | 2 +-
 recipes-security/audit/audit_2.3.2.bb       | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/recipes-security/audit/audit/auditd.service b/recipes-security/audit/audit/auditd.service
index 6daa056..adf4d3b 100644
--- a/recipes-security/audit/audit/auditd.service
+++ b/recipes-security/audit/audit/auditd.service
@@ -14,7 +14,7 @@ ExecStart=/sbin/auditd -n
 ## Then copy existing rules to /etc/audit/rules.d/
 ## Not doing this last step can cause loss of existing rules
 #ExecStartPost=-/sbin/augenrules --load
-ExecStartPost=-/sbin/auditctl -R /etc/audit/rules.d/audit.rules
+ExecStartPost=-/sbin/auditctl -R /etc/audit/audit.rules
 ExecReload=/bin/kill -HUP $MAINPID
 
 [Install]
diff --git a/recipes-security/audit/audit_2.3.2.bb b/recipes-security/audit/audit_2.3.2.bb
index 4a9c954..ae6556f 100644
--- a/recipes-security/audit/audit_2.3.2.bb
+++ b/recipes-security/audit/audit_2.3.2.bb
@@ -67,6 +67,8 @@ FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug"
 FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}"
 FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la"
 
+CONFFILES_auditd += "${sysconfdir}/audit/audit.rules"
+
 do_install_append() {
 	rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a
 	rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la
@@ -91,4 +93,7 @@ do_install_append() {
 
 	chmod 750 ${D}/etc/audit ${D}/etc/audit/rules.d
 	chmod 640 ${D}/etc/audit/auditd.conf ${D}/etc/audit/rules.d/audit.rules
+
+	# Based on the audit.spec "Copy default rules into place on new installation"
+	cp ${D}/etc/audit/rules.d/audit.rules ${D}/etc/audit/audit.rules
 }
-- 
1.8.5.3



             reply	other threads:[~2014-04-04 23:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-04 23:09 Mark Hatle [this message]
2014-04-07 13:54 ` [meta-selinux][PATCH] audit: Fix lack of a default audit.rules Joe MacDonald

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1396652972-28046-1-git-send-email-mark.hatle@windriver.com \
    --to=mark.hatle@windriver.com \
    --cc=joe@deserted.net \
    --cc=xin.ouyang@windriver.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.