]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-meta/modify.c
refine fix to ITS#4315; apply it to back-meta as well
[openldap] / servers / slapd / back-meta / modify.c
index f2b40d24a409d32e08c1b13eb1160affd41373fd..fd54c03fcca7f4b88832cbf321540f020f0eb33e 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1999-2005 The OpenLDAP Foundation.
+ * Copyright 1999-2006 The OpenLDAP Foundation.
  * Portions Copyright 2001-2003 Pierangelo Masarati.
  * Portions Copyright 1999-2003 Howard Chu.
  * All rights reserved.
@@ -89,7 +89,8 @@ meta_back_modify( Operation *op, SlapReply *rs )
        for ( i = 0, ml = op->orm_modlist; ml; ml = ml->sml_next ) {
                int     j, is_oc = 0;
 
-               if ( !isupdate && ml->sml_desc->ad_type->sat_no_user_mod  ) {
+               if ( !isupdate && !get_manageDIT( op ) && ml->sml_desc->ad_type->sat_no_user_mod  )
+               {
                        continue;
                }
 
@@ -185,15 +186,15 @@ retry:;
                struct timeval  tv, *tvp = NULL;
                LDAPMessage     *res = NULL;
 
-               if ( mi->mi_targets[ candidate ].mt_timeout[ META_OP_MODIFY ] != 0 ) {
-                       tv.tv_sec = mi->mi_targets[ candidate ].mt_timeout[ META_OP_MODIFY ];
+               if ( mi->mi_targets[ candidate ].mt_timeout[ LDAP_BACK_OP_MODIFY ] != 0 ) {
+                       tv.tv_sec = mi->mi_targets[ candidate ].mt_timeout[ LDAP_BACK_OP_MODIFY ];
                        tv.tv_usec = 0;
                        tvp = &tv;
                }
 
                rs->sr_err = LDAP_OTHER;
                rc = ldap_result( mc->mc_conns[ candidate ].msc_ld,
-                       msgid, LDAP_MSG_ONE, tvp, &res );
+                       msgid, LDAP_MSG_ALL, tvp, &res );
                switch ( rc ) {
                case -1:
                        rc = -1;