s3: Fix a winbind crash when scanning trusts
authorVolker Lendecke <vl@samba.org>
Wed, 21 Apr 2010 15:04:49 +0000 (17:04 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 23 Apr 2010 08:35:52 +0000 (10:35 +0200)
add_trusted_domain() for a new domain always needs to be followed by a
setup_domain_child(). This was not always done, in particular not when walking
to the forest root for additional trusts.

This is a minimal patch, we need to fix add_trusted_domain().

source3/winbindd/winbindd_util.c

index 84522ea0a7e31570f7d9afa641f4036cce487759..a13df1f15798592eb68e50399ff917f293edc8eb 100644 (file)
@@ -428,6 +428,9 @@ static void rescan_forest_root_trusts( void )
                                                dom_list[i].dns_name,
                                                &cache_methods,
                                                &dom_list[i].sid );
+                       if (d != NULL) {
+                               setup_domain_child(d, &d->child);
+                       }
                }
 
                if (d == NULL) {
@@ -497,6 +500,9 @@ static void rescan_forest_trusts( void )
                                                        dom_list[i].dns_name,
                                                        &cache_methods,
                                                        &dom_list[i].sid );
+                               if (d != NULL) {
+                                       setup_domain_child(d, &d->child);
+                               }
                        }
 
                        if (d == NULL) {