Changeset 38
- Timestamp:
- 11/29/06 05:28:05 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
honeyclient/branches/bug/42/lib/HoneyClient/Agent.pm
r37 r38 237 237 getVar(name => "perform_integrity_checks"); 238 238 239 # A globally shared, serialized hashtable, containing the 240 # initialized integrity state of the VM -- ready to be checked 241 # against, at any time. 242 our $integrityState : shared = undef; 243 239 244 # A globally shared, serialized hashtable, containing data per 240 245 # registered driver. Specifically, for each @DRIVER <entry>, … … 359 364 $driverUpdateQueues{$driverName} = new Thread::Queue; 360 365 } 366 367 # Perform initial integrity baseline check. 368 my $integrity = undef; 369 if ($PERFORM_INTEGRITY_CHECKS) { 370 print "Initializing Integrity Check...\n"; 371 # TODO: Initialize Integrity Checks 372 $integrity = HoneyClient::Agent::Integrity->new(); 373 $integrity->initAll(); 374 } 375 $integrityState = nfreeze($integrity); 361 376 362 377 # Release data lock. … … 688 703 eval { 689 704 690 my $integrity = undef;691 if ($PERFORM_INTEGRITY_CHECKS) {692 print "Initializing Integrity Check...\n";693 # TODO: Initialize Integrity Checks694 $integrity = HoneyClient::Agent::Integrity->new();695 $integrity->initAll();696 }697 698 705 ################################### 699 706 ### Driver Initialization Phase ### 700 707 ################################### 708 709 # Initially set local integrity object to undef. 710 my $integrity = undef; 701 711 702 712 # Initially set all driver objects to undef. … … 705 715 # Acquire lock on stored driver state. 706 716 $data = _lock(); 717 718 if ($PERFORM_INTEGRITY_CHECKS) { 719 # XXX: WARNING - The $integrityState object data is NOT thread-safe 720 # (since it relies on external data stored on the file system). 721 # As such, do NOT try to call integrity checks on multiple, simultaneous 722 # asynchronous threaded drivers. 723 $integrity = thaw($integrityState); 724 } 707 725 708 726 # Now, initialize each driver object.
