[PATCH] unable to reload globs
Dag-Erling Smørgrav
des at des.no
Thu Sep 17 16:39:56 UTC 2015
When the configuration lexer processes an include directive and unbound
is chrooted, it will attempt to strip the chroot directory from the
front of the filename. Unfortunately, this is omitted from the loop
that handles globs.
The bug was reported to me by a 1.5.3 user and has been confirmed in
1.5.4. The patch below is relative to 1.5.4 and applies to the latest
trunk with a slight offset.
Index: util/configlexer.lex
===================================================================
--- util/configlexer.lex (revision 3445)
+++ util/configlexer.lex (working copy)
@@ -126,6 +126,10 @@
#endif
;
memset(&g, 0, sizeof(g));
+ if(cfg_parser->chroot && strncmp(filename, cfg_parser->chroot,
+ strlen(cfg_parser->chroot)) == 0) {
+ filename += strlen(cfg_parser->chroot);
+ }
r = glob(filename, flags, NULL, &g);
if(r) {
/* some error */
DES
--
Dag-Erling Smørgrav - des at des.no
More information about the Unbound-users
mailing list