]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/modify.c
Import improved schema check error reporting from HEAD
[openldap] / servers / slapd / back-ldbm / modify.c
index 8e7c7441a852cceb361a7f9d61fc8e6b235db7e6..0dc69c133ee185ca916612fc97891f439e191292 100644 (file)
@@ -34,7 +34,9 @@ int ldbm_modify_internal(
     const char *dn,
     Modifications      *modlist,
     Entry      *e,
-       const char **text 
+       const char **text,
+       char *textbuf,
+       size_t textlen
 )
 {
        int rc, err;
@@ -135,7 +137,7 @@ int ldbm_modify_internal(
        ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
 
        /* check that the entry still obeys the schema */
-       rc = entry_schema_check( e, save_attrs, text );
+       rc = entry_schema_check( e, save_attrs, text, textbuf, textlen );
        if ( rc != LDAP_SUCCESS ) {
                attrs_free( e->e_attrs );
                e->e_attrs = save_attrs;
@@ -182,6 +184,8 @@ ldbm_back_modify(
        Entry           *e;
        int             manageDSAit = get_manageDSAit( op );
        const char *text = NULL;
+       char textbuf[SLAP_TEXT_BUFLEN];
+       size_t textlen = sizeof textbuf;
 
        Debug(LDAP_DEBUG_ARGS, "ldbm_back_modify:\n", 0, 0, 0);
 
@@ -229,7 +233,8 @@ ldbm_back_modify(
        }
        
        /* Modify the entry */
-       rc = ldbm_modify_internal( be, conn, op, ndn, modlist, e, &text );
+       rc = ldbm_modify_internal( be, conn, op, ndn, modlist, e,
+               &text, textbuf, textlen );
 
        if( rc != LDAP_SUCCESS ) {
                if( rc != SLAPD_ABANDON ) {