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