From: Pierangelo Masarati Date: Tue, 28 Aug 2007 18:36:42 +0000 (+0000) Subject: if tool mode needs to add structuralObjectClass, override any database setting (ratio... X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~53 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9a0797004f19327a6765d2f4ea3305f139b3789e;p=openldap if tool mode needs to add structuralObjectClass, override any database setting (rationale: if configured w/ mirror mode and syncrepl, a master is also a shadow, but we need to be able to slapadd to a master (possibly with the correct SID; will deal with this later) --- diff --git a/servers/slapd/slapadd.c b/servers/slapd/slapadd.c index 495d03af74..a758955224 100644 --- a/servers/slapd/slapadd.c +++ b/servers/slapd/slapadd.c @@ -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 );