Blame SOURCES/bz1977716-revert-explicit-set-LOG_USER-facility.patch

5789ae
From ff476e860e91c1a814ac038ee16790a2a5b950af Mon Sep 17 00:00:00 2001
5789ae
From: Quentin Armitage <quentin@armitage.org.uk>
5789ae
Date: Mon, 18 Jan 2021 14:38:15 +0000
5789ae
Subject: [PATCH 1/2] Revert "Explicitly set LOG_USER log facility when
5789ae
 syslogging"
5789ae
5789ae
This reverts commit db3bcf7b891881e8e70954424f0fe88ec7d37ce0.
5789ae
5789ae
This commit was just plain wrong. The facility should default to
5789ae
LOG_DAEMON (see keepalived(8) man page), but if --log-facility is
5789ae
specified, that is the facility to which log entries should be logged.
5789ae
---
5789ae
 lib/logger.c | 5 +----
5789ae
 lib/logger.h | 2 +-
5789ae
 2 files changed, 2 insertions(+), 5 deletions(-)
5789ae
5789ae
diff --git a/lib/logger.c b/lib/logger.c
5789ae
index a0cc2048..34c83f32 100644
5789ae
--- a/lib/logger.c
5789ae
+++ b/lib/logger.c
5789ae
@@ -133,7 +133,7 @@ block_signals(sigset_t *cur_set)
5789ae
 #endif
5789ae
 
5789ae
 void
5789ae
-vlog_message(int facility, const char* format, va_list args)
5789ae
+vlog_message(const int facility, const char* format, va_list args)
5789ae
 {
5789ae
 #ifndef HAVE_SIGNALFD
5789ae
 	sigset_t cur_set;
5789ae
@@ -213,9 +213,6 @@ vlog_message(int facility, const char* format, va_list args)
5789ae
 			restore_signals = true;
5789ae
 #endif
5789ae
 
5789ae
-		if (!(facility & LOG_FACMASK))
5789ae
-			facility |= LOG_USER;
5789ae
-
5789ae
 #if HAVE_VSYSLOG
5789ae
 		vsyslog(facility, format, args);
5789ae
 #else
5789ae
diff --git a/lib/logger.h b/lib/logger.h
5789ae
index 7536536a..20b2a7e4 100644
5789ae
--- a/lib/logger.h
5789ae
+++ b/lib/logger.h
5789ae
@@ -44,7 +44,7 @@ extern void open_log_file(const char *, const char *, const char *, const char *
5789ae
 extern void flush_log_file(void);
5789ae
 extern void update_log_file_perms(mode_t);
5789ae
 #endif
5789ae
-extern void vlog_message(int facility, const char* format, va_list args)
5789ae
+extern void vlog_message(const int facility, const char* format, va_list args)
5789ae
 	__attribute__ ((format (printf, 2, 0)));
5789ae
 extern void log_message(int priority, const char* format, ...)
5789ae
 	__attribute__ ((format (printf, 2, 3)));
5789ae
-- 
5789ae
2.31.1
5789ae