Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use correct syslog facility number in journald-audit #2304

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.

None yet

3 participants