Changeset 1126

Show
Ignore:
Timestamp:
01/24/08 16:34:14 (7 months ago)
Author:
kindlund
Message:

Updated schema to reflect Ruby API.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeyclient/trunk/lib/HoneyClient/Agent/Integrity.pm

    r1108 r1126  
    494494             
    495495            #OPTIONAL, this will not exist for deleted files 
    496             'content' => { 
     496            'file_content' => { 
    497497                'size' => 1234,                                       # size of new content 
    498                 'type' => 'application/octect-stream',                # type of new content 
     498                'mime_type' => 'application/octect-stream',           # type of new content 
    499499                'md5'  => 'b1946ac92492d2347c6235b4d2611184',         # md5  of new content 
    500500                'sha1' => 'f572d396fae9206628714fb2ce00f72e94f2258f', # sha1 of new content 
     
    690690                    if($toks[$F_EVENT_TYPE] ne "Delete"){ 
    691691                        #Fill in the default values, incase the file can't be found due to a rename rather than delete 
    692                         $file_obj->{'contents'} = { 
     692                        $file_obj->{'file_content'} = { 
    693693                            'size' => 0, 
    694                             'type' => "UNKNOWN", 
     694                            'mime_type' => "UNKNOWN", 
    695695                            'md5' => "$toks[$F_NAME]$toks[$F_TIME]", 
    696696                            'sha1' => "$toks[$F_NAME]$toks[$F_TIME]", 
     
    728728                                # Close the file handle. 
    729729                                undef $fh; 
    730                                 $file_obj->{'contents'}->{'size'} = $size; 
    731                                 $file_obj->{'contents'}->{'md5'} = $md5; 
    732                                 $file_obj->{'contents'}->{'sha1'} = $sha1; 
    733                                 $file_obj->{'contents'}->{'type'} = $type; 
     730                                $file_obj->{'file_content'}->{'size'} = $size; 
     731                                $file_obj->{'file_content'}->{'md5'} = $md5; 
     732                                $file_obj->{'file_content'}->{'sha1'} = $sha1; 
     733                                $file_obj->{'file_content'}->{'mime_type'} = $type; 
    734734                            } 
    735735                        }; 
    736736                        if($@){ 
    737737                            print "Filesystem error occurred, setting safe values for $tmp_name\n"; 
    738                             $file_obj->{'contents'} = { 
     738                            $file_obj->{'file_content'} = { 
    739739                                'size' => 0, 
    740                                 'type' => "FSERROR", 
     740                                'mime_type' => "FSERROR", 
    741741                                'md5' => "FSERROR", 
    742742                                'sha1' => "FSERROR",