public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Bug 3604: fix calls to openlog() with LOG_KERN facility
@ 2021-03-27 20:07 Dan Raymond
  2021-03-31 15:19 ` Dan Raymond
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Dan Raymond @ 2021-03-27 20:07 UTC (permalink / raw)
  To: libc-alpha

 From 93683928886a563a4740e2b42b53752a4a7d431f Mon Sep 17 00:00:00 2001
From: Dan Raymond <draymond@foxvalley.net>
Date: Sat, 27 Mar 2021 13:51:16 -0600
Subject: [PATCH] Bug 3604: fix calls to openlog() with LOG_KERN facility

---
  misc/syslog.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/misc/syslog.c b/misc/syslog.c
index 2cc63ef287..bb30cd963a 100644
--- a/misc/syslog.c
+++ b/misc/syslog.c
@@ -285,7 +285,7 @@ __vsyslog_internal(int pri, const char *fmt, va_list ap,

      /* Get connected, output the message to the local logger. */
      if (!connected)
-        openlog_internal(LogTag, LogStat | LOG_NDELAY, 0);
+        openlog_internal(NULL, LogStat | LOG_NDELAY, LogFacility);

      /* If we have a SOCK_STREAM connection, also send ASCII NUL as
         a record terminator.  */
@@ -299,7 +299,7 @@ __vsyslog_internal(int pri, const char *fmt, va_list ap,
          /* Try to reopen the syslog connection.  Maybe it went
             down.  */
          closelog_internal ();
-        openlog_internal(LogTag, LogStat | LOG_NDELAY, 0);
+        openlog_internal(NULL, LogStat | LOG_NDELAY, LogFacility);
            }

          if (!connected || __send(LogFile, buf, bufsize, send_flags) < 0)
@@ -343,7 +343,7 @@ openlog_internal(const char *ident, int logstat, int 
logfac)
      if (ident != NULL)
          LogTag = ident;
      LogStat = logstat;
-    if (logfac != 0 && (logfac &~ LOG_FACMASK) == 0)
+    if ((logfac &~ LOG_FACMASK) == 0)
          LogFacility = logfac;

      int retry = 0;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-04-09 17:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-27 20:07 [PATCH] Bug 3604: fix calls to openlog() with LOG_KERN facility Dan Raymond
2021-03-31 15:19 ` Dan Raymond
2021-03-31 19:27 ` syslog and LOG_KERN - " Adhemerval Zanella
2021-03-31 19:44   ` [libc-coord] " Alan Coopersmith
2021-04-01  1:21     ` ***SPAM***Re: " Dan Raymond
2021-04-01 15:21   ` Rich Felker
2021-04-06 16:47     ` [PATCH] fix calls to openlog() with LOG_KERN facility (Bug 3604) Dan Raymond
2021-04-09 17:37 ` [PATCH] Bug 3604: fix calls to openlog() with LOG_KERN facility Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).