From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v9 15/15] audit: Add startup script
Date: Sun, 19 Jul 2015 22:53:39 +0200 [thread overview]
Message-ID: <20150719225339.1f629ed4@free-electrons.com> (raw)
In-Reply-To: <1436905227-26937-16-git-send-email-clayton.shotwell@rockwellcollins.com>
Dear Clayton Shotwell,
On Tue, 14 Jul 2015 15:20:27 -0500, Clayton Shotwell wrote:
> diff --git a/package/audit/S01auditd b/package/audit/S01auditd
> new file mode 100644
> index 0000000..1cbfc20
> --- /dev/null
> +++ b/package/audit/S01auditd
> @@ -0,0 +1,80 @@
> +#!/bin/sh
> +#
> +# auditd This starts and stops auditd
> +#
> +# description: This starts the Linux Auditing System Daemon,
> +# which collects security related events in a dedicated
> +# audit log. If this daemon is turned off, audit events
> +# will be sent to syslog.
> +#
> +
> +NAME=auditd
> +DAEMON=/usr/sbin/${NAME}
> +CONFIG=/etc/audit/auditd.conf
> +PIDFILE=/var/run/${NAME}.pid
> +
> +start(){
> + echo -n "Starting ${NAME}: "
> +
> + # Create dir to store log files in if one doesn't exist. Create
> + # the directory with SELinux permissions if possible
> + command -v matchpathcon >/dev/null 2>&1
> + if [ $? = 0 ]; then
> + mkdir -p /var/log/audit -Z `matchpathcon -n /var/log/audit`
> + else
> + mkdir -p /var/log/audit
> + fi
> +
> + # Run audit daemon executable
> + start-stop-daemon -S -q -p ${PIDFILE} --exec ${DAEMON}
> +
> + if [ $? = 0 ]; then
> + # Load the default rules
> + test -f /etc/audit/rules.d/audit.rules && /usr/sbin/auditctl -R /etc/audit/rules.d/audit.rules >/dev/null
> + echo "OK"
> + else
> + echo "Failed"
This should have been "FAIL" like you do below and like we do in all
other packages.
> +define AUDIT_INSTALL_INIT_SYSV
> + $(INSTALL) -d $(TARGET_DIR)/etc/init.d
> + $(INSTALL) -m 755 package/audit/S01auditd $(TARGET_DIR)/etc/init.d/
> +endef
The $(INSTALL) -d is useless if you use a $(INSTALL) -D with a full
destination path for the S01auditd installation.
I've fixed both nits and applied, thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
prev parent reply other threads:[~2015-07-19 20:53 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-14 20:20 [Buildroot] [PATCH v9 00/15] SELinux Buildroot Additions Clayton Shotwell
2015-07-14 20:20 ` [Buildroot] [PATCH v9 01/15] python-pyparsing: Add host build option Clayton Shotwell
2015-07-14 20:20 ` [Buildroot] [PATCH v9 02/15] policycoreutils: new package Clayton Shotwell
2015-07-14 20:20 ` [Buildroot] [PATCH v9 03/15] refpolicy: " Clayton Shotwell
2015-07-14 20:20 ` [Buildroot] [PATCH v9 04/15] busybox: applets as individual binaries Clayton Shotwell
2015-07-18 12:46 ` Thomas Petazzoni
2015-07-18 14:26 ` Yann E. MORIN
2015-07-14 20:20 ` [Buildroot] [PATCH v9 05/15] busybox: selinux support Clayton Shotwell
2015-07-18 13:06 ` Thomas Petazzoni
2015-07-20 13:56 ` Clayton Shotwell
2015-07-14 20:20 ` [Buildroot] [PATCH v9 06/15] linux-pam: " Clayton Shotwell
2015-07-18 13:22 ` Thomas Petazzoni
2015-07-14 20:20 ` [Buildroot] [PATCH v9 07/15] busybox: added linux-pam support Clayton Shotwell
2015-07-18 13:10 ` Thomas Petazzoni
2015-07-14 20:20 ` [Buildroot] [PATCH v9 08/15] sysvinit: added libselinux dependency Clayton Shotwell
2015-07-18 13:51 ` Thomas Petazzoni
2015-07-14 20:20 ` [Buildroot] [PATCH v9 09/15] dbus: selinux file context support Clayton Shotwell
2015-07-18 14:02 ` Thomas Petazzoni
2015-07-14 20:20 ` [Buildroot] [PATCH v9 10/15] openssh: selinux and pam support Clayton Shotwell
2015-07-18 15:38 ` Thomas Petazzoni
2015-07-14 20:20 ` [Buildroot] [PATCH v9 11/15] util-linux: selinux, audit, " Clayton Shotwell
2015-07-14 20:20 ` [Buildroot] [PATCH v9 12/15] qemu x86 selinux: added common selinux support files Clayton Shotwell
2015-07-14 20:20 ` [Buildroot] [PATCH v9 13/15] qemu x86 selinux: base br defconfig Clayton Shotwell
2015-07-14 20:20 ` [Buildroot] [PATCH v9 14/15] cpio: new package Clayton Shotwell
2015-07-18 17:17 ` Thomas Petazzoni
2015-07-18 17:23 ` Thomas Petazzoni
2015-07-14 20:20 ` [Buildroot] [PATCH v9 15/15] audit: Add startup script Clayton Shotwell
2015-07-19 20:53 ` Thomas Petazzoni [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=20150719225339.1f629ed4@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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.