Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 809562

Summary: Constraints for CNAME records are not enforced
Product: Red Hat Enterprise Linux 6 Reporter: Dmitri Pal <dpal>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.3CC: jgalipea, mkosek, pspacek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-3.0.0-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 09:10:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dmitri Pal 2012-04-03 16:26:08 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/2601

Cite from http://tools.ietf.org/html/rfc1912 section 2.4: "A CNAME record is not allowed to coexist with any other data." (PTR record is an exception, see further text in RFC.)

If there are multiple records for single DNS name (with CNAME and other RR types at same time), behaviour is undefined.

BIND refuses to load zone with mixed names/records. We have to follow standard and enforce same constraint.

Comment 1 Jenny Severance 2012-06-20 19:00:00 UTC
Please add steps to verify this bug

Comment 2 Petr Spacek 2012-06-22 11:51:39 UTC
1) Add CNAME record with name "test" which points to name "blahblahblah".
2) Try to add another record with name "test" and any type other than CNAME - it should fail, because CNAME and A records are not allowed on single name.

E.g. adding an A record should fail.

Another disallowed combination from RFC 1912:
podunk.xx.      IN      NS      ns1
                IN      NS      ns2
                IN      CNAME   mary

Comment 3 Petr Spacek 2012-06-22 11:54:37 UTC
Previous comment should say:

2)  ... it should fail, because CNAME and *other* record *types* are not allowed on single name.

Comment 4 RHEL Program Management 2012-07-10 06:22:36 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 5 RHEL Program Management 2012-07-10 23:26:57 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 6 Rob Crittenden 2012-07-13 15:02:41 UTC
Fixed upstream.

master: 854b7636754643291800ec9d76ab081a870415e5

Comment 7 Jenny Severance 2012-09-25 16:08:26 UTC
regression test automated in DNS test suite

Comment 10 Namita Soman 2012-12-18 03:52:36 UTC
Verified using:ipa-server-3.0.0-11.el6.x86_64

test output:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: 809562 Constraints for CNAME records are not enforced
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

kdestroy: No credentials cache found while destroying cache
spawn /usr/bin/kinit -V admin
Using default cache: /tmp/krb5cc_0
Using principal: admin
Password for admin:
Authenticated to Kerberos v5
Default principal: admin
:: [22:10:14] ::  kinit as admin with password Secret123 was successful.
:: [   PASS   ] :: Kinit as admin user
  Record name: tt
  A record: 1.2.3.4
:: [   PASS   ] :: Add a A record to conflict with the cname record
  A record: 1.2.3.4
:: [   PASS   ] :: Make sure the A record was created
ipa: ERROR: invalid 'cnamerecord': CNAME record is not allowed to coexist with any other records except PTR
:: [   PASS   ] :: Attempt to add a cname record, this should fail
:: [   PASS   ] :: Make sure the CNAME record was not created
-------------------
Deleted record "tt"
-------------------
:: [   PASS   ] :: Delete the A record that conflict with the cname record
:: [   PASS   ] :: Make sure the A record was removed
  Record name: tt
  CNAME record: tt.testrelm.com
:: [   PASS   ] :: Adding a cname record
  CNAME record: tt.testrelm.com
:: [   PASS   ] :: Make sure the CNAME record was created
ipa: ERROR: invalid 'cnamerecord': CNAME record is not allowed to coexist with any other records except PTR
:: [   PASS   ] :: Attempt to create a A record to conflict with the CNAME record.
:: [   PASS   ] :: Make sure the A record was not created
-------------------
Deleted record "tt"
-------------------

Comment 12 errata-xmlrpc 2013-02-21 09:10:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0528.html