]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
When configuring zone ACL, check template too 12132/head
authorMatthijs Mekking <matthijs@isc.org>
Thu, 28 May 2026 13:13:26 +0000 (15:13 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Fri, 29 May 2026 06:04:30 +0000 (06:04 +0000)
When zone templates were introduced, we forgot to add parsing ACL
from templates in 'configure_zone_acl()'. This commit fixes the
omission.

bin/named/zoneconf.c

index cc300845bea5a97c52cd90e823f4a472889639aa..89846353f5709bc33c727bab45337ef68c22b954 100644 (file)
@@ -139,8 +139,14 @@ configure_zone_acl(const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
        if (config != NULL && maps[i] != NULL) {
                const cfg_obj_t *toptions = named_zone_templateopts(config,
                                                                    maps[i]);
+               /* Check to see if ACL is defined within template */
                if (toptions != NULL) {
                        maps[i++] = toptions;
+                       (void)cfg_map_get(toptions, aclname, &aclobj);
+                       if (aclobj != NULL) {
+                               aclp = NULL;
+                               goto parse_acl;
+                       }
                }
        }