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

[ossec-dev] ossec-hids: global-config.c (HEAD) global-config.h (HEAD) syscheck-config.c (HEAD) [dcid]



Module name:	ossec-hids
Changes by:	dcid	06/09/03 22:38:43

Modified files:
	global-config.c global-config.h syscheck-config.c

Log message:
Description: Adding support for monitoring new files. Still need some changes to syscheck..
Reviewed by: dcid
Bug: http://www.ossec.net/bugs/show_bug.cgi?id=14

Index: global-config.c
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/config/global-config.c,v
diff -u -r1.11 -r1.12
--- global-config.c	1 Sep 2006 17:17:41 -0000	1.11
+++ global-config.c	4 Sep 2006 01:38:42 -0000	1.12
@@ -40,6 +40,7 @@
     int ign_size = 1;
     char *xml_ignore = "ignore";
     char *xml_auto_ignore = "auto_ignore";
+    char *xml_alert_new_files = "alert_new_files";
 
     _Config *Config;
 
@@ -85,6 +86,22 @@
             else if(strcmp(node[i]->content, "no") == 0)
             {
                 Config->syscheck_auto_ignore = 0;
+            }
+            else
+            {
+                merror(XML_VALUEERR,ARGV0,node[i]->element,node[i]->content);
+                return(OS_INVALID);
+            }
+        }
+        else if(strcmp(node[i]->element,xml_alert_new_files) == 0)
+        {
+            if(strcmp(node[i]->content, "yes") == 0)
+            {
+                Config->syscheck_alert_new = 1;
+            }
+            else if(strcmp(node[i]->content, "no") == 0)
+            {
+                Config->syscheck_alert_new = 0;
             }
             else
             {

Index: global-config.h
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/config/global-config.h,v
diff -u -r1.6 -r1.7
--- global-config.h	1 Sep 2006 17:17:41 -0000	1.6
+++ global-config.h	4 Sep 2006 01:38:42 -0000	1.7
@@ -23,6 +23,7 @@
     u_int8_t stats;
     u_int8_t integrity;
     u_int8_t syscheck_auto_ignore;
+    u_int8_t syscheck_alert_new;
     u_int8_t rootcheck;
     u_int8_t hostinfo;
     u_int8_t mailbylevel;

Index: syscheck-config.c
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/config/syscheck-config.c,v
diff -u -r1.6 -r1.7
--- syscheck-config.c	1 Sep 2006 17:17:41 -0000	1.6
+++ syscheck-config.c	4 Sep 2006 01:38:42 -0000	1.7
@@ -258,6 +258,7 @@
     char *xml_time = "frequency";
     char *xml_ignore = "ignore";
     char *xml_auto_ignore = "auto_ignore";
+    char *xml_alert_new_files = "alert_new_files";
 
     /* Configuration example 
     <directories check_all="yes">/etc,/usr/bin</directories>
@@ -338,6 +339,10 @@
         else if(strcmp(node[i]->element,xml_auto_ignore) == 0)
         {
             /* auto_ignore is not read here. */
+        }
+        else if(strcmp(node[i]->element,xml_alert_new_files) == 0)
+        {
+            /* alert_new_files option is not read here. */
         }
         else
         {


OSSEC home | Main Index | Thread Index


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