]> git.sur5r.net Git - openldap/commitdiff
blind fix to ITS#6163
authorPierangelo Masarati <ando@openldap.org>
Mon, 3 Aug 2009 13:08:22 +0000 (13:08 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 3 Aug 2009 13:08:22 +0000 (13:08 +0000)
servers/slapd/back-sql/search.c

index 0e54ac995d3b35246fc29fe18932c2f877ccd54b..7b7f78487d7969df59c0a1bf9167c477ff055b95 100644 (file)
@@ -721,6 +721,16 @@ backsql_process_filter( backsql_srch_info *bsi, Filter *f )
                goto done;
        }
 
+       if ( f->f_choice & SLAPD_FILTER_UNDEFINED ) {
+               backsql_strfcat_x( &bsi->bsi_flt_where,
+                       bsi->bsi_op->o_tmpmemctx,
+                       "l",
+                       (ber_len_t)STRLENOF( "1=0" ), "1=0" );
+               done = 1;
+               rc = 1;
+               goto done;
+       }
+
        switch( f->f_choice ) {
        case LDAP_FILTER_OR:
                rc = backsql_process_filter_list( bsi, f->f_or, 
@@ -1196,6 +1206,14 @@ backsql_process_filter_attr( backsql_srch_info *bsi, Filter *f, backsql_at_map_r
                                &at->bam_join_where );
        }
 
+       if ( f->f_choice & SLAPD_FILTER_UNDEFINED ) {
+               backsql_strfcat_x( &bsi->bsi_flt_where,
+                       bsi->bsi_op->o_tmpmemctx,
+                       "l",
+                       (ber_len_t)STRLENOF( "1=0" ), "1=0" );
+               return 1;
+       }
+
        switch ( f->f_choice ) {
        case LDAP_FILTER_EQUALITY:
                filter_value = &f->f_av_value;