diff options
Diffstat (limited to 'usr.sbin/syslogd/syslogd.c')
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 999254a..c3887ac 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -853,8 +853,20 @@ logmsg(int pri, const char *msg, const char *from, int flags) /* skip messages with the incorrect program name */ if (f->f_program) - if (strcmp(prog, f->f_program) != 0) - continue; + switch (f->f_program[0]) { + case '+': + if (strcmp(prog, f->f_program + 1) != 0) + continue; + break; + case '-': + if (strcmp(prog, f->f_program + 1) == 0) + continue; + break; + default: + if (strcmp(prog, f->f_program) != 0) + continue; + break; + } if (f->f_type == F_CONSOLE && (flags & IGN_CONS)) continue; |