]> git.sur5r.net Git - openldap/commitdiff
ITS#3616 allow adding entry with zero-length DN if the suffix is zero length
authorHoward Chu <hyc@openldap.org>
Sat, 9 Apr 2005 11:27:35 +0000 (11:27 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 9 Apr 2005 11:27:35 +0000 (11:27 +0000)
servers/slapd/slapadd.c

index 2235c54dbf723064806c16049a4dcf7ddc9d4728..6dcaae7f5beecba85cf2ad008455e0e8bde8ceb3 100644 (file)
@@ -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;