zrhoffman / rpms / 389-ds-base

Forked from rpms/389-ds-base 3 years ago
Clone
Blob Blame History Raw
From e9514af2fed9f882a8d11d509ffb99e49a304438 Mon Sep 17 00:00:00 2001
From: Mark Reynolds <mreynolds@redhat.com>
Date: Tue, 2 May 2017 16:49:59 -0400
Subject: [PATCH] Ticket 48681 - logconv.pl - fix sasl/bind stats

Description: Fixed the bind and sasl bind total counts, also adjusted the
             v3 bind count to match the sasl bind.

https://pagure.io/389-ds-base/issue/48681

Reviewed by: firstyear(Thanks!)

(cherry picked from commit 770bf3a2341f1ea2e0778a6443b0f89ed77e73af)
---
 ldap/admin/src/logconv.pl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl
index 96639f2..c30e175 100755
--- a/ldap/admin/src/logconv.pl
+++ b/ldap/admin/src/logconv.pl
@@ -2533,6 +2533,7 @@ sub parseLineNormal
 	}
 	if (/ BIND / && /method=sasl/i){
 		$saslBindCount++;
+		$bindCount++;
 		if ($_ =~ /mech=(.*)/i ){
 			my $mech = $1;
 			$hashes->{saslmech}->{$mech}++;
@@ -2550,6 +2551,8 @@ sub parseLineNormal
 	if (/ RESULT err=14 tag=97 / && / SASL bind in progress/){
 		# Drop the sasl bind count since this is step in the bind process
 		$saslBindCount--;
+		$bindCount--;
+		$v3BindCount--;
 		my ($conn, $op);
 		if ($_ =~ /conn= *([0-9A-Z]+) +op= *([0-9\-]+)/i){
 			$conn = $1;
-- 
2.9.3