[Freeipa-devel] [PATCH] 0014 Fix crash on reload without any zones
Adam Tkac
atkac at redhat.com
Fri Mar 23 11:25:40 UTC 2012
On 03/23/2012 09:59 AM, Petr Spacek wrote:
> Hello,
>
> this patch fixes crash on reload/halt. Current code will crash if no
> zones were loaded from LDAP (because of connection error or bad DN in
> config).
>
> There is no BZ/ticket for this issue.
This patch is fine and fixes
https://bugzilla.redhat.com/show_bug.cgi?id=805814
Before you push it, please add comment to code that there still might be
issues with the RUNTIME_CHECK when nodechain_first returns ISC_R_NOMEMORY.
Regards, Adam
>
> Petr^2 Spacek
>
> bind-dyndb-ldap-pspacek-0014-Fix-crash-on-reload-without-any-zones.patch
>
>
> From 4f10354d7dcff6bff7421cc4594ec06da32da765 Mon Sep 17 00:00:00 2001
> From: Petr Spacek<pspacek at redhat.com>
> Date: Fri, 23 Mar 2012 09:50:44 +0100
> Subject: [PATCH] Fix crash on reload without any zones. Signed-off-by: Petr
> Spacek<pspacek at redhat.com>
>
> ---
> src/ldap_helper.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/ldap_helper.c b/src/ldap_helper.c
> index 971d90f..e9ed7ca 100644
> --- a/src/ldap_helper.c
> +++ b/src/ldap_helper.c
> @@ -504,9 +504,10 @@ destroy_ldap_instance(ldap_instance_t **ldap_instp)
> rbt = zr_get_rbt(ldap_inst->zone_register);
>
> result = dns_rbtnodechain_first(&chain, rbt, NULL, NULL);
> - RUNTIME_CHECK(result == ISC_R_SUCCESS || result == DNS_R_NEWORIGIN);
> + RUNTIME_CHECK(result == ISC_R_SUCCESS || result == DNS_R_NEWORIGIN
> + || result == ISC_R_NOTFOUND);
>
> - while (result != ISC_R_NOMORE) {
> + while (result != ISC_R_NOMORE&& result != ISC_R_NOTFOUND) {
> dns_fixedname_t name;
> dns_fixedname_init(&name);
> result = dns_rbtnodechain_current(&chain, NULL,
More information about the Freeipa-devel
mailing list