On an AD DC we need to update sam_domain->fti, so that
find_routing_from_namespace_noinit() uses the correct
uPNSuffixes and msDS-SPNSuffixes values for the local forest.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Apr 3 10:35:10 UTC 2025 on atb-devel-224
return false;
}
+ if (IS_AD_DC) {
+ struct winbindd_domain *sam_domain = find_local_sam_domain();
+ NTSTATUS status;
+
+ SMB_ASSERT(sam_domain);
+
+ TALLOC_FREE(sam_domain->fti);
+
+ status = pdb_filter_hints(sam_domain,
+ NULL, /* p_local_tdo */
+ &sam_domain->fti,
+ NULL); /* p_local_functional_level */
+ if (!NT_STATUS_IS_OK(status)) {
+ DBG_ERR("pdb_filter_hints(%s) - %s\n",
+ sam_domain->name,
+ nt_errstr(status));
+ return false;
+ }
+ }
+
ok = add_trusted_domains_dc();
if (!ok) {
return false;