]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/modify.c
Debug output: printed soc_cname, should be soc_cname.bv_val
[openldap] / servers / slapd / back-ldbm / modify.c
index 31a498fd5280dffd6b8f2c16d1a92fb640096530..51d10c269197ab37358f2242a8df3fde6d3a36ae 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2004 The OpenLDAP Foundation.
+ * Copyright 1998-2005 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -164,8 +164,8 @@ int ldbm_modify_internal(
        }
 
        /* check that the entry still obeys the schema */
-       rc = entry_schema_check( op->o_bd, e, save_attrs, text, textbuf, textlen );
-
+       rc = entry_schema_check( op->o_bd, e, save_attrs, get_manageDIT(op),
+               text, textbuf, textlen );
        if ( rc != LDAP_SUCCESS ) {
                Debug( LDAP_DEBUG_ANY, "entry failed schema check: %s\n",
                        *text, 0, 0 );
@@ -249,7 +249,6 @@ ldbm_back_modify(
 
        /* FIXME: dn2entry() should return non-glue entry */
        if (( e == NULL ) || ( !manageDSAit && e && is_entry_glue( e ))) {
-               BerVarray deref = NULL;
                if ( matched != NULL ) {
                        rs->sr_matched = ch_strdup( matched->e_dn );
                        rs->sr_ref = is_entry_referral( matched )
@@ -257,18 +256,8 @@ ldbm_back_modify(
                                : NULL;
                        cache_return_entry_r( &li->li_cache, matched );
                } else {
-                       if ( !LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) {
-                               syncinfo_t *si;
-                               LDAP_STAILQ_FOREACH( si, &op->o_bd->be_syncinfo, si_next ) {
-                                       struct berval tmpbv;
-                                       ber_dupbv( &tmpbv, &si->si_provideruri_bv[0] );
-                                       ber_bvarray_add( &deref, &tmpbv );
-                               }
-                       } else {
-                               deref = SLAPD_GLOBAL(default_referral);
-                       }
-                       rs->sr_ref = referral_rewrite( deref, NULL, &op->o_req_dn,
-                                               LDAP_SCOPE_DEFAULT );
+                       rs->sr_ref = referral_rewrite( default_referral, NULL,
+                                               &op->o_req_dn, LDAP_SCOPE_DEFAULT );
                }
 
                ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
@@ -276,9 +265,6 @@ ldbm_back_modify(
                send_ldap_result( op, rs );
 
                if ( rs->sr_ref ) ber_bvarray_free( rs->sr_ref );
-               if ( deref != SLAPD_GLOBAL(default_referral) ) {
-                       ber_bvarray_free( deref );
-               }
                free( (char *)rs->sr_matched );
 
                rs->sr_ref = NULL;