-/* @(#) $Id: syscheck-baseline.c,v 1.2 2009/06/24 18:53:09 dcid Exp $ */
+/* @(#) $Id: ./src/syscheckd/syscheck-baseline.c, 2011/09/08 dcid Exp $
+ */
/* Copyright (C) 2009 Trend Micro Inc.
* All rights 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.
*
- * License details at the LICENSE file included with OSSEC or
+ * License details at the LICENSE file included with OSSEC or
* online at: http://www.ossec.net/en/licensing.html
*/
{
int c,r,no_stop = 1;
int test_config = 0;
-
+
char *cfg = DEFAULTCPATH;
char *input_f = NULL;
char *output_f = NULL;
-
-
+
+
/* Zeroing the structure */
syscheck.workdir = NULL;
/* Setting the name */
OS_SetName(ARGV0);
-
-
+
+
while((c = getopt(argc, argv, "VtdshD:c:i:o:")) != -1)
{
switch(c)
break;
case 's':
no_stop = 0;
- break;
+ break;
case 'd':
nowDebug();
break;
break;
case 't':
test_config = 1;
- break;
+ break;
default:
help(ARGV0);
- break;
+ break;
}
}
/* Reading internal options */
read_internal(no_stop);
-
-
+
+
/* Exit if testing config */
if(test_config)
exit(0);
-
+
/* Setting default values */
if(syscheck.workdir == NULL)
syscheck.workdir = DEFAULTDIR;
syscheck.db = (char *)calloc(1024,sizeof(char));
if(syscheck.db == NULL)
ErrorExit(MEM_ERROR,ARGV0);
-
+
snprintf(syscheck.db,1023, output_f);
/* Start the signal handling */
StartSIG(ARGV0);
-
+
/* Start up message */
verbose(STARTUP_MSG, ARGV0, getpid());
-
+
/* Create local database */
create_db(0);
-
+
fflush(syscheck.fp);
- return(0);
+ return(0);
}