]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal: fix up syslog facility when forwarding native messages (#5667)
authorMichael Biebl <mbiebl@gmail.com>
Thu, 30 Mar 2017 09:56:25 +0000 (11:56 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 30 Mar 2017 09:56:25 +0000 (11:56 +0200)
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
src/journal/journald-native.c

index 3c03b83754dbae12931c9621bbbf32142322e75b..c9bf3832c7a73843781af9dbb4f52fa340fb0ad8 100644 (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);