andykimpe / rpms / 389-ds-base

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

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

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