summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-07-24 08:59:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:56 -0500
commitc8a07d8431f29b28e11041c8c3df60869c85bd57 (patch)
tree4c7a8c4faa30ea805d39ec322440e27e69cee9f6 /source3/nsswitch
parentc0dbc801af463fc76298b4ff6ebbd3acbf893fac (diff)
downloadsamba-c8a07d8431f29b28e11041c8c3df60869c85bd57.tar.gz
samba-c8a07d8431f29b28e11041c8c3df60869c85bd57.tar.bz2
samba-c8a07d8431f29b28e11041c8c3df60869c85bd57.zip
r24017: merge from http://samba.org/~tridge/samba_3_2_ctdb/:
add add_trusted_domain() can return NULL metze (This used to be commit 12440efe0bab70a8a1b5100d77e387ce1c371a4e)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_util.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index a6fd0a7870..7170e0fc6e 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -323,7 +323,9 @@ static void trustdom_recv(void *private_data, BOOL success)
domain = add_trusted_domain(p, alternate_name,
&cache_methods,
&sid);
- setup_domain_child(domain, &domain->child, NULL);
+ if (domain) {
+ setup_domain_child(domain, &domain->child, NULL);
+ }
}
p=q;
if (p != NULL)
@@ -702,32 +704,38 @@ BOOL init_domain_list(void)
domain = add_trusted_domain( lp_workgroup(), lp_realm(),
&cache_methods, &our_sid);
- domain->primary = True;
- setup_domain_child(domain, &domain->child, NULL);
+ if (domain) {
+ domain->primary = True;
+ setup_domain_child(domain, &domain->child, NULL);
- /* 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
- as the init_dc_connection() in init_child_recv()
- will do this, but we can start detecting the DC
- early here. */
- set_domain_online_request(domain);
+ /* 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
+ as the init_dc_connection() in init_child_recv()
+ will do this, but we can start detecting the DC
+ early here. */
+ set_domain_online_request(domain);
+ }
}
/* Local SAM */
domain = add_trusted_domain(get_global_sam_name(), NULL,
&passdb_methods, get_global_sam_sid());
- if ( role != ROLE_DOMAIN_MEMBER ) {
- domain->primary = True;
+ if (domain) {
+ if ( role != ROLE_DOMAIN_MEMBER ) {
+ domain->primary = True;
+ }
+ setup_domain_child(domain, &domain->child, NULL);
}
- setup_domain_child(domain, &domain->child, NULL);
/* BUILTIN domain */
domain = add_trusted_domain("BUILTIN", NULL, &passdb_methods,
&global_sid_Builtin);
- setup_domain_child(domain, &domain->child, NULL);
+ if (domain) {
+ setup_domain_child(domain, &domain->child, NULL);
+ }
return True;
}