From 8aaf01c62846a2b55a8d2ca622fef17b381d7791 Mon Sep 17 00:00:00 2001 From: Petr Kubat Date: Mon, 8 Jan 2018 12:18:18 +0100 Subject: [PATCH] use lowercased key when matching hosts.byname --- src/yp_match.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/yp_match.c b/src/yp_match.c index 603892d..eadd4f1 100644 --- a/src/yp_match.c +++ b/src/yp_match.c @@ -17,6 +17,7 @@ #include "config.h" #endif +#include #include #include #include @@ -41,6 +42,14 @@ yp_match (const char *indomain, const char *inmap, const char *inkey, req.keydat.keydat_val = (char *) inkey; req.keydat.keydat_len = inkeylen; + /* If matching hosts.byname make sure to use lowercase key */ + if (strncmp(inmap, "hosts.byname", 12) == 0) + { + int i; + for(i = 0; i