]> git.sur5r.net Git - openldap/commitdiff
ITS#5571
authorQuanah Gibson-Mount <quanah@openldap.org>
Thu, 10 Jul 2008 01:47:39 +0000 (01:47 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 10 Jul 2008 01:47:39 +0000 (01:47 +0000)
CHANGES
servers/slapd/bconfig.c

diff --git a/CHANGES b/CHANGES
index 7aac8833a5111c370e9962d9e394378d4f00b89c..77be43d5335899be687c56ee38efd610e739ffcc 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,7 @@ OpenLDAP 2.4.11 Engineering
        Added libldap assertion control (ITS#5560)
        Fixed libldap GnuTLS CRL result handling (ITS#5577)
        Fixed slapd check for structural_class failures (ITS#5540)
+       Fixed slapd config backend renumbering (ITS#5571)
        Fixed slapd configContext OID (ITS#5383)
        Fixed slapd crash with no listeners (ITS#5563)
        Fixed slapd equality rules for olcRootDN/olcSchemaDN (ITS#5540)
index e1dab77134baf0d3368658ecc9ba3e76511f41fc..b7334eb16c86692cc57b57709f95f871c6f9dae1 100644 (file)
@@ -3992,6 +3992,11 @@ cfAddDatabase( CfEntryInfo *p, Entry *e, struct config_args_s *ca )
        if ( p->ce_type != Cft_Global ) {
                return LDAP_CONSTRAINT_VIOLATION;
        }
+       /* config must be {0}, nothing else allowed */
+       if ( !strncmp( e->e_nname.bv_val, "olcDatabase={0}", STRLENOF("olcDatabase={0}")) &&
+               strcmp( e->e_nname.bv_val + STRLENOF("olcDatabase={0}"), "config" )) {
+               return LDAP_CONSTRAINT_VIOLATION;
+       }
        ca->be = frontendDB;    /* just to get past check_vals */
        return LDAP_SUCCESS;
 }
@@ -5457,7 +5462,7 @@ config_build_entry( Operation *op, SlapReply *rs, CfEntryInfo *parent,
        ce->ce_parent = parent;
        if ( parent ) {
                pdn = parent->ce_entry->e_nname;
-               if ( parent->ce_kids )
+               if ( parent->ce_kids && parent->ce_kids->ce_type <= ce->ce_type )
                        for ( ceprev = parent->ce_kids; ceprev->ce_sibs &&
                                ceprev->ce_type <= ce->ce_type;
                                ceprev = ceprev->ce_sibs );