From: Stefan Metzmacher Date: Sat, 22 Mar 2025 00:03:26 +0000 (+0100) Subject: winbindd: let update_trusted_domains_dc() also call pdb_filter_hints() X-Git-Tag: tevent-0.17.0~364 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72cb5fcbed3b27deac6464f5a203209445b50d58;p=thirdparty%2Fsamba.git winbindd: let update_trusted_domains_dc() also call pdb_filter_hints() 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 Reviewed-by: Ralph Boehme Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Thu Apr 3 10:35:10 UTC 2025 on atb-devel-224 --- diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index 2ccffe0e280..05466177600 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -1388,6 +1388,26 @@ bool update_trusted_domains_dc(void) 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;