From: Kurt Zeilenga Date: Mon, 18 Jan 1999 20:00:58 +0000 (+0000) Subject: e_ndn = dn_normalize_case( e_dn ) X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~751 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c9242a123f5187f06807af4756c6b4f618642b5f;p=openldap e_ndn = dn_normalize_case( e_dn ) --- diff --git a/servers/slapd/back-ldbm/cache.c b/servers/slapd/back-ldbm/cache.c index f8664f5ebe..f83ea50c54 100644 --- a/servers/slapd/back-ldbm/cache.c +++ b/servers/slapd/back-ldbm/cache.c @@ -35,8 +35,8 @@ cache_entry_cmp( Entry *e1, Entry *e2 ) static int cache_entrydn_cmp( Entry *e1, Entry *e2 ) { - /* compare their normalized dn's */ - return( strcasecmp( e1->e_ndn, e2->e_ndn ) ); + /* compare their normalized UPPERCASED dn's */ + return( strcmp( e1->e_ndn, e2->e_ndn ) ); } static int @@ -235,7 +235,7 @@ cache_find_entry_dn2id( pthread_mutex_lock( &cache->c_mutex ); e.e_dn = dn; - e.e_ndn = dn_normalize( ch_strdup( dn ) ); + e.e_ndn = dn_normalize_case( ch_strdup( dn ) ); if ( (ep = (Entry *) avl_find( cache->c_dntree, (caddr_t) &e, cache_entrydn_cmp )) != NULL ) diff --git a/servers/slapd/back-passwd/search.c b/servers/slapd/back-passwd/search.c index a97206fe31..cbfc68fb4d 100644 --- a/servers/slapd/back-passwd/search.c +++ b/servers/slapd/back-passwd/search.c @@ -136,7 +136,7 @@ pw2entry( Backend *be, struct passwd *pw ) sprintf( buf, "%s@%s", pw->pw_name, be->be_suffix[0] ); e->e_dn = ch_strdup( buf ); - e->e_ndn = ch_strdup( buf ); + e->e_ndn = dn_normalize_case( ch_strdup( buf ) ); val.bv_val = pw->pw_name; val.bv_len = strlen( pw->pw_name ); diff --git a/servers/slapd/entry.c b/servers/slapd/entry.c index 440411e481..fedab892fa 100644 --- a/servers/slapd/entry.c +++ b/servers/slapd/entry.c @@ -109,7 +109,7 @@ str2entry( char *s ) e->e_id, e->e_ndn, value ); free( e->e_ndn ); } - e->e_ndn = dn_normalize( ch_strdup( value ) ); + e->e_ndn = dn_normalize_case( ch_strdup( value ) ); continue; } diff --git a/servers/slapd/monitor.c b/servers/slapd/monitor.c index 9efffc788e..1d3e55f967 100644 --- a/servers/slapd/monitor.c +++ b/servers/slapd/monitor.c @@ -49,7 +49,7 @@ monitor_info( Connection *conn, Operation *op ) entry_rdwr_init(e); e->e_attrs = NULL; e->e_dn = ch_strdup( SLAPD_MONITOR_DN ); - e->e_ndn = NULL; + e->e_ndn = dn_normalize_case( ch_strdup(SLAPD_MONITOR_DN) ); val.bv_val = Versionstr; if (( p = strchr( Versionstr, '\n' )) == NULL ) {