]> git.sur5r.net Git - openldap/commitdiff
Fix value_normalize bug. Must uppercase the dn.
authorKurt Zeilenga <kurt@openldap.org>
Mon, 12 Jul 1999 23:00:38 +0000 (23:00 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 12 Jul 1999 23:00:38 +0000 (23:00 +0000)
Change no search candidates error to success.
'make ldbm' now works again!

servers/slapd/acl.c
servers/slapd/back-ldbm/dn2id.c
servers/slapd/back-ldbm/search.c
servers/slapd/search.c
servers/slapd/value.c

index 1520bca475ed4dfe000e4bec01f404a6427ab3cd..6dcdcd50870b045a946c60aa459b3cee572dbfd4 100644 (file)
@@ -320,7 +320,7 @@ acl_access_allowed(
                                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 )) )
index 71b97641bbf5ff3754b2abf20e07ee5f8d748993..387ad2fff6a877e392d70483f08bd8279bfca414 100644 (file)
@@ -191,6 +191,7 @@ dn2entry_rw(
        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 ) {
index 3a1d72c4d5b01fdd188f7b885721ef54e5360ba9..7abce79feb9f1306728a6543a7345199eb40ef01 100644 (file)
@@ -134,14 +134,14 @@ ldbm_back_search(
        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;
@@ -320,7 +320,7 @@ search_candidates(
        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;
 
index 09d1591666bd498c53febdc9a3f00265903507de..b9906a12c9111a69bc617ac4c4c24559c530977f 100644 (file)
@@ -155,7 +155,6 @@ do_search(
            "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 ) {
@@ -163,30 +162,25 @@ do_search(
                        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;
        }
 
        /*
index 7ef0c62cd5be93fdb4b422695d3009593a21990e..ccabdf06a42ae84c2e6250a0591da93e163f6d84 100644 (file)
@@ -89,7 +89,7 @@ value_normalize(
        }
 
        if ( syntax & SYNTAX_DN ) {
-               (void) dn_normalize( s );
+               (void) dn_normalize_case( s );
                return;
        }