From d4c814b18a489dc2aa41e768e6e3cad2f16a8af3 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 5 Mar 2015 16:54:34 +0100 Subject: [PATCH] logger: fix -p kern.* priority is accepted regression Pre 2.26, syslog(3) was used for local logging, and it did not accept kern.* priorities. This is re-enabled by the patch. --- misc-utils/logger.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc-utils/logger.c b/misc-utils/logger.c index 5ec722efe2..06f0759b5d 100644 --- a/misc-utils/logger.c +++ b/misc-utils/logger.c @@ -173,6 +173,8 @@ static int pencode(char *s) level = decode(s, prioritynames); if (level < 0) errx(EXIT_FAILURE, _("unknown priority name: %s"), s); + if(facility == LOG_KERN) + facility = LOG_USER; /* kern is forbidden */ return ((level & LOG_PRIMASK) | (facility & LOG_FACMASK)); } -- 2.47.2