]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9538 Actually skip internal searches
authorOndřej Kuzník <ondra@mistotebe.net>
Tue, 14 Sep 2021 10:17:06 +0000 (11:17 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 10 Jan 2022 22:25:33 +0000 (22:25 +0000)
servers/slapd/overlays/accesslog.c

index b90d8a17081ac0fb911f203a566a696e293192bb..adbf70110a11bdc08824c8bbea2ed00d30e46bac 100644 (file)
@@ -2063,6 +2063,16 @@ static int
 accesslog_op_misc( Operation *op, SlapReply *rs )
 {
        slap_callback *sc;
+       slap_verbmasks *lo;
+       int logop;
+
+       logop = accesslog_op2logop( op );
+       lo = logops+logop+EN_OFFSET;
+
+       /* ignore these internal reads */
+       if (( lo->mask & LOG_OP_READS ) && op->o_do_not_cache ) {
+               return SLAP_CB_CONTINUE;
+       }
 
        sc = op->o_tmpcalloc( 1, sizeof(slap_callback), op->o_tmpmemctx );
        sc->sc_response = accesslog_response;
@@ -2097,11 +2107,6 @@ accesslog_op_mod( Operation *op, SlapReply *rs )
        logop = accesslog_op2logop( op );
        lo = logops+logop+EN_OFFSET;
 
-       /* Ignore these internal reads */
-       if (( lo->mask & LOG_OP_READS ) && op->o_do_not_cache ) {
-               return SLAP_CB_CONTINUE;
-       }
-
        if ( !( li->li_ops & lo->mask )) {
                log_base *lb;
                int i = 0;