From: Howard Chu Date: Sun, 29 Jun 2008 03:35:54 +0000 (+0000) Subject: ITS#5540 check for structural_class() failures X-Git-Tag: LOCKER_IDS~85 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=417ab52d4572de3925a69cbf91af6971911a947b;p=openldap ITS#5540 check for structural_class() failures --- diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 450cbbfc8e..bd93b5c7b4 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -5507,6 +5507,12 @@ config_build_entry( Operation *op, SlapReply *rs, CfEntryInfo *parent, oc_at = attr_find( e->e_attrs, slap_schema.si_ad_objectClass ); rc = structural_class(oc_at->a_vals, &oc, NULL, &text, c->cr_msg, sizeof(c->cr_msg), op ? op->o_tmpmemctx : NULL ); + if ( rc != LDAP_SUCCESS ) { + Debug( LDAP_DEBUG_ANY, + "config_build_entry: build \"%s\" failed: \"%s\"\n", + rdn->bv_val, text, 0); + return NULL; + } attr_merge_normalize_one(e, slap_schema.si_ad_structuralObjectClass, &oc->soc_cname, NULL ); if ( op ) { op->ora_e = e;