Changeset 1037 for branches/stable
- Timestamp:
- 02/12/26 18:03:01 (32 hours ago)
- Location:
- branches/stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable
- Property svn:mergeinfo changed
/trunk merged: 773,826,904,1035-1036
- Property svn:mergeinfo changed
-
branches/stable/DNSDB.pm
r1034 r1037 698 698 unless ${$args{val}} =~ /^(?:\.|\*\.|rpz-passthru\.|rpz-drop\.|rpz-tcp-only\.)$/; 699 699 # Append the RPZ name 700 my $pname = ($args{defrec} eq 'y' ? 'DOMAIN' : $ self->domainName($args{id}));700 my $pname = ($args{defrec} eq 'y' ? 'DOMAIN' : $zname); 701 701 ${$args{host}} =~ s/\.*$/\.$pname/ if ${$args{host}} !~ /$pname$/i; 702 702 } else { … … 2805 2805 } 2806 2806 2807 my ($domid) = $dbh->selectrow_array( 2808 "SELECT domain_id FROM domains WHERE lower(domain) = lower(?) AND default_location = ?", 2809 undef, ($domain, $location) ); 2807 my $sql = "SELECT domain_id FROM domains WHERE lower(domain) = lower(?)"; 2808 my @zargs = ($domain); 2809 # yay magic strings! 2810 if ($location eq ':ANY:') { 2811 # no-op 2812 } else { 2813 $sql .= " AND default_location = ?"; 2814 push @zargs, $location; 2815 } 2816 2817 my ($domid) = $dbh->selectrow_array($sql, undef, @zargs); 2818 2810 2819 if (!$domid) { 2811 2820 if ($dbh->err) { … … 2836 2845 } 2837 2846 2838 my ($revid) = $dbh->selectrow_array( 2839 "SELECT rdns_id FROM revzones WHERE revnet = ? AND default_location = ?", 2840 undef, ($revzone, $location) ); 2847 my $sql = "SELECT rdns_id FROM revzones WHERE revnet = ?"; 2848 my @zargs = ($revzone); 2849 # yay magic strings! 2850 if ($location eq ':ANY:') { 2851 # no-op 2852 } else { 2853 $sql .= " AND default_location = ?"; 2854 push @zargs, $location; 2855 } 2856 2857 my ($revid) = $dbh->selectrow_array($sql, undef, @zargs); 2858 2841 2859 if (!$revid) { 2842 2860 if ($dbh->err) { … … 6688 6706 $$recflags{$ip}++; 6689 6707 next if $hpat eq '%blank%'; # Allows blanking a subnet so no records are published. 6708 next if $hpat =~ /^\%blank\%/; # Safety net in case of oopses elsewhere 6690 6709 my $rec = $hpat; # start fresh with the template for each IP 6691 6710 ##fixme: there really isn't a good way to handle sub-/24 zones here. This way at least -
branches/stable/dns-rpc.cgi
r1034 r1037 907 907 my $ret = $dnsdb->getRecList(defrec => $args{defrec}, revrec => $args{revrec}, id => $args{id}, 908 908 offset => $args{offset}, nrecs => $args{nrecs}, sortby => $args{sortby}, 909 sortorder => $args{sortorder}, filter => $args{filter} );909 sortorder => $args{sortorder}, filter => $args{filter}, location => $args{location}); 910 910 die $dnsdb->errstr."\n" if !$ret; 911 911 912 912 return $ret; 913 } 913 } # getRecList() 914 914 915 915
Note:
See TracChangeset
for help on using the changeset viewer.
![[ DNS Administrator ]](/fx/dnsadmin-logo.png)