[Freeipa-devel] [PATCH] 0014 Fix crash on reload without any zones

Petr Spacek pspacek at redhat.com
Fri Mar 23 11:38:36 UTC 2012


On 03/23/2012 12:25 PM, Adam Tkac wrote:
> 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

Comment added, pushed to master.

https://fedorahosted.org/bind-dyndb-ldap/changeset/f35661ac8fd7fe3a778ad95fc5135bf332230453

Note: BZ 805814 was reported after patch was sent to list :-)

>> 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,
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bind-dyndb-ldap-pspacek-0014-Fix-crash-on-reload-without-any-zones.patch
Type: text/x-patch
Size: 1305 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120323/6001d5c8/attachment.bin>


More information about the Freeipa-devel mailing list