#48231 logconv autobind handling regression caused by 47446
Closed: Fixed None Opened 3 years ago by rmeggins.

https://fedorahosted.org/389/ticket/47446 has introduced a (small) regression. when there are autobinds with ldapi, the code enters into the
{{{ if($_ =~ /AUTOBIND dn=\"(.*)\"/) }}}
and compares {{{ $1 }}} with {{{ $rootDN }}}. Everything is ok until the next if concerning the usage
{{{ if($usage =~ /f/ || $usage =~ /u/ || $usage =~ /U/ || $usage =~ /b/ || $verb eq "yes") }}}

At this stage, {{{ $1 }}} is reset to {{{ undef }}} and the translate operator {{{ $tmpp =~ tr/A-Z/a-z/; }}} spits out

Use of uninitialized value in transliteration (tr///) at /Local/dirsrv/bin/logconv.pl line 2018, <$LOGFH> line 207.
Use of uninitialized value $tmpp in hash element at /Local/dirsrv/bin/logconv.pl line 2019, <$LOGFH> line 207.

The patch is trivial - just set the value of {{{ $tmpp }}} outside of the second if. For the logconv.pl from the branch 1.3.3.x :

--- ./dirsrv/bin/logconv.pl     2015-07-28 11:24:31.000000000 +0200
+++ /Local/dirsrv/bin/logconv.pl        2015-07-28 14:59:06.358309779 +0200
@@ -2013,8 +2013,8 @@
                        if($1 eq $rootDN){
                                $rootDNBindCount++;
                        }
+                       $tmpp = $1;
                        if($usage =~ /f/ || $usage =~ /u/ || $usage =~ /U/ || $usage =~ /b/ || $verb eq "yes"){
-                               $tmpp = $1;
                                $tmpp =~ tr/A-Z/a-z/;
                                $hashes->{bindlist}->{$tmpp}++;
                        }

Thanks for providing the fix and testing it, pj101 and rmeggins@redhat.com.

Reviewed by nhosoi@redhat.com.

Pushed to master:
0db2978..44a223f master -> master
commit 44a223f

Pushed to 389-ds-base-1.3.4:
b81adb0..e7fc143 389-ds-base-1.3.4 -> 389-ds-base-1.3.4
commit e7fc143

Pushed to 389-ds-base-1.3.3:
a3af235..132e716 389-ds-base-1.3.3 -> 389-ds-base-1.3.3
commit 132e716

Pushed to 389-ds-base-1.2.11:
e94bf22..e4db055 389-ds-base-1.2.11
commit e4db055
-> 389-ds-base-1.2.11

Metadata Update from @nhosoi:
- Issue set to the milestone: 1.2.11.33

2 years ago

Login to comment on this ticket.

Metadata