Ignore:
Timestamp:
10/10/13 14:20:30 (11 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Cleanup on some configuration for RPC and FastCGI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/ipdb-rpc.cgi

    • Property svn:keywords set to Date Rev Author Id
    r600 r610  
    3737}
    3838
    39 syslog "debug", "$authuser active, $ENV{'REMOTE_ADDR'}";
    40 
    4139# Why not a global DB handle?  (And a global statement handle, as well...)
    4240# Use the connectDB function, otherwise we end up confusing ourselves
     
    5755# main FCGI loop.
    5856while (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
    5961  # don't *think* we need any of these...
    6062  # %disp_alloctypes, %def_custids, %list_alloctypes
     
    7476    print $res->answer;
    7577  }
    76 #  last if $reqcnt++ > $IPDB::maxfcgi;
     78  last if $reqcnt++ > $IPDB::maxfcgi;
    7779} # while FCGI::accept
    7880
     
    8789sub _aclcheck {
    8890  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}};
    9192  warn "$subsys/$ENV{REMOTE_ADDR} not in ACL\n";        # a bit of logging
    9293  return 0;
Note: See TracChangeset for help on using the changeset viewer.