]> git.sur5r.net Git - openldap/commitdiff
ITS#7608 allow slapadd w/unknown RDNs for config DB
authorHoward Chu <hyc@openldap.org>
Tue, 28 May 2013 01:51:34 +0000 (18:51 -0700)
committerHoward Chu <hyc@openldap.org>
Tue, 28 May 2013 01:51:34 +0000 (18:51 -0700)
servers/slapd/slapadd.c

index 8b339928e8200bc917b2df6cd5c8103831f6b4b1..951739406248f2884b4b7185415baf63987c5fb0 100644 (file)
@@ -40,6 +40,8 @@
 
 #include "slapcommon.h"
 
+extern int slap_DN_strict;     /* dn.c */
+
 static char csnbuf[ LDAP_PVT_CSNSTR_BUFSIZE ];
 
 typedef struct Erec {
@@ -96,11 +98,19 @@ again:
        {
                BackendDB *bd;
                Entry *e;
+               int prev_DN_strict;
 
                if ( erec->lineno < jumpline )
                        goto again;
 
+               if ( !dbnum ) {
+                       prev_DN_strict = slap_DN_strict;
+                       slap_DN_strict = 0;
+               }
                e = str2entry2( buf, checkvals );
+               if ( !dbnum ) {
+                       slap_DN_strict = prev_DN_strict;
+               }
 
                if ( enable_meter )
                        lutil_meter_update( &meter,