int normalize = 0;
local_rc = slap_str2ad( mod->mod_type, &mods.sm_desc, &text );
+ /*
+ * Usually this would be a bad idea (way too dangerous, risks
+ * corrupting the DB), but ITS#7786 documents this as a last
+ * resort to fix cn=config and missing attributes are one of
+ * the possible issues we might encounter.
+ */
+ if ( local_rc == LDAP_UNDEFINED_TYPE &&
+ (slapMode & SLAP_TOOL_NO_SCHEMA_CHECK) ) {
+ local_rc = slap_str2undef_ad( mod->mod_type, &mods.sm_desc, &text, 0 );
+ }
if ( local_rc != LDAP_SUCCESS ) {
fprintf( stderr, "%s: slap_str2ad(\"%s\") failed for entry \"%s\" (%d: %s, lineno=%lu)\n",
progname, mod->mod_type, lr.lr_dn.bv_val, local_rc, text, lineno );