[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ossec-cvs] ossec-hids: config.c (HEAD) create_db.c (HEAD) syscheck.c (HEAD) [dcid]



Module name:	ossec-hids
Changes by:	dcid	07/09/20 22:41:37

Modified files:
	config.c create_db.c syscheck.c

Log message:
Description: A few more fixes for rootcheck and the windows install.
Reviewed by: dcid
Bug:

Index: config.c
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/syscheckd/config.c,v
diff -u -r1.16 -r1.17
--- config.c	9 Feb 2007 02:51:47 -0000	1.16
+++ config.c	21 Sep 2007 01:41:37 -0000	1.17
@@ -22,7 +22,7 @@
     modules|= CSYSCHECK;
 
     syscheck.rootcheck = 0;
-    syscheck.time = SYSCHECK_WAIT*2;
+    syscheck.time = SYSCHECK_WAIT * 2;
     syscheck.ignore = NULL;
     syscheck.ignore_regex = NULL;
     

Index: create_db.c
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/syscheckd/create_db.c,v
diff -u -r1.17 -r1.18
--- create_db.c	3 Aug 2007 00:26:37 -0000	1.17
+++ create_db.c	21 Sep 2007 01:41:37 -0000	1.18
@@ -5,15 +5,20 @@
  *
  * 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 3) as published by the FSF - Free Software
  * Foundation
+ *
+ * License details at the LICENSE file included with OSSEC or 
+ * online at: http://www.ossec.net/en/licensing.html
  */
 
+
 #include "shared.h"
 #include "syscheck.h"
 #include "os_crypto/md5/md5_op.h"
 #include "os_crypto/sha1/sha1_op.h"
 
+
 /* flags for read_dir and read_file */
 #define CREATE_DB   1
 #define CHECK_DB    2    
@@ -357,6 +362,7 @@
 }
 
 
+
 /* int create_db
  * Creates the file database.
  */
@@ -364,7 +370,7 @@
 {
     int i = 0;
     
-    syscheck.fp = fopen(syscheck.db,"w+"); /* Read and write */
+    syscheck.fp = fopen(syscheck.db, "w+"); /* Read and write */
     if(!syscheck.fp)
     {
         ErrorExit("%s: Unable to create syscheck database "
@@ -373,7 +379,7 @@
     }
 
 
-    /* Creating an local fp only */
+    /* Creating a local fp only */
     unlink(syscheck.db);
 
     

Index: syscheck.c
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/syscheckd/syscheck.c,v
diff -u -r1.30 -r1.31
--- syscheck.c	5 Sep 2007 00:38:29 -0000	1.30
+++ syscheck.c	21 Sep 2007 01:41:37 -0000	1.31
@@ -51,6 +51,7 @@
     int r = 0;
     char *cfg = DEFAULTCPATH;
 
+
     /* Zeroing the structure */
     syscheck.workdir = DEFAULTDIR;
 
@@ -69,7 +70,6 @@
     else if(r == 1)
     {
         merror("%s: Syscheck disabled.", ARGV0);
-        return(0);
     }
 
 
@@ -90,10 +90,7 @@
 
 
     /* Opening syscheck db file */
-    syscheck.db = (char *)calloc(1024,sizeof(char));
-    if(syscheck.db == NULL)
-        ErrorExit(MEM_ERROR,ARGV0);
-
+    os_calloc(1024,sizeof(char), syscheck.db);
     snprintf(syscheck.db,1023,"%s",SYS_WIN_DB);
 
 


OSSEC home | Main Index | Thread Index


OSSEC project: www.ossec.net.
Mailling list information: http://www.ossec.net/en/mailing_lists.html.