summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-05-06 21:31:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:21:50 -0500
commit189b694ee938953cd52448db7f7e101d5b6a2546 (patch)
treeb779ec587e567c0ac361975adf837a5369bbb7bb /source3/nsswitch
parent215e033e82ec8f02b4a73ead19640220610e8ece (diff)
downloadsamba-189b694ee938953cd52448db7f7e101d5b6a2546.tar.gz
samba-189b694ee938953cd52448db7f7e101d5b6a2546.tar.bz2
samba-189b694ee938953cd52448db7f7e101d5b6a2546.zip
r22724: Call an nss_info backend's init() function if the
previous call was unsuccessful. needed for offline logons. (This used to be commit c3a8dc5d136e33b66849c38bfa910cd044cd521f)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/nss_info.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/nsswitch/nss_info.c b/source3/nsswitch/nss_info.c
index d251629662..3fab9db839 100644
--- a/source3/nsswitch/nss_info.c
+++ b/source3/nsswitch/nss_info.c
@@ -190,10 +190,11 @@ static BOOL parse_nss_parm( const char *config, char **backend, char **domain )
nss_domain->backend = nss_backend;
nss_domain->domain = talloc_strdup( nss_domain, domain );
- status = nss_domain->backend->methods->init( nss_domain );
- if ( NT_STATUS_IS_OK( status ) ) {
+ /* Try to init and ave the result */
+
+ nss_domain->init_status = nss_domain->backend->methods->init( nss_domain );
DLIST_ADD( nss_domain_list, nss_domain );
- } else {
+ if ( !NT_STATUS_IS_OK(nss_domain->init_status) ) {
DEBUG(0,("nss_init: Failed to init backend for %s domain!\n",
nss_domain->domain));
}
@@ -248,6 +249,10 @@ static struct nss_domain_entry *find_nss_domain( const char *domain )
p = nss_domain_list;
}
+ if ( !NT_STATUS_IS_OK( p->init_status ) ) {
+ p->init_status = p->backend->methods->init( p );
+ }
+
return p;
}