[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ossec-cvs] ossec-hids: store_op.c (HEAD) [dcid]
Module name: ossec-hids
Changes by: dcid 07/08/21 21:39:34
Modified files:
store_op.c
Log message:
Description: Fixing netscreen decoder, the database daemon and adding a few more entries to the policy checks/ rootkit list...
Reviewed by: dcid
Bug:
Index: store_op.c
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/shared/store_op.c,v
diff -u -r1.4 -r1.5
--- store_op.c 10 Aug 2007 00:56:23 -0000 1.4
+++ store_op.c 22 Aug 2007 00:39:34 -0000 1.5
@@ -77,6 +77,7 @@
}
+
/* Get key position from storage
* Returns 0 if not present or the key
* if available.
@@ -103,6 +104,33 @@
pos++;
}
return(0);
+}
+
+
+
+/* Get data from storage.
+ * Returns NULL if not present.
+ */
+void *OSStore_Get(OSStore *list, char *key)
+{
+ int chk_rc;
+ list->cur_node = list->first_node;
+
+ while(list->cur_node)
+ {
+ if((chk_rc = strcmp(list->cur_node->key, key)) >= 0)
+ {
+ /* Found */
+ if(chk_rc == 0)
+ return(list->cur_node->data);
+
+ /* Not found */
+ return(NULL);
+ }
+
+ list->cur_node = list->cur_node->next;
+ }
+ return(NULL);
}
OSSEC home |
Main Index |
Thread Index
OSSEC project: www.ossec.net.
Mailling list information: http://www.ossec.net/en/mailing_lists.html.