diff --git a/servers/slapd/slapadd.c b/servers/slapd/slapadd.c index 2235c54dbf..6dcaae7f5b 100644 --- a/servers/slapd/slapadd.c +++ b/servers/slapd/slapadd.c @@ -115,7 +115,8 @@ slapadd( int argc, char **argv ) } /* 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", progname, e->e_dn, lineno ); rc = EXIT_FAILURE;