Blob Blame History Raw
--- bind-9.4.0/bin/named/main.c.sdb-sqlite-bld	2007-03-12 14:00:05.000000000 +0100
+++ bind-9.4.0/bin/named/main.c	2007-03-12 14:02:34.000000000 +0100
@@ -74,6 +74,7 @@
 /* #include "xxdb.h" */
 #include "ldapdb.h"
 #include "pgsqldb.h"
+#include "sqlitedb.h"
 #include "dirdb.h"
 
 /*
@@ -648,6 +649,7 @@
 
 	ldapdb_clear();
 	pgsqldb_clear();
+	sqlitedb_clear();
 	dirdb_clear();
 
 	isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
@@ -737,6 +739,23 @@
                           ISC_LOG_NOTICE, "SDB postgreSQL DB zone database module loaded."
                          );
 
+        result = sqlitedb_init();
+        if (result != ISC_R_SUCCESS)
+        {
+             isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
+                          ISC_LOG_ERROR, 
+                          "SDB sqlite3 module initialisation failed: %s.",
+                          isc_result_totext(result)
+                );
+            isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
+                          ISC_LOG_ERROR, 
+                          "SDB sqlite3 zone database will be unavailable."
+                );
+        }else
+            isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
+                          ISC_LOG_NOTICE, "SDB sqlite3 DB zone database module loaded."
+                         );
+
         result = dirdb_init();
         if (result != ISC_R_SUCCESS)
         {
@@ -781,6 +800,7 @@
 
         ldapdb_clear();
         pgsqldb_clear();
+        sqlitedb_clear();
         dirdb_clear();
 
 	isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
--- bind-9.4.0/bin/named/Makefile.in.sdb-sqlite-bld	2007-03-12 14:00:05.000000000 +0100
+++ bind-9.4.0/bin/named/Makefile.in	2007-03-12 14:00:05.000000000 +0100
@@ -26,10 +26,10 @@
 #
 # Add database drivers here.
 #
-DBDRIVER_OBJS =      ldapdb.o     pgsqldb.o    dirdb.o
-DBDRIVER_SRCS =      ldapdb.c     pgsqldb.c    dirdb.c
+DBDRIVER_OBJS =      ldapdb.o     pgsqldb.o    sqlitedb.o	dirdb.o
+DBDRIVER_SRCS =      ldapdb.c     pgsqldb.c    sqlitedb.c	dirdb.c
 DBDRIVER_INCLUDES =
-DBDRIVER_LIBS =      -lldap -llber  -lpq
+DBDRIVER_LIBS =      -lldap -llber -lpq -lsqlite3
 
 DLZ_DRIVER_DIR =	${top_srcdir}/contrib/dlz/drivers
 
--- bind-9.4.0/bin/sdb_tools/Makefile.in.sdb-sqlite-bld	2007-03-12 14:00:05.000000000 +0100
+++ bind-9.4.0/bin/sdb_tools/Makefile.in	2007-03-12 14:00:05.000000000 +0100
@@ -30,11 +30,11 @@
 LIBS =		${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} \
 		${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} ${DBDRIVER_LIBS} @LIBS@
 
-TARGETS =	zone2ldap@EXEEXT@ ldap2zone@EXEEXT@ zonetodb@EXEEXT@
+TARGETS =	zone2ldap@EXEEXT@ ldap2zone@EXEEXT@ zonetodb@EXEEXT@ zone2sqlite@EXEEXT@
 
-OBJS	=	zone2ldap.o ldap2zone.o zonetodb.o
+OBJS	=	zone2ldap.o ldap2zone.o zonetodb.o zone2sqlite
 
-SRCS    =       zone2ldap.c ldap2zone.c zonetodb.c
+SRCS    =       zone2ldap.c ldap2zone.c zonetodb.c zone2sqlite.c
 
 MANPAGES =      zone2ldap.1
 
@@ -54,6 +54,9 @@
 zonetodb:	zonetodb.o  ${DEPLIBS}
 	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ zonetodb.o -lpq ${LIBS}
 
+zone2sqlite:	zone2sqlite.o  ${DEPLIBS}
+	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ zone2sqlite.o -lsqlite3 -lssl ${LIBS}
+
 ldap2zone:	ldap2zone.o ${DEPLIBS}
 	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ldap2zone.o -lldap -llber ${LIBS}
 
@@ -68,4 +71,5 @@
 	${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} zone2ldap ${DESTDIR}${sbindir}
 	${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} ldap2zone ${DESTDIR}${sbindir}
 	${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} zonetodb  ${DESTDIR}${sbindir}
+	${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} zone2sqlite  ${DESTDIR}${sbindir}
 	${INSTALL_DATA} ${srcdir}/zone2ldap.1 ${DESTDIR}${mandir}/man1/zone2ldap.1