From: Ryan Tandy Date: Fri, 7 Aug 2015 21:03:45 +0000 (-0700) Subject: ITS#8213 fix deleting rewrite rules X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7380354270758201408200253efff729a8e7deee;p=openldap ITS#8213 fix deleting rewrite rules From ITS#5940. Add path has the same code. --- diff --git a/servers/slapd/overlays/rwm.c b/servers/slapd/overlays/rwm.c index 63e817af38..ad045a9524 100644 --- a/servers/slapd/overlays/rwm.c +++ b/servers/slapd/overlays/rwm.c @@ -2179,7 +2179,10 @@ rwm_cf_gen( ConfigArgs *c ) ca.line = rwmap->rwm_bva_rewrite[ i ].bv_val; ca.argc = 0; config_fp_parse_line( &ca ); - + + argv0 = ca.argv[ 0 ]; + ca.argv[ 0 ] += STRLENOF( "rwm-" ); + if ( strcasecmp( ca.argv[ 0 ], "suffixmassage" ) == 0 ) { rc = rwm_suffixmassage_config( &db, c->fname, c->lineno, ca.argc, ca.argv ); @@ -2189,6 +2192,8 @@ rwm_cf_gen( ConfigArgs *c ) ca.argc, ca.argv ); } + ca.argv[ 0 ] = argv0; + ch_free( ca.tline ); ch_free( ca.argv );