From 5139241ade3536a96c16da53f577536fa2ae6b2a Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 3 Aug 2009 13:08:22 +0000 Subject: [PATCH] blind fix to ITS#6163 --- servers/slapd/back-sql/search.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/servers/slapd/back-sql/search.c b/servers/slapd/back-sql/search.c index 0e54ac995d..7b7f78487d 100644 --- a/servers/slapd/back-sql/search.c +++ b/servers/slapd/back-sql/search.c @@ -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; -- 2.39.5