]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
When chrooted, we need to strip the chroot directory from the front of
authordes <des@FreeBSD.org>
Thu, 17 Sep 2015 16:19:36 +0000 (16:19 +0000)
committerdes <des@FreeBSD.org>
Thu, 17 Sep 2015 16:19:36 +0000 (16:19 +0000)
included paths.  Don't forget to do it for globs as well.

contrib/unbound/util/configlexer.lex

index 26974c69a0940c3eb597de4d054148810353d6b7..c80fedfbd5a0beed6a4c8695928957c3c5ebd56b 100644 (file)
@@ -128,6 +128,10 @@ static void config_start_include_glob(const char* filename)
 #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 */