From 7aac82d31cace2e0a9dfd440bba4f70864333531 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 9 Apr 2005 11:27:35 +0000 Subject: [PATCH] ITS#3616 allow adding entry with zero-length DN if the suffix is zero length --- servers/slapd/slapadd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.39.5