def full_audit(ret, input_file, output_file, pid, working, config, syslog, enforcer_interval)
do_audit = true
pids=[]
new_pid = normalise_and_sort(input_file, "in", pid, working, config, syslog)
pids.push(new_pid)
new_pid = normalise_and_sort(output_file, "out", pid, working, config, syslog)
pids.push(new_pid)
pids.each {|id|
ret_id, ret_status = Process.wait2(id)
if (ret_status != 0)
syslog.log(LOG_ERR, "Error sorting files (#{input_file} and #{output_file}) : ERR #{ret_status}- moving on to next zone")
ret = 1
do_audit = false
end
}
begin
if (do_audit)
auditor = Auditor.new(syslog, working, enforcer_interval)
ret_val = auditor.check_zone(config, working+get_name(input_file)+".in.sorted.#{pid}",
working + get_name(output_file)+".out.sorted.#{pid}",
input_file, output_file)
ret = ret_val if (ret_val < ret)
if ((config.err > 0) && (config.err < ret))
ret = config.err
end
end
rescue Exception=> e
syslog.log(LOG_ERR, "Unexpected error auditing files (#{input_file} and #{output_file}) : ERR #{e}- moving on to next zone. Trace for debugging : #{e.backtrace.join("\n")}")
ret = 1
ensure
[input_file + ".in", output_file + ".out"].each {|f|
delete_file(working + get_name(f)+".parsed.#{pid}")
delete_file(working + get_name(f)+".sorted.#{pid}")
}
end
return ret
end