From 9a0797004f19327a6765d2f4ea3305f139b3789e Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 28 Aug 2007 18:36:42 +0000 Subject: [PATCH] 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) --- servers/slapd/slapadd.c | 5 +++++ 1 file changed, 5 insertions(+) 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 ); -- 2.39.5