[Freeipa-devel] [PATCH 0040] Handle incomplete/invalid zone unload in same way as BIND's ns_server_del_zone()
Adam Tkac
atkac at redhat.com
Wed Jul 25 13:10:17 UTC 2012
On Wed, Jul 25, 2012 at 10:18:01AM +0200, Petr Spacek wrote:
> Hello,
>
> this patch prevents potential failure during invalid zone unload.
> Error handling was changed to the same way as in
> bind/bin/named/server.c ns_server_del_zone().
Ack.
> From 02e232632a8a04fcd17f1089553961c18c0b175a Mon Sep 17 00:00:00 2001
> From: Petr Spacek <pspacek at redhat.com>
> Date: Wed, 25 Jul 2012 10:07:20 +0200
> Subject: [PATCH] Handle incomplete/invalid zone unload in same way as
> ns_server_del_zone().
>
> Signed-off-by: Petr Spacek <pspacek at redhat.com>
> ---
> src/ldap_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/ldap_helper.c b/src/ldap_helper.c
> index daffac7c7825a99a07c333217638d3beaddfaad2..cc7003a6cdcd2d27404fec936623ed8a3e8fa7f8 100644
> --- a/src/ldap_helper.c
> +++ b/src/ldap_helper.c
> @@ -823,7 +823,7 @@ ldap_delete_zone2(ldap_instance_t *inst, dns_name_t *name, isc_boolean_t lock)
>
> /* Do not unload partially loaded zones, they have incomplete structures. */
> dns_db_t *dbp = NULL;
> - if (dns_zone_getdb(zone, &dbp) != DNS_R_NOTLOADED) {
> + if (dns_zone_getdb(zone, &dbp) == ISC_R_SUCCESS) {
> dns_db_detach(&dbp); /* dns_zone_getdb() attaches DB implicitly */
> dns_zone_unload(zone);
> }
> --
> 1.7.10.4
>
--
Adam Tkac, Red Hat, Inc.
More information about the Freeipa-devel
mailing list