]> git.ipfire.org Git - thirdparty/systemd.git/commit
journal: make JournalConfig.set_audit as enum 39069/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 22 Sep 2025 06:22:48 +0000 (15:22 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 22 Sep 2025 14:07:06 +0000 (23:07 +0900)
commitb5fdfedf729712b9824a5cb457a07d5699d2946c
treefd2cdca7636101defd815553257b4237680fcdfa
parentadacdfd9d657a649251e341423602ff44a65bee2
journal: make JournalConfig.set_audit as enum

In systemd <= 257, each set_audit tristate value had special meaning,
- true: enable the kernel audit subsystem,
- false: disable the kernel audit subsystem,
- negative: keep the current kernel audit subsystem state.

And the default is true, rather than negative. So, users sometimes
explicitly pass an empty string to Audit= setting to keep the state.

But since f48cf2a96dfdc23fe30ba0f870125fe55cab64c7 (v258), the negative
value is mistakenly used as 'really unspecified' even if an empty string
is explicitly specified.

This makes negative values handled as unspecified as usual, and assign a new
positive value AUDIT_KEEP for when an empty string is explicitly specified.
Also, make the Audit= setting accept "keep" setting, and suggest to use "keep"
rather than an empty string.

Fixes a regression caused by f48cf2a96dfdc23fe30ba0f870125fe55cab64c7 (v258).
Fixes #39057.
man/journald.conf.xml
src/journal/journald-audit.c
src/journal/journald-audit.h
src/journal/journald-config.c
src/journal/journald-config.h
src/journal/journald-forward.h
src/journal/journald-gperf.gperf