103 lines
4.3 KiB
Diff
103 lines
4.3 KiB
Diff
diff -up bind-9.5.0b2/bin/named-sdb/Makefile.in.sdb-sqlite-bld bind-9.5.0b2/bin/named/Makefile.in
|
|
--- bind-9.5.0b2/bin/named-sdb/Makefile.in.sdb-sqlite-bld 2008-02-11 17:44:32.000000000 +0100
|
|
+++ bind-9.5.0b2/bin/named-sdb/Makefile.in 2008-02-11 17:46:00.000000000 +0100
|
|
@@ -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.0b2/bin/named-sdb/main.c.sdb-sqlite-bld bind-9.5.0b2/bin/named/main-sdb.c
|
|
--- bind-9.5.0b2/bin/named-sdb/main.c.sdb-sqlite-bld 2008-02-11 17:44:32.000000000 +0100
|
|
+++ bind-9.5.0b2/bin/named-sdb/main.c 2008-02-11 17:44:33.000000000 +0100
|
|
@@ -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.0b2/bin/sdb_tools/Makefile.in.sdb-sqlite-bld bind-9.5.0b2/bin/sdb_tools/Makefile.in
|
|
--- bind-9.5.0b2/bin/sdb_tools/Makefile.in.sdb-sqlite-bld 2008-02-11 17:44:33.000000000 +0100
|
|
+++ bind-9.5.0b2/bin/sdb_tools/Makefile.in 2008-02-11 17:44:33.000000000 +0100
|
|
@@ -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
|
|
|
|
@@ -54,6 +54,9 @@ zone2ldap: zone2ldap.o ${DEPLIBS}
|
|
zonetodb@EXEEXT@: zonetodb.@O@ ${DEPLIBS}
|
|
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_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} ${CFLAGS} ${LDFLAGS} -o $@ ldap2zone.@O@ -lldap -llber ${LIBS}
|
|
|
|
@@ -68,4 +71,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
|