mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Don't shortcut scope base searches. Base scope searches can be
useful to ensure target entry exists.
This commit is contained in:
parent
9d87b68ba6
commit
2ec6755eda
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user