Skip to content

fix(rsyslog): allow imjournal state dir in apparmor on ubuntu - #176

Open
yulianV99 wants to merge 1 commit into
masterfrom
fix/rsyslog-apparmor-imjournal-state
Open

yulianV99 wants to merge 1 commit into
masterfrom
fix/rsyslog-apparmor-imjournal-state

Conversation

@yulianV99

Copy link
Copy Markdown
Contributor

tldr: Ubuntu 24.04 rsyslogd apparmor profile denies /var/lib/rsyslog, so imjournal cannot save its cursor.

Problem

On Ubuntu 24.04 the shipped rsyslogd AppArmor profile (enforce) only allows /var/spool/rsyslog/**, but profile::logging::rsyslog points the imjournal StateFile at /var/lib/rsyslog/imjournal.state. Every write is denied (apparmor="DENIED" operation="mknod" name="/var/lib/rsyslog/imjournal.state.tmp" fsuid=0), so imjournal never saves its cursor and replays from a stale position on each rsyslog start.

Changes

This adds /etc/apparmor.d/rsyslog.d/linuxaid-imjournal on Ubuntu with read on the directory and rwk on its contents. The profile already does include if exists <rsyslog.d>, and the rsyslog unit reloads the profile in ExecStartPre, so the file notifies Service['rsyslog'].

Ubuntu 24.04 rsyslogd apparmor profile denies /var/lib/rsyslog, so imjournal
cannot save its cursor. Ship an rsyslog.d snippet and restart rsyslog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant