X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-ldbm%2Ffilterindex.c;h=e7d17af8f3daf3d55eb3ab55a533a212596e63ec;hb=1586a68219cf85e9caaafcf2259c9bc249358077;hp=95ba7c6cf2bc45908a73a98952af41d310c82941;hpb=aa470b80521ac5d4d1e5fd543c1ecfae7a1a62de;p=openldap diff --git a/servers/slapd/back-ldbm/filterindex.c b/servers/slapd/back-ldbm/filterindex.c index 95ba7c6cf2..e7d17af8f3 100644 --- a/servers/slapd/back-ldbm/filterindex.c +++ b/servers/slapd/back-ldbm/filterindex.c @@ -1,8 +1,17 @@ /* filterindex.c - generate the list of candidate entries from a filter */ /* $OpenLDAP$ */ -/* - * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved. - * COPYING RESTRICTIONS APPLY, see COPYRIGHT file +/* This work is part of OpenLDAP Software . + * + * Copyright 1998-2003 The OpenLDAP Foundation. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted only as authorized by the OpenLDAP + * Public License. + * + * A copy of this license is available in the file LICENSE in the + * top-level directory of the distribution or, alternatively, at + * . */ #include "portable.h" @@ -47,6 +56,22 @@ filter_candidates( result = NULL; switch ( f->f_choice ) { + case SLAPD_FILTER_COMPUTED: + switch( f->f_result ) { + case SLAPD_COMPARE_UNDEFINED: + /* This technically is not the same as FALSE, but it + * certainly will produce no matches. + */ + /* FALLTHRU */ + case LDAP_COMPARE_FALSE: + result = NULL; + break; + case LDAP_COMPARE_TRUE: + result = idl_allids( op->o_bd ); + break; + } + break; + case SLAPD_FILTER_DN_ONE: #ifdef NEW_LOGGING LDAP_LOG( FILTER, DETAIL1,