lib/ssltransportagent.rb
# this is the code executed after the process has been
# forked and root privileges have been dropped
this is the code executed after the process has been
forked and root privileges have been dropped
this is the code executed after the process has been forked and root privileges have been dropped
def process_call(log, local_port, connection, remote_port, remote_ip, remote_hostname, remote_service)
    begin
      Signal.trap("INT") { } 
      log.info("%06d"%Process::pid) {"Connection accepted on port #{local_port} from port #{remote_port} at #{remote_ip} (#{remote_hostname})"}
      if Host[:host]
        $db = Mysql2::Client.new(Host)
        db_open if defined?(db_open)
        log.info("%06d"%Process::pid) {"MySQL database #{Host[:database]} opened on #{Host[:host]} by #{Host[:username]}"}
      end
      TAReceiver::new(log, connection).receive(local_port, Socket::gethostname, remote_port, remote_hostname, remote_ip)
    rescue TAQuit
    ensure
      db_close if defined?(db_close)
      $db.close if $db
      nil 
    end
  end
def process_call ( log , local_port , connection , remote_port , remote_ip , remote_hostname , remote_service ) begin Signal . trap ( "INT" ) { } log . info ( "%06d" % Process :: pid ) { "Connection accepted on port #{local_port} from port #{remote_port} at #{remote_ip} (#{remote_hostname})" } if Host [ :host ] $db = Mysql2 :: Client . new ( Host ) db_open if defined? ( db_open ) log . info ( "%06d" % Process :: pid ) { "MySQL database #{Host[:database]} opened on #{Host[:host]} by #{Host[:username]}" } end TAReceiver :: new ( log , connection ) . receive ( local_port , Socket :: gethostname , remote_port , remote_hostname , remote_ip ) rescue TAQuit ensure db_close if defined? ( db_close ) $db . close if $db nil end end
this is the code executed after the process has been
forked and root privileges have been dropped
this is the code executed after the process has been forked and root privileges have been dropped
# ignore ^C in the child process # open the database, if any is required # a new object is created here to provide separation between server and receiver # this call receives the email and does basic validation # nothing to do here # close the database # don't return the TAReceiver object
log
<not_specific>
local_port
<not_specific>
connection
<not_specific>
remote_port
<not_specific>
remote_ip
<not_specific>
remote_hostname
<not_specific>
remote_service
<not_specific>