]> git.sur5r.net Git - openldap/commitdiff
Allow "" DNs
authorKurt Zeilenga <kurt@openldap.org>
Sat, 14 Aug 1999 01:39:54 +0000 (01:39 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 14 Aug 1999 01:39:54 +0000 (01:39 +0000)
servers/slapd/entry.c

index 2954ca36714703f78a5e8dc1eca2bd76454aa21b..d58b4a70931b07a894b68c9b70bbcccda51eed8a 100644 (file)
@@ -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;
                }