chiark / gitweb /
journald: do not overwrite syslog facility when parsing priority
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 10 Jun 2013 22:10:12 +0000 (18:10 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 10 Jun 2013 22:10:12 +0000 (18:10 -0400)
https://bugs.freedesktop.org/show_bug.cgi?id=65610

src/journal/journald-syslog.c

index 000f5ac..4aeb9a3 100644 (file)
@@ -268,7 +268,7 @@ void syslog_parse_priority(char **p, int *priority) {
         if (a < 0 || b < 0 || c < 0)
                 return;
 
-        *priority = a*100+b*10+c;
+        *priority = (*priority & LOG_FACMASK) | (a*100 + b*10 + c);
         *p += k;
 }