summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-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;
}