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<[email protected]>
Date: Fri, 18 Nov 2011 08:04:53 -0500
Subject: [PATCH] Skip bad records.
Signed-off-by: Jiri Kuncar<[email protected]>
---
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
[email protected]
https://www.redhat.com/mailman/listinfo/freeipa-devel
_______________________________________________
Freeipa-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/freeipa-devel