Change no search candidates error to success.
'make ldbm' now works again!
b->a_dnattr, 0, 0);
/* see if asker is listed in dnattr */
if ( (at = attr_find( e->e_attrs, b->a_dnattr )) != NULL &&
- value_find( at->a_vals, &bv, at->a_syntax, 1 ) == 0 )
+ value_find( at->a_vals, &bv, at->a_syntax, 3 ) == 0 )
{
if ( ACL_IS_SELF(b->a_access) &&
(val == NULL || value_cmp( &bv, val, at->a_syntax, 2 )) )
if( matched == NULL ) return NULL;
/* entry does not exist - see how much of the dn does exist */
+ /* dn_parent checks runs NULL if dn is suffix */
if ( (pdn = dn_parent( be, dn )) != NULL ) {
/* get entry with reader lock */
if ( (e = dn2entry_r( be, pdn, matched )) != NULL ) {
matched_dn = ch_strdup( e->e_ndn );
cache_return_entry_r( &li->li_cache, e );
- /* null candidates means we could not find the base object */
if ( candidates == NULL ) {
- /* return a NO SUCH OBJECT */
+ /* no candidates */
Debug( LDAP_DEBUG_TRACE, "no candidates\n", 0,
0, 0 );
- send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT,
- matched_dn, "no search candidates", NULL, NULL );
+ send_search_result( conn, op,
+ LDAP_SUCCESS,
+ NULL, NULL, NULL, NULL, 0 );
free( matched_dn );
return 1;
Filter *f, *rf, *af, *lf;
Debug(LDAP_DEBUG_TRACE, "search_candidates: base=\"%s\" s=%d d=%d\n",
- e->e_dn, scope, deref );
+ e->e_ndn, scope, deref );
f = NULL;
"conn=%d op=%d SRCH base=\"%s\" scope=%d filter=\"%s\"\n",
conn->c_connid, op->o_opid, base, scope, fstr );
-#if defined( SLAPD_MONITOR_DN ) || defined( SLAPD_CONFIG_DN ) || defined( SLAPD_SCHEMA_DN )
if ( scope == LDAP_SCOPE_BASE ) {
#if defined( SLAPD_MONITOR_DN )
if ( strcmp( base, SLAPD_MONITOR_DN ) == 0 ) {
goto return_results;
}
#endif
+
#if defined( SLAPD_CONFIG_DN )
if ( strcmp( base, SLAPD_CONFIG_DN ) == 0 ) {
config_info( conn, op );
goto return_results;
}
#endif
+
#if defined( SLAPD_SCHEMA_DN )
if ( strcmp( base, SLAPD_SCHEMA_DN ) == 0 ) {
schema_info( conn, op, attrs, attrsonly );
goto return_results;
}
#endif
- }
-#endif /* monitor or config or schema dn */
- if ( strcmp( base, LDAP_ROOT_DSE ) == 0 ) {
- if( scope == LDAP_SCOPE_BASE ) {
+ if ( strcmp( base, LDAP_ROOT_DSE ) == 0 ) {
root_dse_info( conn, op, attrs, attrsonly );
-
- } else {
- send_ldap_result( conn, op, rc = LDAP_REFERRAL,
- NULL, NULL, default_referral, NULL );
+ goto return_results;
}
- goto return_results;
}
/*
}
if ( syntax & SYNTAX_DN ) {
- (void) dn_normalize( s );
+ (void) dn_normalize_case( s );
return;
}