Bug 671545

Summary: ipa dnsrecord-add allows you to create a bad(not rfc-compliant) ptr record.
Product: [Retired] freeIPA Reporter: Michael Gregg <mgregg>
Component: ipa-admintoolsAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Chandrasekar Kannan <ckannan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: benl, dpal, jhrozek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: freeipa-2.1.0-1.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-28 09:26:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Michael Gregg 2011-01-21 20:13:21 UTC
Description of problem:
When bad values are entered in a attempt to create a bad ptr record, dnsrecord-add allows it without warning the user.

Version-Release number of selected component (if applicable):
ipa-server-2.0-0.2011011418gita68b2d2.fc14.x86_64

How reproducible:
always

Steps to Reproduce:
1. create zone: ipa dnszone-add 4.4.4.in-addr.arpa
2. create a bad record: ipa dnsrecord-add 4.4.4.in-addr.arpa 8.4.6 --ptr-rec=domain.awesome.times.now.
 
Actual results:
IPA happily takes it. 

Expected results:
I'd expect ipa to take it, but check to make sure that the entry will comply to RFC 1035 http://tools.ietf.org/html/rfc1035 and then throw a error. 
Trying to create this record will try to create 8.4.6.4.4.4.in-addr.arpa
That's illegal, and doesn't make sense. But it's something that sombody that isn't very familiar with ptr records might try.
given that there was three octets defined in the zone, then you'll only be allowed one octet in the record name. 

If there are two octets in the zone, then you should be allowed two octets in the record. 

Again, I expect that IPA will just create the record, and throw a warning like "Possibly a bad PTR record. Please see help <link to help section> for more info."

Comment 1 Dmitri Pal 2011-01-24 21:36:18 UTC
https://fedorahosted.org/freeipa/ticket/839

Comment 2 Rob Crittenden 2011-02-18 02:40:28 UTC
master: 23234094c3fbdc415ffe4e221bd29c0dedf0c5b3