|
Adam Tkac |
1e57f4 |
diff -up bind-9.5.1b1/bin/named-sdb/main.c.sdb-sqlite-bld bind-9.5.1b1/bin/named-sdb/main.c
|
|
Adam Tkac |
1e57f4 |
--- bind-9.5.1b1/bin/named-sdb/main.c.sdb-sqlite-bld 2008-07-21 12:19:50.000000000 +0200
|
|
Adam Tkac |
1e57f4 |
+++ bind-9.5.1b1/bin/named-sdb/main.c 2008-07-21 12:19:50.000000000 +0200
|
|
Adam Tkac |
c30533 |
@@ -74,6 +74,7 @@
|
|
Adam Tkac |
c30533 |
/* #include "xxdb.h" */
|
|
Adam Tkac |
c30533 |
#include "ldapdb.h"
|
|
Adam Tkac |
c30533 |
#include "pgsqldb.h"
|
|
Adam Tkac |
c30533 |
+#include "sqlitedb.h"
|
|
Adam Tkac |
c30533 |
#include "dirdb.h"
|
|
Adam Tkac |
c30533 |
|
|
Adam Tkac |
c30533 |
/*
|
|
Adam Tkac |
bbeea4 |
@@ -646,6 +647,7 @@ setup(void) {
|
|
Adam Tkac |
c30533 |
|
|
Adam Tkac |
c30533 |
ldapdb_clear();
|
|
Adam Tkac |
c30533 |
pgsqldb_clear();
|
|
Adam Tkac |
c30533 |
+ sqlitedb_clear();
|
|
Adam Tkac |
c30533 |
dirdb_clear();
|
|
Adam Tkac |
c30533 |
|
|
Adam Tkac |
c30533 |
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
Adam Tkac |
bbeea4 |
@@ -743,6 +745,23 @@ setup(void) {
|
|
Adam Tkac |
c30533 |
ISC_LOG_NOTICE, "SDB postgreSQL DB zone database module loaded."
|
|
Adam Tkac |
c30533 |
);
|
|
Adam Tkac |
c30533 |
|
|
Adam Tkac |
c30533 |
+ result = sqlitedb_init();
|
|
Adam Tkac |
c30533 |
+ if (result != ISC_R_SUCCESS)
|
|
Adam Tkac |
c30533 |
+ {
|
|
Adam Tkac |
c30533 |
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
Adam Tkac |
c30533 |
+ ISC_LOG_ERROR,
|
|
Adam Tkac |
c30533 |
+ "SDB sqlite3 module initialisation failed: %s.",
|
|
Adam Tkac |
c30533 |
+ isc_result_totext(result)
|
|
Adam Tkac |
c30533 |
+ );
|
|
Adam Tkac |
c30533 |
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
Adam Tkac |
c30533 |
+ ISC_LOG_ERROR,
|
|
Adam Tkac |
c30533 |
+ "SDB sqlite3 zone database will be unavailable."
|
|
Adam Tkac |
c30533 |
+ );
|
|
Adam Tkac |
c30533 |
+ }else
|
|
Adam Tkac |
c30533 |
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
Adam Tkac |
c30533 |
+ ISC_LOG_NOTICE, "SDB sqlite3 DB zone database module loaded."
|
|
Adam Tkac |
c30533 |
+ );
|
|
Adam Tkac |
c30533 |
+
|
|
Adam Tkac |
c30533 |
result = dirdb_init();
|
|
Adam Tkac |
c30533 |
if (result != ISC_R_SUCCESS)
|
|
Adam Tkac |
c30533 |
{
|
|
Adam Tkac |
bbeea4 |
@@ -787,6 +806,7 @@ cleanup(void) {
|
|
Adam Tkac |
c30533 |
|
|
Adam Tkac |
c30533 |
ldapdb_clear();
|
|
Adam Tkac |
c30533 |
pgsqldb_clear();
|
|
Adam Tkac |
c30533 |
+ sqlitedb_clear();
|
|
Adam Tkac |
c30533 |
dirdb_clear();
|
|
Adam Tkac |
c30533 |
|
|
Adam Tkac |
c30533 |
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
Adam Tkac |
1e57f4 |
diff -up bind-9.5.1b1/bin/named-sdb/Makefile.in.sdb-sqlite-bld bind-9.5.1b1/bin/named-sdb/Makefile.in
|
|
Adam Tkac |
1e57f4 |
--- bind-9.5.1b1/bin/named-sdb/Makefile.in.sdb-sqlite-bld 2008-07-21 12:19:50.000000000 +0200
|
|
Adam Tkac |
1e57f4 |
+++ bind-9.5.1b1/bin/named-sdb/Makefile.in 2008-07-21 12:19:50.000000000 +0200
|
|
Adam Tkac |
1e57f4 |
@@ -26,10 +26,10 @@ top_srcdir = @top_srcdir@
|
|
Adam Tkac |
1e57f4 |
#
|
|
Adam Tkac |
1e57f4 |
# Add database drivers here.
|
|
Adam Tkac |
1e57f4 |
#
|
|
Adam Tkac |
1e57f4 |
-DBDRIVER_OBJS = ldapdb.@O@ pgsqldb.@O@ dirdb.@O@
|
|
Adam Tkac |
1e57f4 |
-DBDRIVER_SRCS = ldapdb.c pgsqldb.c dirdb.c
|
|
Adam Tkac |
1e57f4 |
+DBDRIVER_OBJS = ldapdb.@O@ pgsqldb.@O@ sqlitedb.@O@ dirdb.@O@
|
|
Adam Tkac |
1e57f4 |
+DBDRIVER_SRCS = ldapdb.c pgsqldb.c sqlitedb.c dirdb.c
|
|
Adam Tkac |
1e57f4 |
DBDRIVER_INCLUDES =
|
|
Adam Tkac |
1e57f4 |
-DBDRIVER_LIBS = -lldap -llber -lpq
|
|
Adam Tkac |
1e57f4 |
+DBDRIVER_LIBS = -lldap -llber -lpq -lsqlite3
|
|
Adam Tkac |
1e57f4 |
|
|
Adam Tkac |
1e57f4 |
DLZ_DRIVER_DIR = ${top_srcdir}/contrib/dlz/drivers
|
|
Adam Tkac |
1e57f4 |
|
|
Adam Tkac |
1e57f4 |
diff -up bind-9.5.1b1/bin/sdb_tools/Makefile.in.sdb-sqlite-bld bind-9.5.1b1/bin/sdb_tools/Makefile.in
|
|
Adam Tkac |
1e57f4 |
--- bind-9.5.1b1/bin/sdb_tools/Makefile.in.sdb-sqlite-bld 2008-07-21 12:19:50.000000000 +0200
|
|
Adam Tkac |
1e57f4 |
+++ bind-9.5.1b1/bin/sdb_tools/Makefile.in 2008-07-21 12:22:13.000000000 +0200
|
|
Adam Tkac |
bbeea4 |
@@ -30,11 +30,11 @@ DEPLIBS = ${LWRESDEPLIBS} ${DNSDEPLIBS}
|
|
Adam Tkac |
c30533 |
LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} \
|
|
Adam Tkac |
c30533 |
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} ${DBDRIVER_LIBS} @LIBS@
|
|
Adam Tkac |
c30533 |
|
|
Adam Tkac |
c30533 |
-TARGETS = zone2ldap@EXEEXT@ ldap2zone@EXEEXT@ zonetodb@EXEEXT@
|
|
Adam Tkac |
c30533 |
+TARGETS = zone2ldap@EXEEXT@ ldap2zone@EXEEXT@ zonetodb@EXEEXT@ zone2sqlite@EXEEXT@
|
|
Adam Tkac |
c30533 |
|
|
Adam Tkac |
5ca594 |
-OBJS = zone2ldap.@O@ ldap2zone.@O@ zonetodb.@O@
|
|
Adam Tkac |
5ca594 |
+OBJS = zone2ldap.@O@ ldap2zone.@O@ zonetodb.@O@ zone2sqlite.@O@
|
|
Adam Tkac |
c30533 |
|
|
Adam Tkac |
c30533 |
-SRCS = zone2ldap.c ldap2zone.c zonetodb.c
|
|
Adam Tkac |
c30533 |
+SRCS = zone2ldap.c ldap2zone.c zonetodb.c zone2sqlite.c
|
|
Adam Tkac |
c30533 |
|
|
Adam Tkac |
c30533 |
MANPAGES = zone2ldap.1
|
|
Adam Tkac |
c30533 |
|
|
Adam Tkac |
1e57f4 |
@@ -48,6 +48,9 @@ zone2ldap@EXEEXT@: zone2ldap.@O@ ${DEPLI
|
|
Adam Tkac |
1e57f4 |
zonetodb@EXEEXT@: zonetodb.@O@ ${DEPLIBS}
|
|
Adam Tkac |
1e57f4 |
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ zonetodb.@O@ -lpq ${LIBS}
|
|
Adam Tkac |
c30533 |
|
|
Adam Tkac |
1e57f4 |
+zone2sqlite@EXEEXT@: zone2sqlite.@O@ ${DEPLIBS}
|
|
Adam Tkac |
5ca594 |
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ zone2sqlite.@O@ -lsqlite3 -lssl ${LIBS}
|
|
Adam Tkac |
c30533 |
+
|
|
Adam Tkac |
1e57f4 |
ldap2zone@EXEEXT@: ldap2zone.@O@ ${DEPLIBS}
|
|
Adam Tkac |
1e57f4 |
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ ldap2zone.@O@ -lldap -llber ${LIBS}
|
|
Adam Tkac |
c30533 |
|
|
Adam Tkac |
1e57f4 |
@@ -62,4 +65,5 @@ install:: ${TARGETS} installdirs
|
|
Adam Tkac |
5ca594 |
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} zone2ldap@EXEEXT@ ${DESTDIR}${sbindir}
|
|
Adam Tkac |
5ca594 |
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} ldap2zone@EXEEXT@ ${DESTDIR}${sbindir}
|
|
Adam Tkac |
5ca594 |
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} zonetodb@EXEEXT@ ${DESTDIR}${sbindir}
|
|
Adam Tkac |
5ca594 |
+ ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} zone2sqlite@EXEEXT@ ${DESTDIR}${sbindir}
|
|
Adam Tkac |
c30533 |
${INSTALL_DATA} ${srcdir}/zone2ldap.1 ${DESTDIR}${mandir}/man1/zone2ldap.1
|