-/* @(#) $Id: syscheck.c,v 1.49 2009/11/18 19:07:42 dcid Exp $ */
+/* @(#) $Id$ */
/* 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
#include "rootcheck/rootcheck.h"
-/* Definitions only used in here. */
-#define SYSCHECK_DB SYSCHECK_DIR "/syschecklocal.db"
-#define SYS_WIN_DB "syscheck/syschecklocal.db"
-
int dump_syscheck_entry(config *syscheck, char *entry, int vals, int reg);
- /* Opening syscheck db file */
- os_calloc(1024,sizeof(char), syscheck.db);
- snprintf(syscheck.db,1023,"%s",SYS_WIN_DB);
-
-
/* Printing options */
r = 0;
while(syscheck.registry[r] != NULL)
os_wait();
- /* Start the daemon checking against the syscheck.db */
start_daemon();
syscheck.workdir = DEFAULTDIR;
- /* Creating a temporary fp */
- syscheck.db = (char *)calloc(1024,sizeof(char));
- if(syscheck.db == NULL)
- ErrorExit(MEM_ERROR,ARGV0);
-
- snprintf(syscheck.db,1023,"%s%s-%d%d.tmp",
- syscheck.workdir,
- SYSCHECK_DB,
- (int)time(NULL),
- (int)getpid());
-
-
-
- if (!run_foreground)
+ if(!run_foreground)
{
nowDaemon();
goDaemon();