chiark / gitweb /
@@ -1,3 +1,10 @@
authorianmdlvl <ianmdlvl>
Tue, 5 Feb 2008 19:50:57 +0000 (19:50 +0000)
committerianmdlvl <ianmdlvl>
Tue, 5 Feb 2008 19:50:57 +0000 (19:50 +0000)
+chiark-utils (4.1.26) unstable; urgency=low
+
+  * chiark-named-conf: foreign zones work properly using the configuration
+    prevailing at the end of the config file.
+
+ -- Ian Jackson <ian@davenant.greenend.org.uk>  Tue, 05 Feb 2008 19:50:19 +0000
+
 chiark-utils (4.1.25) unstable; urgency=low

   * chiark-backup: remove snap-mount properly whether it's a dir or a leaf

debian/changelog
scripts/named-conf
scripts/named-conf.8

index d2fd9860867d82826ed52b67f0241991b55f1705..645fe864163f816345df81943031460882d32ba0 100644 (file)
@@ -1,3 +1,10 @@
+chiark-utils (4.1.26) unstable; urgency=low
+
+  * chiark-named-conf: foreign zones work properly using the configuration
+    prevailing at the end of the config file.
+
+ -- Ian Jackson <ian@davenant.greenend.org.uk>  Tue, 05 Feb 2008 19:50:19 +0000
+
 chiark-utils (4.1.25) unstable; urgency=low
 
   * chiark-backup: remove snap-mount properly whether it's a dir or a leaf
 chiark-utils (4.1.25) unstable; urgency=low
 
   * chiark-backup: remove snap-mount properly whether it's a dir or a leaf
index fdfa404792adbfe7cb42767a6f598ffa2d87acf0..d6790773c16d70d1ab99237a8f4bc268e9a2e479 100755 (executable)
@@ -354,9 +354,23 @@ sub bad_modifiers ($) {
     return 0;
 }
 
     return 0;
 }
 
+sub zone_conf_settings ($$) {
+    my ($cfg,$zone) = @_;
+    my ($sfx,$aref);
+    foreach $sfx (qw(self_soa self_ns self_addr forbid_addr forbid_slave
+                    conv_glueless indirect_glue)) {
+       { no strict 'refs'; $aref= [ @$sfx ]; }
+       @$aref or cfg_fail("failed to specify $sfx before zone")
+           if $sfx =~ m/^self/;
+       $cfg->{$sfx}= $aref;
+    }
+    foreach $sfx (qw(self_soa self_ns)) {
+       map { s/\*$/$zone/ } @{ $zone_cfg{$zone}{$sfx} };
+    }
+}
+
 sub zone_conf ($$$$$@) {
     my ($zone,$style,$sabbr,$mod,$file,@servers) = @_;
 sub zone_conf ($$$$$@) {
     my ($zone,$style,$sabbr,$mod,$file,@servers) = @_;
-    my ($sfx,$aref);
     $file= qualify("$slave_dir/$slave_prefix".$zone.$slave_suffix)
        unless length $file;
     if (!length $output) {
     $file= qualify("$slave_dir/$slave_prefix".$zone.$slave_suffix)
        unless length $file;
     if (!length $output) {
@@ -382,16 +396,7 @@ sub zone_conf ($$$$$@) {
        $zone_cfg{$zone}{'maildir'}= qualify($mail_state_dir);
        $zone_cfg{$zone}{'mailmwarn'}= $mail_max_warnfreq;
     }
        $zone_cfg{$zone}{'maildir'}= qualify($mail_state_dir);
        $zone_cfg{$zone}{'mailmwarn'}= $mail_max_warnfreq;
     }
-    foreach $sfx (qw(self_soa self_ns self_addr forbid_addr forbid_slave
-                    conv_glueless indirect_glue)) {
-       { no strict 'refs'; $aref= [ @$sfx ]; }
-       @$aref or cfg_fail("failed to specify $sfx before zone")
-           if $sfx =~ m/^self/;
-       $zone_cfg{$zone}{$sfx}= $aref;
-    }
-    foreach $sfx (qw(self_soa self_ns)) {
-       map { s/\*$/$zone/ } @{ $zone_cfg{$zone}{$sfx} };
-    }
+    zone_conf_settings($zone_cfg{$zone}, $zone);
     $zone_cfg{$zone}{'output'}= $output;
     push @zone_cfg_list, $zone;
 }
     $zone_cfg{$zone}{'output'}= $output;
     push @zone_cfg_list, $zone;
 }
@@ -425,6 +430,7 @@ sub process_zones (@) {
            's' => "f $group2modcmd{'foreign'}",
            'servers' => [ ],
            };
            's' => "f $group2modcmd{'foreign'}",
            'servers' => [ ],
            };
+       zone_conf_settings($cfg, $zone);
 
        mail_zone_before() or next
            if $domail;
 
        mail_zone_before() or next
            if $domail;
index 57d5a9382928aae9243d8f64c166a4f4de8e95c2..0faae0ae7c0789b47b2f7b92db6013cf3c648db3 100644 (file)
@@ -152,7 +152,9 @@ several physical lines.
 .SS GENERAL DIRECTIVES
 These directives specify general configuration details.  They should
 appear before directives specifying zones, as each will affect only
 .SS GENERAL DIRECTIVES
 These directives specify general configuration details.  They should
 appear before directives specifying zones, as each will affect only
-later zone directives.
+later zone directives.  Foreign zones (zones explicitly specified on
+the command line but not mentioned in the configuration) use the
+configuration settings prevailing at the end of the config file.
 .TP
 \fBadmin\fP \fIemail\-address\fP
 Specifies the email address of the local administrator.  This is used
 .TP
 \fBadmin\fP \fIemail\-address\fP
 Specifies the email address of the local administrator.  This is used