summaryrefslogtreecommitdiff
path: root/source4/dns_server
diff options
context:
space:
mode:
authorStefan Gohmann <gohmann@univention.de>2011-10-13 15:23:58 +0200
committerStefan Metzmacher <metze@samba.org>2011-10-17 12:36:50 +0200
commitd9558fdc34a690230cd4927df45f4353bd5cc498 (patch)
treeddff2d18e5d08a545e27644c1c529ee7dd3a552e /source4/dns_server
parentc88195fbe3a6b201f24ffb1ababdac22dd2c33a3 (diff)
downloadsamba-d9558fdc34a690230cd4927df45f4353bd5cc498.tar.gz
samba-d9558fdc34a690230cd4927df45f4353bd5cc498.tar.bz2
samba-d9558fdc34a690230cd4927df45f4353bd5cc498.zip
s4:dlz_bind9: Copy dn before changing in b9_has_soa
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/dns_server')
-rw-r--r--source4/dns_server/dlz_bind9.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/dns_server/dlz_bind9.c b/source4/dns_server/dlz_bind9.c
index 4105c1119e..58b47ce566 100644
--- a/source4/dns_server/dlz_bind9.c
+++ b/source4/dns_server/dlz_bind9.c
@@ -1015,10 +1015,14 @@ _PUBLIC_ isc_result_t dlz_configure(dns_view_t *view, void *dbdata)
for (j=0; j<res->count; j++) {
isc_result_t result;
const char *zone = ldb_msg_find_attr_as_string(res->msgs[j], "name", NULL);
+ struct ldb_dn *zone_dn;
+
if (zone == NULL) {
continue;
}
- if (!b9_has_soa(state, dn, zone)) {
+ zone_dn = ldb_dn_copy(tmp_ctx, dn);
+
+ if (!b9_has_soa(state, zone_dn, zone)) {
continue;
}
result = state->writeable_zone(view, zone);