On Fri, Oct 05, 2012 at 01:45:42PM +0200, Petr Spacek wrote:
> Hello,
> 
>     Prevent misleading "partial match" error messages for disabled zones.
> 
>     Following message was printed if zone "e.test" was disabled and LDAP
>     contained zones "test" and "e.test":
>     update_zone (psearch) failed for
> 'idnsName=e.test,cn=dns,dc=e,dc=org'. Zones can be outdated, run
> `rndc reload`: partial match

Ack

> From e7f7a7d6e4fb3c9e47bac22d3291d09aa3d885ab Mon Sep 17 00:00:00 2001
> From: Petr Spacek <pspa...@redhat.com>
> Date: Fri, 5 Oct 2012 13:37:18 +0200
> Subject: [PATCH] Prevent misleading "partial match" error messages for
>  disabled zones.
> 
> Following message was printed if zone "e.test" was disabled and LDAP
> contained zones "test" and "e.test":
> update_zone (psearch) failed for 'idnsName=e.test,cn=dns,dc=e,dc=org'. Zones 
> can be outdated, run `rndc reload`: partial match
> 
> Signed-off-by: Petr Spacek <pspa...@redhat.com>
> ---
>  src/ldap_helper.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/src/ldap_helper.c b/src/ldap_helper.c
> index 
> 199b345bb604c30bfa8a3690afc844ca8b264e89..d4bb6db10b0e79f8777fde3c5f344298af87ce56
>  100644
> --- a/src/ldap_helper.c
> +++ b/src/ldap_helper.c
> @@ -815,10 +815,9 @@ ldap_delete_zone2(ldap_instance_t *inst, dns_name_t 
> *name, isc_boolean_t lock)
>       }
>  
>       result = zr_get_zone_ptr(inst->zone_register, name, &zone);
> -     if (result == ISC_R_NOTFOUND) {
> +     if (result == ISC_R_NOTFOUND || result == DNS_R_PARTIALMATCH) {
>               log_debug(1, "zone '%s' not found in zone register", 
> zone_name_char);
> -             result = ISC_R_SUCCESS;
> -             goto cleanup;
> +             CLEANUP_WITH(ISC_R_SUCCESS);
>       } else if (result != ISC_R_SUCCESS)
>               goto cleanup;
>  
> -- 
> 1.7.11.4
> 


-- 
Adam Tkac, Red Hat, Inc.

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to