diff options
| author | David Malone <dwmalone@FreeBSD.org> | 2004-05-29 23:24:18 +0000 |
|---|---|---|
| committer | David Malone <dwmalone@FreeBSD.org> | 2004-05-29 23:24:18 +0000 |
| commit | ac3a1548f84cda73725d4f433757c78668882eea (patch) | |
| tree | 53b112bd93a0ba92cab3e8705f3bcd1c5f8b87a2 | |
| parent | a944213190380347889b2cd92854cd259ece6c2d (diff) | |
Notes
| -rw-r--r-- | usr.sbin/syslogd/syslogd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 1c9086b7c9ea6..50adb6290c9cc 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -401,7 +401,6 @@ main(int argc, char *argv[]) case 'v': /* log facility and priority */ LogFacPri++; break; - case '?': default: usage(); } @@ -664,8 +663,12 @@ printline(const char *hname, char *msg) if (pri &~ (LOG_FACMASK|LOG_PRIMASK)) pri = DEFUPRI; - /* don't allow users to log kernel messages */ - if (LOG_FAC(pri) == LOG_KERN && !KeepKernFac) + /* + * Don't allow users to log kernel messages. + * NOTE: since LOG_KERN == 0 this will also match + * messages with no facility specified. + */ + if ((pri & LOG_FACMASK) == LOG_KERN && !KeepKernFac) pri = LOG_MAKEPRI(LOG_USER, LOG_PRI(pri)); q = line; |
