From 9d0c7b24c68ff241b9b6bdb793f6ea2deb8fbfc7 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Thu, 5 Nov 2009 15:38:03 +0000 Subject: [PATCH] Initialize ConfigArgs before calling config_del_vals (ITS#6363) --- servers/slapd/bconfig.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 8c3e2b9707..8d5ca2a6fb 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -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 ) { -- 2.39.5