From owner-svn-src-all@freebsd.org Thu Sep 17 16:19:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B7089CE4E6; Thu, 17 Sep 2015 16:19:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C4801B58; Thu, 17 Sep 2015 16:19:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HGJbZe071082; Thu, 17 Sep 2015 16:19:37 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HGJb2c071081; Thu, 17 Sep 2015 16:19:37 GMT (envelope-from des@FreeBSD.org) Message-Id: <201509171619.t8HGJb2c071081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Thu, 17 Sep 2015 16:19:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287918 - head/contrib/unbound/util X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Sep 2015 16:19:37 -0000 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 */