From ad919e2f8f54f3c47a89e3326a785e3c37fb542a Mon Sep 17 00:00:00 2001 From: des Date: Thu, 13 Sep 2001 09:40:35 +0000 Subject: Add a strcasecmp() call I forgot in my hurry to commit the previous fix. Without this call, the hostname check would in some cases yield false positives. Pointed out by: ru --- usr.sbin/syslogd/syslogd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.sbin') diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 1af1efa..0eb22ea 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1553,7 +1553,8 @@ cfline(line, f, prog, host) if (f->f_host[hl-1] == '.') f->f_host[--hl] = '\0'; dl = strlen(LocalDomain) + 1; - if (hl > dl && f->f_host[hl-dl] == '.') + if (hl > dl && f->f_host[hl-dl] == '.' && + strcasecmp(f->f_host + hl - dl + 1, LocalDomain) == 0) f->f_host[hl-dl] = '\0'; } -- cgit v1.1