bv.bv_val++;
if ( !strncasecmp( bv.bv_val, "exact:", sizeof( "exact:" ) - 1 ) ) {
- bv.bv_val += sizeof( "exact" ) - 1;
+ bv.bv_val += sizeof( "exact:" ) - 1;
*scope = LDAP_X_SCOPE_EXACT;
} else if ( !strncasecmp( bv.bv_val, "regex:", sizeof( "regex:" ) - 1 ) ) {
- bv.bv_val += sizeof( "regex" ) - 1;
+ bv.bv_val += sizeof( "regex:" ) - 1;
*scope = LDAP_X_SCOPE_REGEX;
} else if ( !strncasecmp( bv.bv_val, "children:", sizeof( "chldren:" ) - 1 ) ) {
- bv.bv_val += sizeof( "children" ) - 1;
+ bv.bv_val += sizeof( "children:" ) - 1;
*scope = LDAP_X_SCOPE_CHILDREN;
} else if ( !strncasecmp( bv.bv_val, "subtree:", sizeof( "subtree:" ) - 1 ) ) {
- bv.bv_val += sizeof( "subtree" ) - 1;
+ bv.bv_val += sizeof( "subtree:" ) - 1;
*scope = LDAP_X_SCOPE_SUBTREE;
} else if ( !strncasecmp( bv.bv_val, "onelevel:", sizeof( "onelevel:" ) - 1 ) ) {
- bv.bv_val += sizeof( "onelevel" ) - 1;
+ bv.bv_val += sizeof( "onelevel:" ) - 1;
*scope = LDAP_X_SCOPE_ONELEVEL;
} else {
return LDAP_PROTOCOL_ERROR;
}
+ } else {
+ if ( bv.bv_val[ 0 ] != ':' ) {
+ return LDAP_PROTOCOL_ERROR;
+ }
+ *scope = LDAP_X_SCOPE_EXACT;
+ bv.bv_val++;
}
- if ( bv.bv_val[ 0 ] != ':' ) {
- return LDAP_PROTOCOL_ERROR;
- }
- bv.bv_val++;
-
bv.bv_val += strspn( bv.bv_val, " " );
/* jump here in case no type specification was present
* and uir was not an URI... HEADS-UP: assuming EXACT */
&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 ) ) {
op.o_req_dn = op.o_req_ndn;
op.oq_search.rs_slimit = 1;
op.oq_search.rs_tlimit = -1;
+ op.o_sync_slog_size = -1;
op.o_bd->be_search( &op, &rs );
}
CONCLUDED:
- if( op.o_req_dn.bv_len ) ch_free( op.o_req_dn.bv_val );
- if( op.o_req_ndn.bv_len ) sl_free( op.o_req_ndn.bv_val, opx->o_tmpmemctx );
+ if( op.o_req_dn.bv_val && op.o_req_dn.bv_val != op.o_req_ndn.bv_val ) ch_free( op.o_req_dn.bv_val );
+ if( op.o_req_ndn.bv_val ) sl_free( op.o_req_ndn.bv_val, opx->o_tmpmemctx );
if( op.oq_search.rs_filter ) filter_free_x( opx, op.oq_search.rs_filter );
- if( op.ors_filterstr.bv_len ) ch_free( op.ors_filterstr.bv_val );
+ if( op.ors_filterstr.bv_val ) ch_free( op.ors_filterstr.bv_val );
#ifdef NEW_LOGGING
LDAP_LOG( TRANSPORT, ENTRY,
/* 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;
op.o_req_ndn.bv_len = 0;
/* correctly parsed, but illegal */
goto FINISHED;
+ case LDAP_SCOPE_BASE:
case LDAP_SCOPE_ONELEVEL:
case LDAP_SCOPE_SUBTREE:
#ifdef LDAP_SCOPE_SUBORDINATE