Changeset 848
- Timestamp:
- 09/01/22 12:43:41 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB/ExportBIND.pm
r847 r848 30 30 my $dbh = $self->{dbh}; 31 31 32 } 32 # allow for future exports of subgroups of records 33 my $viewlist = $dnsdb->getLocList(curgroup => 1); 34 35 # Write the view list to a configuration fragment 36 if ($viewlist) { 37 foreach my $view (@{$viewlist}) { 38 #print Dumper($view); 39 # print BINDCONF "view $view->{location} {\n"; 40 print "view $view->{location} {\n"; 41 # could also use an acl { ... }; statement, then match-clients { aclname; };, but that gets hairy 42 # note that some semantics of data visibility need to be handled by the record export, since it's 43 # not 100% clear if the semantics of a tinydns view with an empty IP list (matches anyone) are the 44 # same as a BIND view with match-clients { any; }; 45 if ($view->{iplist}) { 46 # print BINDCONF " match-clients { ".join("; ", $view->iplist)."; };\n"; 47 print " match-clients { ".join("; ", split(/[\s,]+/, $view->{iplist}))."; };\n"; 48 } else { 49 # print BINDCONF " match-clients { any; };\n" 50 print " match-clients { any; };\n" 51 } 52 print "};\n\n"; 53 } # foreach @$viewlist 54 } # if $viewlist 55 56 } # export() 33 57 34 58 1;
Note:
See TracChangeset
for help on using the changeset viewer.