summaryrefslogtreecommitdiff
path: root/usr.sbin/syslogd/syslogd.c
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>1997-09-08 17:50:52 +0000
committerBob Beck <beck@cvs.openbsd.org>1997-09-08 17:50:52 +0000
commitc79d983786cefc20c9a9fdbf82ab606e7b2f3d51 (patch)
treefd08f8fb26daffcdd969f3b16a6cdd042d237ede /usr.sbin/syslogd/syslogd.c
parentc17b5c702059c4b10937b3c5c726c4e0de7b7516 (diff)
Ignore trailing spaces on priority in /etc/syslogd.conf
Diffstat (limited to 'usr.sbin/syslogd/syslogd.c')
-rw-r--r--usr.sbin/syslogd/syslogd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index 1b4334e30cd..2fc4cfb0b22 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -1022,6 +1022,12 @@ cfline(line, f)
if (*buf == '*')
pri = LOG_PRIMASK + 1;
else {
+ /* ignore trailing spaces */
+ int i;
+ for (i=strlen(buf)-1; i >= 0 && buf[i] == ' '; i--) {
+ buf[i]='\0';
+ }
+
pri = decode(buf, prioritynames);
if (pri < 0) {
(void)snprintf(ebuf, sizeof ebuf,