From 6055f9c8378fd4599d3dc11fe77712176e017695 Mon Sep 17 00:00:00 2001 From: anti Date: Tue, 28 Apr 2026 19:12:11 -0400 Subject: [PATCH] fix(deckies): set MSGID=command on bash PROMPT_COMMAND syslog lines Add --rfc5424 --msgid command to the logger invocation in SSH and telnet decky bashrc. MSGID arrives as "command" instead of NIL, which is what the profiler's _COMMAND_EVENT_TYPES filter expects. The parser heuristic shipped in d4591b3 stays as a safety net for any future emitter that forgets the flags or for inflight pre-rebuild containers. --- decnet/templates/ssh/Dockerfile | 2 +- decnet/templates/telnet/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/decnet/templates/ssh/Dockerfile b/decnet/templates/ssh/Dockerfile index 364f3bcc..33515a87 100644 --- a/decnet/templates/ssh/Dockerfile +++ b/decnet/templates/ssh/Dockerfile @@ -109,7 +109,7 @@ RUN echo 'alias ll="ls -alF"' >> /root/.bashrc && \ echo 'alias l="ls -CF"' >> /root/.bashrc && \ echo 'export HISTSIZE=1000' >> /root/.bashrc && \ echo 'export HISTFILESIZE=2000' >> /root/.bashrc && \ - echo 'PROMPT_COMMAND='"'"'logger -p user.info -t bash "CMD uid=$UID user=$USER src=${SSH_CLIENT%% *} pwd=$PWD cmd=$(history 1 | sed "s/^ *[0-9]* *//")";'"'" >> /root/.bashrc + echo 'PROMPT_COMMAND='"'"'logger --rfc5424 --msgid command -p user.info -t bash "CMD uid=$UID user=$USER src=${SSH_CLIENT%% *} pwd=$PWD cmd=$(history 1 | sed "s/^ *[0-9]* *//")";'"'" >> /root/.bashrc # Fake project files to look lived-in RUN mkdir -p /root/projects /root/backups /var/www/html && \ diff --git a/decnet/templates/telnet/Dockerfile b/decnet/templates/telnet/Dockerfile index 43f421c6..70650aca 100644 --- a/decnet/templates/telnet/Dockerfile +++ b/decnet/templates/telnet/Dockerfile @@ -83,7 +83,7 @@ RUN mkdir -p /root/scripts /root/backups && \ printf 'alias ll="ls -alF"\nalias la="ls -A"\nexport HISTSIZE=1000\n' >> /root/.bashrc # Log bash commands via syslog -RUN echo 'PROMPT_COMMAND='"'"'logger -p user.info -t bash "CMD uid=$UID pwd=$PWD cmd=$(history 1 | sed "s/^ *[0-9]* *//")";'"'" >> /root/.bashrc +RUN echo 'PROMPT_COMMAND='"'"'logger --rfc5424 --msgid command -p user.info -t bash "CMD uid=$UID pwd=$PWD cmd=$(history 1 | sed "s/^ *[0-9]* *//")";'"'" >> /root/.bashrc COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh