From eca769a7dfd68317ea80e8c7707204193d43440ce9f9dc3e0f83dc49f4ed83c4 Mon Sep 17 00:00:00 2001 From: "Marc S. Weidner" Date: Thu, 9 Oct 2025 23:44:01 +0100 Subject: [PATCH] ## V8.13.096.2025.10.09 Signed-off-by: Marc S. Weidner --- config/hooks/live/0000_basic_chroot_setup.chroot | 4 ++-- config/hooks/live/0001_initramfs_modules.chroot | 3 ++- config/hooks/live/9996_auditd.chroot | 9 +++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/config/hooks/live/0000_basic_chroot_setup.chroot b/config/hooks/live/0000_basic_chroot_setup.chroot index 24bb0cb..0740ff5 100644 --- a/config/hooks/live/0000_basic_chroot_setup.chroot +++ b/config/hooks/live/0000_basic_chroot_setup.chroot @@ -16,8 +16,8 @@ printf "\e[95m++++ ++++ ++++ ++++ ++++ ++++ ++ 🧪 '%s' starting ... \e[0m\n" " export DEBIAN_FRONTEND="noninteractive" apt-get update -qq -mkdir -p /root/.ciss/dlb/backup -chmod 0700 /root/.ciss/dlb/backup +mkdir -p /root/.ciss/dlb/{backup,log} +chmod 0700 /root/.ciss/dlb/{backup,log} mkdir -p /root/git chmod 0700 /root/git diff --git a/config/hooks/live/0001_initramfs_modules.chroot b/config/hooks/live/0001_initramfs_modules.chroot index f0447ea..9b0fe15 100644 --- a/config/hooks/live/0001_initramfs_modules.chroot +++ b/config/hooks/live/0001_initramfs_modules.chroot @@ -355,7 +355,8 @@ EOF chmod 0755 /etc/initramfs-tools/hooks/ciss_debian_live_builder ### Regenerate the initramfs for the live system kernel -update-initramfs -u -k all -v +touch /root/.ciss/dlb/0001_initramfs_modules.log +update-initramfs -u -k all -v | tee -a /root/.ciss/dlb/0001_initramfs_modules.log printf "\e[92m++++ ++++ ++++ ++++ ++++ ++++ ++ ✅ '%s' applied successfully. \e[0m\n" "${0}" diff --git a/config/hooks/live/9996_auditd.chroot b/config/hooks/live/9996_auditd.chroot index 080760f..916e5b7 100644 --- a/config/hooks/live/9996_auditd.chroot +++ b/config/hooks/live/9996_auditd.chroot @@ -362,8 +362,13 @@ printf '%s\0' "${rules[@]}" \ printf '\n' >> "${tmp}" done -install -m 0600 -o root -g root "${tmp}" /etc/audit/audit.rules -rm -f "${tmp}" +# shellcheck disable=2155 +declare tmp_stripped="$(mktemp)" +sed -e '/^[[:space:]]*#/d' -e '/^[[:space:]]*$/d' "${tmp}" > "${tmp_stripped}" +sed -E 's/[[:space:]]+#.*$//' -i "${tmp_stripped}" + +install -m 0600 -o root -g root "${tmp_stripped}" /etc/audit/audit.rules +rm -f "${tmp}" "${tmp_stripped}" if ! grep -Eq '(^-a|^-w|^-e[[:space:]]+1|^-e[[:space:]]+2)' /etc/audit/audit.rules; then log "WARN: /etc/audit/audit.rules contains no -a/-w rules or '-e 1/2'; is this intended?"