]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/config.c
Fix prev commit, config_obsolete
[openldap] / servers / slapd / config.c
index 54dcf2d571eb86deeb9a8709c9d3cb26dff9ebde..4f4f91e1af8ad0c0661a85b0c0d896acadc552dd 100644 (file)
@@ -318,8 +318,7 @@ int config_set_vals(ConfigTable *Conf, ConfigArgs *c) {
                return(0);
        }
        if(arg_type & ARG_OFFSET) {
-               if (c->be && (!overlay_is_over(c->be) || 
-                       ((slap_overinfo *)c->be->bd_info)->oi_orig == c->bi))
+               if (c->be && c->table == Cft_Database)
                        ptr = c->be->be_private;
                else if (c->bi)
                        ptr = c->bi->bi_private;
@@ -410,8 +409,7 @@ config_get_vals(ConfigTable *cf, ConfigArgs *c)
                if ( rc ) return rc;
        } else {
                if ( cf->arg_type & ARG_OFFSET ) {
-                       if (c->be && (!overlay_is_over(c->be) || 
-                               ((slap_overinfo *)c->be->bd_info)->oi_orig == c->bi))
+                       if (c->be && c->table == Cft_Database)
                                ptr = c->be->be_private;
                        else if ( c->bi )
                                ptr = c->bi->bi_private;
@@ -728,6 +726,7 @@ read_config_file(const char *fname, int depth, ConfigArgs *cf, ConfigTable *cft)
 
                ct = config_find_keyword( cft, c );
                if ( ct ) {
+                       c->table = Cft_Global;
                        rc = config_add_vals( ct, c );
                        if ( !rc ) continue;
 
@@ -748,6 +747,7 @@ read_config_file(const char *fname, int depth, ConfigArgs *cf, ConfigTable *cft)
                        if ( c->bi->bi_cf_ocs ) {
                                ct = config_find_keyword( c->bi->bi_cf_ocs->co_table, c );
                                if ( ct ) {
+                                       c->table = c->bi->bi_cf_ocs->co_type;
                                        rc = config_add_vals( ct, c );
                                }
                        }
@@ -772,6 +772,7 @@ read_config_file(const char *fname, int depth, ConfigArgs *cf, ConfigTable *cft)
                        if ( c->be->be_cf_ocs ) {
                                ct = config_find_keyword( c->be->be_cf_ocs->co_table, c );
                                if ( ct ) {
+                                       c->table = c->be->be_cf_ocs->co_type;
                                        rc = config_add_vals( ct, c );
                                }
                        }
@@ -1350,12 +1351,6 @@ void bindconf_free( slap_bindconf *bc ) {
                BER_BVZERO( &bc->sb_authzId );
        }
 #ifdef HAVE_TLS
-#if 0
-       if ( bc->sb_tls_ctx ) {
-               SSL_CTX_free( bc->sb_tls_ctx );
-               bc->sb_tls_ctx = NULL;
-       }
-#endif
        if ( bc->sb_tls_cert ) {
                ch_free( bc->sb_tls_cert );
                bc->sb_tls_cert = NULL;
@@ -1482,7 +1477,7 @@ int bindconf_tls_set( slap_bindconf *bc, LDAP *ld )
                int opt = 0;
 
                if ( bc->sb_tls_ctx ) {
-                       SSL_CTX_free( bc->sb_tls_ctx );
+                       ldap_pvt_tls_ctx_free( bc->sb_tls_ctx );
                        bc->sb_tls_ctx = NULL;
                }
                rc = ldap_set_option( ld, LDAP_OPT_X_TLS_NEWCTX, &opt );
@@ -1914,7 +1909,9 @@ int config_generic_wrapper( Backend *be, const char *fname, int lineno,
 
        rc = SLAP_CONF_UNKNOWN;
        ct = config_find_keyword( be->be_cf_ocs->co_table, &c );
-       if ( ct )
+       if ( ct ) {
+               c.table = be->be_cf_ocs->co_type;
                rc = config_add_vals( ct, &c );
+       }
        return rc;
 }