2008-07-21 10:47:18 +00:00
|
|
|
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
|
2007-03-12 15:15:37 +00:00
|
|
|
@@ -74,6 +74,7 @@
|
|
|
|
/* #include "xxdb.h" */
|
|
|
|
#include "ldapdb.h"
|
|
|
|
#include "pgsqldb.h"
|
|
|
|
+#include "sqlitedb.h"
|
|
|
|
#include "dirdb.h"
|
|
|
|
|
|
|
|
/*
|
2008-02-11 17:11:26 +00:00
|
|
|
@@ -646,6 +647,7 @@ setup(void) {
|
2007-03-12 15:15:37 +00:00
|
|
|
|
|
|
|
ldapdb_clear();
|
|
|
|
pgsqldb_clear();
|
|
|
|
+ sqlitedb_clear();
|
|
|
|
dirdb_clear();
|
|
|
|
|
|
|
|
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
2008-02-11 17:11:26 +00:00
|
|
|
@@ -743,6 +745,23 @@ setup(void) {
|
2007-03-12 15:15:37 +00:00
|
|
|
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)
|
|
|
|
{
|
2008-02-11 17:11:26 +00:00
|
|
|
@@ -787,6 +806,7 @@ cleanup(void) {
|
2007-03-12 15:15:37 +00:00
|
|
|
|
|
|
|
ldapdb_clear();
|
|
|
|
pgsqldb_clear();
|
|
|
|
+ sqlitedb_clear();
|
|
|
|
dirdb_clear();
|
|
|
|
|
|
|
|
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
2008-07-21 10:47:18 +00:00
|
|
|
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
|
2008-02-11 17:11:26 +00:00
|
|
|
@@ -30,11 +30,11 @@ DEPLIBS = ${LWRESDEPLIBS} ${DNSDEPLIBS}
|
2007-03-12 15:15:37 +00:00
|
|
|
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@
|
|
|
|
|
2008-02-12 11:40:19 +00:00
|
|
|
-OBJS = zone2ldap.@O@ ldap2zone.@O@ zonetodb.@O@
|
|
|
|
+OBJS = zone2ldap.@O@ ldap2zone.@O@ zonetodb.@O@ zone2sqlite.@O@
|
2007-03-12 15:15:37 +00:00
|
|
|
|
|
|
|
-SRCS = zone2ldap.c ldap2zone.c zonetodb.c
|
|
|
|
+SRCS = zone2ldap.c ldap2zone.c zonetodb.c zone2sqlite.c
|
|
|
|
|
|
|
|
MANPAGES = zone2ldap.1
|
|
|
|
|
2008-07-21 10:47:18 +00:00
|
|
|
@@ -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}
|
2007-03-12 15:15:37 +00:00
|
|
|
|
2008-07-21 10:47:18 +00:00
|
|
|
+zone2sqlite@EXEEXT@: zone2sqlite.@O@ ${DEPLIBS}
|
2008-02-12 11:40:19 +00:00
|
|
|
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ zone2sqlite.@O@ -lsqlite3 -lssl ${LIBS}
|
2007-03-12 15:15:37 +00:00
|
|
|
+
|
2008-07-21 10:47:18 +00:00
|
|
|
ldap2zone@EXEEXT@: ldap2zone.@O@ ${DEPLIBS}
|
|
|
|
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ ldap2zone.@O@ -lldap -llber ${LIBS}
|
2007-03-12 15:15:37 +00:00
|
|
|
|
2008-07-21 10:47:18 +00:00
|
|
|
@@ -62,4 +65,5 @@ install:: ${TARGETS} installdirs
|
2008-02-12 11:40:19 +00:00
|
|
|
${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}
|
2007-03-12 15:15:37 +00:00
|
|
|
${INSTALL_DATA} ${srcdir}/zone2ldap.1 ${DESTDIR}${mandir}/man1/zone2ldap.1
|