fix cut-n-paste error found by abartlet
authorGerald Carter <jerry@samba.org>
Fri, 1 Aug 2003 13:28:13 +0000 (13:28 +0000)
committerGerald Carter <jerry@samba.org>
Fri, 1 Aug 2003 13:28:13 +0000 (13:28 +0000)
(This used to be commit 042492b862c4f2389086275dd8a0e044d7432537)

source3/nsswitch/winbindd_util.c

index 0de30dbca8bb81d773215f396655a4129116cc79..a810e503a00adbafc0181114e292d76d03c6cbf6 100644 (file)
@@ -197,20 +197,22 @@ void rescan_trusted_domains(BOOL force)
                        
                        if ( sid_equal(&dom_sids[i], &null_sid) ) {
                        
-                                new_domain = find_domain_from_name(names[i]);
+                               new_domain = find_domain_from_name(names[i]);
                                 
-                                /* this should never happen */
-                                if ( !domain) {        
-                                       DEBUG(0,("rescan_trust_domains: can't find the domain I just added! [%s]\n",
+                               /* this should never happen */
+                               if ( !new_domain ) {    
+                                       DEBUG(0,("rescan_trust_domains: can't find the domain I just added! [%s]\n",
                                                names[i]));
                                        break;
-                                }
+                               }
                                 
-                                result = domain->methods->domain_sid( new_domain, &new_domain->sid );
+                               /* call the cache method; which will operate on the winbindd_domain \
+                                  passed in and choose either rpc or ads as appropriate */
+
+                               result = domain->methods->domain_sid( new_domain, &new_domain->sid );
                                 
-                                if ( NT_STATUS_IS_OK(result) )
+                               if ( NT_STATUS_IS_OK(result) )
                                        sid_copy( &dom_sids[i], &domain->sid );
-                       
                        }
                        
                        /* store trusted domain in the cache */