mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-30 02:19:26 -05:00
ITS#4884 fix prev commit
This commit is contained in:
parent
a1a63bead0
commit
f0468901c6
1 changed files with 15 additions and 2 deletions
|
|
@ -4187,11 +4187,26 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs,
|
|||
rc = LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
colst = count_ocs( oc_at, &nocs );
|
||||
|
||||
/* Check whether the Add is allowed by its parent, and do
|
||||
* any necessary arg setup
|
||||
*/
|
||||
if ( last ) {
|
||||
rc = config_add_oc( &coptr, last, e, ca );
|
||||
if ( rc == LDAP_CONSTRAINT_VIOLATION ) {
|
||||
for ( i = 0; i<nocs; i++ ) {
|
||||
/* Already checked these */
|
||||
if ( colst[i]->co_oc->soc_kind == LDAP_SCHEMA_STRUCTURAL )
|
||||
continue;
|
||||
if ( colst[i]->co_ldadd &&
|
||||
( rc = colst[i]->co_ldadd( last, e, ca ))
|
||||
!= LDAP_CONSTRAINT_VIOLATION ) {
|
||||
coptr = colst[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( rc == LDAP_CONSTRAINT_VIOLATION ) {
|
||||
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
||||
"DN=\"%s\" no structural objectClass add function\n",
|
||||
|
|
@ -4200,8 +4215,6 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs,
|
|||
}
|
||||
}
|
||||
|
||||
colst = count_ocs( oc_at, &nocs );
|
||||
|
||||
/* Add the entry but don't parse it, we already have its contents */
|
||||
if ( rc == LDAP_COMPARE_TRUE ) {
|
||||
rc = LDAP_SUCCESS;
|
||||
|
|
|
|||
Loading…
Reference in a new issue