The commit
b9ef27f have added priority check, but it introduced
regression as the default priority (as specified by --priority) is
ignored.
This patch fixes this problem, but it also removes extra check for
"kern facility", it's unnecessary and inconsistent with the rest of
logger.
Fixes: https://github.com/karelzak/util-linux/issues/1450
Signed-off-by: Karel Zak <kzak@redhat.com>
if (c == '>' && 0 <= pri && pri <= 191) {
/* valid RFC PRI values */
i = 0;
- if (pri < 8) /* kern facility is forbidden */
- pri |= 8;
+ if ((pri & LOG_FACMASK) == 0)
+ pri |= (default_priority & LOG_FACMASK);
ctl->pri = pri;
} else
ctl->pri = default_priority;