From: Howard Chu Date: Sat, 9 Apr 2005 11:27:35 +0000 (+0000) Subject: ITS#3616 allow adding entry with zero-length DN if the suffix is zero length X-Git-Tag: OPENLDAP_AC_BP~945 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7aac82d31cace2e0a9dfd440bba4f70864333531;p=openldap ITS#3616 allow adding entry with zero-length DN if the suffix is zero length --- 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;