Changeset 333

Show
Ignore:
Timestamp:
05/06/07 22:00:59 (2 years ago)
Author:
kindlund
Message:

still having problems with sharing serialized integrity data between threads; reverting back to using integrity code within a single thread

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeyclient/trunk/bin/StartAgent.pl

    r332 r333  
    3737    print "Watchdog fault detected, recovering Agent daemon.\n"; 
    3838    # XXX: Reenable this, eventually. 
    39     Carp::carp __PACKAGE__ . "->_watchdogFaultHandler(): Error occurred during processing.\n" . $errMsg; 
     39    #Carp::carp __PACKAGE__ . "->_watchdogFaultHandler(): Error occurred during processing.\n" . $errMsg; 
    4040 
    4141 
  • honeyclient/trunk/lib/HoneyClient/Agent.pm

    r332 r333  
    243243# initialized integrity state of the VM -- ready to be checked 
    244244# against, at any time. 
    245 our $integrity = undef; 
     245#our $integrity = undef; 
    246246our $integrityState : shared = undef; 
    247247 
     
    371371    # Perform initial integrity baseline check. 
    372372    #my $integrity = undef; 
    373     if ($PERFORM_INTEGRITY_CHECKS) { 
    374         $integrity = HoneyClient::Agent::Integrity->new(); 
    375         $integrity->closeFiles(); 
    376         $integrityState = freeze($integrity); 
    377    
     373    #if ($PERFORM_INTEGRITY_CHECKS) { 
     374    #    $integrity = HoneyClient::Agent::Integrity->new(); 
     375    #    $integrity->closeFiles(); 
     376    #    $integrityState = freeze($integrity); 
     377    #
    378378    # XXX: Check to make sure this doesn't destroy the integrity 
    379379    # object prematurely. 
     
    653653    # Temporary variable, used to hold thread objects. 
    654654    my $thread = undef; 
    655  
    656     # XXX: Delete this, maybe? 
    657     my $integrity = undef; 
    658655 
    659656    # TODO: Eventually, use the globally defined array 
     
    723720 
    724721                # Initially set local integrity object to undef. 
    725                 my $integrity2 = undef; 
     722                my $integrity = undef; 
    726723                 
    727724                # Initially set all driver objects to undef.  
     
    736733                    # As such, do NOT try to call integrity checks on multiple, simultaneous 
    737734                    # asynchronous threaded drivers. 
    738                     $integrity2 = thaw($integrityState); 
     735                    #$integrity = thaw($integrityState); 
    739736                    # Perform initial integrity baseline check. 
    740737                    #print "Initializing Integrity Check...\n"; 
    741738                    # TODO: Initialize Integrity Checks 
    742                     #$integrity = HoneyClient::Agent::Integrity->new(); 
     739                    $integrity = HoneyClient::Agent::Integrity->new(); 
    743740                } 
    744741 
     
    847844                 
    848845                # TODO: Perform Integrity Check 
    849                 if (defined($integrity2)) { 
     846                if (defined($integrity)) { 
    850847                    # For now, we update a scalar called 'is_compromised' within 
    851848                    # the $data->{$driverName}->{'status'} sub-hashtable. 
    852849                    print "Performing Integrity Checks...\n"; 
    853                     my $changes = $integrity2->check(); 
     850                    my $changes = $integrity->check(); 
    854851                    if (scalar(@{$changes->{registry}}) ||  
    855852                        scalar(@{$changes->{filesystem}})) {