]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-monitor/modify.c
tolerate that config_get_vals() returns success with no values (ITS#4341)
[openldap] / servers / slapd / back-monitor / modify.c
index 0fe61e2b46acec739d81f47137f8022af2aa9524..3602bf548173580c1d7034d62ecfb98e00989932 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2001-2005 The OpenLDAP Foundation.
+ * Copyright 2001-2006 The OpenLDAP Foundation.
  * Portions Copyright 2001-2003 Pierangelo Masarati.
  * All rights reserved.
  *
@@ -41,7 +41,7 @@ monitor_back_modify( Operation *op, SlapReply *rs )
        Debug(LDAP_DEBUG_ARGS, "monitor_back_modify:\n", 0, 0, 0);
 
        /* acquire and lock entry */
-       monitor_cache_dn2entry( op, &op->o_req_ndn, &e, &matched );
+       monitor_cache_dn2entry( op, rs, &op->o_req_ndn, &e, &matched );
        if ( e == NULL ) {
                rs->sr_err = LDAP_NO_SUCH_OBJECT;
                if ( matched ) {
@@ -67,8 +67,12 @@ monitor_back_modify( Operation *op, SlapReply *rs )
 
        if ( !acl_check_modlist( op, e, op->oq_modify.rs_modlist )) {
                rc = LDAP_INSUFFICIENT_ACCESS;
+
        } else {
-               rc = monitor_entry_modify( op, e );
+               assert( !SLAP_SHADOW( op->o_bd ) );
+               slap_mods_opattrs( op, &op->orm_modlist, 0 );
+
+               rc = monitor_entry_modify( op, rs, e );
        }
 
 #ifdef SLAP_ACL_HONOR_DISCLOSE