2007-03-06 15:32:16 +00:00
|
|
|
--- bind-9.4.0/configure.in.sdb 2007-03-06 12:59:32.000000000 +0100
|
|
|
|
+++ bind-9.4.0/configure.in 2007-03-06 12:59:32.000000000 +0100
|
2007-07-20 11:31:19 +00:00
|
|
|
@@ -2478,6 +2478,7 @@
|
2005-02-17 06:39:15 +00:00
|
|
|
bin/tests/system/tkey/Makefile
|
|
|
|
bin/tests/headerdep_test.sh
|
|
|
|
bin/dnssec/Makefile
|
|
|
|
+ bin/sdb_tools/Makefile
|
|
|
|
doc/Makefile
|
|
|
|
doc/arm/Makefile
|
2007-03-06 15:32:16 +00:00
|
|
|
doc/misc/Makefile
|
|
|
|
--- bind-9.4.0/bin/Makefile.in.sdb 2004-03-05 05:57:10.000000000 +0100
|
|
|
|
+++ bind-9.4.0/bin/Makefile.in 2007-03-06 12:59:32.000000000 +0100
|
|
|
|
@@ -19,7 +19,7 @@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
|
|
|
|
-SUBDIRS = named rndc dig dnssec tests nsupdate check
|
2007-07-20 11:31:19 +00:00
|
|
|
+SUBDIRS = named rndc dig dnssec tests nsupdate check sdb_tools
|
2007-03-06 15:32:16 +00:00
|
|
|
TARGETS =
|
|
|
|
|
|
|
|
@BIND9_MAKE_RULES@
|
2007-07-20 11:31:19 +00:00
|
|
|
--- bind-9.4.0/bin/named/main.c.sdb 2006-11-10 19:51:14.000000000 +0100
|
|
|
|
+++ bind-9.4.0/bin/named/main.c 2007-03-06 13:43:31.000000000 +0100
|
2007-03-06 15:32:16 +00:00
|
|
|
@@ -72,6 +72,9 @@
|
2005-02-17 06:39:15 +00:00
|
|
|
* Include header files for database drivers here.
|
|
|
|
*/
|
|
|
|
/* #include "xxdb.h" */
|
|
|
|
+#include "ldapdb.h"
|
|
|
|
+#include "pgsqldb.h"
|
|
|
|
+#include "dirdb.h"
|
|
|
|
|
2007-03-06 15:32:16 +00:00
|
|
|
/*
|
|
|
|
* Include DLZ drivers if appropriate.
|
|
|
|
@@ -639,6 +642,10 @@
|
|
|
|
ns_main_earlyfatal("isc_app_start() failed: %s",
|
|
|
|
isc_result_totext(result));
|
2005-02-17 06:39:15 +00:00
|
|
|
|
|
|
|
+ ldapdb_clear();
|
|
|
|
+ pgsqldb_clear();
|
|
|
|
+ dirdb_clear();
|
2007-03-06 15:32:16 +00:00
|
|
|
+
|
|
|
|
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
|
ISC_LOG_NOTICE, "starting BIND %s%s", ns_g_version,
|
|
|
|
saved_command_line);
|
|
|
|
@@ -692,6 +699,57 @@
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -717,6 +775,10 @@
|
|
|
|
|
|
|
|
dns_name_destroy();
|
|
|
|
|
|
|
|
+ ldapdb_clear();
|
|
|
|
+ pgsqldb_clear();
|
|
|
|
+ dirdb_clear();
|
2005-02-17 06:39:15 +00:00
|
|
|
+
|
|
|
|
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
|
|
|
ISC_LOG_NOTICE, "exiting");
|
|
|
|
ns_log_shutdown();
|
2007-07-20 11:31:19 +00:00
|
|
|
--- bind-9.4.0/bin/named/Makefile.in.sdb 2007-03-06 12:59:32.000000000 +0100
|
|
|
|
+++ bind-9.4.0/bin/named/Makefile.in 2007-03-06 12:59:32.000000000 +0100
|
2005-02-17 06:39:15 +00:00
|
|
|
@@ -26,10 +26,10 @@
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
2007-03-06 15:32:16 +00:00
|
|
|
DLZ_DRIVER_DIR = ${top_srcdir}/contrib/dlz/drivers
|