]> git.sur5r.net Git - openldap/commitdiff
Don't shortcut scope base searches. Base scope searches can be
authorKurt Zeilenga <kurt@openldap.org>
Sun, 30 May 2004 22:15:39 +0000 (22:15 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 30 May 2004 22:15:39 +0000 (22:15 +0000)
useful to ensure target entry exists.

servers/slapd/saslauthz.c

index f90706975c4523243d52ad1275f4971abe5fa7d4..ffc2bde4f262ecf98055894b2a6d00da6e3ae4c4 100644 (file)
@@ -893,9 +893,7 @@ int slap_sasl_match( Operation *opx, struct berval *rule,
                &op.ors_filterstr );
        if( rc != LDAP_SUCCESS ) goto CONCLUDED;
 
-       /* Massive shortcut: search scope == base */
        switch ( op.oq_search.rs_scope ) {
-       case LDAP_SCOPE_BASE:
        case LDAP_X_SCOPE_EXACT:
 exact_match:
                if ( dn_match( &op.o_req_ndn, assertDN ) ) {
@@ -1177,9 +1175,7 @@ void slap_sasl2dn( Operation *opx,
        /* Must do an internal search */
        op.o_bd = select_backend( &op.o_req_ndn, 0, 1 );
 
-       /* Massive shortcut: search scope == base */
        switch ( op.oq_search.rs_scope ) {
-       case LDAP_SCOPE_BASE:
        case LDAP_X_SCOPE_EXACT:
                *sasldn = op.o_req_ndn;
                BER_BVZERO( &op.o_req_ndn );
@@ -1193,6 +1189,7 @@ void slap_sasl2dn( Operation *opx,
                /* correctly parsed, but illegal */
                goto FINISHED;
 
+       case LDAP_SCOPE_BASE:
        case LDAP_SCOPE_ONELEVEL:
        case LDAP_SCOPE_SUBTREE:
 #ifdef LDAP_SCOPE_SUBORDINATE