- Timestamp:
- 04/09/13 15:18:00 (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r489 r490 166 166 log_failures => 1, # log all evarthing by default 167 167 perpage => 15, 168 maxfcgi => 100, # reasonable default? 168 169 ); 169 170 … … 1338 1339 # RPC options 1339 1340 $config{rpcmode} = $1 if /^rpc_mode\s*=\s*(socket|HTTP|XMLRPC)\s*$/i; 1341 $config{maxfcgi} = $1 if /^max_fcgi_requests\s*=\s*(\d+)\s*$/i; 1340 1342 if (my ($tmp) = /^rpc_iplist\s*=\s*(.+)/i) { 1341 1343 my @ips = split /[,\s]+/, $tmp; -
trunk/dns-rpc.cgi
r486 r490 24 24 # don't remove! required for GNU/FHS-ish install from tarball 25 25 use lib '.'; ##uselib## 26 27 use DNSDB; # note we're not importing subs; this lets us (ab)use the same sub names here for convenience 28 use Data::Dumper; 29 26 use DNSDB; 27 28 use FCGI; 30 29 #use Frontier::RPC2; 31 30 use Frontier::Responder; … … 69 68 }; 70 69 71 my $res = Frontier::Responder->new( 70 my $reqcnt = 0; 71 72 while (FCGI::accept >= 0) { 73 my $res = Frontier::Responder->new( 72 74 methods => $methods 73 75 ); 74 76 75 # "Can't do that" errors 76 if (!$dnsdb) { 77 print "Content-type: text/xml\n\n".$res->{_decode}->encode_fault(5, $msg); 78 exit; 79 } 80 ##fixme: fail on missing rpcuser/rpcsystem args 81 82 print $res->answer; 77 # "Can't do that" errors 78 if (!$dnsdb) { 79 print "Content-type: text/xml\n\n".$res->{_decode}->encode_fault(5, $dnsdb->err); 80 } else { 81 print $res->answer; 82 } 83 last if $reqcnt++ > $dnsdb->{maxfcgi}; 84 } # while FCGI::accept 85 83 86 84 87 exit; … … 88 91 ## 89 92 90 # Utility subs93 # Check RPC ACL 91 94 sub _aclcheck { 92 95 my $subsys = shift;
Note:
See TracChangeset
for help on using the changeset viewer.