ITS#3616 allow adding entry with zero-length DN if the suffix is zero length

This commit is contained in:
Howard Chu 2005-04-09 11:27:35 +00:00
parent 335e8a8ba7
commit 7aac82d31c

View File

@ -115,7 +115,8 @@ slapadd( int argc, char **argv )
} }
/* make sure the DN is not empty */ /* make sure the DN is not empty */
if( !e->e_nname.bv_len ) { if( BER_BVISEMPTY( &e->e_nname ) &&
!BER_BVISEMPTY( be->be_nsuffix )) {
fprintf( stderr, "%s: empty dn=\"%s\" (line=%d)\n", fprintf( stderr, "%s: empty dn=\"%s\" (line=%d)\n",
progname, e->e_dn, lineno ); progname, e->e_dn, lineno );
rc = EXIT_FAILURE; rc = EXIT_FAILURE;