jvdias 18d1e1
--- bind-9.3.1rc1/configure.in.sdb	2005-02-16 22:25:08.000000000 -0500
jvdias 18d1e1
+++ bind-9.3.1rc1/configure.in	2005-02-16 22:25:08.000000000 -0500
jvdias 18d1e1
@@ -2194,6 +2194,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
jvdias 18d1e1
@@ -2215,6 +2217,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
jvdias 18d1e1
 	doc/arm/nominum-docbook-html.dsl
jvdias 18d1e1
--- bind-9.3.1rc1/bin/named_sdb/main.c.sdb	2004-10-24 20:42:54.000000000 -0400
jvdias 18d1e1
+++ bind-9.3.1rc1/bin/named_sdb/main.c	2005-02-16 22:25:08.000000000 -0500
jvdias 18d1e1
@@ -71,6 +71,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
 
jvdias 18d1e1
 static isc_boolean_t	want_stats = ISC_FALSE;
jvdias 18d1e1
 static char		program_name[ISC_DIR_NAMEMAX] = "named";
jvdias 18d1e1
@@ -656,7 +659,57 @@
jvdias 18d1e1
 	 * Add calls to register sdb drivers here.
jvdias 18d1e1
 	 */
jvdias 18d1e1
 	/* xxdb_init(); */
jvdias 18d1e1
-
jvdias 18d1e1
+	result = ldapdb_init();
jvdias 18d1e1
+	if (result != ISC_R_SUCCESS)
jvdias 18d1e1
+	{
jvdias 18d1e1
+	    isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
jvdias 18d1e1
+			  ISC_LOG_ERROR, 
jvdias 18d1e1
+			  "SDB ldap module initialisation failed: %s.",
jvdias 18d1e1
+			  isc_result_totext(result)
jvdias 18d1e1
+		);
jvdias 18d1e1
+	    isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
jvdias 18d1e1
+			  ISC_LOG_ERROR, 
jvdias 18d1e1
+			  "SDB ldap zone database will be unavailable."
jvdias 18d1e1
+		);
jvdias 18d1e1
+	}else
jvdias 18d1e1
+	    isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
jvdias 18d1e1
+			  ISC_LOG_NOTICE, "SDB ldap zone database module loaded."
jvdias 18d1e1
+		         );
jvdias 18d1e1
+	
jvdias 18d1e1
+	result = pgsqldb_init();
jvdias 18d1e1
+	if (result != ISC_R_SUCCESS)
jvdias 18d1e1
+	{
jvdias 18d1e1
+	    isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
jvdias 18d1e1
+			  ISC_LOG_ERROR, 
jvdias 18d1e1
+			  "SDB pgsql module initialisation failed: %s.",
jvdias 18d1e1
+			  isc_result_totext(result)
jvdias 18d1e1
+		);
jvdias 18d1e1
+	    isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
jvdias 18d1e1
+			  ISC_LOG_ERROR, 
jvdias 18d1e1
+			  "SDB pgsql zone database will be unavailable."
jvdias 18d1e1
+		);
jvdias 18d1e1
+	}else
jvdias 18d1e1
+	    isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
jvdias 18d1e1
+			  ISC_LOG_NOTICE, "SDB postgreSQL DB zone database module loaded."
jvdias 18d1e1
+		         );
jvdias 18d1e1
+		
jvdias 18d1e1
+	result = dirdb_init();
jvdias 18d1e1
+	if (result != ISC_R_SUCCESS)
jvdias 18d1e1
+	{
jvdias 18d1e1
+	    isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
jvdias 18d1e1
+			  ISC_LOG_ERROR, 
jvdias 18d1e1
+			  "SDB directory DB module initialisation failed: %s.",
jvdias 18d1e1
+			  isc_result_totext(result)
jvdias 18d1e1
+		);
jvdias 18d1e1
+	    isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
jvdias 18d1e1
+			  ISC_LOG_ERROR, 
jvdias 18d1e1
+			  "SDB directory DB zone database will be unavailable."
jvdias 18d1e1
+		);
jvdias 18d1e1
+	}else
jvdias 18d1e1
+	    isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
jvdias 18d1e1
+			  ISC_LOG_NOTICE, "SDB directory DB zone database module loaded."
jvdias 18d1e1
+		         );
jvdias 18d1e1
+	       
jvdias 18d1e1
 	ns_server_create(ns_g_mctx, &ns_g_server);
jvdias 18d1e1
 }
jvdias 18d1e1
 
jvdias 18d1e1
@@ -673,6 +726,10 @@
jvdias 18d1e1
 	 */
jvdias 18d1e1
 	/* xxdb_clear(); */
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,
jvdias 18d1e1
 		      ISC_LOG_NOTICE, "exiting");
jvdias 18d1e1
 	ns_log_shutdown();
jvdias 18d1e1
--- bind-9.3.1rc1/bin/named_sdb/Makefile.in.sdb	2005-02-16 22:25:08.000000000 -0500
jvdias 18d1e1
+++ bind-9.3.1rc1/bin/named_sdb/Makefile.in	2005-02-16 22:25:08.000000000 -0500
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
 
jvdias 18d1e1
 CINCLUDES =	-I${srcdir}/include -I${srcdir}/unix/include \
jvdias 18d1e1
 		${LWRES_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES} \
jvdias 18d1e1
@@ -61,7 +61,7 @@
jvdias 18d1e1
 
jvdias 18d1e1
 SUBDIRS =	unix
jvdias 18d1e1
 
jvdias 18d1e1
-TARGETS =	named@EXEEXT@ lwresd@EXEEXT@
jvdias 18d1e1
+TARGETS =	named_sdb@EXEEXT@
jvdias 18d1e1
 
jvdias 18d1e1
 OBJS =		aclconf.o builtin.o client.o config.o control.o \
jvdias 18d1e1
 		controlconf.o interfacemgr.o \
jvdias 18d1e1
@@ -114,14 +114,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::
jvdias 18d1e1
@@ -132,13 +128,8 @@
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
 
jvdias 18d1e1
--- bind-9.3.1rc1/bin/Makefile.in.sdb	2004-03-06 05:21:10.000000000 -0500
jvdias 18d1e1
+++ bind-9.3.1rc1/bin/Makefile.in	2005-02-16 22:25:08.000000000 -0500
jvdias 18d1e1
@@ -19,7 +19,7 @@
jvdias 18d1e1
 VPATH =		@srcdir@
jvdias 18d1e1
 top_srcdir =	@top_srcdir@
jvdias 18d1e1
 
jvdias 18d1e1
-SUBDIRS =	named rndc dig dnssec tests nsupdate check
jvdias 18d1e1
+SUBDIRS =	named named_sdb rndc dig dnssec tests nsupdate check sdb_tools
jvdias 18d1e1
 TARGETS =
jvdias 18d1e1
 
jvdias 18d1e1
 @BIND9_MAKE_RULES@