On Mon, Oct 22, 2012 at 04:18:19PM +0200, Petr Spacek wrote:
> Hello,
> 
> this patch prevents false 'zone serial (2012060301) unchanged' error
> messages coming from zone_postload(), which is called after each
> zone change from dns_zone_load().
> 
> I found zone_postload() unnecessary for our plugin except initial
> load. Adam, please, check that information, I'm not 100 % sure about
> BIND internals. I examined only zone_load() and zone_postload()
> functions and I'm not sure about consequences in other parts of
> BIND.
> 
> Attached patch creates empty SSU table which is enough to pass
> dns_zone_isdynamic() check - as a result zone_postload() is not
> called for our zones anymore.
> 
> 
> This patch closes
> https://fedorahosted.org/bind-dyndb-ldap/ticket/79

Ack

> From 8aaf2edbf7cc57b61ee48f649d23bf5ef575f5dc Mon Sep 17 00:00:00 2001
> From: Petr Spacek <pspa...@redhat.com>
> Date: Mon, 22 Oct 2012 16:07:32 +0200
> Subject: [PATCH] Prevent false 'zone serial (2012060301) unchanged' error
>  messages.
> 
> This patch prevents zone_postload() calls for all zones managed by
> bind-dyndb-ldap.
> 
> https://fedorahosted.org/bind-dyndb-ldap/ticket/79
> 
> Signed-off-by: Petr Spacek <pspa...@redhat.com>
> ---
>  src/ldap_helper.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/src/ldap_helper.c b/src/ldap_helper.c
> index 
> ca08afcfdd9b68cd19997f1b263674bc90c89b20..8534362ae119e51931af375658bcdddd99d8e88a
>  100644
> --- a/src/ldap_helper.c
> +++ b/src/ldap_helper.c
> @@ -1092,7 +1092,13 @@ ldap_parse_zoneentry(ldap_entry_t *entry, 
> ldap_instance_t *inst)
>       if (result == ISC_R_SUCCESS)
>               CHECK(configure_zone_ssutable(zone, HEAD(values)->value));
>       else
> -             CHECK(configure_zone_ssutable(zone, NULL));
> +             /* We need to declare zone as 'dynamic'
> +              * for dns_zone_isdynamic() to prevent unwanted
> +              * zone_postload() calls and warnings about serial and so on.
> +              *
> +              * Created SSU table contains no rules =>
> +              * dns_ssutable_checkrules() will return deny. */
> +             CHECK(configure_zone_ssutable(zone, ""));
>  
>       /* Fetch allow-query and allow-transfer ACLs */
>       log_debug(2, "Setting allow-query for %p: %s", zone, dn);
> -- 
> 1.7.11.7
> 


-- 
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