2013-04-16 13:39:46 +00:00
|
|
|
diff -up bind-9.9.3rc1/bin/Makefile.in.sdb bind-9.9.3rc1/bin/Makefile.in
|
|
|
|
--- bind-9.9.3rc1/bin/Makefile.in.sdb 2013-04-05 00:21:21.000000000 +0200
|
|
|
|
+++ bind-9.9.3rc1/bin/Makefile.in 2013-04-16 15:21:22.286944331 +0200
|
2009-11-03 11:06:16 +00:00
|
|
|
@@ -19,8 +19,8 @@ srcdir = @srcdir@
|
2009-09-15 12:56:46 +00:00
|
|
|
VPATH = @srcdir@
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
|
2013-04-16 13:39:46 +00:00
|
|
|
-SUBDIRS = named rndc dig dnssec tools tests nsupdate \
|
2012-10-11 11:34:19 +00:00
|
|
|
- check confgen @PYTHON_TOOLS@ @PKCS11_TOOLS@
|
2013-04-16 13:39:46 +00:00
|
|
|
+SUBDIRS = named named-sdb rndc dig dnssec tools tests nsupdate \
|
2012-10-11 11:34:19 +00:00
|
|
|
+ check confgen @PYTHON_TOOLS@ @PKCS11_TOOLS@ sdb_tools
|
2009-09-15 12:56:46 +00:00
|
|
|
TARGETS =
|
|
|
|
|
|
|
|
@BIND9_MAKE_RULES@
|
2013-04-16 13:39:46 +00:00
|
|
|
diff -up bind-9.9.3rc1/bin/named/Makefile.in.sdb bind-9.9.3rc1/bin/named/Makefile.in
|
|
|
|
--- bind-9.9.3rc1/bin/named/Makefile.in.sdb 2013-04-16 15:21:22.102944727 +0200
|
|
|
|
+++ bind-9.9.3rc1/bin/named/Makefile.in 2013-04-16 15:21:22.286944331 +0200
|
|
|
|
@@ -49,7 +49,7 @@ CINCLUDES = -I${srcdir}/include -I${srcd
|
2009-09-15 12:56:46 +00:00
|
|
|
${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} ${ISC_INCLUDES} \
|
2011-02-21 16:12:57 +00:00
|
|
|
${DLZDRIVER_INCLUDES} ${DBDRIVER_INCLUDES} @DST_OPENSSL_INC@
|
2009-09-15 12:56:46 +00:00
|
|
|
|
2011-08-31 12:57:44 +00:00
|
|
|
-CDEFINES = @CONTRIB_DLZ@ @USE_PKCS11@ @USE_OPENSSL@
|
2011-03-03 11:54:23 +00:00
|
|
|
+CDEFINES = @USE_PKCS11@ @USE_OPENSSL@
|
2009-09-15 12:56:46 +00:00
|
|
|
|
|
|
|
CWARNINGS =
|
|
|
|
|
2013-04-16 13:39:46 +00:00
|
|
|
@@ -73,11 +73,11 @@ DEPLIBS = ${LWRESDEPLIBS} ${DNSDEPLIBS}
|
2009-09-15 12:56:46 +00:00
|
|
|
|
|
|
|
LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} \
|
|
|
|
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} \
|
2011-03-03 11:54:23 +00:00
|
|
|
- ${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBS@
|
|
|
|
+ @LIBS@
|
2009-09-16 11:09:13 +00:00
|
|
|
|
|
|
|
NOSYMLIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} \
|
|
|
|
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCNOSYMLIBS} \
|
2011-03-03 11:54:23 +00:00
|
|
|
- ${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBS@
|
|
|
|
+ @LIBS@
|
2009-09-15 12:56:46 +00:00
|
|
|
|
|
|
|
SUBDIRS = unix
|
|
|
|
|
2013-04-16 13:39:46 +00:00
|
|
|
@@ -90,8 +90,7 @@ OBJS = builtin.@O@ client.@O@ config.@O
|
2009-09-15 12:56:46 +00:00
|
|
|
tkeyconf.@O@ tsigconf.@O@ update.@O@ xfrout.@O@ \
|
|
|
|
zoneconf.@O@ \
|
|
|
|
lwaddr.@O@ lwresd.@O@ lwdclient.@O@ lwderror.@O@ lwdgabn.@O@ \
|
|
|
|
- lwdgnba.@O@ lwdgrbn.@O@ lwdnoop.@O@ lwsearch.@O@ \
|
|
|
|
- ${DLZDRIVER_OBJS} ${DBDRIVER_OBJS}
|
|
|
|
+ lwdgnba.@O@ lwdgrbn.@O@ lwdnoop.@O@ lwsearch.@O@
|
|
|
|
|
2011-08-31 12:57:44 +00:00
|
|
|
UOBJS = unix/os.@O@ unix/dlz_dlopen_driver.@O@
|
2009-09-15 12:56:46 +00:00
|
|
|
|
2013-04-16 13:39:46 +00:00
|
|
|
@@ -104,8 +103,7 @@ SRCS = builtin.c client.c config.c cont
|
2009-09-15 12:56:46 +00:00
|
|
|
tkeyconf.c tsigconf.c update.c xfrout.c \
|
|
|
|
zoneconf.c \
|
|
|
|
lwaddr.c lwresd.c lwdclient.c lwderror.c lwdgabn.c \
|
|
|
|
- lwdgnba.c lwdgrbn.c lwdnoop.c lwsearch.c \
|
|
|
|
- ${DLZDRIVER_SRCS} ${DBDRIVER_SRCS}
|
|
|
|
+ lwdgnba.c lwdgrbn.c lwdnoop.c lwsearch.c
|
|
|
|
|
|
|
|
MANPAGES = named.8 lwresd.8 named.conf.5
|
|
|
|
|
2013-04-16 13:39:46 +00:00
|
|
|
@@ -180,7 +178,5 @@ install:: named@EXEEXT@ lwresd@EXEEXT@ i
|
2009-09-15 12:56:46 +00:00
|
|
|
${INSTALL_DATA} ${srcdir}/lwresd.8 ${DESTDIR}${mandir}/man8
|
|
|
|
${INSTALL_DATA} ${srcdir}/named.conf.5 ${DESTDIR}${mandir}/man5
|
2013-04-16 13:39:46 +00:00
|
|
|
|
2009-09-15 12:56:46 +00:00
|
|
|
-@DLZ_DRIVER_RULES@
|
2013-04-16 13:39:46 +00:00
|
|
|
-
|
|
|
|
named-symtbl.@O@: named-symtbl.c
|
|
|
|
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c named-symtbl.c
|
|
|
|
diff -up bind-9.9.3rc1/bin/named-sdb/main.c.sdb bind-9.9.3rc1/bin/named-sdb/main.c
|
|
|
|
--- bind-9.9.3rc1/bin/named-sdb/main.c.sdb 2013-04-16 15:21:22.249944411 +0200
|
|
|
|
+++ bind-9.9.3rc1/bin/named-sdb/main.c 2013-04-16 15:21:22.287944329 +0200
|
2011-08-31 12:57:44 +00:00
|
|
|
@@ -83,6 +83,9 @@
|
2007-11-15 10:49:41 +00:00
|
|
|
* Include header files for database drivers here.
|
|
|
|
*/
|
|
|
|
/* #include "xxdb.h" */
|
|
|
|
+#include "ldapdb.h"
|
|
|
|
+#include "pgsqldb.h"
|
|
|
|
+#include "dirdb.h"
|
|
|
|
|
2011-08-31 12:57:44 +00:00
|
|
|
#ifdef CONTRIB_DLZ
|
2007-11-15 10:49:41 +00:00
|
|
|
/*
|
2013-04-16 13:39:46 +00:00
|
|
|
@@ -808,6 +811,10 @@ setup(void) {
|
2007-11-15 10:49:41 +00:00
|
|
|
ns_main_earlyfatal("isc_app_start() failed: %s",
|
|
|
|
isc_result_totext(result));
|
|
|
|
|
|
|
|
+ ldapdb_clear();
|
|
|
|
+ pgsqldb_clear();
|
|
|
|
+ dirdb_clear();
|
|
|
|
+
|
|
|
|
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
2013-04-16 13:39:46 +00:00
|
|
|
ISC_LOG_NOTICE, "starting %s %s%s", ns_g_product,
|
|
|
|
ns_g_version, saved_command_line);
|
|
|
|
@@ -920,6 +927,57 @@ setup(void) {
|
2007-11-15 10:49:41 +00:00
|
|
|
isc_result_totext(result));
|
|
|
|
#endif
|
|
|
|
|
|
|
|
+ result = ldapdb_init();
|
|
|
|
+ if (result != ISC_R_SUCCESS)
|
|
|
|
+ {
|
|
|
|
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
|
+ ISC_LOG_ERROR,
|
|
|
|
+ "SDB ldap module initialisation failed: %s.",
|
|
|
|
+ isc_result_totext(result)
|
|
|
|
+ );
|
|
|
|
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
|
+ ISC_LOG_ERROR,
|
|
|
|
+ "SDB ldap zone database will be unavailable."
|
|
|
|
+ );
|
|
|
|
+ }else
|
|
|
|
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
|
+ ISC_LOG_NOTICE, "SDB ldap zone database module loaded."
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ result = pgsqldb_init();
|
|
|
|
+ if (result != ISC_R_SUCCESS)
|
|
|
|
+ {
|
|
|
|
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
|
+ ISC_LOG_ERROR,
|
|
|
|
+ "SDB pgsql module initialisation failed: %s.",
|
|
|
|
+ isc_result_totext(result)
|
|
|
|
+ );
|
|
|
|
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
|
+ ISC_LOG_ERROR,
|
|
|
|
+ "SDB pgsql zone database will be unavailable."
|
|
|
|
+ );
|
|
|
|
+ }else
|
|
|
|
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
|
+ ISC_LOG_NOTICE, "SDB postgreSQL DB zone database module loaded."
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ result = dirdb_init();
|
|
|
|
+ if (result != ISC_R_SUCCESS)
|
|
|
|
+ {
|
|
|
|
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
|
+ ISC_LOG_ERROR,
|
|
|
|
+ "SDB directory DB module initialisation failed: %s.",
|
|
|
|
+ isc_result_totext(result)
|
|
|
|
+ );
|
|
|
|
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
|
+ ISC_LOG_ERROR,
|
|
|
|
+ "SDB directory DB zone database will be unavailable."
|
|
|
|
+ );
|
|
|
|
+ }else
|
|
|
|
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
|
+ ISC_LOG_NOTICE, "SDB directory DB zone database module loaded."
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
ns_server_create(ns_g_mctx, &ns_g_server);
|
|
|
|
}
|
|
|
|
|
2013-04-16 13:39:46 +00:00
|
|
|
@@ -951,6 +1009,10 @@ cleanup(void) {
|
2007-11-15 10:49:41 +00:00
|
|
|
|
|
|
|
dns_name_destroy();
|
|
|
|
|
|
|
|
+ ldapdb_clear();
|
|
|
|
+ pgsqldb_clear();
|
|
|
|
+ dirdb_clear();
|
|
|
|
+
|
|
|
|
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
|
ISC_LOG_NOTICE, "exiting");
|
|
|
|
ns_log_shutdown();
|
2013-04-16 13:39:46 +00:00
|
|
|
diff -up bind-9.9.3rc1/bin/named-sdb/Makefile.in.sdb bind-9.9.3rc1/bin/named-sdb/Makefile.in
|
|
|
|
--- bind-9.9.3rc1/bin/named-sdb/Makefile.in.sdb 2013-04-16 15:21:22.243944424 +0200
|
|
|
|
+++ bind-9.9.3rc1/bin/named-sdb/Makefile.in 2013-04-16 15:21:22.287944329 +0200
|
|
|
|
@@ -32,10 +32,10 @@ top_srcdir = @top_srcdir@
|
2008-02-19 10:20:49 +00:00
|
|
|
#
|
|
|
|
# Add database drivers here.
|
|
|
|
#
|
|
|
|
-DBDRIVER_OBJS =
|
|
|
|
-DBDRIVER_SRCS =
|
|
|
|
+DBDRIVER_OBJS = ldapdb.@O@ pgsqldb.@O@ dirdb.@O@
|
|
|
|
+DBDRIVER_SRCS = ldapdb.c pgsqldb.c dirdb.c
|
|
|
|
DBDRIVER_INCLUDES =
|
|
|
|
-DBDRIVER_LIBS =
|
|
|
|
+DBDRIVER_LIBS = -lldap -llber -lpq
|
|
|
|
|
|
|
|
DLZ_DRIVER_DIR = ${top_srcdir}/contrib/dlz/drivers
|
|
|
|
|
2013-04-16 13:39:46 +00:00
|
|
|
@@ -81,7 +81,7 @@ NOSYMLIBS = ${LWRESLIBS} ${DNSLIBS} ${BI
|
2008-02-19 10:20:49 +00:00
|
|
|
|
|
|
|
SUBDIRS = unix
|
|
|
|
|
|
|
|
-TARGETS = named@EXEEXT@ lwresd@EXEEXT@
|
|
|
|
+TARGETS = named-sdb@EXEEXT@
|
|
|
|
|
|
|
|
OBJS = builtin.@O@ client.@O@ config.@O@ control.@O@ \
|
|
|
|
controlconf.@O@ interfacemgr.@O@ \
|
2013-04-16 13:39:46 +00:00
|
|
|
@@ -139,7 +139,7 @@ config.@O@: config.c bind.keys.h
|
2009-09-15 12:56:46 +00:00
|
|
|
-DNS_SYSCONFDIR=\"${sysconfdir}\" \
|
2008-02-19 10:20:49 +00:00
|
|
|
-c ${srcdir}/config.c
|
|
|
|
|
|
|
|
-named@EXEEXT@: ${OBJS} ${UOBJS} ${DEPLIBS}
|
|
|
|
+named-sdb@EXEEXT@: ${OBJS} ${UOBJS} ${DEPLIBS}
|
2009-09-16 11:09:13 +00:00
|
|
|
export MAKE_SYMTABLE="yes"; \
|
|
|
|
export BASEOBJS="${OBJS} ${UOBJS}"; \
|
|
|
|
${FINALBUILDCMD}
|
2013-04-16 13:39:46 +00:00
|
|
|
@@ -170,15 +170,9 @@ statschannel.@O@: bind9.xsl.h bind9.ver3
|
2008-02-19 10:20:49 +00:00
|
|
|
|
|
|
|
installdirs:
|
|
|
|
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
|
|
|
|
- $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man5
|
|
|
|
- $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
|
|
|
|
|
|
|
|
-install:: named@EXEEXT@ lwresd@EXEEXT@ installdirs
|
|
|
|
- ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named@EXEEXT@ ${DESTDIR}${sbindir}
|
|
|
|
- (cd ${DESTDIR}${sbindir}; rm -f lwresd@EXEEXT@; @LN@ named@EXEEXT@ lwresd@EXEEXT@)
|
|
|
|
- ${INSTALL_DATA} ${srcdir}/named.8 ${DESTDIR}${mandir}/man8
|
|
|
|
- ${INSTALL_DATA} ${srcdir}/lwresd.8 ${DESTDIR}${mandir}/man8
|
|
|
|
- ${INSTALL_DATA} ${srcdir}/named.conf.5 ${DESTDIR}${mandir}/man5
|
|
|
|
+install:: named-sdb@EXEEXT@ installdirs
|
|
|
|
+ ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-sdb@EXEEXT@ ${DESTDIR}${sbindir}
|
|
|
|
|
|
|
|
@DLZ_DRIVER_RULES@
|
2013-04-16 13:39:46 +00:00
|
|
|
|
|
|
|
diff -up bind-9.9.3rc1/configure.in.sdb bind-9.9.3rc1/configure.in
|
|
|
|
--- bind-9.9.3rc1/configure.in.sdb 2013-04-16 15:21:22.208944499 +0200
|
|
|
|
+++ bind-9.9.3rc1/configure.in 2013-04-16 15:21:19.395950103 +0200
|
|
|
|
@@ -3651,12 +3651,15 @@ AC_CONFIG_FILES([
|
2011-02-21 16:12:57 +00:00
|
|
|
bin/dnssec/Makefile
|
2009-09-15 12:56:46 +00:00
|
|
|
bin/named/Makefile
|
|
|
|
bin/named/unix/Makefile
|
|
|
|
+ bin/named-sdb/Makefile
|
|
|
|
+ bin/named-sdb/unix/Makefile
|
|
|
|
bin/nsupdate/Makefile
|
2009-11-03 11:06:16 +00:00
|
|
|
bin/pkcs11/Makefile
|
2012-10-11 11:34:19 +00:00
|
|
|
bin/python/Makefile
|
|
|
|
bin/python/dnssec-checkds.py
|
2013-04-16 13:39:46 +00:00
|
|
|
bin/python/dnssec-coverage.py
|
2011-02-21 16:12:57 +00:00
|
|
|
bin/rndc/Makefile
|
|
|
|
+ bin/sdb_tools/Makefile
|
|
|
|
bin/tests/Makefile
|
|
|
|
bin/tests/atomic/Makefile
|
|
|
|
bin/tests/db/Makefile
|