[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ossec-cvs] ossec-hids: Makefile (HEAD) db_op.c (HEAD) [dcid]
Module name: ossec-hids
Changes by: dcid 07/08/21 21:39:33
Modified files:
Makefile db_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: Makefile
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/os_dbd/Makefile,v
diff -u -r1.2 -r1.3
--- Makefile 18 Aug 2007 01:07:49 -0000 1.2
+++ Makefile 22 Aug 2007 00:39:33 -0000 1.3
@@ -21,9 +21,8 @@
OBJS = ${OS_CONFIG} ${OS_SHARED} ${OS_NET} ${OS_REGEX} ${OS_XML}
default:
- @if [ "X${DBMYSQL}" = "X" -a "X${DBPOSTGRES}" = "X" ]; then ./dbmake.sh mysql; exit 1; fi;
- @echo "Compiling DB support with: ${DBMYSQL} ${DBPOSTGRES}"
- ${CC} ${CFLAGS} ${DBFLAGS} ${DBMYSQL} ${DBPOSTGRES} ${LOCAL} ${OBJS} -o ${NAME}
+ @echo "Compiling DB support with: ${DBCHECK}"
+ ${CC} ${CFLAGS} ${DBFLAGS} ${DBCHECK} ${LOCAL} ${OBJS} -o ${NAME}
mysql:
@if [ "X${DBMYSQL}" = "X" ]; then ./dbmake.sh mysql; exit 1; fi;
@echo "Compiling MySQL DB support with: ${DBVAL}"
Index: db_op.c
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/os_dbd/db_op.c,v
diff -u -r1.4 -r1.5
--- db_op.c 18 Aug 2007 03:38:34 -0000 1.4
+++ db_op.c 22 Aug 2007 00:39:33 -0000 1.5
@@ -16,7 +16,6 @@
/* Common lib for dealing with databases */
-#ifdef DBD
#include "shared.h"
#include "db_op.h"
@@ -54,6 +53,10 @@
}
+/** MySQL calls **/
+#ifdef UMYSQL
+
+
/* Create the tree
* Return NULL on error
*/
@@ -143,9 +146,67 @@
return(result_int);
}
+/** End of MYSQL calls **/
+
+
+/** PostGRES Calls **/
+#elif defined UPOSTGRES
+
+
+
+/** End of PostGRES calls **/
+
+
+
+/* Everything else when db is not defined. */
+#else
+
+
+
+void *osdb_connect(char *host, char *user, char *pass, char *db)
+{
+ char *tmp;
+
+
+ /* Just to avoid warnings. */
+ tmp = host; tmp = user; tmp = pass; tmp = db;
+
+
+ merror("%s: ERROR: Database support not enabled. Exiting.", ARGV0);
+ return(NULL);
+}
+void osdb_close(void *db_conn)
+{
+ void *tmp;
+
+ tmp = db_conn;
+ merror("%s: ERROR: Database support not enabled. Exiting.", ARGV0);
+ return;
+}
+int osdb_query_insert(void *db_conn, char *query)
+{
+ void *tmp;
+ tmp = db_conn; tmp = query;
-#endif /* DBD */
+ merror("%s: ERROR: Database support not enabled. Exiting.", ARGV0);
+ return(0);
+}
+int osdb_query_select(void *db_conn, char *query)
+{
+ void *tmp;
+
+ tmp = db_conn; tmp = query;
+
+ merror("%s: ERROR: Database support not enabled. Exiting.", ARGV0);
+ return(0);
+}
+
+
+
+
+/** End of not defined db calls **/
+#endif
OSSEC home |
Main Index |
Thread Index
OSSEC project: www.ossec.net.
Mailling list information: http://www.ossec.net/en/mailing_lists.html.