-#ifdef NEW_LOGGING
- LDAP_LOG(( "sasl", LDAP_LEVEL_DETAIL1,
- "slap_sasl2dn: performing internal search (base=%s, scope=%d)\n",
- searchbase.bv_val, scope ));
-#else
- Debug( LDAP_DEBUG_TRACE,
- "slap_sasl2dn: performing internal search (base=%s, scope=%d)\n",
- searchbase.bv_val, scope, 0 );
-#endif
-
-
- be = select_backend( &searchbase, 0, 1 );
- if(( be == NULL ) || ( be->be_search == NULL))
- goto FINISHED;
- suffix_alias( be, &searchbase );
-
- rc = connection_internal_open( &conn, &client, saslname );
- if( rc != LDAP_SUCCESS )
- goto FINISHED;
-
- (*be->be_search)( be, conn, conn->c_ops, /*base=*/NULL, searchbase.bv_val,
- scope, /*deref=*/1, /*sizelimit=*/1, /*time=*/0, filter, /*fstr=*/NULL,
- /*attrs=*/NULL, /*attrsonly=*/0 );
-
-
- /* Read the client side of the internal search */
- rc = ldap_result( client, LDAP_RES_ANY, LDAP_MSG_ALL, NULL, &res );
- if( rc == -1 )