journal: fix up syslog facility when forwarding native messages (#5667)

Native journal messages (_TRANSPORT=journal) typically don't have a
syslog facility attached to it. As a result when forwarding the messages
to syslog they ended up with facility 0 (LOG_KERN).
Apply syslog_fixup_facility() so we use LOG_USER instead.

Fixes: #5640
This commit is contained in:
Michael Biebl
2017-03-30 11:56:25 +02:00
committed by Lennart Poettering
parent 4e6f13af93
commit b6a20306fa

View File

@@ -279,7 +279,7 @@ void server_process_native_message(
if (message) {
if (s->forward_to_syslog)
server_forward_syslog(s, priority, identifier, message, ucred, tv);
server_forward_syslog(s, syslog_fixup_facility(priority), identifier, message, ucred, tv);
if (s->forward_to_kmsg)
server_forward_kmsg(s, priority, identifier, message, ucred);