summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2001-09-13 09:40:35 +0000
committerdes <des@FreeBSD.org>2001-09-13 09:40:35 +0000
commitad919e2f8f54f3c47a89e3326a785e3c37fb542a (patch)
treeeddc25d2ebb4ae70945529a08053c71056627f5b /usr.sbin
parent2887552f5214717b6f1370100374aa76b86044fe (diff)
downloadFreeBSD-src-ad919e2f8f54f3c47a89e3326a785e3c37fb542a.zip
FreeBSD-src-ad919e2f8f54f3c47a89e3326a785e3c37fb542a.tar.gz
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
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/syslogd/syslogd.c3
1 files changed, 2 insertions, 1 deletions
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';
}
OpenPOWER on IntegriCloud