From: Kurt Zeilenga Date: Sat, 14 Aug 1999 01:39:54 +0000 (+0000) Subject: Allow "" DNs X-Git-Tag: TWEB_OL_BASE~216 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5cf9fad3e3e45a9bf12c68c855bf6d9b15c29ff5;p=openldap Allow "" DNs --- diff --git a/servers/slapd/entry.c b/servers/slapd/entry.c index 2954ca3671..d58b4a7093 100644 --- a/servers/slapd/entry.c +++ b/servers/slapd/entry.c @@ -104,18 +104,20 @@ str2entry( char *s ) if ( e->e_dn != NULL ) { Debug( LDAP_DEBUG_ANY, "str2entry: entry %ld has multiple dns \"%s\" and \"%s\" (second ignored)\n", - e->e_id, e->e_dn, value ); + e->e_id, e->e_dn, + value != NULL ? value : NULL ); continue; } - e->e_dn = ch_strdup( value ); + e->e_dn = ch_strdup( value != NULL ? value : "" ); if ( e->e_ndn != NULL ) { Debug( LDAP_DEBUG_ANY, "str2entry: entry %ld already has a normalized dn \"%s\" for \"%s\" (first ignored)\n", - e->e_id, e->e_ndn, value ); + e->e_id, e->e_ndn, + value != NULL ? value : NULL ); free( e->e_ndn ); } - e->e_ndn = ch_strdup( value ); + e->e_ndn = ch_strdup( e->e_dn ); (void) dn_normalize_case( e->e_ndn ); continue; }