]> git.sur5r.net Git - openldap/commitdiff
if tool mode needs to add structuralObjectClass, override any database setting (ratio...
authorPierangelo Masarati <ando@openldap.org>
Tue, 28 Aug 2007 18:36:42 +0000 (18:36 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 28 Aug 2007 18:36:42 +0000 (18:36 +0000)
servers/slapd/slapadd.c

index 495d03af74a4aadd75a1ae3a94aa4537453d3e1a..a758955224a1c420fab84dcb0a94cca5b2aa2ac7 100644 (file)
@@ -96,6 +96,11 @@ slapadd( int argc, char **argv )
        lmax = 0;
        nextline = 0;
 
+       /* enforce schema checking unless not disabled */
+       if ( (slapMode & SLAP_TOOL_NO_SCHEMA_CHECK) == 0) {
+               SLAP_DBFLAGS(be) &= ~(SLAP_DBFLAG_NO_SCHEMA_CHECK);
+       }
+
        if( !dryrun && be->be_entry_open( be, 1 ) != 0 ) {
                fprintf( stderr, "%s: could not open database.\n",
                        progname );