Changeset 336
- Timestamp:
- 05/07/07 00:37:10 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
honeyclient/branches/exp/kindlund-filesystem/lib/HoneyClient/Agent.pm
r335 r336 243 243 # initialized integrity state of the VM -- ready to be checked 244 244 # against, at any time. 245 #our $integrity = undef;246 245 our $integrityState : shared = undef; 247 246 … … 370 369 371 370 # Perform initial integrity baseline check. 372 #my $integrity = undef;373 #if ($PERFORM_INTEGRITY_CHECKS) {374 #$integrity = HoneyClient::Agent::Integrity->new();375 #$integrity->closeFiles();376 #$integrityState = freeze($integrity);377 #}371 my $integrity = undef; 372 if ($PERFORM_INTEGRITY_CHECKS) { 373 $integrity = HoneyClient::Agent::Integrity->new(); 374 $integrity->closeFiles(); 375 $integrityState = freeze($integrity); 376 } 378 377 # XXX: Check to make sure this doesn't destroy the integrity 379 378 # object prematurely. 380 #$integrity = undef; 379 # DESTROY this reference, but don't kill any temporary files created. 380 $integrity = undef; 381 381 382 382 # Release data lock. … … 493 493 $driverDataSemaphore = Thread::Semaphore->new(1); 494 494 %driverUpdateQueues = ( ); 495 495 $integrityState = undef; 496 497 # TODO: need to set $integrityState to undef 498 # and need to call $integrity->destroy, which will call 499 # the registry destroy, which will kill any used temporary 500 # files 501 496 502 # Release data lock. 497 503 _unlock(); … … 733 739 # As such, do NOT try to call integrity checks on multiple, simultaneous 734 740 # asynchronous threaded drivers. 735 #$integrity = thaw($integrityState);741 $integrity = thaw($integrityState); 736 742 # Perform initial integrity baseline check. 737 743 #print "Initializing Integrity Check...\n"; 738 744 # TODO: Initialize Integrity Checks 739 $integrity = HoneyClient::Agent::Integrity->new();745 #$integrity = HoneyClient::Agent::Integrity->new(); 740 746 } 741 747 honeyclient/branches/exp/kindlund-filesystem/lib/HoneyClient/Agent/Integrity/Registry.pm
r302 r336 406 406 # we can simply leave the garbage collection up to Perl's internal 407 407 # mechanism. 408 sub DESTROY { 408 # XXX: Change this to destroy() and update the integrity module's 409 # with integrity->destroy() accordingly. 410 sub XDESTROY { 409 411 my $self = shift; 410 412 … … 417 419 $fname = $parser->getFilename(); 418 420 if (defined($fname) && (-f $fname)) { 419 $LOG->debug("Deleting baseline of hive '" . $hive . "' in '" . 421 # XXX: Change this to debug, eventually. 422 $LOG->info("Deleting baseline of hive '" . $hive . "' in '" . 420 423 $fname . "'."); 421 424 if (!unlink($fname)) { … … 430 433 $fname = $parser->getFilename(); 431 434 if (defined($fname) && (-f $fname)) { 432 $LOG->debug("Deleting checkpoint of hive '" . $hive . "' in '" . 435 # XXX: Change this to debug, eventually. 436 $LOG->info("Deleting checkpoint of hive '" . $hive . "' in '" . 433 437 $fname . "'."); 434 438 if (!unlink($fname)) { … … 457 461 my $fname_tmp = undef; 458 462 foreach my $hive (@{$self->{hives_to_check}}) { 459 $fname = tmpnam(); 463 # Check to see if we can reuse temporary files from 464 # past checkpoint operations. 465 if (exists($parser_collection->{$hive}) && 466 defined($parser_collection->{$hive})) { 467 $parser = $parser_collection->{$hive}; 468 $fname = $parser->getFilename(); 469 } else { 470 $fname = tmpnam(); 471 } 472 460 473 $fname_tmp = tmpnam(); 461 474 $LOG->debug("Storing snapshot of hive '" . $hive . "' into '" . $fname . "'.");
