int rc = 0;
Debug( LDAP_DEBUG_TRACE, "==>backsql_process_filter()\n", 0, 0, 0 );
- if ( f == NULL || f->f_choice == SLAPD_FILTER_COMPUTED ) {
- return 0;
+ if ( f->f_choice == SLAPD_FILTER_COMPUTED ) {
+ Debug( LDAP_DEBUG_TRACE, "backsql_process_filter(): "
+ "invalid filter\n", 0, 0, 0 );
+ goto impossible;
}
switch( f->f_choice ) {
ObjectClass *oc = oc_bvfind( &f->f_av_value );
if ( oc == NULL ) {
+ Debug( LDAP_DEBUG_TRACE,
+ "backsql_process_filter(): "
+ "unknown objectClass \"%s\" "
+ "in filter\n",
+ f->f_av_value.bv_val, 0, 0 );
bsi->bsi_status = LDAP_OTHER;
goto impossible;
}
goto done;
default:
+ Debug( LDAP_DEBUG_TRACE,
+ "backsql_process_filter(): "
+ "illegal/unhandled filter "
+ "on objectClass attribute",
+ 0, 0, 0 );
bsi->bsi_status = LDAP_OTHER;
goto impossible;
}
Debug( LDAP_DEBUG_TRACE, "backsql_process_filter(): "
"attribute '%s' is not defined for objectclass '%s'\n",
ad->ad_cname.bv_val, BACKSQL_OC_NAME( bsi->bsi_oc ), 0 );
+
+#if 0
backsql_strfcat( &bsi->bsi_flt_where, "l",
(ber_len_t)sizeof( "1=0" ) - 1, "1=0" );
bsi->bsi_status = LDAP_UNDEFINED_TYPE;
goto impossible;
+#else
+ /* search anyway; other parts of the filter may succeeed */
+ backsql_strfcat( &bsi->bsi_flt_where, "l",
+ (ber_len_t)sizeof( "1=1" ) - 1, "1=1" );
+ bsi->bsi_status = LDAP_SUCCESS;
+ goto done;
+#endif
}
backsql_strfcat( &bsi->bsi_flt_where, "c", '(' );