amoralej / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 years ago
Clone

Blame SOURCES/0034-Ticket-48681-logconv.pl-fix-sasl-bind-stats.patch

b69e47
From e9514af2fed9f882a8d11d509ffb99e49a304438 Mon Sep 17 00:00:00 2001
b69e47
From: Mark Reynolds <mreynolds@redhat.com>
b69e47
Date: Tue, 2 May 2017 16:49:59 -0400
b69e47
Subject: [PATCH] Ticket 48681 - logconv.pl - fix sasl/bind stats
b69e47
b69e47
Description: Fixed the bind and sasl bind total counts, also adjusted the
b69e47
             v3 bind count to match the sasl bind.
b69e47
b69e47
https://pagure.io/389-ds-base/issue/48681
b69e47
b69e47
Reviewed by: firstyear(Thanks!)
b69e47
b69e47
(cherry picked from commit 770bf3a2341f1ea2e0778a6443b0f89ed77e73af)
b69e47
---
b69e47
 ldap/admin/src/logconv.pl | 3 +++
b69e47
 1 file changed, 3 insertions(+)
b69e47
b69e47
diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl
b69e47
index 96639f2..c30e175 100755
b69e47
--- a/ldap/admin/src/logconv.pl
b69e47
+++ b/ldap/admin/src/logconv.pl
b69e47
@@ -2533,6 +2533,7 @@ sub parseLineNormal
b69e47
 	}
b69e47
 	if (/ BIND / && /method=sasl/i){
b69e47
 		$saslBindCount++;
b69e47
+		$bindCount++;
b69e47
 		if ($_ =~ /mech=(.*)/i ){
b69e47
 			my $mech = $1;
b69e47
 			$hashes->{saslmech}->{$mech}++;
b69e47
@@ -2550,6 +2551,8 @@ sub parseLineNormal
b69e47
 	if (/ RESULT err=14 tag=97 / && / SASL bind in progress/){
b69e47
 		# Drop the sasl bind count since this is step in the bind process
b69e47
 		$saslBindCount--;
b69e47
+		$bindCount--;
b69e47
+		$v3BindCount--;
b69e47
 		my ($conn, $op);
b69e47
 		if ($_ =~ /conn= *([0-9A-Z]+) +op= *([0-9\-]+)/i){
b69e47
 			$conn = $1;
b69e47
-- 
b69e47
2.9.3
b69e47