]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#7080 Find config entry before processing pre-read on delete
authorOndřej Kuzník <ondra@mistotebe.net>
Fri, 10 Dec 2021 11:28:45 +0000 (11:28 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 6 Jan 2022 03:05:45 +0000 (03:05 +0000)
servers/slapd/bconfig.c

index 9fabfbc411aa75fbd019c5616fdeb5fb77d06b6e..7b870210db241cd6a2da62ff31d7d4aa3cb57446 100644 (file)
@@ -6599,6 +6599,7 @@ config_back_delete( Operation *op, SlapReply *rs )
        cfb = (CfBackInfo *)op->o_bd->be_private;
 
        /* If we have a backend, it will handle the control */
+       ce = config_find_base( cfb->cb_root, &op->o_req_ndn, &last );
        if ( ce && !cfb->cb_use_ldif && op->o_preread ) {
                if ( preread_ctrl == NULL ) {
                        preread_ctrl = &ctrls[num_ctrls++];
@@ -6618,7 +6619,6 @@ config_back_delete( Operation *op, SlapReply *rs )
                }
        }
 
-       ce = config_find_base( cfb->cb_root, &op->o_req_ndn, &last );
        if ( !ce ) {
                if ( last )
                        rs->sr_matched = last->ce_entry->e_name.bv_val;