#9924 Names of domains from a trusted forest should be compared case-insentive
Closed: fixed by sumenon. Opened by frenaud.

Clone of https://issues.redhat.com/browse/RHEL-4823


Description of problem:
If the AD forest root has a mix case name the this is preserved for the trust object. It looks like netr_DsRGetForestTrustInformation returns this name in all lower case, which is ok since DNS names are case-insensitive.

Unfortunately there is a case-sensitive comparison in fetch_domains():

for t in domains.entries:
    if t.type == lsa.LSA_FOREST_TRUST_DOMAIN_INFO:
        tname = unicode(t.forest_trust_data.dns_domain_name.string)
        if tname == trustdomain: <<<<<<<<<<<<<<<<<<<<<<<<<<
            continue
        result['domains'][tname] =
            { 'cn': tname, 'ipantflatname': unicode( t.forest_trust_data.netbios_domain_name.string), 'ipanttrusteddomainsid': unicode( t.forest_trust_data.domain_sid) }
    elif t.type == lsa.LSA_FOREST_TRUST_TOP_LEVEL_NAME:
        tname = unicode(t.forest_trust_data.string)
        if tname == trustdomain:

and as a result the forest root is added a second time as forest member which casuse all kind of unexpected behavior.


Metadata Update from @frenaud:
- Custom field rhbz adjusted to https://issues.redhat.com/browse/RHEL-4823

Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/8123

master:

  • 0dccca5979569b7c8eadc23cfdded052e21d1b21 fetch_domains: Use case-insensitive comparison for domains names

ipa-4-13:

  • 7f6a2835f0972af5e94b58daf47fa60bfade4279 fetch_domains: Use case-insensitive comparison for domains names

Metadata Update from @sumenon:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata Update from @frenaud:
- Custom field rhbz adjusted to https://issues.redhat.com/browse/RHEL-4823, https://issues.redhat.com/browse/RHEL-146185 (was: https://issues.redhat.com/browse/RHEL-4823)

Metadata