]> git.sur5r.net Git - openldap/commitdiff
"searchFilter" by default must be empty
authorPierangelo Masarati <ando@openldap.org>
Wed, 10 Mar 2004 21:53:39 +0000 (21:53 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 10 Mar 2004 21:53:39 +0000 (21:53 +0000)
servers/slapd/back-ldap/init.c
servers/slapd/back-meta/config.c
servers/slapd/overlays/rwm.c

index 2cbf10a99835f803eba2b2ec261a101d20550fed..83d8c90234c477ed351022beabc89e98d1be7ab3 100644 (file)
@@ -132,6 +132,12 @@ ldap_back_db_init(
                rargv[ 2 ] = NULL;
                rewrite_parse( li->rwmap.rwm_rw, "<suffix massage>", 
                                1, 2, rargv );
+
+               rargv[ 0 ] = "rewriteContext";
+               rargv[ 1 ] = "default";
+               rargv[ 2 ] = NULL;
+               rewrite_parse( li->rwmap.rwm_rw, "<suffix massage>", 
+                               1, 2, rargv );
        }
 #endif /* ENABLE_REWRITE */
 
index 6792b28ea3be36c9d30d9ce1f9655ae027f83b08..2234e601a01eb0a3ebee4be1472bdb0f96c65e0d 100644 (file)
@@ -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, "<suffix massage>", 
+                               1, 2, rargv );
+
+               rargv[ 0 ] = "rewriteContext";
+               rargv[ 1 ] = "default";
+               rargv[ 2 ] = NULL;
+               rewrite_parse( lt->rwmap.rwm_rw, "<suffix massage>", 
+                               1, 2, rargv );
+       }
+
        ldap_back_map_init( &lt->rwmap.rwm_at, &mapping );
 
        return lt;
index 4e11a800f49afddd124b3d02c13fbe9f6b6084c3..bd7de69eea951a7d0be1bd1ed40a9bc81b567c00 100644 (file)
@@ -683,6 +683,11 @@ rwm_over_init(
                rargv[ 1 ] = "searchFilter";
                rargv[ 2 ] = NULL;
                rewrite_parse( rwmap->rwm_rw, "<suffix massage>", 1, 2, rargv );
+
+               rargv[ 0 ] = "rewriteContext";
+               rargv[ 1 ] = "default";
+               rargv[ 2 ] = NULL;
+               rewrite_parse( rwmap->rwm_rw, "<suffix massage>", 2, 2, rargv );
        }
        
 #endif /* ENABLE_REWRITE */