diff options
author | Jeremy Allison <jra@samba.org> | 2006-10-06 17:33:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:16 -0500 |
commit | 10ada62bedd6edaaf1311ce03bf9695f927de7b9 (patch) | |
tree | e423db765e375b43bc90350e168874a90baa8ae2 /source3/nsswitch/winbindd_util.c | |
parent | 1362fd0b687294ac3e944797a6f87284b545fa22 (diff) | |
download | samba-10ada62bedd6edaaf1311ce03bf9695f927de7b9.tar.gz samba-10ada62bedd6edaaf1311ce03bf9695f927de7b9.tar.xz samba-10ada62bedd6edaaf1311ce03bf9695f927de7b9.zip |
r19148: Finish last nights patch - make offline
work again. Still under test.
Jeremy.
(This used to be commit 40a455db78f805daa6bfeb9e78fb78dcc12fd9a7)
Diffstat (limited to 'source3/nsswitch/winbindd_util.c')
-rw-r--r-- | source3/nsswitch/winbindd_util.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index f26ec9232b..a6d6959446 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -474,13 +474,25 @@ enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domai domain->dcaddr.sin_port = 0; } - set_dc_type_and_flags(domain); + init_dc_connection(domain); +#if 1 + if (!domain->initialized) { + /* If we return error here we can't do any cached authentication, + but we may be in disconnected mode and can't initialize correctly. + Do what the previous code did and just return without initialization, + once we go online we'll re-initialize. + */ + DEBUG(5, ("winbindd_dual_init_connection: %s returning without initialization " + "online = %d\n", domain->name, (int)domain->online )); + } +#else if (!domain->initialized) { DEBUG(1, ("Could not initialize domain %s\n", state->request.domain_name)); return WINBINDD_ERROR; } +#endif fstrcpy(state->response.data.domain_info.name, domain->name); fstrcpy(state->response.data.domain_info.alt_name, domain->alt_name); @@ -585,7 +597,7 @@ struct winbindd_domain *find_domain_from_name(const char *domain_name) return NULL; if (!domain->initialized) - set_dc_type_and_flags(domain); + init_dc_connection(domain); return domain; } @@ -620,7 +632,7 @@ struct winbindd_domain *find_domain_from_sid(const DOM_SID *sid) return NULL; if (!domain->initialized) - set_dc_type_and_flags(domain); + init_dc_connection(domain); return domain; } |