Changeset 490 for trunk/dns-rpc.cgi
- Timestamp:
- 04/09/13 15:18:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.