Changeset 343

Show
Ignore:
Timestamp:
05/07/07 14:52:34 (2 years ago)
Author:
kindlund
Message:

reduced integrity check critical section inside agent run thread

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeyclient/branches/exp/kindlund-filesystem/lib/HoneyClient/Agent.pm

    r342 r343  
    849849                } 
    850850                 
    851                 # Acquire lock on stored driver state. 
    852                 $data = _lock(); 
    853                  
    854851                # TODO: Perform Integrity Check 
    855852                if (defined($integrity)) { 
     
    861858                        scalar(@{$changes->{filesystem}})) { 
    862859                        print "Integrity Check: FAILED\n"; 
     860 
     861                        # Acquire lock on stored driver state. 
     862                        $data = _lock(); 
     863 
    863864                        $data->{$driverName}->{'status'}->{'is_compromised'} = 1; 
     865 
     866                        # Release lock on stored driver state. 
     867                        _unlock($data); 
     868 
    864869                    } else { 
    865870                        print "Integrity Check: PASSED\n"; 
     
    870875                # DESTROY this reference, but don't kill any temporary files created. 
    871876                $integrity = undef; 
    872  
    873                 # Release lock on stored driver state. 
    874                 _unlock($data); 
    875877 
    876878                # XXX: Debugging, remove eventually.  
     
    914916            # XXX: Fix this? 
    915917            #threads->detach(); # XXX: Test this. 
     918            # XXX: Debugging, remove eventually.  
     919            print "About to return out of child thread.\n"; 
    916920            return; 
    917921        };