From: Pierangelo Masarati Date: Mon, 9 Jul 2001 10:35:43 +0000 (+0000) Subject: Forbid empty ("") dn! (followup 5 to ITS#1173) X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1246 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=005823e032226965a9d4f2f636a7095174924ba3;p=openldap Forbid empty ("") dn! (followup 5 to ITS#1173) --- diff --git a/servers/slapd/tools/slapadd.c b/servers/slapd/tools/slapadd.c index 5bc3832970..55b536c43d 100644 --- a/servers/slapd/tools/slapadd.c +++ b/servers/slapd/tools/slapadd.c @@ -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;