From: Stefan Metzmacher Date: Wed, 25 Sep 2024 17:33:09 +0000 (+0200) Subject: s3:winbindd: set_dc_type_and_flags() doesn't need to do something for primary or... X-Git-Tag: tdb-1.4.13~1027 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b375f7dca96becb5369c1536c4e5586570c81e38;p=thirdparty%2Fsamba.git s3:winbindd: set_dc_type_and_flags() doesn't need to do something for primary or internal domains In the end set_dc_type_and_flags should be removed completely, but this is a good start in the right direction... Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index d10f0ffcf6f..b39fc6056ec 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -2436,11 +2436,18 @@ static void set_dc_type_and_flags( struct winbindd_domain *domain ) } /* we always have to contact our primary domain */ - - if ( domain->primary || domain->internal) { - DEBUG(10,("set_dc_type_and_flags: setting up flags for " - "primary or internal domain\n")); - set_dc_type_and_flags_connect( domain ); + if (domain->primary || domain->internal) { + /* + * primary and internal domains are + * are already completely + * setup via init_domain_list() + * calling add_trusted_domain() + * + * There's no need to ask the + * server again, if it hosts an AD + * domain... + */ + domain->initialized = true; return; }