Adam Tkac 5ea70d
--- bind-9.4.0/configure.in.sdb	2007-03-06 12:59:32.000000000 +0100
Adam Tkac 5ea70d
+++ bind-9.4.0/configure.in	2007-03-06 12:59:32.000000000 +0100
Adam Tkac 5ea70d
@@ -2457,6 +2457,8 @@
jvdias 18d1e1
 	bin/check/Makefile
jvdias 18d1e1
 	bin/named/Makefile
jvdias 18d1e1
 	bin/named/unix/Makefile
jvdias 18d1e1
+	bin/named_sdb/Makefile
jvdias 18d1e1
+	bin/named_sdb/unix/Makefile
jvdias 18d1e1
 	bin/rndc/Makefile
jvdias 18d1e1
 	bin/rndc/unix/Makefile
jvdias 18d1e1
 	bin/dig/Makefile
Adam Tkac 5ea70d
@@ -2478,6 +2480,7 @@
jvdias 18d1e1
 	bin/tests/system/tkey/Makefile
jvdias 18d1e1
 	bin/tests/headerdep_test.sh
jvdias 18d1e1
 	bin/dnssec/Makefile
jvdias 18d1e1
+	bin/sdb_tools/Makefile
jvdias 18d1e1
 	doc/Makefile
jvdias 18d1e1
 	doc/arm/Makefile
Adam Tkac 5ea70d
 	doc/misc/Makefile
Adam Tkac 5ea70d
--- bind-9.4.0/bin/Makefile.in.sdb	2004-03-05 05:57:10.000000000 +0100
Adam Tkac 5ea70d
+++ bind-9.4.0/bin/Makefile.in	2007-03-06 12:59:32.000000000 +0100
Adam Tkac 5ea70d
@@ -19,7 +19,7 @@
Adam Tkac 5ea70d
 VPATH =		@srcdir@
Adam Tkac 5ea70d
 top_srcdir =	@top_srcdir@
Adam Tkac 5ea70d
 
Adam Tkac 5ea70d
-SUBDIRS =	named rndc dig dnssec tests nsupdate check
Adam Tkac 5ea70d
+SUBDIRS =	named named_sdb rndc dig dnssec tests nsupdate check sdb_tools
Adam Tkac 5ea70d
 TARGETS =
Adam Tkac 5ea70d
 
Adam Tkac 5ea70d
 @BIND9_MAKE_RULES@
Adam Tkac 5ea70d
--- bind-9.4.0/bin/named_sdb/main.c.sdb	2006-11-10 19:51:14.000000000 +0100
Adam Tkac 5ea70d
+++ bind-9.4.0/bin/named_sdb/main.c	2007-03-06 13:43:31.000000000 +0100
Adam Tkac 5ea70d
@@ -72,6 +72,9 @@
jvdias 18d1e1
  * Include header files for database drivers here.
jvdias 18d1e1
  */
jvdias 18d1e1
 /* #include "xxdb.h" */
jvdias 18d1e1
+#include "ldapdb.h"
jvdias 18d1e1
+#include "pgsqldb.h"
jvdias 18d1e1
+#include "dirdb.h"
jvdias 18d1e1
 
Adam Tkac 5ea70d
 /*
Adam Tkac 5ea70d
  * Include DLZ drivers if appropriate.
Adam Tkac 5ea70d
@@ -639,6 +642,10 @@
Adam Tkac 5ea70d
 		ns_main_earlyfatal("isc_app_start() failed: %s",
Adam Tkac 5ea70d
 				   isc_result_totext(result));
jvdias 18d1e1
 
jvdias 18d1e1
+	ldapdb_clear();
jvdias 18d1e1
+	pgsqldb_clear();
jvdias 18d1e1
+	dirdb_clear();
jvdias 18d1e1
+
jvdias 18d1e1
 	isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
Adam Tkac 5ea70d
 		      ISC_LOG_NOTICE, "starting BIND %s%s", ns_g_version,
Adam Tkac 5ea70d
 		      saved_command_line);
Adam Tkac 5ea70d
@@ -692,6 +699,57 @@
Adam Tkac 5ea70d
 				   isc_result_totext(result));
Adam Tkac 5ea70d
 #endif
Adam Tkac 5ea70d
 
Adam Tkac 5ea70d
+        result = ldapdb_init();
Adam Tkac 5ea70d
+        if (result != ISC_R_SUCCESS)
Adam Tkac 5ea70d
+        {
Adam Tkac 5ea70d
+            isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
Adam Tkac 5ea70d
+                          ISC_LOG_ERROR, 
Adam Tkac 5ea70d
+                          "SDB ldap module initialisation failed: %s.",
Adam Tkac 5ea70d
+                          isc_result_totext(result)
Adam Tkac 5ea70d
+                );
Adam Tkac 5ea70d
+            isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
Adam Tkac 5ea70d
+                          ISC_LOG_ERROR, 
Adam Tkac 5ea70d
+                          "SDB ldap zone database will be unavailable."
Adam Tkac 5ea70d
+                );
Adam Tkac 5ea70d
+        }else
Adam Tkac 5ea70d
+            isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
Adam Tkac 5ea70d
+                          ISC_LOG_NOTICE, "SDB ldap zone database module loaded."
Adam Tkac 5ea70d
+                         );
Adam Tkac 5ea70d
+
Adam Tkac 5ea70d
+        result = pgsqldb_init();
Adam Tkac 5ea70d
+        if (result != ISC_R_SUCCESS)
Adam Tkac 5ea70d
+        {
Adam Tkac 5ea70d
+            isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
Adam Tkac 5ea70d
+                          ISC_LOG_ERROR, 
Adam Tkac 5ea70d
+                          "SDB pgsql module initialisation failed: %s.",
Adam Tkac 5ea70d
+                          isc_result_totext(result)
Adam Tkac 5ea70d
+                );
Adam Tkac 5ea70d
+            isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
Adam Tkac 5ea70d
+                          ISC_LOG_ERROR, 
Adam Tkac 5ea70d
+                          "SDB pgsql zone database will be unavailable."
Adam Tkac 5ea70d
+                );
Adam Tkac 5ea70d
+        }else
Adam Tkac 5ea70d
+            isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
Adam Tkac 5ea70d
+                          ISC_LOG_NOTICE, "SDB postgreSQL DB zone database module loaded."
Adam Tkac 5ea70d
+                         );
Adam Tkac 5ea70d
+
Adam Tkac 5ea70d
+        result = dirdb_init();
Adam Tkac 5ea70d
+        if (result != ISC_R_SUCCESS)
Adam Tkac 5ea70d
+        {
Adam Tkac 5ea70d
+            isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
Adam Tkac 5ea70d
+                          ISC_LOG_ERROR, 
Adam Tkac 5ea70d
+                          "SDB directory DB module initialisation failed: %s.",
Adam Tkac 5ea70d
+                          isc_result_totext(result)
Adam Tkac 5ea70d
+                );
Adam Tkac 5ea70d
+            isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
Adam Tkac 5ea70d
+                          ISC_LOG_ERROR, 
Adam Tkac 5ea70d
+                          "SDB directory DB zone database will be unavailable."
Adam Tkac 5ea70d
+                );
Adam Tkac 5ea70d
+        }else
Adam Tkac 5ea70d
+            isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
Adam Tkac 5ea70d
+                          ISC_LOG_NOTICE, "SDB directory DB zone database module loaded."
Adam Tkac 5ea70d
+                         );
Adam Tkac 5ea70d
+
Adam Tkac 5ea70d
 	ns_server_create(ns_g_mctx, &ns_g_server);
Adam Tkac 5ea70d
 }
Adam Tkac 5ea70d
 
Adam Tkac 5ea70d
@@ -717,6 +775,10 @@
Adam Tkac 5ea70d
 
Adam Tkac 5ea70d
 	dns_name_destroy();
Adam Tkac 5ea70d
 
Adam Tkac 5ea70d
+        ldapdb_clear();
Adam Tkac 5ea70d
+        pgsqldb_clear();
Adam Tkac 5ea70d
+        dirdb_clear();
Adam Tkac 5ea70d
+
Adam Tkac 5ea70d
 	isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
jvdias 18d1e1
 		      ISC_LOG_NOTICE, "exiting");
jvdias 18d1e1
 	ns_log_shutdown();
Adam Tkac 5ea70d
--- bind-9.4.0/bin/named_sdb/Makefile.in.sdb	2007-03-06 12:59:32.000000000 +0100
Adam Tkac 5ea70d
+++ bind-9.4.0/bin/named_sdb/Makefile.in	2007-03-06 12:59:32.000000000 +0100
jvdias 18d1e1
@@ -26,10 +26,10 @@
jvdias 18d1e1
 #
jvdias 18d1e1
 # Add database drivers here.
jvdias 18d1e1
 #
jvdias 18d1e1
-DBDRIVER_OBJS =
jvdias 18d1e1
-DBDRIVER_SRCS =
jvdias 18d1e1
+DBDRIVER_OBJS =      ldapdb.o     pgsqldb.o    dirdb.o
jvdias 18d1e1
+DBDRIVER_SRCS =      ldapdb.c     pgsqldb.c    dirdb.c
jvdias 18d1e1
 DBDRIVER_INCLUDES =
jvdias 18d1e1
-DBDRIVER_LIBS =
jvdias 18d1e1
+DBDRIVER_LIBS =      -lldap -llber  -lpq
jvdias 18d1e1
 
Adam Tkac 5ea70d
 DLZ_DRIVER_DIR =	${top_srcdir}/contrib/dlz/drivers
Adam Tkac 5ea70d
 
Adam Tkac 5ea70d
@@ -70,7 +70,7 @@
jvdias 18d1e1
 
jvdias 18d1e1
 SUBDIRS =	unix
jvdias 18d1e1
 
jvdias 18d1e1
-TARGETS =	named@EXEEXT@ lwresd@EXEEXT@
jvdias 18d1e1
+TARGETS =	named_sdb@EXEEXT@
jvdias 18d1e1
 
Adam Tkac 5ea70d
 OBJS =		builtin.o client.o config.o control.o \
jvdias 18d1e1
 		controlconf.o interfacemgr.o \
Adam Tkac 5ea70d
@@ -120,14 +120,10 @@
jvdias 18d1e1
 		-DNS_LOCALSTATEDIR=\"${localstatedir}\" \
jvdias 18d1e1
 		-c ${srcdir}/config.c
jvdias 18d1e1
 
jvdias 18d1e1
-named@EXEEXT@: ${OBJS} ${UOBJS} ${DEPLIBS}
jvdias 18d1e1
+named_sdb@EXEEXT@: ${OBJS} ${UOBJS} ${DEPLIBS}
jvdias 18d1e1
 	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
jvdias 18d1e1
 	${OBJS} ${UOBJS} ${LIBS}
jvdias 18d1e1
 
jvdias 18d1e1
-lwresd@EXEEXT@: named@EXEEXT@
jvdias 18d1e1
-	rm -f lwresd@EXEEXT@
jvdias 18d1e1
-	@LN@ named@EXEEXT@ lwresd@EXEEXT@
jvdias 18d1e1
-
jvdias 18d1e1
 doc man:: ${MANOBJS}
jvdias 18d1e1
 
jvdias 18d1e1
 docclean manclean maintainer-clean::
Adam Tkac 5ea70d
@@ -138,14 +134,9 @@
jvdias 18d1e1
 
jvdias 18d1e1
 installdirs:
jvdias 18d1e1
 	$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
jvdias 18d1e1
-	$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man5
jvdias 18d1e1
-	$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
jvdias 18d1e1
 
jvdias 18d1e1
-install:: named@EXEEXT@ lwresd@EXEEXT@ installdirs
jvdias 18d1e1
-	${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named@EXEEXT@ ${DESTDIR}${sbindir}
jvdias 18d1e1
-	(cd ${DESTDIR}${sbindir}; rm -f lwresd@EXEEXT@; @LN@ named@EXEEXT@ lwresd@EXEEXT@)
jvdias 18d1e1
-	${INSTALL_DATA} ${srcdir}/named.8 ${DESTDIR}${mandir}/man8
jvdias 18d1e1
-	${INSTALL_DATA} ${srcdir}/lwresd.8 ${DESTDIR}${mandir}/man8
jvdias 18d1e1
-	${INSTALL_DATA} ${srcdir}/named.conf.5 ${DESTDIR}${mandir}/man5
jvdias 18d1e1
+install:: named_sdb@EXEEXT@ installdirs
jvdias 18d1e1
+	${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named_sdb@EXEEXT@ ${DESTDIR}${sbindir}
jvdias 18d1e1
+
jvdias 18d1e1
 
Adam Tkac 5ea70d
 @DLZ_DRIVER_RULES@