On 05/03/2013 03:34 PM, Jan Cholasta wrote:
> On 3.5.2013 15:23, Martin Kosek wrote:
>> On 05/03/2013 03:03 PM, Jan Cholasta wrote:
>>> Hi,
>>>
>>> the attached patch fixes <https://fedorahosted.org/freeipa/ticket/3600>.
>>>
>>> Honza
>>>
>>
>> This would fix the behavior, yes. But I think that it would be even better to
>> fix add_ptr_rr function to avoid unconditionally adding trailing dot to fqdn:
>>
>> def add_ptr_rr(zone, ip_address, fqdn, dns_backup=None):
>>      name = get_reverse_record_name(zone, ip_address)
>>      add_rr(zone, name, "PTR", fqdn+".", dns_backup)
>>
>> Otherwise we may get hit by this issue next time if we normalize fqdn before
>> passing it to add_ptr_rr. add_ns_rr already does this check:
>>
>> def add_ns_rr(zone, hostname, dns_backup=None, force=True):
>>      if not hostname.endswith('.'):
>>          hostname += '.'
>>
>>
>> Martin
>>
> 
> I don't see a point in doing this now. There are many occurences of
> uncoditional fqdn+'.' in the code and the proper fix would be to get rid of
> them all. I think this could be done in the scope of
> <https://fedorahosted.org/freeipa/ticket/1917>.
> 
> Honza
> 

I would not want to wait until then - this ticket won't be done in near future.
Can you please just replace fqdn+"." and fqdn+'.' in bindinstance.py with
normalize_zone(fqdn) for now? I saw about 8 occurrences there.

This could fix a lot of potential errors we have now.

Thanks,
Martin

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

Reply via email to