[GLUE] Rsync SAMBA_3_0 SVN r25598 in order to create the v3-0-test branch.
[gd/samba/.git] / source / nsswitch / nss_info.c
index 3fab9db83916e026d46b213c2d3c39f4e128678a..8c18162deb45da2651bc9d2aeed9cd5baad5fcf4 100644 (file)
@@ -156,7 +156,7 @@ static BOOL parse_nss_parm( const char *config, char **backend, char **domain )
 
                if ( !parse_nss_parm(nss_list[i], &backend, &domain) )  {
                        DEBUG(0,("nss_init: failed to parse \"%s\"!\n",
-                                nss_list[0]));
+                                nss_list[i]));
                        continue;                       
                }
 
@@ -190,11 +190,10 @@ 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 );
 
-               /* Try to init and ave the result */
-
-               nss_domain->init_status = nss_domain->backend->methods->init( nss_domain );
+               status = nss_domain->backend->methods->init( nss_domain );
+               if ( NT_STATUS_IS_OK( status ) ) {
                        DLIST_ADD( nss_domain_list, nss_domain );
-               if ( !NT_STATUS_IS_OK(nss_domain->init_status) ) {                      
+               } else {
                        DEBUG(0,("nss_init: Failed to init backend for %s domain!\n", 
                                 nss_domain->domain));
                }
@@ -249,10 +248,6 @@ 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;
 }