103 lines
4.3 KiB
Diff
103 lines
4.3 KiB
Diff
diff -up bind-9.5.1b1/bin/named-sdb/main.c.sdb-sqlite-bld bind-9.5.1b1/bin/named-sdb/main.c
|
|
--- bind-9.5.1b1/bin/named-sdb/main.c.sdb-sqlite-bld 2008-07-21 12:19:50.000000000 +0200
|
|
+++ bind-9.5.1b1/bin/named-sdb/main.c 2008-07-21 12:19:50.000000000 +0200
|
|
@@ -74,6 +74,7 @@
|
|
/* #include "xxdb.h" */
|
|
#include "ldapdb.h"
|
|
#include "pgsqldb.h"
|
|
+#include "sqlitedb.h"
|
|
#include "dirdb.h"
|
|
|
|
/*
|
|
@@ -646,6 +647,7 @@ setup(void) {
|
|
|
|
ldapdb_clear();
|
|
pgsqldb_clear();
|
|
+ sqlitedb_clear();
|
|
dirdb_clear();
|
|
|
|
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
@@ -743,6 +745,23 @@ setup(void) {
|
|
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)
|
|
{
|
|
@@ -787,6 +806,7 @@ cleanup(void) {
|
|
|
|
ldapdb_clear();
|
|
pgsqldb_clear();
|
|
+ sqlitedb_clear();
|
|
dirdb_clear();
|
|
|
|
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
diff -up bind-9.5.1b1/bin/named-sdb/Makefile.in.sdb-sqlite-bld bind-9.5.1b1/bin/named-sdb/Makefile.in
|
|
--- bind-9.5.1b1/bin/named-sdb/Makefile.in.sdb-sqlite-bld 2008-07-21 12:19:50.000000000 +0200
|
|
+++ bind-9.5.1b1/bin/named-sdb/Makefile.in 2008-07-21 12:19:50.000000000 +0200
|
|
@@ -26,10 +26,10 @@ top_srcdir = @top_srcdir@
|
|
#
|
|
# 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
|
|
|
|
diff -up bind-9.5.1b1/bin/sdb_tools/Makefile.in.sdb-sqlite-bld bind-9.5.1b1/bin/sdb_tools/Makefile.in
|
|
--- bind-9.5.1b1/bin/sdb_tools/Makefile.in.sdb-sqlite-bld 2008-07-21 12:19:50.000000000 +0200
|
|
+++ bind-9.5.1b1/bin/sdb_tools/Makefile.in 2008-07-21 12:22:13.000000000 +0200
|
|
@@ -30,11 +30,11 @@ DEPLIBS = ${LWRESDEPLIBS} ${DNSDEPLIBS}
|
|
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.@O@
|
|
|
|
-SRCS = zone2ldap.c ldap2zone.c zonetodb.c
|
|
+SRCS = zone2ldap.c ldap2zone.c zonetodb.c zone2sqlite.c
|
|
|
|
MANPAGES = zone2ldap.1
|
|
|
|
@@ -48,6 +48,9 @@ zone2ldap@EXEEXT@: zone2ldap.@O@ ${DEPLI
|
|
zonetodb@EXEEXT@: zonetodb.@O@ ${DEPLIBS}
|
|
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ zonetodb.@O@ -lpq ${LIBS}
|
|
|
|
+zone2sqlite@EXEEXT@: zone2sqlite.@O@ ${DEPLIBS}
|
|
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ zone2sqlite.@O@ -lsqlite3 -lssl ${LIBS}
|
|
+
|
|
ldap2zone@EXEEXT@: ldap2zone.@O@ ${DEPLIBS}
|
|
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ ldap2zone.@O@ -lldap -llber ${LIBS}
|
|
|
|
@@ -62,4 +65,5 @@ install:: ${TARGETS} installdirs
|
|
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} zone2ldap@EXEEXT@ ${DESTDIR}${sbindir}
|
|
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} ldap2zone@EXEEXT@ ${DESTDIR}${sbindir}
|
|
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} zonetodb@EXEEXT@ ${DESTDIR}${sbindir}
|
|
+ ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} zone2sqlite@EXEEXT@ ${DESTDIR}${sbindir}
|
|
${INSTALL_DATA} ${srcdir}/zone2ldap.1 ${DESTDIR}${mandir}/man1/zone2ldap.1
|