Skip to content

Commit

Permalink
dcerpc: invalidate forest trust info cache when filtering out realm d…
Browse files Browse the repository at this point in the history
…omains

When get_realmdomains() method is called, it will filter out subdomains
of the IPA primary domain. This is required because Active Directory
domain controllers are assuming subdomains already covered by the main
domain namespace.

[MS-LSAD] 3.1.4.7.16.1, 'Forest Trust Collision Generation' defines the
method of validating the forest trust information. They are the same as
rules in [MS-ADTS] section 6.1.6. Specifically,

  - A top-level name must not be superior to an enabled top-level name
    for another trusted domain object, unless the current trusted domain
    object has a corresponding exclusion record.

In practice, we filtered those subdomains already but the code wasn't
invalidating a previously retrieved forest trust information.

Fixes: https://pagure.io/freeipa/issue/9551

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
  • Loading branch information
abbra authored and flo-renaud committed Mar 20, 2024
1 parent d7c1ba0 commit 656a11a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ipaserver/dcerpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,7 @@ def generate_ftinfo(self, another_domain):

info.count = len(ftinfo_records)
info.entries = ftinfo_records
another_domain.ftinfo_data = info
return info

def clear_ftinfo_conflict(self, another_domain, cinfo):
Expand Down Expand Up @@ -1778,6 +1779,7 @@ def get_realmdomains(self):
return

self.local_domain.ftinfo_records = []
self.local_domain.ftinfo_data = None

realm_domains = self.api.Command.realmdomains_show()['result']
# Use realmdomains' modification timestamp
Expand Down

0 comments on commit 656a11a

Please sign in to comment.