]> git.sur5r.net Git - openldap/commitdiff
Fix ARG_OFFSET to work with overlays
authorHoward Chu <hyc@openldap.org>
Tue, 30 May 2006 11:34:36 +0000 (11:34 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 30 May 2006 11:34:36 +0000 (11:34 +0000)
servers/slapd/config.c

index ddfc2af581eee4f9cdbe2be4e81244ea4262ba66..ae8c5feb654d009d1a68a25279208d27caa77638 100644 (file)
@@ -315,7 +315,8 @@ int config_set_vals(ConfigTable *Conf, ConfigArgs *c) {
                return(0);
        }
        if(arg_type & ARG_OFFSET) {
-               if (c->be)
+               if (c->be && (!overlay_is_over(c->be) || 
+                       ((slap_overinfo *)c->be->bd_info)->oi_orig == c->bi))
                        ptr = c->be->be_private;
                else if (c->bi)
                        ptr = c->bi->bi_private;
@@ -406,7 +407,8 @@ config_get_vals(ConfigTable *cf, ConfigArgs *c)
                if ( rc ) return rc;
        } else {
                if ( cf->arg_type & ARG_OFFSET ) {
-                       if ( c->be )
+                       if (c->be && (!overlay_is_over(c->be) || 
+                               ((slap_overinfo *)c->be->bd_info)->oi_orig == c->bi))
                                ptr = c->be->be_private;
                        else if ( c->bi )
                                ptr = c->bi->bi_private;