]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#7080 cn=config postread support for modrdn when back-ldif not used
authorOndřej Kuzník <ondra@mistotebe.net>
Thu, 13 Jan 2022 09:45:21 +0000 (09:45 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 18 Jan 2022 18:31:32 +0000 (18:31 +0000)
servers/slapd/bconfig.c

index 49a6b3ff1491131c7e4599f38f341b115ced526e..693cfa3206e8c2b366336cfa5df5d992d39f45f0 100644 (file)
@@ -6615,6 +6615,20 @@ config_back_modrdn( Operation *op, SlapReply *rs )
                op->oq_modrdn = modr;
        }
 
+       if ( rs->sr_err == LDAP_SUCCESS && !cfb->cb_use_ldif && op->o_postread ) {
+               if ( postread_ctrl == NULL ) {
+                       postread_ctrl = &ctrls[num_ctrls++];
+                       ctrls[num_ctrls] = NULL;
+               }
+               if ( slap_read_controls( op, rs, ce->ce_entry,
+                       &slap_post_read_bv, postread_ctrl ) )
+               {
+                       Debug( LDAP_DEBUG_ANY, "config_back_modrdn: "
+                               "post-read failed \"%s\"\n",
+                               ce->ce_entry->e_name.bv_val );
+               }
+       }
+
        if ( dopause )
                slap_unpause_server();
 out: