]> git.sur5r.net Git - openldap/commitdiff
Check log_ops before logging unbind and abandon
authorHoward Chu <hyc@openldap.org>
Mon, 26 Sep 2005 09:49:03 +0000 (09:49 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 26 Sep 2005 09:49:03 +0000 (09:49 +0000)
servers/slapd/overlays/accesslog.c

index 6bcd9701ebd9fba09fdcb3aa7c2b61b52b9a7420..2cbda0046eaf84b1b94a1419d70f5a2da4406e66 100644 (file)
@@ -995,6 +995,9 @@ accesslog_unbind( Operation *op, SlapReply *rs )
                SlapReply rs2 = {REP_RESULT};
                Entry *e;
 
+               if ( !( li->li_ops & LOG_OP_UNBIND ))
+                       return SLAP_CB_CONTINUE;
+
                e = accesslog_entry( op, LOG_EN_UNBIND );
                op2.o_hdr = op->o_hdr;
                op2.o_tag = LDAP_REQ_ADD;
@@ -1025,7 +1028,7 @@ accesslog_abandon( Operation *op, SlapReply *rs )
        char buf[64];
        struct berval bv;
 
-       if ( !op->o_time )
+       if ( !op->o_time || !( li->li_ops & LOG_OP_ABANDON ))
                return SLAP_CB_CONTINUE;
 
        e = accesslog_entry( op, LOG_EN_ABANDON );