[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#769138: unblock: dlz-ldap-enum/1.0.3-1



Package: release.debian.org
User: release.debian.org@packages.debian.org
UserTags: unblock


bind9 9.9.x changes the prototype of dlz_lookup

dlz-ldap-enum v1.0.3 supports the new function prototype:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769134

This problem wasn't visible before because of another bind9 bug, it
isn't putting dlz_dlopen.h under /usr/include/dns and so a convenience
copy was being used in builds of dlz-ldap-enum

Upstream fixes that other issue in 9.9.6.  The function prototype for
dlz_lookup remains constant throughout 9.9.x

The 1.0.3-1 update doesn't build yet as it is pending a solution for:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769117

but as soon as that is resolved and the header is provided, I will build
and upload dlz-ldap-enum 1.0.3-1 using the source package I have already
prepared.

The debdiff is attached.


cat dlz-ldap-enum.debdiff | filterdiff --exclude='*/aclocal.m4'
--exclude='*/config.sub' --exclude='*/configure' --exclude='*/depcomp'
--exclude='*/ltmain.sh' --exclude='*/m4/*' --exclude='*/Makefile.in' >
dlz-ldap-enum-short.debdiff



diff -Nru dlz-ldap-enum-1.0.2/aclocal.m4 dlz-ldap-enum-1.0.3/aclocal.m4
diff -Nru dlz-ldap-enum-1.0.2/bind98_dlz_dlopen.h dlz-ldap-enum-1.0.3/bind98_dlz_dlopen.h
--- dlz-ldap-enum-1.0.2/bind98_dlz_dlopen.h	1970-01-01 01:00:00.000000000 +0100
+++ dlz-ldap-enum-1.0.3/bind98_dlz_dlopen.h	2014-11-11 17:29:34.000000000 +0100
@@ -0,0 +1,160 @@
+/*
+ * Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: dlz_dlopen.h,v 1.2.2.2 2011-03-17 09:41:07 fdupont Exp $ */
+
+/*! \file dns/dlz_open.h */
+
+#ifndef DLZ_DLOPEN_H
+#define DLZ_DLOPEN_H
+
+#include <dns/sdlz.h>
+
+ISC_LANG_BEGINDECLS
+
+/*
+ * This header provides a minimal set of defines and typedefs needed
+ * for the entry points of an external DLZ module for bind9.
+ */
+
+#define DLZ_DLOPEN_VERSION 1
+
+/*
+ * dlz_dlopen_version() is required for all DLZ external drivers. It
+ * should return DLZ_DLOPEN_VERSION
+ */
+typedef int dlz_dlopen_version_t (unsigned int *flags);
+
+/*
+ * dlz_dlopen_create() is required for all DLZ external drivers.
+ */
+typedef isc_result_t dlz_dlopen_create_t (const char *dlzname,
+					  unsigned int argc,
+					  char *argv[],
+					  void **dbdata,
+					  ...);
+
+/*
+ * dlz_dlopen_destroy() is optional, and will be called when the
+ * driver is unloaded if supplied
+ */
+typedef void dlz_dlopen_destroy_t (void *dbdata);
+
+/*
+ * dlz_dlopen_findzonedb() is required for all DLZ external drivers
+ */
+typedef isc_result_t dlz_dlopen_findzonedb_t (void *dbdata,
+					      const char *name);
+
+/*
+ * dlz_dlopen_lookup() is required for all DLZ external drivers
+ */
+typedef isc_result_t dlz_dlopen_lookup_t (const char *zone,
+					  const char *name,
+					  void *dbdata,
+					  dns_sdlzlookup_t *lookup);
+
+/*
+ * dlz_dlopen_authority is optional() if dlz_dlopen_lookup()
+ * supplies authority information for the dns record
+ */
+typedef isc_result_t dlz_dlopen_authority_t (const char *zone,
+					     void *dbdata,
+					     dns_sdlzlookup_t *lookup);
+
+/*
+ * dlz_dlopen_allowzonexfr() is optional, and should be supplied if
+ * you want to support zone transfers
+ */
+typedef isc_result_t dlz_dlopen_allowzonexfr_t (void *dbdata,
+						const char *name,
+						const char *client);
+
+/*
+ * dlz_dlopen_allnodes() is optional, but must be supplied if supply a
+ * dlz_dlopen_allowzonexfr() function
+ */
+typedef isc_result_t dlz_dlopen_allnodes_t (const char *zone,
+					    void *dbdata,
+					    dns_sdlzallnodes_t *allnodes);
+
+/*
+ * dlz_dlopen_newversion() is optional. It should be supplied if you
+ * want to support dynamic updates.
+ */
+typedef isc_result_t dlz_dlopen_newversion_t (const char *zone,
+					      void *dbdata,
+					      void **versionp);
+
+/*
+ * dlz_closeversion() is optional, but must be supplied if you supply
+ * a dlz_newversion() function
+ */
+typedef void dlz_dlopen_closeversion_t (const char *zone,
+					isc_boolean_t commit,
+					void *dbdata,
+					void **versionp);
+
+/*
+ * dlz_dlopen_configure() is optional, but must be supplied if you
+ * want to support dynamic updates
+ */
+typedef isc_result_t dlz_dlopen_configure_t (dns_view_t *view,
+					     void *dbdata);
+
+/*
+ * dlz_dlopen_ssumatch() is optional, but must be supplied if you want
+ * to support dynamic updates
+ */
+typedef isc_boolean_t dlz_dlopen_ssumatch_t (const char *signer,
+					     const char *name,
+					     const char *tcpaddr,
+					     const char *type,
+					     const char *key,
+					     isc_uint32_t keydatalen,
+					     unsigned char *keydata,
+					     void *dbdata);
+
+/*
+ * dlz_dlopen_addrdataset() is optional, but must be supplied if you
+ * want to support dynamic updates
+ */
+typedef isc_result_t dlz_dlopen_addrdataset_t (const char *name,
+					       const char *rdatastr,
+					       void *dbdata,
+					       void *version);
+
+/*
+ * dlz_dlopen_subrdataset() is optional, but must be supplied if you
+ * want to support dynamic updates
+ */
+typedef isc_result_t dlz_dlopen_subrdataset_t (const char *name,
+					       const char *rdatastr,
+					       void *dbdata,
+					       void *version);
+
+/*
+ * dlz_dlopen_delrdataset() is optional, but must be supplied if you
+ * want to support dynamic updates
+ */
+typedef isc_result_t dlz_dlopen_delrdataset_t (const char *name,
+					       const char *type,
+					       void *dbdata,
+					       void *version);
+
+ISC_LANG_ENDDECLS
+
+#endif
diff -Nru dlz-ldap-enum-1.0.2/config.h.in dlz-ldap-enum-1.0.3/config.h.in
--- dlz-ldap-enum-1.0.2/config.h.in	2012-05-17 23:42:59.000000000 +0200
+++ dlz-ldap-enum-1.0.3/config.h.in	2014-11-11 17:30:58.000000000 +0100
@@ -1,5 +1,8 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
+/* Indicates we are compiling for bind9 9.9 or later */
+#undef BIND_9_9
+
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
diff -Nru dlz-ldap-enum-1.0.2/config.sub dlz-ldap-enum-1.0.3/config.sub
diff -Nru dlz-ldap-enum-1.0.2/configure dlz-ldap-enum-1.0.3/configure
diff -Nru dlz-ldap-enum-1.0.2/configure.ac dlz-ldap-enum-1.0.3/configure.ac
--- dlz-ldap-enum-1.0.2/configure.ac	2012-05-17 23:41:39.000000000 +0200
+++ dlz-ldap-enum-1.0.3/configure.ac	2014-11-11 17:29:34.000000000 +0100
@@ -1,10 +1,10 @@
 dnl    dlz-ldap-enum: bind9 DLZ module for using an LDAP database to answer
 dnl                   ENUM queries over DNS
-dnl    Copyright (C) 2012 Daniel Pocock
+dnl    Copyright (C) 2012-2014 Daniel Pocock
 dnl
 dnl    Please see the COPYING file for license terms
 
-AC_INIT(dlz-ldap-enum,1.0.2)
+AC_INIT(dlz-ldap-enum,1.0.3)
 AC_CONFIG_SRCDIR(dlz_ldap_enum_driver.c)
 AM_INIT_AUTOMAKE
 
@@ -19,6 +19,11 @@
 
 AC_PROG_LIBTOOL
 
+AC_ARG_ENABLE(bind99,
+[  --enable-bind99         Enable building for bind9 9.9.x and later],
+   [AC_DEFINE([BIND_9_9], , [Indicates we are compiling for bind9 9.9 or later])],
+   [])
+
 AC_OUTPUT(Makefile)
 
 
diff -Nru dlz-ldap-enum-1.0.2/debian/changelog dlz-ldap-enum-1.0.3/debian/changelog
--- dlz-ldap-enum-1.0.2/debian/changelog	2014-09-14 10:27:58.000000000 +0200
+++ dlz-ldap-enum-1.0.3/debian/changelog	2014-11-11 17:47:04.000000000 +0100
@@ -1,3 +1,10 @@
+dlz-ldap-enum (1.0.3-1) unstable; urgency=medium
+
+  * New upstream release.
+  * dlz_lookup function updated for bind9 9.9.x. (Closes: #769134)
+
+ -- Daniel Pocock <daniel@pocock.pro>  Tue, 11 Nov 2014 17:38:11 +0100
+
 dlz-ldap-enum (1.0.2-2) unstable; urgency=low
 
   * Update maintainer and VCS details.
diff -Nru dlz-ldap-enum-1.0.2/debian/rules dlz-ldap-enum-1.0.3/debian/rules
--- dlz-ldap-enum-1.0.2/debian/rules	2014-10-26 07:06:43.000000000 +0100
+++ dlz-ldap-enum-1.0.3/debian/rules	2014-11-11 17:37:10.000000000 +0100
@@ -11,10 +11,7 @@
 
 # Add here any variable or target overrides you need.
 
-DLZ_DLOPEN_H=/usr/include/dns/dlz_dlopen.h
-ifeq ("$(readlink $(DLZ_DLOPEN_H))","")
-CPPFLAGS:="-DUSE_COPIED_DLZ_DLOPEN_H"
-endif
+DEB_CONFIGURE_EXTRA_FLAGS = --enable-bind99
 
 binary-fixup/dlz-ldap-enum::
 	sed -i "/dependency_libs/ s/'.*'/''/" `find debian/dlz-ldap-enum -name '*.la'`
diff -Nru dlz-ldap-enum-1.0.2/depcomp dlz-ldap-enum-1.0.3/depcomp
diff -Nru dlz-ldap-enum-1.0.2/dlz_dlopen.h dlz-ldap-enum-1.0.3/dlz_dlopen.h
--- dlz-ldap-enum-1.0.2/dlz_dlopen.h	2012-05-17 16:36:17.000000000 +0200
+++ dlz-ldap-enum-1.0.3/dlz_dlopen.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,160 +0,0 @@
-/*
- * Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: dlz_dlopen.h,v 1.2.2.2 2011-03-17 09:41:07 fdupont Exp $ */
-
-/*! \file dns/dlz_open.h */
-
-#ifndef DLZ_DLOPEN_H
-#define DLZ_DLOPEN_H
-
-#include <dns/sdlz.h>
-
-ISC_LANG_BEGINDECLS
-
-/*
- * This header provides a minimal set of defines and typedefs needed
- * for the entry points of an external DLZ module for bind9.
- */
-
-#define DLZ_DLOPEN_VERSION 1
-
-/*
- * dlz_dlopen_version() is required for all DLZ external drivers. It
- * should return DLZ_DLOPEN_VERSION
- */
-typedef int dlz_dlopen_version_t (unsigned int *flags);
-
-/*
- * dlz_dlopen_create() is required for all DLZ external drivers.
- */
-typedef isc_result_t dlz_dlopen_create_t (const char *dlzname,
-					  unsigned int argc,
-					  char *argv[],
-					  void **dbdata,
-					  ...);
-
-/*
- * dlz_dlopen_destroy() is optional, and will be called when the
- * driver is unloaded if supplied
- */
-typedef void dlz_dlopen_destroy_t (void *dbdata);
-
-/*
- * dlz_dlopen_findzonedb() is required for all DLZ external drivers
- */
-typedef isc_result_t dlz_dlopen_findzonedb_t (void *dbdata,
-					      const char *name);
-
-/*
- * dlz_dlopen_lookup() is required for all DLZ external drivers
- */
-typedef isc_result_t dlz_dlopen_lookup_t (const char *zone,
-					  const char *name,
-					  void *dbdata,
-					  dns_sdlzlookup_t *lookup);
-
-/*
- * dlz_dlopen_authority is optional() if dlz_dlopen_lookup()
- * supplies authority information for the dns record
- */
-typedef isc_result_t dlz_dlopen_authority_t (const char *zone,
-					     void *dbdata,
-					     dns_sdlzlookup_t *lookup);
-
-/*
- * dlz_dlopen_allowzonexfr() is optional, and should be supplied if
- * you want to support zone transfers
- */
-typedef isc_result_t dlz_dlopen_allowzonexfr_t (void *dbdata,
-						const char *name,
-						const char *client);
-
-/*
- * dlz_dlopen_allnodes() is optional, but must be supplied if supply a
- * dlz_dlopen_allowzonexfr() function
- */
-typedef isc_result_t dlz_dlopen_allnodes_t (const char *zone,
-					    void *dbdata,
-					    dns_sdlzallnodes_t *allnodes);
-
-/*
- * dlz_dlopen_newversion() is optional. It should be supplied if you
- * want to support dynamic updates.
- */
-typedef isc_result_t dlz_dlopen_newversion_t (const char *zone,
-					      void *dbdata,
-					      void **versionp);
-
-/*
- * dlz_closeversion() is optional, but must be supplied if you supply
- * a dlz_newversion() function
- */
-typedef void dlz_dlopen_closeversion_t (const char *zone,
-					isc_boolean_t commit,
-					void *dbdata,
-					void **versionp);
-
-/*
- * dlz_dlopen_configure() is optional, but must be supplied if you
- * want to support dynamic updates
- */
-typedef isc_result_t dlz_dlopen_configure_t (dns_view_t *view,
-					     void *dbdata);
-
-/*
- * dlz_dlopen_ssumatch() is optional, but must be supplied if you want
- * to support dynamic updates
- */
-typedef isc_boolean_t dlz_dlopen_ssumatch_t (const char *signer,
-					     const char *name,
-					     const char *tcpaddr,
-					     const char *type,
-					     const char *key,
-					     isc_uint32_t keydatalen,
-					     unsigned char *keydata,
-					     void *dbdata);
-
-/*
- * dlz_dlopen_addrdataset() is optional, but must be supplied if you
- * want to support dynamic updates
- */
-typedef isc_result_t dlz_dlopen_addrdataset_t (const char *name,
-					       const char *rdatastr,
-					       void *dbdata,
-					       void *version);
-
-/*
- * dlz_dlopen_subrdataset() is optional, but must be supplied if you
- * want to support dynamic updates
- */
-typedef isc_result_t dlz_dlopen_subrdataset_t (const char *name,
-					       const char *rdatastr,
-					       void *dbdata,
-					       void *version);
-
-/*
- * dlz_dlopen_delrdataset() is optional, but must be supplied if you
- * want to support dynamic updates
- */
-typedef isc_result_t dlz_dlopen_delrdataset_t (const char *name,
-					       const char *type,
-					       void *dbdata,
-					       void *version);
-
-ISC_LANG_ENDDECLS
-
-#endif
diff -Nru dlz-ldap-enum-1.0.2/dlz_ldap_enum_driver.c dlz-ldap-enum-1.0.3/dlz_ldap_enum_driver.c
--- dlz-ldap-enum-1.0.2/dlz_ldap_enum_driver.c	2012-05-17 16:36:27.000000000 +0200
+++ dlz-ldap-enum-1.0.3/dlz_ldap_enum_driver.c	2014-11-11 17:29:34.000000000 +0100
@@ -117,6 +117,10 @@
 	int default_ttl;
 } ldap_instance_t;
 
+#ifdef BIND_9_9
+isc_mem_t *ns_g_mctx = NULL;
+#endif
+
 /*
  * Private methods
  */
@@ -998,8 +1002,15 @@
 }
 
 isc_result_t
+#ifndef BIND_9_9
 dlz_lookup(const char *zone, const char *name,
 		void *dbdata, dns_sdlzlookup_t *lookup)
+#else
+dlz_lookup(const char *zone, const char *name,
+                void *dbdata, dns_sdlzlookup_t *lookup,
+                dns_clientinfomethods_t *methods,
+                dns_clientinfo_t *clientinfo)
+#endif
 {
 	isc_result_t result;
 
@@ -1023,6 +1034,14 @@
 	int protocol;
 	int method;
 
+	result = isc_mem_create(0, 0, &ns_g_mctx);
+	if (result != ISC_R_SUCCESS) {
+		isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+			DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
+			"Memory init failed");
+		return (result);
+	}
+
 #ifdef ISC_PLATFORM_USETHREADS
 	/* if multi-threaded, we need a few extra variables. */
 	int dbcount;
diff -Nru dlz-ldap-enum-1.0.2/dlz_ldap_enum_driver.h dlz-ldap-enum-1.0.3/dlz_ldap_enum_driver.h
--- dlz-ldap-enum-1.0.2/dlz_ldap_enum_driver.h	2012-05-17 16:45:21.000000000 +0200
+++ dlz-ldap-enum-1.0.3/dlz_ldap_enum_driver.h	2014-11-11 17:29:34.000000000 +0100
@@ -40,10 +40,13 @@
 #include <dns/dlz_dlopen.h>
 #else
 
+#ifdef BIND_9_9
+#error The bundled copy of dlz_dlopen.h only works with bind9 9.8.x, bind9 up to 9.9.5 does not install dlz_dlopen.h under /usr/include but 9.9.6 or later does.
+#endif
 // These things are borrowed from the main bind sources,
 // this is meant to be installed as part of the public API,
 // but may not be available on all systems.
-#include "dlz_dlopen.h"
+#include "bind98_dlz_dlopen.h"
 // ---from named/globals.h---
 // this is used from the traditional dlz_ldap code, now
 // that we have dlz_dlopen, maybe the memory management
diff -Nru dlz-ldap-enum-1.0.2/ltmain.sh dlz-ldap-enum-1.0.3/ltmain.sh
diff -Nru dlz-ldap-enum-1.0.2/m4/libtool.m4 dlz-ldap-enum-1.0.3/m4/libtool.m4
diff -Nru dlz-ldap-enum-1.0.2/Makefile.am dlz-ldap-enum-1.0.3/Makefile.am
--- dlz-ldap-enum-1.0.2/Makefile.am	2012-05-17 17:19:49.000000000 +0200
+++ dlz-ldap-enum-1.0.3/Makefile.am	2014-11-11 17:29:34.000000000 +0100
@@ -11,7 +11,7 @@
 dlz_ldap_enum_la_LIBADD = -lldap
 
 noinst_HEADERS = dlz_ldap_enum_driver.h
-noinst_HEADERS += dlz_dlopen.h  
+noinst_HEADERS += bind98_dlz_dlopen.h
 noinst_HEADERS += sdlz_helper.h
 
 EXTRA_DIST = dlz_ldap_enum.conf
diff -Nru dlz-ldap-enum-1.0.2/Makefile.in dlz-ldap-enum-1.0.3/Makefile.in

Reply to: