mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 22:11:59 -09:00
package/audit: Fix type output on log folder creation
Testing buildroot 2021.05 I observed that after first
boot I was having the following folders:
/context:
/system_u:object_r:auditd_log_t
The root of this problem turned to be a difference in the
output of $(selabel_lookup -b file -k /var/log/audit) called
by S02auditd that from this version on looks like:
$ selabel_lookup -b file -k /var/log/audit
Default context: system_u:object_r:auditd_log_t
This patch will cut it to retrieve the type piece only. Unfortunately,
audit has no options to create machine-readable output that is
guaranteed not to change, so that's the best we can do.
Signed-off-by: José Pekkarinen <jose.pekkarinen@unikie.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
(cherry picked from commit e47832c860)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
2af1d61f97
commit
641fde8091
@@ -20,7 +20,7 @@ start(){
|
|||||||
# the directory with SELinux permissions if possible
|
# the directory with SELinux permissions if possible
|
||||||
command -v selabel_lookup >/dev/null 2>&1
|
command -v selabel_lookup >/dev/null 2>&1
|
||||||
if [ $? = 0 ]; then
|
if [ $? = 0 ]; then
|
||||||
mkdir -p /var/log/audit -Z `selabel_lookup -b file -k /var/log/audit`
|
mkdir -p /var/log/audit -Z `selabel_lookup -b file -k /var/log/audit | cut -d ' ' -f 3`
|
||||||
else
|
else
|
||||||
mkdir -p /var/log/audit
|
mkdir -p /var/log/audit
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user