Skip to content

Use correct syslog facility number in journald-audit#2304

Closed
aadamowski wants to merge 1 commit intosystemd:masterfrom
aadamowski:correct-syslog-facility-number-in-journald-audit
Closed

Use correct syslog facility number in journald-audit#2304
aadamowski wants to merge 1 commit intosystemd:masterfrom
aadamowski:correct-syslog-facility-number-in-journald-audit

Conversation

@aadamowski
Copy link
Contributor

The hardcoded value of "32" for SYSLOG_FACILITY is not valid. This value
has probably been taken in the bit shifted form, as it is defined in
syslog.h for facility LOG_AUTH.

In case of any integrations (rsyslog imjournal?) the value passed on
would likely be shifter even further, resulting in an incorrect syslog
priority propagated.

The hardcoded value of "32" for SYSLOG_FACILITY is not valid. This value
has probably been taken in the bit shifted form, as it is defined in
syslog.h for facility LOG_AUTH.

In case of any integrations (rsyslog imjournal?) the value passed on
would likely be shifter even further, resulting in an incorrect syslog
priority propagated.
@zonque zonque added the journal label Jan 12, 2016
@poettering poettering added this to the v229 milestone Jan 12, 2016
@poettering poettering added the reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks label Jan 12, 2016
@aadamowski
Copy link
Contributor Author

I thought that, since all the arguments to snprintf are literals, compiler would optimize this.

After reading about the history of GCC's printf optimizations, I think it might in fact miss this opportunity.

I'll follow up with a revised patch when I have some time to work on it.

poettering added a commit to poettering/systemd that referenced this pull request Jan 26, 2016
@teg teg closed this in d6f4302 Jan 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

journal reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks

Development

Successfully merging this pull request may close these issues.

3 participants