# File ../../auditor/lib/kasp_auditor/key_tracker.rb, line 176 def save_tracker_cache # These values should only be written if the audit has been successful!! # Best to write it back to a new file - then move the new file to the # original location (overwriting the original) return if @parent.ret_val == 3 tracker_file = get_tracker_filename File.open(tracker_file + ".temp", 'w') { |f| # First, save the initial timestamp and the current SOA serial f.puts(@initial_timestamp.to_s) f.puts(@last_soa_serial.to_s) # Now save the cache!! Status.strings.each {|s| status = s.downcase eval "@cache.#{status}.each {|key, time| write_key_to_file(f, key.to_s, status, time[0], time[1]) }".untaint } } # Now move the .temp file over the original File.delete(tracker_file) File.rename(tracker_file+".temp", tracker_file) end