journal: fix two recent regressions in config handling#39069
Merged
yuwata merged 2 commits intosystemd:mainfrom Sep 22, 2025
Merged
journal: fix two recent regressions in config handling#39069yuwata merged 2 commits intosystemd:mainfrom
yuwata merged 2 commits intosystemd:mainfrom
Conversation
This was referenced Sep 22, 2025
arianvp
reviewed
Sep 22, 2025
| <listitem><para>Takes a boolean value or special value <literal>keep</literal>. If enabled | ||
| <command>systemd-journald</command> will turn on kernel auditing on start-up. If disabled it will | ||
| turn it off. When <literal>keep</literal> it will neither enable nor disable it, leaving the previous | ||
| state unchanged. This means if another tool turns on auditing even if |
Contributor
There was a problem hiding this comment.
Thanks for adding this bit to the docs! I think it's a great addition
arianvp
reviewed
Sep 22, 2025
src/journal/journald-config.c
Outdated
| static const char* const audit_set_mode_table[_AUDIT_SET_MODE_MAX] = { | ||
| [AUDIT_DISABLE] = "no", | ||
| [AUDIT_ENABLE] = "yes", | ||
| [AUDIT_KEEP] = "keep", |
Contributor
There was a problem hiding this comment.
Yes this is way nicer than the empty string!
YHNdnzj
approved these changes
Sep 22, 2025
poettering
reviewed
Sep 22, 2025
Otherwise, SplitMode= in journald.conf is always ignored. Fixes a regression caused by f48cf2a (v258). Fixes systemd#39046.
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 f48cf2a (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 f48cf2a (v258). Fixes systemd#39057.
78ff191 to
b5fdfed
Compare
Member
Author
|
@arianvp @YHNdnzj @poettering Thank you for the review and comments. All requests are addressed. Upgrading the green label. |
ElvishJerricco
added a commit
to NixOS/nixpkgs
that referenced
this pull request
Oct 3, 2025
Member
|
I queued this up for v258.1, but there's a lot of conflicts for v257-stable. I'm leaving it out for now. |
Contributor
|
Neither of these bugs were present in 257. I think they were both introduced by a refactor that took place in 258. So I don't think there is a need for backport to 257 |
Member
|
Oh, you're right. The second patch says '<= 257' and I misinterpreted that. So indeed, this doesn't need further backporting. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #39046.
Fixes #39057.