diff options
author | Amitay Isaacs <amitay@gmail.com> | 2014-10-20 16:32:42 +1100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2014-11-24 21:17:09 +0100 |
commit | a5adad6f82517ae07db4eadadcef1cfd475b55d5 (patch) | |
tree | 99d7be86f51c0b2277d1ca42d3f79df5bf58fa3a /source4/dns_server | |
parent | a30eeec0606952df43835fb3f51357d06952e1cd (diff) | |
download | samba-a5adad6f82517ae07db4eadadcef1cfd475b55d5.tar.gz |
s4-dns: Add support for BIND 9.10
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Matthieu Patou <mat@matws.net>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Sat Oct 25 05:42:19 CEST 2014 on sn-devel-104
(cherry picked from commit faa3423d1a26eb6103389b234add0f1e8d0dfc08)
Conflicts:
python/samba/provision/sambadns.py
source4/dns_server/dlz_bind9.c
source4/setup/named.conf.dlz
Diffstat (limited to 'source4/dns_server')
-rw-r--r-- | source4/dns_server/dlz_bind9.c | 20 | ||||
-rw-r--r-- | source4/dns_server/wscript_build | 10 |
2 files changed, 29 insertions, 1 deletions
diff --git a/source4/dns_server/dlz_bind9.c b/source4/dns_server/dlz_bind9.c index 7583540f58..62e6f377d9 100644 --- a/source4/dns_server/dlz_bind9.c +++ b/source4/dns_server/dlz_bind9.c @@ -785,7 +785,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); @@ -867,7 +873,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); } /* @@ -1073,7 +1081,12 @@ static bool b9_has_soa(struct dlz_bind9_data *state, struct ldb_dn *dn, const ch /* 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; @@ -1132,7 +1145,12 @@ _PUBLIC_ isc_result_t dlz_configure(dns_view_t *view, void *dbdata) if (!b9_has_soa(state, zone_dn, zone)) { continue; } + +#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); diff --git a/source4/dns_server/wscript_build b/source4/dns_server/wscript_build index a92ab67a40..803ca62e6f 100644 --- a/source4/dns_server/wscript_build +++ b/source4/dns_server/wscript_build @@ -37,6 +37,16 @@ bld.SAMBA_LIBRARY('dlz_bind9_9', deps='samba-hostconfig samdb-common gensec popt dnsserver_common', enabled=bld.AD_DC_BUILD_IS_ENABLED()) +bld.SAMBA_LIBRARY('dlz_bind9_10', + source='dlz_bind9.c', + cflags='-DBIND_VERSION_9_10', + private_library=True, + link_name='modules/bind9/dlz_bind9_10.so', + realname='dlz_bind9_10.so', + install_path='${MODULESDIR}/bind9', + deps='samba-hostconfig samdb-common gensec popt dnsserver_common', + enabled=bld.AD_DC_BUILD_IS_ENABLED()) + bld.SAMBA_LIBRARY('dlz_bind9_for_torture', source='dlz_bind9.c', cflags='-DBIND_VERSION_9_8', |