X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fsyscheckd%2Fsyscheck.c;h=67a5879cca7ffb772d8aa0e4268e088c049f6331;hp=ff88da4de8c0e8078d519676f3b8a23f7e3f02a6;hb=301048b51990573e58a30dc4a5bb4ec285cad554;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a diff --git a/src/syscheckd/syscheck.c b/src/syscheckd/syscheck.c index ff88da4..67a5879 100755 --- a/src/syscheckd/syscheck.c +++ b/src/syscheckd/syscheck.c @@ -1,11 +1,11 @@ -/* @(#) $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 @@ -29,10 +29,6 @@ #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); @@ -114,11 +110,6 @@ int Start_win32_Syscheck() - /* 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) @@ -150,7 +141,6 @@ int Start_win32_Syscheck() os_wait(); - /* Start the daemon checking against the syscheck.db */ start_daemon(); @@ -273,20 +263,7 @@ int main(int argc, char **argv) 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();