From 5cf9fad3e3e45a9bf12c68c855bf6d9b15c29ff5 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 14 Aug 1999 01:39:54 +0000 Subject: [PATCH] Allow "" DNs --- servers/slapd/entry.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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; } -- 2.39.5