summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_util.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-01-02 21:48:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:52 -0500
commitb2317c097954844af4a0596fea507f0139d14465 (patch)
treea718a8529cbb1b93845a0880ab2c96162e3019d4 /source3/nsswitch/winbindd_util.c
parentd3fc370fb9e32b881bb6c626ac525246af665ea4 (diff)
downloadsamba-b2317c097954844af4a0596fea507f0139d14465.tar.gz
samba-b2317c097954844af4a0596fea507f0139d14465.tar.bz2
samba-b2317c097954844af4a0596fea507f0139d14465.zip
r20488: When joined to a child domain in a multi-domain/single domain tree,
the child domain cannot always resolve SIDs in sibling domains. Windows tries to contact a DC in its own domain and then the root domain in the forest. This async changes makes winbindd's name2sid() call do the same. (This used to be commit 7b2bf0e5a6b8d4119657c7a34aa53c9a0c1d5723)
Diffstat (limited to 'source3/nsswitch/winbindd_util.c')
-rw-r--r--source3/nsswitch/winbindd_util.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index d0a59b0cbe..419c80e3c4 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -529,6 +529,10 @@ BOOL init_domain_list(void)
&cache_methods, &our_sid);
domain->primary = True;
setup_domain_child(domain, &domain->child, NULL);
+#if 0 /* old code needed to get the parent domain */
+ init_dc_connection(domain);
+#endif
+
/* Even in the parent winbindd we'll need to
talk to the DC, so try and see if we can
contact it. Theoretically this isn't neccessary
@@ -652,6 +656,19 @@ struct winbindd_domain *find_our_domain(void)
return NULL;
}
+struct winbindd_domain *find_root_domain(void)
+{
+ struct winbindd_domain *ours = find_our_domain();
+
+ if ( !ours )
+ return NULL;
+
+ if ( strlen(ours->forest_name) == 0 )
+ return NULL;
+
+ return find_domain_from_name( ours->forest_name );
+}
+
struct winbindd_domain *find_builtin_domain(void)
{
DOM_SID sid;