projects
/
ossec-hids.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- fortify/harden the compile
[ossec-hids.git]
/
src
/
monitord
/
manage_files.c
diff --git
a/src/monitord/manage_files.c
b/src/monitord/manage_files.c
index
7ba33fc
..
3a33475
100755
(executable)
--- a/
src/monitord/manage_files.c
+++ b/
src/monitord/manage_files.c
@@
-1,11
+1,12
@@
-/* @(#) $Id$ */
+/* @(#) $Id: ./src/monitord/manage_files.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
/* 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 2) as published by the FSF - Free Software
+ * License (version 2) as published by the FSF - Free Software
* Foundation
*/
* Foundation
*/
@@
-27,13
+28,13
@@
void manage_files(int cday, int cmon, int cyear)
#ifndef SOLARIS
struct tm p_old;
#endif
#ifndef SOLARIS
struct tm p_old;
#endif
-
+
char elogfile[OS_FLSIZE +1];
char elogfile_old[OS_FLSIZE +1];
char elogfile[OS_FLSIZE +1];
char elogfile_old[OS_FLSIZE +1];
-
+
char alogfile[OS_FLSIZE +1];
char alogfile_old[OS_FLSIZE +1];
char alogfile[OS_FLSIZE +1];
char alogfile_old[OS_FLSIZE +1];
-
+
char flogfile[OS_FLSIZE +1];
char flogfile_old[OS_FLSIZE +1];
char flogfile[OS_FLSIZE +1];
char flogfile_old[OS_FLSIZE +1];
@@
-46,7
+47,7
@@
void manage_files(int cday, int cmon, int cyear)
#else
pp_old = localtime(&tm_old);
#endif
#else
pp_old = localtime(&tm_old);
#endif
-
+
memset(elogfile, '\0', OS_FLSIZE +1);
memset(elogfile_old, '\0', OS_FLSIZE +1);
memset(elogfile, '\0', OS_FLSIZE +1);
memset(elogfile_old, '\0', OS_FLSIZE +1);
@@
-60,7
+61,7
@@
void manage_files(int cday, int cmon, int cyear)
* before compressing the file.
*/
sleep(mond.day_wait);
* before compressing the file.
*/
sleep(mond.day_wait);
-
+
/* Event logfile */
snprintf(elogfile, OS_FLSIZE, "%s/%d/%s/ossec-%s-%02d.log",
/* Event logfile */
snprintf(elogfile, OS_FLSIZE, "%s/%d/%s/ossec-%s-%02d.log",
@@
-88,7
+89,7
@@
void manage_files(int cday, int cmon, int cyear)
months[cmon],
"alerts",
cday);
months[cmon],
"alerts",
cday);
- /* alert logfile old */
+ /* alert logfile old */
snprintf(alogfile_old, OS_FLSIZE, "%s/%d/%s/ossec-%s-%02d.log",
ALERTS,
pp_old->tm_year+1900,
snprintf(alogfile_old, OS_FLSIZE, "%s/%d/%s/ossec-%s-%02d.log",
ALERTS,
pp_old->tm_year+1900,