From: Howard Chu Date: Sun, 24 Dec 2006 07:14:54 +0000 (+0000) Subject: ITS#4788 op->o_no_schema_check allows unknown attrs in slap_mods_check X-Git-Tag: OPENLDAP_REL_ENG_2_4_4ALPHA~8^2~316 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=01744806a36d0b79dc1a238f47b44c5413dcb584;p=openldap ITS#4788 op->o_no_schema_check allows unknown attrs in slap_mods_check --- diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index f8f709244d..f840262208 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -554,6 +554,12 @@ int slap_mods_check( /* convert to attribute description */ if ( ml->sml_desc == NULL ) { rc = slap_bv2ad( &ml->sml_type, &ml->sml_desc, text ); + if( rc != LDAP_SUCCESS ) { + if ( get_no_schema_check( op )) { + rc = slap_bv2undef_ad( &ml->sml_type, &ml->sml_desc, + text, 0 ); + } + } if( rc != LDAP_SUCCESS ) { snprintf( textbuf, textlen, "%s: %s", ml->sml_type.bv_val, *text );