From a72374000ec9854d57e23b0bfc6b366382002dd3 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Fri, 16 Jan 2026 13:46:03 +0100 Subject: [PATCH] - simdzone-zone-load, fix to use chrootdir adjustment when dealing with $INCLUDE in a zonefile read. --- services/authzone.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/services/authzone.c b/services/authzone.c index bb58bab28..bce28ee8d 100644 --- a/services/authzone.c +++ b/services/authzone.c @@ -1723,7 +1723,8 @@ az_parse_include(zone_parser_t *parser, const char *file, * Parse file with simdzone. */ static int -az_parse_file_simdzone(struct auth_zone* z, char* zfilename) +az_parse_file_simdzone(struct auth_zone* z, char* zfilename, + struct config_file* cfg) { zone_parser_t parser; zone_options_t options; @@ -1739,6 +1740,9 @@ az_parse_file_simdzone(struct auth_zone* z, char* zfilename) options.default_class = LDNS_RR_CLASS_IN; options.secondary = z->zone_is_slave; options.pretty_ttls = true; /* non-standard, for backwards compatibility */ + if(cfg->chrootdir && cfg->chrootdir[0]) + options.chrootdir = cfg->chrootdir; + else options.chrootdir = NULL; options.log.callback = &az_parse_log; options.accept.callback = &az_parse_accept; options.include.callback = &az_parse_include; @@ -1815,7 +1819,7 @@ auth_zone_read_zonefile(struct auth_zone* z, struct config_file* cfg) /* parse the (toplevel) file */ if(1) { /* Use simdzone. */ - if(!az_parse_file_simdzone(z, zfilename)) { + if(!az_parse_file_simdzone(z, zfilename, cfg)) { char* n = sldns_wire2str_dname(z->name, z->namelen); log_err("error parsing zonefile %s for %s", zfilename, n?n:"error"); -- 2.47.3