]> git.sur5r.net Git - openldap/commitdiff
Forbid empty ("") dn! (followup 5 to ITS#1173)
authorPierangelo Masarati <ando@openldap.org>
Mon, 9 Jul 2001 10:35:43 +0000 (10:35 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 9 Jul 2001 10:35:43 +0000 (10:35 +0000)
servers/slapd/tools/slapadd.c

index 5bc383297055752e72408664322f4450dad37632..55b536c43dcde2143c23038713e7898105602103 100644 (file)
@@ -58,7 +58,7 @@ main( int argc, char **argv )
                }
 
                /* make sure the DN is valid */
-               if( dn_normalize( e->e_ndn ) == NULL ) {
+               if( dn_normalize( e->e_ndn ) == NULL || e->e_ndn[0] == '\0' ) {
                        fprintf( stderr, "%s: invalid dn=\"%s\" (line=%d)\n",
                                progname, e->e_dn, lineno );
                        rc = EXIT_FAILURE;