From: Rainer Gerhards Date: Thu, 5 Mar 2015 15:54:34 +0000 (+0100) Subject: logger: fix -p kern.* priority is accepted regression X-Git-Tag: v2.26.1~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d239040764ad0b7100ffb6151486b9b6d3c6b617;p=thirdparty%2Futil-linux.git 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. --- diff --git a/misc-utils/logger.c b/misc-utils/logger.c index 5bdfeeecaa..323661e741 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)); }