]> git.sur5r.net Git - openldap/commitdiff
Initialize ConfigArgs before calling config_del_vals (ITS#6363)
authorRalf Haferkamp <ralf@openldap.org>
Thu, 5 Nov 2009 15:38:03 +0000 (15:38 +0000)
committerRalf Haferkamp <ralf@openldap.org>
Thu, 5 Nov 2009 15:38:03 +0000 (15:38 +0000)
servers/slapd/bconfig.c

index 8c3e2b9707a9d218ad649dfde79841b9b0f3ffc1..8d5ca2a6fbc37da31216db98ecd2e12ff694c63e 100644 (file)
@@ -4578,11 +4578,13 @@ schema_destroy_one( ConfigArgs *ca, ConfigOCs **colst, int nocs,
 
        ca->valx = -1;
        ca->line = NULL;
+       ca->argc = 1;
        if ( cfn->c_cr_head ) {
                struct berval bv = BER_BVC("olcDitContentRules");
                ad = NULL;
                slap_bv2ad( &bv, &ad, &text );
                ct = config_find_table( colst, nocs, ad, ca );
+               ca->argv[0] = ct->ad->ad_cname.bv_val;
                config_del_vals( ct, ca );
        }
        if ( cfn->c_oc_head ) {
@@ -4590,6 +4592,7 @@ schema_destroy_one( ConfigArgs *ca, ConfigOCs **colst, int nocs,
                ad = NULL;
                slap_bv2ad( &bv, &ad, &text );
                ct = config_find_table( colst, nocs, ad, ca );
+               ca->argv[0] = ct->ad->ad_cname.bv_val;
                config_del_vals( ct, ca );
        }
        if ( cfn->c_at_head ) {
@@ -4597,6 +4600,7 @@ schema_destroy_one( ConfigArgs *ca, ConfigOCs **colst, int nocs,
                ad = NULL;
                slap_bv2ad( &bv, &ad, &text );
                ct = config_find_table( colst, nocs, ad, ca );
+               ca->argv[0] = ct->ad->ad_cname.bv_val;
                config_del_vals( ct, ca );
        }
        if ( cfn->c_syn_head ) {
@@ -4604,6 +4608,7 @@ schema_destroy_one( ConfigArgs *ca, ConfigOCs **colst, int nocs,
                ad = NULL;
                slap_bv2ad( &bv, &ad, &text );
                ct = config_find_table( colst, nocs, ad, ca );
+               ca->argv[0] = ct->ad->ad_cname.bv_val;
                config_del_vals( ct, ca );
        }
        if ( cfn->c_om_head ) {
@@ -4611,6 +4616,7 @@ schema_destroy_one( ConfigArgs *ca, ConfigOCs **colst, int nocs,
                ad = NULL;
                slap_bv2ad( &bv, &ad, &text );
                ct = config_find_table( colst, nocs, ad, ca );
+               ca->argv[0] = ct->ad->ad_cname.bv_val;
                config_del_vals( ct, ca );
        }
        cfo = p->ce_private;
@@ -5393,6 +5399,7 @@ config_modify_internal( CfEntryInfo *ce, Operation *op, SlapReply *rs,
                                        }
                                        ca->line = bv.bv_val;
                                        ca->valx = d->idx[i];
+                                       config_parse_vals(ct, ca, d->idx[i] );
                                        rc = config_del_vals( ct, ca );
                                        if ( rc != LDAP_SUCCESS ) break;
                                        if ( s )
@@ -5404,6 +5411,8 @@ config_modify_internal( CfEntryInfo *ce, Operation *op, SlapReply *rs,
                        } else {
                                ca->valx = -1;
                                ca->line = NULL;
+                               ca->argc = 1;
+                               ca->argv[0] = ct->ad->ad_cname.bv_val;
                                rc = config_del_vals( ct, ca );
                                if ( rc ) rc = LDAP_OTHER;
                                if ( s )
@@ -5450,6 +5459,8 @@ out:
                                        a->a_flags &= ~(SLAP_ATTR_IXDEL|SLAP_ATTR_IXADD);
                                        ca->valx = -1;
                                        ca->line = NULL;
+                                       ca->argc = 1;
+                                       ca->argv[0] = ct->ad->ad_cname.bv_val;
                                        config_del_vals( ct, ca );
                                }
                                for ( i=0; !BER_BVISNULL( &s->a_vals[i] ); i++ ) {
@@ -5464,6 +5475,8 @@ out:
                                ct = config_find_table( colst, nocs, a->a_desc, ca );
                                ca->valx = -1;
                                ca->line = NULL;
+                               ca->argc = 1;
+                               ca->argv[0] = ct->ad->ad_cname.bv_val;
                                config_del_vals( ct, ca );
                                s = attr_find( save_attrs, a->a_desc );
                                if ( s ) {