Changeset 610 for branches/stable/cgi-bin
- Timestamp:
- 10/10/13 14:20:30 (11 years ago)
- Location:
- branches/stable/cgi-bin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/IPDB.pm
r605 r610 24 24 @EXPORT_OK = qw( 25 25 %disp_alloctypes %list_alloctypes %def_custids @citylist @poplist 26 %IPDBacl %aclmsg %rpcacl 26 %IPDBacl %aclmsg %rpcacl $maxfcgi 27 27 &initIPDBGlobals &connectDB &finish &checkDBSanity 28 28 &addMaster &touchMaster … … 38 38 %EXPORT_TAGS = ( ALL => [qw( 39 39 %disp_alloctypes %list_alloctypes %def_custids @citylist @poplist 40 %IPDBacl %aclmsg %rpcacl 40 %IPDBacl %aclmsg %rpcacl $maxfcgi 41 41 &initIPDBGlobals &connectDB &finish &checkDBSanity 42 42 &addMaster &touchMaster … … 69 69 70 70 our %rpcacl; 71 our $maxfcgi = 3; 71 72 72 73 our $org_name = 'Example Corp'; -
branches/stable/cgi-bin/MyIPDB.pm
r601 r610 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 -
branches/stable/cgi-bin/ipdb-rpc.cgi
-
Property svn:keywords
set to
Date Rev Author Id
r600 r610 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.