commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_4-15-g7adcd0


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_4-15-g7adcd01
Date: Thu, 08 Oct 2015 17:55:25 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  7adcd01d96ac8f9077d32f214c85c0d8ef866308 (commit)
      from  d898738601cf65e6f6d9fb98c4ee9aa938d4899d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=7adcd01d96ac8f9077d32f214c85c0d8ef866308


commit 7adcd01d96ac8f9077d32f214c85c0d8ef866308
Author: Mats Erik Andersson <address@hidden>
Date:   Thu Oct 8 19:04:43 2015 +0200

    syslogd: Redefine faulty macro LOG_MAKEPRI.
    
    Old versions of Glibc cause remotely logged kernel
    messages to be rewritten for facility `uucp', not
    the intended facility `user'.

diff --git a/ChangeLog b/ChangeLog
index c3302ef..10a1d20 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2015-10-08  Mats Erik Andersson  <address@hidden>
+
+       syslogd: Redefine faulty macro LOG_MAKEPRI whenever needed.
+       Systems with Glibc header file <syslog.h> prior to 2.17,
+       are not correctly defining the helper macro LOG_MAKEPRI.
+       This effects our syslog service whenever it receives kernel
+       messages from a remote host.  The issue was mentioned in
+       Debian's BTS as report #729666.
+
+       * src/logprio.h [LOG_MAKEPRI]: Check that the macro does
+       not shift the first argument.  If it does, undefine it and
+       apply our corrected definition.
+       * src/syslogd.c [LOG_MAKEPRI]: Likewise.  Display a precompiler
+       warning to the effect that we have diagnosed an issue.
+
 2015-09-15  Mats Erik Andersson  <address@hidden>
 
        * doc/inetutils.texi (ifconfig invocation): New chapter.
diff --git a/src/logprio.h b/src/logprio.h
index 79072e0..315ad05 100644
--- a/src/logprio.h
+++ b/src/logprio.h
@@ -66,6 +66,18 @@ typedef struct _code {
 #  define LOG_PRI(p)   ((p) & LOG_PRIMASK)
 #endif
 
+/* Glibc prior to 2.17 included a definition of LOG_MAKEPRI
+ * that evaluated LOG_MAKEPRI(LOG_USER, 0) to (1 << 9).
+ * The first argument was shifted three bits, ignoring
+ * the definition LOG_USER = (1 << 3).  Avoid this
+ * harmful mistake.
+ */
+#ifdef LOG_MAKEPRI
+# if LOG_MAKEPRI (1, 0) > LOG_PRIMASK
+#  undef LOG_MAKEPRI
+# endif
+#endif /* LOG_MAKEPRI */
+
 #ifndef LOG_MAKEPRI
 #  define LOG_MAKEPRI(fac, p)  ((fac) | (p))
 #endif
diff --git a/src/syslogd.c b/src/syslogd.c
index 0fa4194..352a5bd 100644
--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -116,6 +116,19 @@
 # include "logprio.h"
 #endif
 
+/* Glibc prior to 2.17 included a definition of LOG_MAKEPRI
+ * that evaluated LOG_MAKEPRI(LOG_USER, 0) to (1 << 9).
+ * The first argument was shifted three bits, ignoring
+ * the definition LOG_USER = (1 << 3).  Avoid this
+ * harmful mistake.
+ */
+#ifdef LOG_MAKEPRI
+# if LOG_MAKEPRI (1, 0) > LOG_PRIMASK
+#  warning Discarding faulty LOG_MAKEPRI defined in system header file.
+#  undef LOG_MAKEPRI
+# endif
+#endif /* LOG_MAKEPRI */
+
 #ifndef LOG_MAKEPRI
 #  define LOG_MAKEPRI(fac, p)  ((fac) | (p))
 #endif

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog     |   15 +++++++++++++++
 src/logprio.h |   12 ++++++++++++
 src/syslogd.c |   13 +++++++++++++
 3 files changed, 40 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]