[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ossec-cvs] ossec-hids: common.c (HEAD) common_rcl.c (HEAD) win-common.c (HEAD) [dcid]
- To: ossec-cvs@xxxxxxxxx
- Subject: [ossec-cvs] ossec-hids: common.c (HEAD) common_rcl.c (HEAD) win-common.c (HEAD) [dcid]
- From: OSSEC CVS <cvs-commit@xxxxxxxxx>
- Date: Wed, 25 Jul 2007 22:32:06 -0300 (ADT)
- Content-transfer-encoding: 8bit
Module name: ossec-hids
Changes by: dcid 07/07/25 22:32:03
Modified files:
common.c common_rcl.c win-common.c
Log message:
Description: Adding support for "!" on some of the policy checks. Fixing manage_agents and changing the version to 1.3...
Reviewed by: dcid
Bug:
Index: common.c
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/rootcheck/common.c,v
diff -u -r1.15 -r1.16
--- common.c 5 Jul 2007 00:14:11 -0000 1.15
+++ common.c 26 Jul 2007 01:32:03 -0000 1.16
@@ -117,6 +117,10 @@
*tmp_pt = '\0';
tmp_pt += 4;
}
+ else
+ {
+ tmp_pt = NULL;
+ }
/* Checking for negate values */
Index: common_rcl.c
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/rootcheck/common_rcl.c,v
diff -u -r1.7 -r1.8
--- common_rcl.c 20 Jul 2007 00:19:26 -0000 1.7
+++ common_rcl.c 26 Jul 2007 01:32:03 -0000 1.8
@@ -343,6 +343,7 @@
/* Getting each value */
do
{
+ int negate = 0;
int found = 0;
nbuf = _rkcl_getfp(fp, buf);
@@ -372,6 +373,14 @@
return(0);
}
+
+ /* Getting negate value */
+ if(*value == '!')
+ {
+ negate = 1;
+ value++;
+ }
+
/* Checking for a file. */
if(type == RKCL_TYPE_FILE)
{
@@ -441,6 +450,20 @@
found = 1;
}
}
+
+ /* Switching the values if ! is present */
+ if(negate)
+ {
+ if(found)
+ {
+ found = 0;
+ }
+ else
+ {
+ found = 1;
+ }
+ }
+
if(condition == RKCL_COND_ANY)
{
Index: win-common.c
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/rootcheck/win-common.c,v
diff -u -r1.9 -r1.10
--- win-common.c 30 Jun 2007 21:48:14 -0000 1.9
+++ win-common.c 26 Jul 2007 01:32:03 -0000 1.10
@@ -471,7 +471,12 @@
{
return(0);
}
+ if(!value)
+ {
+ return(0);
+ }
+
l_node = OSList_GetFirstNode(p_list);
while(l_node)
{
@@ -484,7 +489,7 @@
{
return(1);
}
-
+
l_node = OSList_GetNextNode(p_list);
}
OSSEC home |
Main Index |
Thread Index
OSSEC project: www.ossec.net.
Mailling list information: http://www.ossec.net/en/mailing_lists.html.