]> git.sur5r.net Git - openldap/commitdiff
ITS#5343
authorQuanah Gibson-Mount <quanah@openldap.org>
Tue, 12 Feb 2008 01:01:29 +0000 (01:01 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 12 Feb 2008 01:01:29 +0000 (01:01 +0000)
CHANGES
servers/slapd/bconfig.c

diff --git a/CHANGES b/CHANGES
index 42414bb5b10a947a7d6991ab634e80cddaab4c8c..9ebb684be39da7df1945455232c4c434eee8148e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -21,6 +21,7 @@ OpenLDAP 2.4.8 Engineering
        Fixed slapd NULL printf (ITS#5264)      
        Fixed slapd NULL set values (ITS#5286)
        Fixed slapd segv with SASL/OTP (ITS#5259)
+       Fixed slapd cn=config crash on delete (ITS#5343)
        Fixed slapd str2entry with no attrs (ITS#5308)
        Fixed slapd-bdb segv with bdb4.6 (ITS#5322)
        Fixed slapd-bdb modrdn to same dn (ITS#5319)
index 457bcfd3f62a17a44860d4fb9dff23aa4101e880..1a265594caec4cfa41f764be8212d0a5f388a41e 100644 (file)
@@ -4775,8 +4775,9 @@ config_modify_internal( CfEntryInfo *ce, Operation *op, SlapReply *rs,
                /* check that the entry still obeys the schema */
                rc = entry_schema_check(op, e, NULL, 0, 0,
                        &rs->sr_text, ca->cr_msg, sizeof(ca->cr_msg) );
-               if ( rc ) goto out_noop;
        }
+       if ( rc ) goto out_noop;
+
        /* Basic syntax checks are OK. Do the actual settings. */
        for ( ml = op->orm_modlist; ml; ml = ml->sml_next ) {
                ct = config_find_table( colst, nocs, ml->sml_desc, ca );
@@ -5414,13 +5415,16 @@ config_build_entry( Operation *op, SlapReply *rs, CfEntryInfo *parent,
        rc = structural_class(oc_at->a_vals, &oc, NULL, &text, c->cr_msg,
                sizeof(c->cr_msg), op ? op->o_tmpmemctx : NULL );
        attr_merge_normalize_one(e, slap_schema.si_ad_structuralObjectClass, &oc->soc_cname, NULL );
-       if ( op && !op->o_noop ) {
+       if ( op ) {
                op->ora_e = e;
                op->ora_modlist = NULL;
-               op->o_bd->be_add( op, rs );
-               if ( ( rs->sr_err != LDAP_SUCCESS ) 
-                               && (rs->sr_err != LDAP_ALREADY_EXISTS) ) {
-                       return NULL;
+               slap_add_opattrs( op, NULL, NULL, 0, 0 );
+               if ( !op->o_noop ) {
+                       op->o_bd->be_add( op, rs );
+                       if ( ( rs->sr_err != LDAP_SUCCESS ) 
+                                       && (rs->sr_err != LDAP_ALREADY_EXISTS) ) {
+                               return NULL;
+                       }
                }
        }
        if ( ceprev ) {