]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/search.c
allow backwards compatibility for 'T' option (single char)
[openldap] / servers / slapd / search.c
index 981223cf517c7103a8959df6babd2b66637520af..52e7d5a3dafdbf40e95368393aaae60f216d1618 100644 (file)
@@ -49,7 +49,7 @@ do_search(
     Operation  *op,    /* info about the op to which we're responding */
     SlapReply  *rs     /* all the response data we'll send */
 ) {
-       struct berval base = { 0, NULL };
+       struct berval base = BER_BVNULL;
        ber_len_t       siz, off, i;
        int                     manageDSAit;
        int                     be_manageDSAit;
@@ -102,7 +102,9 @@ do_search(
        case LDAP_SCOPE_BASE:
        case LDAP_SCOPE_ONELEVEL:
        case LDAP_SCOPE_SUBTREE:
+#ifdef LDAP_SCOPE_SUBORDINATE
        case LDAP_SCOPE_SUBORDINATE:
+#endif
                break;
        default:
                send_ldap_error( op, rs, LDAP_PROTOCOL_ERROR, "invalid scope" );
@@ -398,7 +400,7 @@ do_search(
 #endif /* LDAP_SLAPI */
 
        /* actually do the search and send the result(s) */
-       if ( op->o_bd->be_search ) {
+       if ( op->o_bd->be_search && limits_check( op, rs ) == 0 ) {
                (op->o_bd->be_search)( op, rs );
        } else {
                send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,