Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Sep 2015 16:19:37 +0000 (UTC)
From:      =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r287918 - head/contrib/unbound/util
Message-ID:  <201509171619.t8HGJb2c071081@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Thu Sep 17 16:19:36 2015
New Revision: 287918
URL: https://svnweb.freebsd.org/changeset/base/287918

Log:
  When chrooted, we need to strip the chroot directory from the front of
  included paths.  Don't forget to do it for globs as well.

Modified:
  head/contrib/unbound/util/configlexer.lex

Modified: head/contrib/unbound/util/configlexer.lex
==============================================================================
--- head/contrib/unbound/util/configlexer.lex	Thu Sep 17 16:10:11 2015	(r287917)
+++ head/contrib/unbound/util/configlexer.lex	Thu Sep 17 16:19:36 2015	(r287918)
@@ -128,6 +128,10 @@ static void config_start_include_glob(co
 #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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509171619.t8HGJb2c071081>