PATCH: Verbose error reporting for dlz_ldap

Michael Graff mgraff at isc.org
Thu Feb 24 16:51:57 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Seems sane.

I'll see about getting it pulled up for including in 9.7.4, 9.8.1, and HEAD.

On 2011-02-24 10:12 AM, Jan Engelhardt wrote:
> 
> ---
> I had an error in my LDAP tree, but
> 
> named[14453]: LDAP driver failed while sending data to Bind.
> 
> did not tell me anything. So I devised this patch that is
> more verbose about which entry (among the hundreds) is wrong.
> Example:
> 
> named[14453]: dlz-ldap: put failed for
> "@ MXdeactivated 7200 9001 ares", error 65543
> 
> ---
>  contrib/dlz/drivers/dlz_ldap_driver.c |   11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> Index: bind-9.7.1P2/contrib/dlz/drivers/dlz_ldap_driver.c
> ===================================================================
> --- bind-9.7.1P2.orig/contrib/dlz/drivers/dlz_ldap_driver.c
> +++ bind-9.7.1P2/contrib/dlz/drivers/dlz_ldap_driver.c
> @@ -499,14 +499,21 @@ ldap_process_results(LDAP *dbc, LDAPMess
>  			goto cleanup;
>  		}
>  		if (allnodes == isc_boolean_true) {
> -			if (strcasecmp(host, "~") == 0)
> +			if (strcasecmp(host, "~") == 0) {
>  				result = dns_sdlz_putnamedrr(
>  						(dns_sdlzallnodes_t *) ptr,
>  						"*", type, ttl, data);
> -			else
> +			} else {
>  				result = dns_sdlz_putnamedrr(
>  						(dns_sdlzallnodes_t *) ptr,
>  						host, type, ttl, data);
> +				if (result != ISC_R_SUCCESS)
> +					isc_log_write(dns_lctx,
> +						DNS_LOGCATEGORY_DATABASE,
> +						DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
> +						"dlz-ldap: put failed for \"%s %s %u %s\", error %d",
> +						host, type, ttl, data, result);
> +			}
>  		}
>  		else
>  			result = dns_sdlz_putrr((dns_sdlzlookup_t *) ptr,
> 
> _______________________________________________
> bind-workers mailing list
> bind-workers at lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-workers

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1mjK0ACgkQLdqv0r6eD6ZJ6QCeOI+yuOj1hy2FppOtgU4Iq1Ik
vZoAn3mEnI1VIDe7PJNNW613617iWw3E
=Si2+
-----END PGP SIGNATURE-----



More information about the bind-workers mailing list