Permalink
Browse files

Use include files when processing acls

  • Loading branch information...
1 parent 93d7e23 commit 829849d67d783480f501ccd61fa0a354d7c5a7ed @cmouse cmouse committed Feb 4, 2014
Showing with 9 additions and 1 deletion.
  1. +1 −1 pdns/arguments.cc
  2. +8 −0 pdns/pdns_recursor.cc
View
@@ -473,7 +473,6 @@ bool ArgvMap::file(const char *fname, bool lax, bool included)
throw ArgException(fn + " could not be parsed");
}
}
- closedir(dir);
}
return true;
@@ -518,4 +517,5 @@ void ArgvMap::gatherIncludes(std::vector<std::string> &extraConfigs) {
}
}
std::sort(extraConfigs.begin(), extraConfigs.end(), CIStringComparePOSIX());
+ closedir(dir);
}
@@ -1632,6 +1632,14 @@ void parseACLs()
::arg().preParse(g_argc, g_argv, "allow-from-file");
::arg().preParseFile(configname.c_str(), "allow-from", LOCAL_NETS);
::arg().preParse(g_argc, g_argv, "allow-from");
+ ::arg().preParse(g_argc, g_argv, "include-dir");
+
+ // then process includes
+ std::vector<std::string> extraConfigs;
+ BOOST_FOREACH(const std::string& fn, extraConfigs) {
+ ::arg().preParseFile(fn.c_str(), "allow-from-file");
+ ::arg().preParseFile(fn.c_str(), "allow-from");
+ }
}
NetmaskGroup* oldAllowFrom = t_allowFrom, *allowFrom=new NetmaskGroup;

0 comments on commit 829849d

Please sign in to comment.