All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe MacDonald <joe@deserted.net>
To: Mark Hatle <mark.hatle@windriver.com>
Cc: yocto@yoctoproject.org
Subject: Re: [meta-selinux][PATCH] audit: Fix lack of a default audit.rules
Date: Mon, 7 Apr 2014 09:54:47 -0400	[thread overview]
Message-ID: <20140407135445.GA5044@deserted.net> (raw)
In-Reply-To: <1396652972-28046-1-git-send-email-mark.hatle@windriver.com>

[-- Attachment #1: Type: text/plain, Size: 2681 bytes --]

[[meta-selinux][PATCH] audit: Fix lack of a default audit.rules] On 14.04.04 (Fri 18:09) Mark Hatle wrote:

> 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.

It's expected that you'd actually generate the audit.rules file using
augenrules, but this is a reasonable approximation of that.  :-)

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

Also the right thing to do here.

Merging.
-J.

> 
> 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
>  }
-- 
-Joe MacDonald.
:wq

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

      reply	other threads:[~2014-04-07 13:54 UTC|newest]

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

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=20140407135445.GA5044@deserted.net \
    --to=joe@deserted.net \
    --cc=mark.hatle@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.