Change tomoyo to oneshot, tomoyo-auditd cannot run in foreground

This commit is contained in:
Andrew Scott 2023-04-16 00:14:05 -04:00
parent bec72c74e3
commit b776ef59c4
Signed by: a
GPG key ID: 7CD5A5977E4931C1
10 changed files with 6 additions and 23 deletions

View file

@ -1 +0,0 @@
tomoyo-auditd-srv

View file

@ -1 +0,0 @@
tomoyo-auditd

View file

@ -1,9 +0,0 @@
#!/bin/execlineb -P
envfile /etc/s6/config/tomoyo-auditd.conf
importas -sCuD "n3 s2000000 T" DIRECTIVES DIRECTIVES
ifelse { test -w /var/log } {
foreground { install -d -o s6log -g s6log /var/log/tomoyo-auditd }
s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /var/log/tomoyo-auditd
}
foreground { install -d -o s6log -g s6log /run/log/tomoyo-auditd }
s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /run/log/tomoyo-auditd

View file

@ -1 +0,0 @@
longrun

View file

@ -1 +0,0 @@
tomoyo-auditd-log

View file

@ -1 +0,0 @@
longrun

View file

@ -1,7 +1,5 @@
# Retrieve logs from a remote system (e.g. REMOTE="remote_ip:remote_port")
# Additonal options must still be configured in /etc/tomoyo/tools/auditd.conf
# See TOMOYO-AUDITD(8)
# Retrieve logs from a remote system (e.g. REMOTE="remote_ip:remote_port").
# Note that tomoyo-auditd still requires that we configure audit logs in
# /etc/tomoyo/tools/auditd.conf, see TOMOYO-AUDITD(8) or
# https://tomoyo.osdn.jp.
REMOTE=""
# This configures the directives used for s6-log in the log service.
DIRECTIVES="n3 s2000000 T"

1
tomoyo-tools/type Normal file
View file

@ -0,0 +1 @@
oneshot

View file

@ -1,5 +1,4 @@
#!/bin/execlineb -P
envfile /etc/s6/config/tomoyo-auditd.conf
importas -sCuD "" REMOTE REMOTE
fdmove -c 2 1
importas -uD "" REMOTE REMOTE
exec tomoyo-auditd ${REMOTE}