|
|
bc5dde |
diff -up bind-9.8.1rc1/bin/named-sdb/main.c.sdb-sqlite-bld bind-9.8.1rc1/bin/named-sdb/main.c
|
|
|
bc5dde |
--- bind-9.8.1rc1/bin/named-sdb/main.c.sdb-sqlite-bld 2011-08-31 14:41:15.646020840 +0200
|
|
|
bc5dde |
+++ bind-9.8.1rc1/bin/named-sdb/main.c 2011-08-31 14:41:35.132019452 +0200
|
|
|
bc5dde |
@@ -85,6 +85,7 @@
|
|
|
bc5dde |
/* #include "xxdb.h" */
|
|
|
bc5dde |
#include "ldapdb.h"
|
|
|
bc5dde |
#include "pgsqldb.h"
|
|
|
bc5dde |
+#include "sqlitedb.h"
|
|
|
bc5dde |
#include "dirdb.h"
|
|
|
bc5dde |
|
|
|
bc5dde |
#ifdef CONTRIB_DLZ
|
|
|
bc5dde |
@@ -792,6 +793,7 @@ setup(void) {
|
|
|
bc5dde |
|
|
|
bc5dde |
ldapdb_clear();
|
|
|
bc5dde |
pgsqldb_clear();
|
|
|
bc5dde |
+ sqlitedb_clear();
|
|
|
bc5dde |
dirdb_clear();
|
|
|
bc5dde |
|
|
|
bc5dde |
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
bc5dde |
@@ -921,6 +923,23 @@ setup(void) {
|
|
|
bc5dde |
ISC_LOG_NOTICE, "SDB postgreSQL DB zone database module loaded."
|
|
|
bc5dde |
);
|
|
|
bc5dde |
|
|
|
bc5dde |
+ result = sqlitedb_init();
|
|
|
bc5dde |
+ if (result != ISC_R_SUCCESS)
|
|
|
bc5dde |
+ {
|
|
|
bc5dde |
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
bc5dde |
+ ISC_LOG_ERROR,
|
|
|
bc5dde |
+ "SDB sqlite3 module initialisation failed: %s.",
|
|
|
bc5dde |
+ isc_result_totext(result)
|
|
|
bc5dde |
+ );
|
|
|
bc5dde |
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
bc5dde |
+ ISC_LOG_ERROR,
|
|
|
bc5dde |
+ "SDB sqlite3 zone database will be unavailable."
|
|
|
bc5dde |
+ );
|
|
|
bc5dde |
+ }else
|
|
|
bc5dde |
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
bc5dde |
+ ISC_LOG_NOTICE, "SDB sqlite3 DB zone database module loaded."
|
|
|
bc5dde |
+ );
|
|
|
bc5dde |
+
|
|
|
bc5dde |
result = dirdb_init();
|
|
|
bc5dde |
if (result != ISC_R_SUCCESS)
|
|
|
bc5dde |
{
|
|
|
bc5dde |
@@ -971,6 +990,7 @@ cleanup(void) {
|
|
|
bc5dde |
|
|
|
bc5dde |
ldapdb_clear();
|
|
|
bc5dde |
pgsqldb_clear();
|
|
|
bc5dde |
+ sqlitedb_clear();
|
|
|
bc5dde |
dirdb_clear();
|
|
|
bc5dde |
|
|
|
bc5dde |
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
bc5dde |
diff -up bind-9.8.1rc1/bin/named-sdb/Makefile.in.sdb-sqlite-bld bind-9.8.1rc1/bin/named-sdb/Makefile.in
|
|
|
bc5dde |
--- bind-9.8.1rc1/bin/named-sdb/Makefile.in.sdb-sqlite-bld 2011-08-31 14:41:15.646020840 +0200
|
|
|
bc5dde |
+++ bind-9.8.1rc1/bin/named-sdb/Makefile.in 2011-08-31 14:41:15.658020839 +0200
|
|
|
bc5dde |
@@ -28,10 +28,10 @@ top_srcdir = @top_srcdir@
|
|
|
bc5dde |
#
|
|
|
bc5dde |
# Add database drivers here.
|
|
|
bc5dde |
#
|
|
|
bc5dde |
-DBDRIVER_OBJS = ldapdb.@O@ pgsqldb.@O@ dirdb.@O@
|
|
|
bc5dde |
-DBDRIVER_SRCS = ldapdb.c pgsqldb.c dirdb.c
|
|
|
bc5dde |
+DBDRIVER_OBJS = ldapdb.@O@ pgsqldb.@O@ sqlitedb.@O@ dirdb.@O@
|
|
|
bc5dde |
+DBDRIVER_SRCS = ldapdb.c pgsqldb.c sqlitedb.c dirdb.c
|
|
|
bc5dde |
DBDRIVER_INCLUDES =
|
|
|
bc5dde |
-DBDRIVER_LIBS = -lldap -llber -lpq
|
|
|
bc5dde |
+DBDRIVER_LIBS = -lldap -llber -lpq -lsqlite3
|
|
|
bc5dde |
|
|
|
bc5dde |
DLZ_DRIVER_DIR = ${top_srcdir}/contrib/dlz/drivers
|
|
|
bc5dde |
|
|
|
bc5dde |
diff -up bind-9.8.1rc1/bin/sdb_tools/Makefile.in.sdb-sqlite-bld bind-9.8.1rc1/bin/sdb_tools/Makefile.in
|
|
|
bc5dde |
--- bind-9.8.1rc1/bin/sdb_tools/Makefile.in.sdb-sqlite-bld 2011-08-31 14:41:15.651020840 +0200
|
|
|
bc5dde |
+++ bind-9.8.1rc1/bin/sdb_tools/Makefile.in 2011-08-31 14:41:15.658020839 +0200
|
|
|
bc5dde |
@@ -32,11 +32,11 @@ DEPLIBS = ${LWRESDEPLIBS} ${DNSDEPLIBS}
|
|
|
bc5dde |
LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} \
|
|
|
bc5dde |
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} ${DBDRIVER_LIBS} @LIBS@
|
|
|
bc5dde |
|
|
|
bc5dde |
-TARGETS = zone2ldap@EXEEXT@ ldap2zone@EXEEXT@ zonetodb@EXEEXT@
|
|
|
bc5dde |
+TARGETS = zone2ldap@EXEEXT@ ldap2zone@EXEEXT@ zonetodb@EXEEXT@ zone2sqlite@EXEEXT@
|
|
|
bc5dde |
|
|
|
bc5dde |
-OBJS = zone2ldap.@O@ ldap2zone.@O@ zonetodb.@O@
|
|
|
bc5dde |
+OBJS = zone2ldap.@O@ ldap2zone.@O@ zonetodb.@O@ zone2sqlite.@O@
|
|
|
bc5dde |
|
|
|
bc5dde |
-SRCS = zone2ldap.c ldap2zone.c zonetodb.c
|
|
|
bc5dde |
+SRCS = zone2ldap.c ldap2zone.c zonetodb.c zone2sqlite.c
|
|
|
bc5dde |
|
|
|
bc5dde |
MANPAGES = zone2ldap.1
|
|
|
bc5dde |
|
|
|
bc5dde |
@@ -50,6 +50,9 @@ zone2ldap@EXEEXT@: zone2ldap.@O@ ${DEPLI
|
|
|
bc5dde |
zonetodb@EXEEXT@: zonetodb.@O@ ${DEPLIBS}
|
|
|
bc5dde |
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ zonetodb.@O@ -lpq ${LIBS}
|
|
|
bc5dde |
|
|
|
bc5dde |
+zone2sqlite@EXEEXT@: zone2sqlite.@O@ ${DEPLIBS}
|
|
|
bc5dde |
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ zone2sqlite.@O@ -lsqlite3 -lssl ${LIBS}
|
|
|
bc5dde |
+
|
|
|
bc5dde |
ldap2zone@EXEEXT@: ldap2zone.@O@ ${DEPLIBS}
|
|
|
bc5dde |
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ ldap2zone.@O@ -lldap -llber ${LIBS}
|
|
|
bc5dde |
|
|
|
bc5dde |
@@ -64,4 +67,5 @@ install:: ${TARGETS} installdirs
|
|
|
bc5dde |
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} zone2ldap@EXEEXT@ ${DESTDIR}${sbindir}
|
|
|
bc5dde |
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} ldap2zone@EXEEXT@ ${DESTDIR}${sbindir}
|
|
|
bc5dde |
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} zonetodb@EXEEXT@ ${DESTDIR}${sbindir}
|
|
|
bc5dde |
+ ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} zone2sqlite@EXEEXT@ ${DESTDIR}${sbindir}
|
|
|
bc5dde |
${INSTALL_DATA} ${srcdir}/zone2ldap.1 ${DESTDIR}${mandir}/man1/zone2ldap.1
|