From: Kurt Zeilenga Date: Sun, 30 May 2004 22:15:39 +0000 (+0000) Subject: Don't shortcut scope base searches. Base scope searches can be X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~320 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2ec6755eda288816990ce478d4bc08b48b6a58ff;p=openldap Don't shortcut scope base searches. Base scope searches can be useful to ensure target entry exists. --- diff --git a/servers/slapd/saslauthz.c b/servers/slapd/saslauthz.c index f90706975c..ffc2bde4f2 100644 --- a/servers/slapd/saslauthz.c +++ b/servers/slapd/saslauthz.c @@ -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