]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/modify.c
Fallout from ITS#4986 - remove unused param of select_backend()
[openldap] / servers / slapd / modify.c
index ca53e0b9fa0e19284e31371351135341821a21f9..d4180770f711cdbbc62cf0e581e47936be06f0c9 100644 (file)
@@ -41,9 +41,6 @@ do_modify(
     SlapReply  *rs )
 {
        struct berval dn = BER_BVNULL;
-       char            *last;
-       ber_tag_t       tag;
-       ber_len_t       len;
        char            textbuf[ SLAP_TEXT_BUFLEN ];
        size_t          textlen = sizeof( textbuf );
 
@@ -98,6 +95,8 @@ do_modify(
                goto cleanup;
        }
 
+       op->orm_no_opattrs = 0;
+
        rs->sr_err = slap_mods_check( op, op->orm_modlist,
                &rs->sr_text, textbuf, textlen, NULL );
 
@@ -130,7 +129,6 @@ fe_op_modify( Operation *op, SlapReply *rs )
 #ifdef LDAP_DEBUG
        Modifications   *tmp;
 #endif
-       int             manageDSAit;
        BackendDB       *op_be, *bd = op->o_bd;
        char            textbuf[ SLAP_TEXT_BUFLEN ];
        size_t          textlen = sizeof( textbuf );
@@ -210,14 +208,12 @@ fe_op_modify( Operation *op, SlapReply *rs )
        }
 #endif /* LDAP_DEBUG */
 
-       manageDSAit = get_manageDSAit( op );
-
        /*
         * We could be serving multiple database backends.  Select the
         * appropriate one, or send a referral to our "referral server"
         * if we don't hold it.
         */
-       op->o_bd = select_backend( &op->o_req_ndn, manageDSAit, 1 );
+       op->o_bd = select_backend( &op->o_req_ndn, 1 );
        if ( op->o_bd == NULL ) {
                op->o_bd = bd;
                rs->sr_ref = referral_rewrite( default_referral,
@@ -244,7 +240,7 @@ fe_op_modify( Operation *op, SlapReply *rs )
        /* If we've got a glued backend, check the real backend */
        op_be = op->o_bd;
        if ( SLAP_GLUE_INSTANCE( op->o_bd )) {
-               op->o_bd = select_backend( &op->o_req_ndn, manageDSAit, 0 );
+               op->o_bd = select_backend( &op->o_req_ndn, 0 );
        }
 
        /* check restrictions */
@@ -287,7 +283,6 @@ fe_op_modify( Operation *op, SlapReply *rs )
                 */
                if ( !SLAP_SINGLE_SHADOW(op->o_bd) || repl_user ) {
                        int update = !BER_BVISEMPTY( &op->o_bd->be_update_ndn );
-                       slap_callback cb = { NULL, slap_replog_cb, NULL, NULL };
 
                        op->o_bd = op_be;
 
@@ -299,13 +294,6 @@ fe_op_modify( Operation *op, SlapReply *rs )
                                        goto cleanup;
                                }
                        }
-
-                       if ( !repl_user ) {
-                               /* but multimaster slapd logs only the ones 
-                                * not from a replicator user */
-                               cb.sc_next = op->o_callback;
-                               op->o_callback = &cb;
-                       }
                        op->o_bd->be_modify( op, rs );
 
                } else { /* send a referral */
@@ -695,7 +683,7 @@ int slap_mods_check(
 
                                        MatchingRule *mr = ad->ad_type->sat_equality;
                                        int istack[sizeof(int)*16];
-                                       int i,j,k,l,ir,jstack, rc, match, *ix, itmp;
+                                       int i, j, k, l, ir, jstack, match, *ix, itmp;
                                        struct berval a, *cv;
 
 /* If PRESERVE_ORDER is defined only the index array is sorted; the
@@ -924,11 +912,9 @@ void slap_mods_opattrs(
 
                ptr = ber_bvchr( &csn, '#' );
                if ( ptr ) {
-                       timestamp.bv_len = ptr - csn.bv_val;
-                       if ( timestamp.bv_len >= sizeof( timebuf ) ) {  /* ?!? */
-                               timestamp.bv_len = sizeof( timebuf ) - 1;
-                       }
+                       timestamp.bv_len = STRLENOF("YYYYMMDDHHMMSSZ");
                        AC_MEMCPY( timebuf, csn.bv_val, timestamp.bv_len );
+                       timebuf[timestamp.bv_len-1] = 'Z';
                        timebuf[timestamp.bv_len] = '\0';
 
                } else {