summaryrefslogtreecommitdiffstats
path: root/bind-9.3.1rc1-sdb.patch
blob: 1ea25795f3cc2bfc02d6f8d6ffae4fc586b19972 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
--- 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
@@ -2457,6 +2457,8 @@
 	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
@@ -2478,6 +2480,7 @@
 	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
--- 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
+SUBDIRS =	named named_sdb rndc dig dnssec tests nsupdate check sdb_tools
 TARGETS =
 
 @BIND9_MAKE_RULES@
--- bind-9.4.0/bin/named_sdb/main.c.sdb	2006-11-10 19:51:14.000000000 +0100
+++ bind-9.4.0/bin/named_sdb/main.c	2007-03-06 13:43:31.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.
@@ -639,6 +642,10 @@
 		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);
@@ -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();
+
 	isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
 		      ISC_LOG_NOTICE, "exiting");
 	ns_log_shutdown();
--- bind-9.4.0/bin/named_sdb/Makefile.in.sdb	2007-03-06 12:59:32.000000000 +0100
+++ bind-9.4.0/bin/named_sdb/Makefile.in	2007-03-06 12:59:32.000000000 +0100
@@ -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
 
 DLZ_DRIVER_DIR =	${top_srcdir}/contrib/dlz/drivers
 
@@ -70,7 +70,7 @@
 
 SUBDIRS =	unix
 
-TARGETS =	named@EXEEXT@ lwresd@EXEEXT@
+TARGETS =	named_sdb@EXEEXT@
 
 OBJS =		builtin.o client.o config.o control.o \
 		controlconf.o interfacemgr.o \
@@ -120,14 +120,10 @@
 		-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}
 
-lwresd@EXEEXT@: named@EXEEXT@
-	rm -f lwresd@EXEEXT@
-	@LN@ named@EXEEXT@ lwresd@EXEEXT@
-
 doc man:: ${MANOBJS}
 
 docclean manclean maintainer-clean::
@@ -138,14 +134,9 @@
 
 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@