Search
j0ke.net Open Build Service
>
Projects
>
server:dns
>
bind
> bind-9.5-sdb.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File bind-9.5-sdb.patch of Package bind
diff -up bind-9.5.0b2/bin/named-sdb/main.c.sdb bind-9.5.0b2/bin/named/main-sdb.c --- bind-9.5.0b2/bin/named-sdb/main.c.sdb 2008-02-11 17:32:43.000000000 +0100 +++ bind-9.5.0b2/bin/named-sdb/main.c 2008-02-11 17:32:43.000000000 +0100 @@ -72,6 +72,9 @@ * Include header files for database drivers here. */ /* #include "xxdb.h" */ +#include "ldapdb.h" +#include "pgsqldb.h" +#include "dirdb.h" /* * Include DLZ drivers if appropriate. @@ -641,6 +644,10 @@ setup(void) { 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, ISC_LOG_NOTICE, "starting BIND %s%s", ns_g_version, saved_command_line); @@ -702,6 +709,57 @@ setup(void) { 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); } @@ -727,6 +785,10 @@ cleanup(void) { 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(); diff -up bind-9.5.0b2/configure.in.sdb bind-9.5.0b2/configure.in --- bind-9.5.0b2/configure.in.sdb 2008-02-14 14:14:55.000000000 +0100 +++ bind-9.5.0b2/configure.in 2008-02-14 14:15:34.000000000 +0100 @@ -2761,6 +2761,8 @@ AC_CONFIG_FILES([ bin/check/Makefile bin/named/Makefile bin/named/unix/Makefile + bin/named-sdb/Makefile + bin/named-sdb/unix/Makefile bin/rndc/Makefile bin/rndc/unix/Makefile bin/dig/Makefile @@ -2782,6 +2784,7 @@ AC_CONFIG_FILES([ bin/tests/system/tkey/Makefile bin/tests/headerdep_test.sh bin/dnssec/Makefile + bin/sdb_tools/Makefile doc/Makefile doc/arm/Makefile doc/misc/Makefile diff -up bind-9.5.0b2/bin/named-sdb/Makefile.in.sdb bind-9.5.0b2/bin/named-sdb/Makefile.in --- bind-9.5.0b2/bin/named-sdb/Makefile.in.sdb 2008-02-14 14:16:10.000000000 +0100 +++ bind-9.5.0b2/bin/named-sdb/Makefile.in 2008-02-14 14:18:45.000000000 +0100 @@ -26,10 +26,10 @@ top_srcdir = @top_srcdir@ # # 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 @@ -70,7 +70,7 @@ LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9L SUBDIRS = unix -TARGETS = named@EXEEXT@ lwresd@EXEEXT@ +TARGETS = named-sdb@EXEEXT@ OBJS = builtin.@O@ client.@O@ config.@O@ control.@O@ \ controlconf.@O@ interfacemgr.@O@ \ @@ -118,7 +118,7 @@ config.@O@: config.c -DNS_LOCALSTATEDIR=\"${localstatedir}\" \ -c ${srcdir}/config.c -named@EXEEXT@: ${OBJS} ${UOBJS} ${DEPLIBS} +named-sdb@EXEEXT@: ${OBJS} ${UOBJS} ${DEPLIBS} ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ ${OBJS} ${UOBJS} ${LIBS} @@ -142,14 +142,8 @@ server.o: bind9.xsl.h 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@ diff -up bind-9.5.0b2/bin/Makefile.in.sdb bind-9.5.0b2/bin/Makefile.in --- bind-9.5.0b2/bin/Makefile.in.sdb 2008-02-14 14:15:42.000000000 +0100 +++ bind-9.5.0b2/bin/Makefile.in 2008-02-14 14:15:55.000000000 +0100 @@ -19,7 +19,7 @@ srcdir = @srcdir@ VPATH = @srcdir@ top_srcdir = @top_srcdir@ -SUBDIRS = named rndc dig dnssec tests nsupdate check +SUBDIRS = named named-sdb rndc dig dnssec tests nsupdate check sdb_tools TARGETS = @BIND9_MAKE_RULES@ diff -up bind-9.5.0b2/bin/named/Makefile.in.sdb bind-9.5.0b2/bin/named/Makefile.in --- bind-9.5.0b2/bin/named/Makefile.in.sdb 2008-02-14 14:19:39.000000000 +0100 +++ bind-9.5.0b2/bin/named/Makefile.in 2008-02-14 14:20:18.000000000 +0100 @@ -43,7 +43,7 @@ CINCLUDES = -I${srcdir}/include -I${srcd ${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} ${ISC_INCLUDES} \ ${DLZDRIVER_INCLUDES} ${DBDRIVER_INCLUDES} -CDEFINES = @USE_DLZ@ +CDEFINES = CWARNINGS = @@ -66,7 +66,7 @@ DEPLIBS = ${LWRESDEPLIBS} ${DNSDEPLIBS} LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} \ ${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} \ - ${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBS@ + @LIBS@ SUBDIRS = unix @@ -79,8 +79,7 @@ OBJS = builtin.@O@ client.@O@ config.@O 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@ UOBJS = unix/os.@O@ @@ -91,8 +90,7 @@ SRCS = builtin.c client.c config.c cont 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 @@ -151,5 +149,3 @@ install:: named@EXEEXT@ lwresd@EXEEXT@ i ${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 - -@DLZ_DRIVER_RULES@