[Freeipa-devel] [PATCH] Skip invalid records
Adam Tkac
atkac at redhat.com
Fri Nov 18 13:45:06 UTC 2011
On 11/18/2011 02:18 PM, Jiri Kuncar wrote:
> Bind-dyndb-ldap: Don't fail to load zone when it contains invalid records.
Your patch seems fine for me, thanks. Please check my comments inside
the patch.
Regards, Adam
>
> Needed by ticket #36 https://fedorahosted.org/bind-dyndb-ldap/ticket/36
>
> 0001-Skip-bad-records.patch
>
>
> From 37a8430b4a5555d33fc727a6b6a19998710b37da Mon Sep 17 00:00:00 2001
> From: Jiri Kuncar<jkuncar at redhat.com>
> Date: Fri, 18 Nov 2011 08:04:53 -0500
> Subject: [PATCH] Skip bad records.
>
> Signed-off-by: Jiri Kuncar<jkuncar at redhat.com>
> ---
> src/ldap_helper.c | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/src/ldap_helper.c b/src/ldap_helper.c
> index 6fb57ce..029398c 100644
> --- a/src/ldap_helper.c
> +++ b/src/ldap_helper.c
> @@ -1080,9 +1080,11 @@ ldapdb_rdatalist_get(isc_mem_t *mctx, ldap_instance_t *ldap_inst, dns_name_t *na
> for (entry = HEAD(ldap_conn->ldap_entries);
> entry != NULL;
> entry = NEXT(entry, link)) {
> - CHECK(ldap_parse_rrentry(mctx, entry, ldap_conn,
> - origin, ldap_inst->fake_mname,
> - string, rdatalist));
> + if (ISC_R_SUCCESS != ldap_parse_rrentry(mctx, entry, ldap_conn,
> + origin, ldap_inst->fake_mname,
> + string, rdatalist)) {
Please keep consistency with rest of code. Use if (function() !=
result), not if (result != function()).
> + log_error("Failed to parse RR entry");
What about log_error("Failed to parse RR entry (%s)", string); ? This
will help admin to track which RR is bad.
> + }
> }
>
> /* Cache RRs */
>
>
> _______________________________________________
> Freeipa-devel mailing list
> Freeipa-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/freeipa-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20111118/08929d66/attachment.htm>
More information about the Freeipa-devel
mailing list