-/* @(#) $Id: sign_log.c,v 1.8 2009/06/24 17:06:27 dcid Exp $ */
+/* @(#) $Id: ./src/monitord/sign_log.c, 2011/09/08 dcid Exp $
+ */
/* Copyright (C) 2009 Trend Micro Inc.
* All right reserved.
*
* This program is a free software; you can redistribute it
* and/or modify it under the terms of the GNU General Public
- * License (version 3) as published by the FSF - Free Software
+ * License (version 2) as published by the FSF - Free Software
* Foundation
*/
/* generating sha1 of the old file. */
if(OS_SHA1_File(logfilesum_old, sf_sum_old) < 0)
{
- merror("%s: No previous sha1 checksum found: '%s'. "
+ merror("%s: No previous sha1 checksum found: '%s'. "
"Starting over.", ARGV0, logfilesum_old);
strncpy(sf_sum_old, "none", 6);
}
if(OS_MD5_File(logfile, mf_sum) < 0)
{
if(log_missing)
- merror("%s: File '%s' not found. MD5 checksum skipped.",
+ merror("%s: File '%s' not found. MD5 checksum skipped.",
ARGV0, logfile);
strncpy(mf_sum, "none", 6);
}
strncpy(sf_sum, "none", 6);
}
-
+
fp = fopen(logfilesum, "w");
if(!fp)
{
fprintf(fp, "Current checksum:\n");
fprintf(fp, "MD5 (%s) = %s\n", logfile, mf_sum);
fprintf(fp, "SHA1 (%s) = %s\n\n", logfile, sf_sum);
-
+
fprintf(fp, "Chained checksum:\n");
fprintf(fp, "MD5 (%s) = %s\n", logfilesum_old, mf_sum_old);
fprintf(fp, "SHA1 (%s) = %s\n\n", logfilesum_old, sf_sum_old);
return;
}
-
+
/* EOF */