s4-dns: Add support for BIND 9.10
[samba.git] / source4 / dns_server / dlz_bind9.c
index 29788dc768a19975b0b9adee691317c7effd12ef..d43b40478a6ee95b6146a49759265b78856e6cee 100644 (file)
@@ -792,7 +792,13 @@ static isc_result_t b9_find_name_dn(struct dlz_bind9_data *state, const char *na
 /*
   see if we handle a given zone
  */
+#if DLZ_DLOPEN_VERSION < 3
 _PUBLIC_ isc_result_t dlz_findzonedb(void *dbdata, const char *name)
+#else
+_PUBLIC_ isc_result_t dlz_findzonedb(void *dbdata, const char *name,
+                                    dns_clientinfomethods_t *methods,
+                                    dns_clientinfo_t *clientinfo)
+#endif
 {
        struct dlz_bind9_data *state = talloc_get_type_abort(dbdata, struct dlz_bind9_data);
        return b9_find_zone_dn(state, name, NULL, NULL);
@@ -874,7 +880,9 @@ _PUBLIC_ isc_result_t dlz_lookup(const char *zone, const char *name,
 _PUBLIC_ isc_result_t dlz_allowzonexfr(void *dbdata, const char *name, const char *client)
 {
        /* just say yes for all our zones for now */
-       return dlz_findzonedb(dbdata, name);
+       struct dlz_bind9_data *state = talloc_get_type(
+               dbdata, struct dlz_bind9_data);
+       return b9_find_zone_dn(state, name, NULL, NULL);
 }
 
 /*
@@ -1116,7 +1124,12 @@ static bool b9_zone_exists(struct dlz_bind9_data *state, const char *name)
 /*
   configure a writeable zone
  */
+#if DLZ_DLOPEN_VERSION < 3
 _PUBLIC_ isc_result_t dlz_configure(dns_view_t *view, void *dbdata)
+#else
+_PUBLIC_ isc_result_t dlz_configure(dns_view_t *view, dns_dlzdb_t *dlzdb,
+                                   void *dbdata)
+#endif
 {
        struct dlz_bind9_data *state = talloc_get_type_abort(dbdata, struct dlz_bind9_data);
        TALLOC_CTX *tmp_ctx;
@@ -1187,7 +1200,11 @@ _PUBLIC_ isc_result_t dlz_configure(dns_view_t *view, void *dbdata)
                                return ISC_R_NOMEMORY;
                        }
 
+#if DLZ_DLOPEN_VERSION < 3
                        result = state->writeable_zone(view, zone);
+#else
+                       result = state->writeable_zone(view, dlzdb, zone);
+#endif
                        if (result != ISC_R_SUCCESS) {
                                state->log(ISC_LOG_ERROR, "samba_dlz: Failed to configure zone '%s'",
                                           zone);