mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 01:06:27 +00:00
Merge ca7fc37268
into bc44cb899c
This commit is contained in:
commit
9bf571ee89
@ -9,7 +9,7 @@ flush = INCREMENTAL_ASYNC
|
||||
freq = 50
|
||||
priority_boost = 4
|
||||
disp_qos = lossy
|
||||
dispatcher = /sbin/audispd
|
||||
dispatcher = /usr/sbin/audispd
|
||||
name_format = NONE
|
||||
##name = mydomain
|
||||
max_log_file_action = ROTATE
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
# load the audit rules into the kernel
|
||||
auditctl -R /etc/audit/audit.rules
|
||||
exec /sbin/auditd -f
|
||||
exec /usr/sbin/auditd -f
|
||||
|
14
test/cases/040_packages/033_auditd/check.sh
Executable file
14
test/cases/040_packages/033_auditd/check.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
for i in $(seq 1 20); do
|
||||
if grep "Init complete" /var/log/auditd.log 2>/dev/null; then
|
||||
printf "auditd test suite PASSED\n" > /dev/console
|
||||
/sbin/poweroff -f
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
printf "auditd test suite FAILED\n" > /dev/console
|
||||
echo "contents of /var/log/auditd.log:" > /dev/console
|
||||
cat /var/log/auditd.log > /dev/console
|
||||
/sbin/poweroff -f
|
24
test/cases/040_packages/033_auditd/test.sh
Normal file
24
test/cases/040_packages/033_auditd/test.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Check that the auditd package works
|
||||
# LABELS:
|
||||
# REPEAT:
|
||||
|
||||
set -e
|
||||
|
||||
# Source libraries. Uncomment if needed/defined
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
NAME=auditd
|
||||
|
||||
clean_up() {
|
||||
rm -rf ${NAME}-*
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
# Test code goes here
|
||||
linuxkit build -disable-content-trust -format kernel+initrd -name "${NAME}" test.yml
|
||||
RESULT="$(linuxkit run ${NAME})"
|
||||
echo "${RESULT}"
|
||||
echo "${RESULT}" | grep -q "suite PASSED"
|
||||
|
||||
exit 0
|
30
test/cases/040_packages/033_auditd/test.yml
Normal file
30
test/cases/040_packages/033_auditd/test.yml
Normal file
@ -0,0 +1,30 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:5.10.34
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:78fb57c7da07c4e43c3a37b27755581da087a3b6
|
||||
- linuxkit/runc:bf1e0c61fb4678d6428d0aabbd80db5ea24e4d4d
|
||||
- linuxkit/containerd:cc02c2af9c928c2faeccbe4edc78bd297ad91866
|
||||
- linuxkit/memlogd:9b0e8a5b3f67672234170d88833163caf7898984
|
||||
services:
|
||||
- name: auditd
|
||||
image: linuxkit/auditd:d777dd0fc555d81ecf55cfbcfa6053a983257246
|
||||
- name: logwrite
|
||||
image: linuxkit/logwrite:e64e0f06e485e3542b58f3517da3bc13f246d208
|
||||
- name: test
|
||||
image: alpine:3.11
|
||||
binds:
|
||||
- /check.sh:/check.sh
|
||||
- /dev/console:/dev/console
|
||||
- /var/log:/var/log
|
||||
command: ["sh", "./check.sh"]
|
||||
pid: host
|
||||
capabilities:
|
||||
- CAP_SYS_BOOT
|
||||
files:
|
||||
- path: check.sh
|
||||
source: ./check.sh
|
||||
trust:
|
||||
org:
|
||||
- linuxkit
|
||||
- library
|
Loading…
Reference in New Issue
Block a user