From 2ec6755eda288816990ce478d4bc08b48b6a58ff Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sun, 30 May 2004 22:15:39 +0000 Subject: [PATCH] Don't shortcut scope base searches. Base scope searches can be useful to ensure target entry exists. --- servers/slapd/saslauthz.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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 -- 2.39.5