]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3063. [contrib] More verbose error reporting from DLZ LDAP. [RT #23402]
authorEvan Hunt <each@isc.org>
Sat, 5 Mar 2011 23:10:08 +0000 (23:10 +0000)
committerEvan Hunt <each@isc.org>
Sat, 5 Mar 2011 23:10:08 +0000 (23:10 +0000)
CHANGES
contrib/dlz/drivers/dlz_ldap_driver.c

diff --git a/CHANGES b/CHANGES
index bba0aef3894fd6c21ea2595b045768fe095d56f8..25fa177d6eee5c443d7572d2a920b107d2813dd9 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+3063.  [contrib]       More verbose error reporting from DLZ LDAP. [RT #23402]
+
 3059.  [test]          Added a regression test for change #3023.
 
 3058.   [bug]           Cause named to terminate at startup or rndc reconfig/
index 77422baee433168e8091293809416d3db1e301f2..6d08285447154d0ea7515edd47f4cb5d02ec37bd 100644 (file)
@@ -507,16 +507,32 @@ ldap_process_results(LDAP *dbc, LDAPMessage *msg, char ** attrs,
                                result = dns_sdlz_putnamedrr(
                                                (dns_sdlzallnodes_t *) ptr,
                                                host, type, ttl, data);
-               }
-               else
+                       if (result != ISC_R_SUCCESS)
+                               isc_log_write(dns_lctx,
+                                       DNS_LOGCATEGORY_DATABASE,
+                                       DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
+                                       "dlz-ldap: putnamedrr failed "
+                                       "for \"%s %s %u %s\", %s",
+                                       host, type, ttl, data,
+                                       isc_result_totext(result));
+               } else {
                        result = dns_sdlz_putrr((dns_sdlzlookup_t *) ptr,
                                                type, ttl, data);
+                       if (result != ISC_R_SUCCESS)
+                               isc_log_write(dns_lctx,
+                                       DNS_LOGCATEGORY_DATABASE,
+                                       DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
+                                       "dlz-ldap: putrr failed "
+                                       "for \"%s %u %s\", %s",
+                                       type, ttl, data,
+                                       isc_result_totext(result));
+               }
 
                if (result != ISC_R_SUCCESS) {
                        isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
                                      DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
                                      "LDAP driver failed "
-                                     "while sending data to Bind.");
+                                     "while sending data to BIND.");
                        goto cleanup;
                }