Blame SOURCES/0019-Ticket-48681-Use-of-uninitialized-value-in-string-ne.patch

96373c
From ef4ac2d45c9ea99fbb1ae6cee97745161f193bf9 Mon Sep 17 00:00:00 2001
96373c
From: Mark Reynolds <mreynolds@redhat.com>
96373c
Date: Wed, 25 Oct 2017 10:53:28 -0400
96373c
Subject: [PATCH] Ticket 48681 - Use of uninitialized value in string ne at
96373c
 /usr/bin/logconv.pl
96373c
96373c
Bug Description:  ldapi connections were not properly porcessed by the
96373c
                  connection parsing code which lead to uninitialized errors.
96373c
96373c
Fix Description:  Modify the connection IP address regex's to include "local"
96373c
96373c
https://pagure.io/389-ds-base/issue/48681
96373c
96373c
Reviewd by: mreynolds (one line commit rule)
96373c
96373c
(cherry picked from commit 6098e7b927b64ba300567e71ea611140c47676a1)
96373c
---
96373c
 ldap/admin/src/logconv.pl | 10 +++++-----
96373c
 1 file changed, 5 insertions(+), 5 deletions(-)
96373c
96373c
diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl
96373c
index 473c71f21..e36386e11 100755
96373c
--- a/ldap/admin/src/logconv.pl
96373c
+++ b/ldap/admin/src/logconv.pl
96373c
@@ -809,9 +809,9 @@ if ($totalTimeInNsecs == 0){
96373c
 print "Restarts:                     $serverRestartCount\n";
96373c
 
96373c
 if(%cipher){
96373c
-	print " Secure Protocol Versions:\n";
96373c
+	print "Secure Protocol Versions:\n";
96373c
 	foreach my $key (sort { $b cmp $a } keys %cipher) {
96373c
-		print "  - $key - $cipher{$key}\n";
96373c
+		print "  - $key ($cipher{$key} connections)\n";
96373c
 	}
96373c
 	print "\n";
96373c
 }
96373c
@@ -1754,7 +1754,7 @@ parseLineBind {
96373c
 			($end) = $endTime =~ /\D*(\S*)/;
96373c
 		}
96373c
 	}
96373c
-	if ($_ =~ /connection from *([0-9A-Fa-f\.\:]+)/i ) {
96373c
+	if ($_ =~ /connection from *([0-9A-Za-z\.\:]+)/i ) {
96373c
 		my $skip = "yes";
96373c
 		for (my $excl =0; $excl < $#excludeIP; $excl++){
96373c
 			if ($excludeIP[$excl] eq $1){
96373c
@@ -2085,7 +2085,7 @@ sub parseLineNormal
96373c
 	}
96373c
 	if (m/ connection from/){
96373c
 		my $ip;
96373c
-		if ($_ =~ /connection from *([0-9A-Fa-f\.\:]+)/i ){
96373c
+		if ($_ =~ /connection from *([0-9A-Za-z\.\:]+)/i ){
96373c
 			$ip = $1;
96373c
 			for (my $xxx =0; $xxx < $#excludeIP; $xxx++){
96373c
 				if ($excludeIP[$xxx] eq $ip){$exc = "yes";}
96373c
@@ -2253,7 +2253,7 @@ sub parseLineNormal
96373c
 	}
96373c
 	if ($usage =~ /g/ || $usage =~ /c/ || $usage =~ /i/ || $usage =~ /f/ || $usage =~ /u/ || $usage =~ /U/ || $verb eq "yes"){
96373c
 		$exc = "no";
96373c
-		if ($_ =~ /connection from *([0-9A-fa-f\.\:]+)/i ) {
96373c
+		if ($_ =~ /connection from *([0-9A-Za-z\.\:]+)/i ) {
96373c
 			for (my $xxx = 0; $xxx < $#excludeIP; $xxx++){
96373c
 				if ($1 eq $excludeIP[$xxx]){
96373c
 					$exc = "yes";
96373c
-- 
96373c
2.13.6
96373c