|
Zbigniew Jędrzejewski-Szmek |
d743bb |
From 709ea8522339275193a9cef277f9b86926ba4068 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
From: Michael Biebl <mbiebl@gmail.com>
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
Date: Thu, 30 Mar 2017 11:56:25 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
Subject: [PATCH] journal: fix up syslog facility when forwarding native
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
messages (#5667)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
Native journal messages (_TRANSPORT=journal) typically don't have a
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
syslog facility attached to it. As a result when forwarding the messages
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
to syslog they ended up with facility 0 (LOG_KERN).
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
Apply syslog_fixup_facility() so we use LOG_USER instead.
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
Fixes: #5640(cherry picked from commit b6a20306fa5dbb8129dd09e07efeacfcfc57363f)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
---
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
src/journal/journald-native.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
index 3c03b83754..c9bf3832c7 100644
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
--- a/src/journal/journald-native.c
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
+++ b/src/journal/journald-native.c
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
@@ -279,7 +279,7 @@ void server_process_native_message(
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
if (message) {
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
if (s->forward_to_syslog)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
- server_forward_syslog(s, priority, identifier, message, ucred, tv);
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
+ server_forward_syslog(s, syslog_fixup_facility(priority), identifier, message, ucred, tv);
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
if (s->forward_to_kmsg)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
server_forward_kmsg(s, priority, identifier, message, ucred);
|