[Freeipa-devel] [PATCH] 234 Avoid deleting DNS zone when a context is reused

Martin Kosek mkosek at redhat.com
Fri Mar 23 15:14:17 UTC 2012


On Fri, 2012-03-23 at 15:34 +0100, Petr Viktorin wrote:
> On 03/23/2012 10:33 AM, Martin Kosek wrote:
> > On Thu, 2012-03-08 at 14:57 +0100, Martin Kosek wrote:
> >> When dnsrecord-del pre_callback detects that the record does
> >> not contain any records, it set a flag to connection context
> >> and deletes the record object later. However, when more
> >> dnsrecord-del share the same context (and this is the case of
> >> "ipa-replica-manage del $MASTER" DNS cleanup), it may reuse
> >> a positive flag from previous dnsrecord-del command and delete
> >> the root DNS zone record and thus effectively delete the zone.
> >>
> >> This patch makes sure that this flag is always initialized to
> >> sane value in dnsrecord-del pre_callback to make sure that the DNS
> >> zone is not deleted. It also fixes pre_callback function definition
> >> to prevent adding attrs_list to "keys" parameter and thus confuse
> >> developers.
> >>
> >> https://fedorahosted.org/freeipa/ticket/2503
> >
> > Sending a rebased patch which applies to current ipa-2-2.
> >
> > Martin
> >
> >
> >
> > _______________________________________________
> > Freeipa-devel mailing list
> > Freeipa-devel at redhat.com
> > https://www.redhat.com/mailman/listinfo/freeipa-devel
> 
> This fixes the issue. ACK.
> It would be nice to have a comment hinting at what the del_all flag 
> does. The option with the same name makes it somewhat unclear.
> 

It has the very same meaning as the --del-all option - record is
deleted. But I added a comment describing the effect of this flag to
make it more clear.

Pushed to master, ipa-2-2.

Martin




More information about the Freeipa-devel mailing list