From f83f7fe1d2d41809e9ab824e572558f881f12766 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Jan 16 2014 16:19:54 +0000 Subject: Ticket #47675 logconv errors when search has invalid bind dn https://fedorahosted.org/389/ticket/47675 Reviewed by: mreynolds (Thanks!) Branch: master Fix Description: Just skip processing the search request, and let the err=34 processing handle this case. Platforms tested: RHEL6 x86_64 Flag Day: no Doc impact: no --- diff --git a/ldap/admin/src/logconv.pl b/ldap/admin/src/logconv.pl index 7da46e0..0f82aee 100755 --- a/ldap/admin/src/logconv.pl +++ b/ldap/admin/src/logconv.pl @@ -2171,6 +2171,7 @@ sub parseLineNormal } if (($usage =~ /l/ || $verb eq "yes" || $usage =~ /u/ || $usage =~ /U/) and / SRCH /){ my ($filterConn, $filterOp); + $tmpp = ""; if (/ SRCH / && / attrs=/ && $_ =~ /filter=\"(.*)\" /i ){ $tmpp = $1; $tmpp =~ tr/A-Z/a-z/; @@ -2185,11 +2186,15 @@ sub parseLineNormal $hashes->{filter}->{$tmpp}++; if ($_ =~ /conn= *([0-9A-Z]+)/i) { $filterConn = $1; } if ($_ =~ /op= *([0-9\-]+)/i) { $filterOp = $1; } + } elsif (/ SRCH / && /invalid dn/){ + # this will be caught by the err=34 checking } - $filterCount++; - if($usage =~ /u/ || $usage =~ /U/ || $verb eq "yes"){ - # we only need this for the unindexed search report - $hashes->{filter_conn_op}->{"$serverRestartCount,$filterConn,$filterOp"} = $tmpp; + if ($tmpp) { + $filterCount++; + if($usage =~ /u/ || $usage =~ /U/ || $verb eq "yes"){ + # we only need this for the unindexed search report + $hashes->{filter_conn_op}->{"$serverRestartCount,$filterConn,$filterOp"} = $tmpp; + } } } if (($usage =~ /a/ || $verb eq "yes" || $usage =~ /u/ || $usage =~ /U/) and / SRCH /){