]> git.sur5r.net Git - openldap/commitdiff
ITS#8213 fix deleting rewrite rules
authorRyan Tandy <ryan@nardis.ca>
Fri, 7 Aug 2015 21:03:45 +0000 (14:03 -0700)
committerRyan Tandy <ryan@nardis.ca>
Sat, 8 Aug 2015 07:49:15 +0000 (07:49 +0000)
From ITS#5940. Add path has the same code.

servers/slapd/overlays/rwm.c

index 63e817af388f7df41eec8ce6863fd1dbbde06002..ad045a95241745af8516893c55ca5bb53cbd6767 100644 (file)
@@ -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 );