]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
conf: don't allow slash with hostname in allow/deny directive
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 25 Jul 2017 10:55:32 +0000 (12:55 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 25 Jul 2017 15:40:35 +0000 (17:40 +0200)
conf.c

diff --git a/conf.c b/conf.c
index ccc365ed9087b8cd21ed923b2401110be11ca30b..3ba835568cfa879c80ddd18ed19e3bf873c7fafd 100644 (file)
--- a/conf.c
+++ b/conf.c
@@ -1071,7 +1071,7 @@ parse_allow_deny(char *line, ARR_Instance restrictions, int allow)
       }
 
     } else {
-      if (DNS_Name2IPAddress(p, &ip_addr, 1) == DNS_Success) {
+      if (!slashpos && DNS_Name2IPAddress(p, &ip_addr, 1) == DNS_Success) {
         new_node = (AllowDeny *)ARR_GetNewElement(restrictions);
         new_node->allow = allow;
         new_node->all = all;