]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10313 Allow counter mods to be chained
authorOndřej Kuzník <ondra@mistotebe.net>
Wed, 8 Oct 2025 16:11:30 +0000 (17:11 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 21 Oct 2025 03:15:43 +0000 (03:15 +0000)
servers/slapd/overlays/otp.c

index 772c9d2d982db02124901a46fe35861afbf2936f..9eade462456399c9a898cb47f205be7316f395b2 100644 (file)
@@ -987,6 +987,9 @@ otp_check_and_update( Operation *op, BerValue *totpdn, BerValue *hotpdn,
                slap_op_time( &op2.o_time, &op2.o_tincr );
                BER_BVZERO( &op2.o_csn );
 
+               if ( SLAP_SHADOW( op->o_bd ) ) {
+                       op2.o_bd = frontendDB;
+               }
                rc = op2.o_bd->be_modify( &op2, &rs2 );
                if ( rs2.sr_err != LDAP_SUCCESS ) {
                        Debug( LDAP_DEBUG_ANY, "%s otp_check_and_update: "