From abb7d524083668c9901c37b1255a6b59b848b3a3 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Thu, 13 Apr 2023 22:48:04 -0400 Subject: [PATCH] Added klogd, smartd, tomoyo-auditd --- klogd-log/consumer-for | 1 + klogd-log/notification-fd | 1 + klogd-log/pipeline-name | 1 + klogd-log/run | 10 ++++++++++ klogd-log/type | 1 + klogd-srv/dependencies.d/mount-procfs | 0 klogd-srv/producer-for | 1 + klogd-srv/run | 6 ++++++ klogd-srv/type | 1 + smartd-log/consumer-for | 1 + smartd-log/notification-fd | 1 + smartd-log/pipeline-name | 1 + smartd-log/run | 9 +++++++++ smartd-log/type | 1 + smartd-srv/producer-for | 1 + smartd-srv/run | 3 +++ smartd-srv/type | 1 + tomoyo-auditd-log/consumer-for | 1 + tomoyo-auditd-log/notification-fd | 1 + tomoyo-auditd-log/pipeline-name | 1 + tomoyo-auditd-log/run | 9 +++++++++ tomoyo-auditd-log/type | 1 + tomoyo-auditd-srv/producer-for | 1 + tomoyo-auditd-srv/run | 3 +++ tomoyo-auditd-srv/type | 1 + 25 files changed, 58 insertions(+) create mode 100644 klogd-log/consumer-for create mode 100644 klogd-log/notification-fd create mode 100644 klogd-log/pipeline-name create mode 100644 klogd-log/run create mode 100644 klogd-log/type create mode 100644 klogd-srv/dependencies.d/mount-procfs create mode 100644 klogd-srv/producer-for create mode 100644 klogd-srv/run create mode 100644 klogd-srv/type create mode 100644 smartd-log/consumer-for create mode 100644 smartd-log/notification-fd create mode 100644 smartd-log/pipeline-name create mode 100644 smartd-log/run create mode 100644 smartd-log/type create mode 100644 smartd-srv/producer-for create mode 100644 smartd-srv/run create mode 100644 smartd-srv/type create mode 100644 tomoyo-auditd-log/consumer-for create mode 100644 tomoyo-auditd-log/notification-fd create mode 100644 tomoyo-auditd-log/pipeline-name create mode 100644 tomoyo-auditd-log/run create mode 100644 tomoyo-auditd-log/type create mode 100644 tomoyo-auditd-srv/producer-for create mode 100644 tomoyo-auditd-srv/run create mode 100644 tomoyo-auditd-srv/type diff --git a/klogd-log/consumer-for b/klogd-log/consumer-for new file mode 100644 index 0000000..3a77aac --- /dev/null +++ b/klogd-log/consumer-for @@ -0,0 +1 @@ +klogd-srv diff --git a/klogd-log/notification-fd b/klogd-log/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/klogd-log/notification-fd @@ -0,0 +1 @@ +3 diff --git a/klogd-log/pipeline-name b/klogd-log/pipeline-name new file mode 100644 index 0000000..fd64770 --- /dev/null +++ b/klogd-log/pipeline-name @@ -0,0 +1 @@ +klogd diff --git a/klogd-log/run b/klogd-log/run new file mode 100644 index 0000000..89140dc --- /dev/null +++ b/klogd-log/run @@ -0,0 +1,10 @@ +#!/bin/execlineb -P +# See: https://git.skarnet.org/cgi-bin/cgit.cgi/s6/tree/examples +envfile /etc/s6/config/klogd.conf +importas -sCuD "s2000000 n3 t" DIRECTIVES DIRECTIVES +ifelse { test -w /var/log } { + foreground { install -d -o root -g root /var/log/klogd } + exec -c s6-log -d3 -b -- ${DIRECTIVES} /var/log/klogd +} +foreground { install -d -o root -g root /run/log/klogd } +exec -c s6-log -d3 -b -- ${DIRECTIVES} /run/log/klogd diff --git a/klogd-log/type b/klogd-log/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/klogd-log/type @@ -0,0 +1 @@ +longrun diff --git a/klogd-srv/dependencies.d/mount-procfs b/klogd-srv/dependencies.d/mount-procfs new file mode 100644 index 0000000..e69de29 diff --git a/klogd-srv/producer-for b/klogd-srv/producer-for new file mode 100644 index 0000000..2f21a8f --- /dev/null +++ b/klogd-srv/producer-for @@ -0,0 +1 @@ +klogd-log diff --git a/klogd-srv/run b/klogd-srv/run new file mode 100644 index 0000000..4de91c5 --- /dev/null +++ b/klogd-srv/run @@ -0,0 +1,6 @@ +#!/bin/execlineb -P +# See: https://git.skarnet.org/cgi-bin/cgit.cgi/s6/tree/examples +fdmove -c 2 1 +redirfd -r 0 /proc/kmsg +exec -c +ucspilogd diff --git a/klogd-srv/type b/klogd-srv/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/klogd-srv/type @@ -0,0 +1 @@ +longrun diff --git a/smartd-log/consumer-for b/smartd-log/consumer-for new file mode 100644 index 0000000..748e470 --- /dev/null +++ b/smartd-log/consumer-for @@ -0,0 +1 @@ +smartd-srv diff --git a/smartd-log/notification-fd b/smartd-log/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/smartd-log/notification-fd @@ -0,0 +1 @@ +3 diff --git a/smartd-log/pipeline-name b/smartd-log/pipeline-name new file mode 100644 index 0000000..fe386f5 --- /dev/null +++ b/smartd-log/pipeline-name @@ -0,0 +1 @@ +smartd diff --git a/smartd-log/run b/smartd-log/run new file mode 100644 index 0000000..d94e2a0 --- /dev/null +++ b/smartd-log/run @@ -0,0 +1,9 @@ +#!/bin/execlineb -P +envfile /etc/s6/config/smartd.conf +importas -sCuD "s2000000 n3 T" DIRECTIVES DIRECTIVES +ifelse { test -w /var/log } { + foreground { install -d -o s6log -g s6log /var/log/smartd } + exec -c s6-log -d3 -b -- ${DIRECTIVES} /var/log/smartd +} +foreground { install -d -o s6log -g s6log /run/log/smartd } +exec -c s6-log -d3 -b -- ${DIRECTIVES} /run/log/smartd diff --git a/smartd-log/type b/smartd-log/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/smartd-log/type @@ -0,0 +1 @@ +longrun diff --git a/smartd-srv/producer-for b/smartd-srv/producer-for new file mode 100644 index 0000000..3440869 --- /dev/null +++ b/smartd-srv/producer-for @@ -0,0 +1 @@ +smartd-log diff --git a/smartd-srv/run b/smartd-srv/run new file mode 100644 index 0000000..ed321ae --- /dev/null +++ b/smartd-srv/run @@ -0,0 +1,3 @@ +#!/bin/execlineb -P +fdmove -c 2 1 +exec smartd -d diff --git a/smartd-srv/type b/smartd-srv/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/smartd-srv/type @@ -0,0 +1 @@ +longrun diff --git a/tomoyo-auditd-log/consumer-for b/tomoyo-auditd-log/consumer-for new file mode 100644 index 0000000..1eb4b9b --- /dev/null +++ b/tomoyo-auditd-log/consumer-for @@ -0,0 +1 @@ +tomoyo-auditd-srv diff --git a/tomoyo-auditd-log/notification-fd b/tomoyo-auditd-log/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/tomoyo-auditd-log/notification-fd @@ -0,0 +1 @@ +3 diff --git a/tomoyo-auditd-log/pipeline-name b/tomoyo-auditd-log/pipeline-name new file mode 100644 index 0000000..f3154aa --- /dev/null +++ b/tomoyo-auditd-log/pipeline-name @@ -0,0 +1 @@ +tomoyo-auditd diff --git a/tomoyo-auditd-log/run b/tomoyo-auditd-log/run new file mode 100644 index 0000000..7c5e72c --- /dev/null +++ b/tomoyo-auditd-log/run @@ -0,0 +1,9 @@ +#!/bin/execlineb -P +envfile /etc/s6/config/tomoyo-audit.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 diff --git a/tomoyo-auditd-log/type b/tomoyo-auditd-log/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/tomoyo-auditd-log/type @@ -0,0 +1 @@ +longrun diff --git a/tomoyo-auditd-srv/producer-for b/tomoyo-auditd-srv/producer-for new file mode 100644 index 0000000..9194e28 --- /dev/null +++ b/tomoyo-auditd-srv/producer-for @@ -0,0 +1 @@ +tomoyo-auditd-log diff --git a/tomoyo-auditd-srv/run b/tomoyo-auditd-srv/run new file mode 100644 index 0000000..27e349c --- /dev/null +++ b/tomoyo-auditd-srv/run @@ -0,0 +1,3 @@ +#!/bin/execlineb -P +fdmove -c 2 1 +exec tomoyo-auditd diff --git a/tomoyo-auditd-srv/type b/tomoyo-auditd-srv/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/tomoyo-auditd-srv/type @@ -0,0 +1 @@ +longrun