amoralej / rpms / 389-ds-base

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

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

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