Changeset 385
- Timestamp:
- 05/29/07 11:37:49 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
honeyclient/branches/exp/kindlund-filesystem/lib/HoneyClient/Agent.pm
r384 r385 164 164 165 165 # Make sure Storable loads. 166 BEGIN { use_ok('Storable', qw(freeze nfreeze thaw )) or diag("Can't load Storable package. Check to make sure the package library is correctly listed within the path."); }166 BEGIN { use_ok('Storable', qw(freeze nfreeze thaw dclone)) or diag("Can't load Storable package. Check to make sure the package library is correctly listed within the path."); } 167 167 require_ok('Storable'); 168 168 can_ok('Storable', 'freeze'); 169 169 can_ok('Storable', 'nfreeze'); 170 170 can_ok('Storable', 'thaw'); 171 use Storable qw(freeze nfreeze thaw); 171 can_ok('Storable', 'dclone'); 172 use Storable qw(freeze nfreeze thaw dclone); 172 173 173 174 # Make sure MIME::Base64 loads. … … 210 211 211 212 # Include Hash Serialization Utility Libraries 212 # TODO: Update unit tests to include 'dclone'213 213 use Storable qw(freeze nfreeze thaw dclone); 214 214 $Storable::Deparse = 1; … … 241 241 getVar(name => "perform_integrity_checks"); 242 242 243 # A globally shared, serialized hashtable, containing the 244 # initialized integrity state of the VM -- ready to be checked 245 # against, at any time. 246 our $integrityState : shared = undef; 247 248 # XXX: Rename this. 249 our $gintegrity; 243 # A globally shared object, containing the initialized integrity 244 # state of the VM -- ready to be checked against, at any time after 245 # initialization. 246 our $integrityData; 250 247 251 248 # A globally shared, serialized hashtable, containing data per … … 373 370 374 371 # Perform initial integrity baseline check. 375 my $integrity = undef;376 # XXX: Disabled temporarily.377 372 if ($PERFORM_INTEGRITY_CHECKS) { 378 # require HoneyClient::Agent::Integrity; 379 $gintegrity = HoneyClient::Agent::Integrity->new(); 380 # XXX: Remove this, eventually. 381 print "Gintegrity Init: " . $gintegrity . "\n"; 382 $gintegrity->closeFiles(); 383 #$integrityState = freeze($integrity); 384 } 385 # XXX: Check to make sure this doesn't destroy the integrity 386 # object prematurely. 387 # DESTROY this reference, but don't kill any temporary files created. 388 $integrity = undef; 373 $integrityData = HoneyClient::Agent::Integrity->new(); 374 $integrityData->closeFiles(); 375 } 389 376 390 377 # Release data lock. … … 501 488 $driverDataSemaphore = Thread::Semaphore->new(1); 502 489 %driverUpdateQueues = ( ); 503 $integrity State= undef;504 505 # TODO: need to set $integrityState to undef506 # and need to call $integrity->destroy, which will call490 $integrityData = undef; 491 492 # TODO: 493 # need to call $integrityData->destroy, which will call 507 494 # the registry destroy, which will kill any used temporary 508 495 # files … … 730 717 { 731 718 'driver_name' => $driverName, 732 'integrity' => $ gintegrity,719 'integrity' => $integrityData, 733 720 } 734 721 );
