prevent a segv when a trusted domain is unavailable at startup
authorAndrew Tridgell <tridge@samba.org>
Sat, 9 Mar 2002 19:37:57 +0000 (19:37 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sat, 9 Mar 2002 19:37:57 +0000 (19:37 +0000)
(This used to be commit d5b5d3f8400a80c943809db9578a2d7317aa6d2d)

source3/nsswitch/winbindd_util.c

index e274c78220786dd51f7403c77e38f14ce43205ee..06804b3b43fe08352f97118192087a577e15f872 100644 (file)
@@ -159,9 +159,8 @@ BOOL init_domain_list(void)
                int i;
                for(i = 0; i < num_domains; i++) {
                        domain = add_trusted_domain(names[i], &cache_methods);
-                       if (domain) {
-                               sid_copy(&domain->sid, &dom_sids[i]);
-                       }
+                       if (!domain) continue;
+                       sid_copy(&domain->sid, &dom_sids[i]);
                        DEBUG(1,("Added domain %s (%s)\n", 
                                 domain->name, 
                                 sid_string_static(&domain->sid)));