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.27-rc1~395^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4c814b18a489dc2aa41e768e6e3cad2f16a8af3;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 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)); }