From: Pierangelo Masarati Date: Wed, 10 Mar 2004 21:53:39 +0000 (+0000) Subject: "searchFilter" by default must be empty X-Git-Tag: OPENLDAP_REL_ENG_2_2_BP~311 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=246fa41c9675121f02cfc068a9e3d5388273a0cc;p=openldap "searchFilter" by default must be empty --- diff --git a/servers/slapd/back-ldap/init.c b/servers/slapd/back-ldap/init.c index 2cbf10a998..83d8c90234 100644 --- a/servers/slapd/back-ldap/init.c +++ b/servers/slapd/back-ldap/init.c @@ -132,6 +132,12 @@ ldap_back_db_init( rargv[ 2 ] = NULL; rewrite_parse( li->rwmap.rwm_rw, "", 1, 2, rargv ); + + rargv[ 0 ] = "rewriteContext"; + rargv[ 1 ] = "default"; + rargv[ 2 ] = NULL; + rewrite_parse( li->rwmap.rwm_rw, "", + 1, 2, rargv ); } #endif /* ENABLE_REWRITE */ diff --git a/servers/slapd/back-meta/config.c b/servers/slapd/back-meta/config.c index 6792b28ea3..2234e601a0 100644 --- a/servers/slapd/back-meta/config.c +++ b/servers/slapd/back-meta/config.c @@ -50,6 +50,27 @@ new_target( void ) return NULL; } + { + char *rargv[3]; + + /* + * the filter rewrite as a string must be disabled + * by default; it can be re-enabled by adding rules; + * this creates an empty rewriteContext + */ + rargv[ 0 ] = "rewriteContext"; + rargv[ 1 ] = "searchFilter"; + rargv[ 2 ] = NULL; + rewrite_parse( lt->rwmap.rwm_rw, "", + 1, 2, rargv ); + + rargv[ 0 ] = "rewriteContext"; + rargv[ 1 ] = "default"; + rargv[ 2 ] = NULL; + rewrite_parse( lt->rwmap.rwm_rw, "", + 1, 2, rargv ); + } + ldap_back_map_init( <->rwmap.rwm_at, &mapping ); return lt; diff --git a/servers/slapd/overlays/rwm.c b/servers/slapd/overlays/rwm.c index 4e11a800f4..bd7de69eea 100644 --- a/servers/slapd/overlays/rwm.c +++ b/servers/slapd/overlays/rwm.c @@ -683,6 +683,11 @@ rwm_over_init( rargv[ 1 ] = "searchFilter"; rargv[ 2 ] = NULL; rewrite_parse( rwmap->rwm_rw, "", 1, 2, rargv ); + + rargv[ 0 ] = "rewriteContext"; + rargv[ 1 ] = "default"; + rargv[ 2 ] = NULL; + rewrite_parse( rwmap->rwm_rw, "", 2, 2, rargv ); } #endif /* ENABLE_REWRITE */