Changeset 661 for trunk/cgi-bin
- Timestamp:
- 12/29/14 17:52:03 (10 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/stable merged: 610
- Property svn:mergeinfo changed
-
trunk/cgi-bin/IPDB.pm
r660 r661 25 25 @EXPORT_OK = qw( 26 26 %disp_alloctypes %list_alloctypes %def_custids @citylist @poplist 27 %IPDBacl %aclmsg %rpcacl 27 %IPDBacl %aclmsg %rpcacl $maxfcgi 28 28 $errstr 29 29 &initIPDBGlobals &connectDB &finish &checkDBSanity … … 40 40 %EXPORT_TAGS = ( ALL => [qw( 41 41 %disp_alloctypes %list_alloctypes %def_custids @citylist @poplist 42 %IPDBacl %aclmsg %rpcacl 42 %IPDBacl %aclmsg %rpcacl $maxfcgi 43 43 $errstr 44 44 &initIPDBGlobals &connectDB &finish &checkDBSanity … … 72 72 73 73 our %rpcacl; 74 our $maxfcgi = 3; 74 75 75 76 # error reporting -
trunk/cgi-bin/MyIPDB.pm
r660 r661 29 29 # devel => ['10.0.10.5'], 30 30 # ); 31 # Only you can prevent memory leaks! 32 #$IPDB::maxfcgi = 100; 31 33 32 34 # Quick workaround for fixed web path. Set this to the absolute web path to -
trunk/cgi-bin/ipdb-rpc.cgi
-
Property svn:keywords
set to
Date Rev Author Id
r660 r661 37 37 } 38 38 39 syslog "debug", "$authuser active, $ENV{'REMOTE_ADDR'}";40 41 39 # Why not a global DB handle? (And a global statement handle, as well...) 42 40 # Use the connectDB function, otherwise we end up confusing ourselves … … 57 55 # main FCGI loop. 58 56 while (FCGI::accept >= 0) { 57 # done here to a) prevent $ENV{'REMOTE_ADDR'} from being empty and b) to collect 58 # the right user for the individual call (since we may be running with FCGI) 59 syslog "debug", "$authuser active, $ENV{'REMOTE_ADDR'}"; 60 59 61 # don't *think* we need any of these... 60 62 # %disp_alloctypes, %def_custids, %list_alloctypes … … 74 76 print $res->answer; 75 77 } 76 #last if $reqcnt++ > $IPDB::maxfcgi;78 last if $reqcnt++ > $IPDB::maxfcgi; 77 79 } # while FCGI::accept 78 80 … … 87 89 sub _aclcheck { 88 90 my $subsys = shift; 89 return 1; 90 return 1 if grep /$ENV{REMOTE_ADDR}/, $IPDB::rpcacl{$subsys}; 91 return 1 if grep /$ENV{REMOTE_ADDR}/, @{$IPDB::rpcacl{$subsys}}; 91 92 warn "$subsys/$ENV{REMOTE_ADDR} not in ACL\n"; # a bit of logging 92 93 return 0; -
Property svn:keywords
set to
Note:
See TracChangeset
for help on using the changeset viewer.