From 49e3f2fbed513c2924cb56c6924bc4cc67427596 Mon Sep 17 00:00:00 2001 From: hno <> Date: Thu, 11 Apr 2002 22:45:28 +0000 Subject: [PATCH] Deal with end-of-line comments in ACL definitions, such as used in the default Safe_ports definition. --- src/acl.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/acl.cc b/src/acl.cc index 07b4cfab86..c309460cbc 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -1,6 +1,6 @@ /* - * $Id: acl.cc,v 1.271 2002/01/13 01:08:43 robertc Exp $ + * $Id: acl.cc,v 1.272 2002/04/11 16:45:28 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -114,7 +114,9 @@ strtokFile(void) strtok_again: if (!aclFromFile) { t = (strtok(NULL, w_space)); - if (t && (*t == '\"' || *t == '\'')) { + if (!t || *t == '#') { + return NULL; + } else if (*t == '\"' || *t == '\'') { /* quote found, start reading from file */ fn = ++t; while (*t && *t != '\"' && *t != '\'') -- 2.47.3