diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2019-01-13 10:42:52 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2019-01-13 10:42:52 +0000 |
commit | e21173a11ef9e11f43d2add977ddba1477e35099 (patch) | |
tree | 3d0b745f21b40ba9edd9d844400594433d63fa62 /usr.sbin | |
parent | 2ad5ff9df8740e306e440fc57fff0cf9848560f3 (diff) |
When parsing log lines in order to select syslog.conf(5) line blocks, support
program names containing period ('.') and underscore ('_') ASCII characters.
Missing feature reported by and patch tested by
Kawashima underscore James at yahoo dot co dot jp.
"Makes sense." deraadt@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 207eea429d0..c0ce551e48e 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syslogd.c,v 1.257 2018/11/29 21:10:51 kn Exp $ */ +/* $OpenBSD: syslogd.c,v 1.258 2019/01/13 10:42:51 schwarze Exp $ */ /* * Copyright (c) 2014-2017 Alexander Bluhm <bluhm@genua.de> @@ -1796,7 +1796,8 @@ logline(int pri, int flags, char *from, char *msg) msglen--; } for (i = 0; i < NAME_MAX; i++) { - if (!isalnum((unsigned char)msg[i]) && msg[i] != '-') + if (!isalnum((unsigned char)msg[i]) && + msg[i] != '-' && msg[i] != '.' && msg[i] != '_') break; prog[i] = msg[i]; } |