RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1247812 - logconv autobind handling regression caused by 47446
Summary: logconv autobind handling regression caused by 47446
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base
Version: 6.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
Petr Bokoc
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-29 00:30 UTC by Noriko Hosoi
Modified: 2020-09-13 21:28 UTC (History)
6 users (show)

Fixed In Version: 389-ds-base-1.2.11.15-67.el6
Doc Type: Bug Fix
Doc Text:
When there are autobinds with ldapi, logconv.pl failed with an syntax error. The bug was fixed.
Clone Of:
Environment:
Last Closed: 2016-05-10 19:20:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 1562 0 None None None 2020-09-13 21:28:44 UTC
Red Hat Product Errata RHBA-2016:0737 0 normal SHIPPED_LIVE 389-ds-base bug fix and enhancement update 2016-05-10 22:29:13 UTC

Description Noriko Hosoi 2015-07-29 00:30:59 UTC

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}++;
                        }

Comment 2 Amita Sharma 2015-12-17 10:13:12 UTC
Hi Norkio,

This is the current logconv.pl code ::
                       if($1 eq $rootDN){
                                $rootDNBindCount++;
                        }
                        $tmpp = $1;
                        if($usage =~ /f/ || $usage =~ /u/ || $usage =~ /U/ || $usage =~ /b/ || $verb eq "yes"){
                                $tmpp =~ tr/A-Z/a-z/;
                                $hashes->{bindlist}->{$tmpp}++;
                        }
                } else {
                        $anonymousBindCount++;
                        if($usage =~ /f/ || $usage =~ /u/ || $usage =~ /U/ || $usage =~ /b/ || $verb eq "yes"){
                                $hashes->{bindlist}->{"Anonymous Binds"}++;
                                if($reportStats){ inc_stats('anonbind',$s_stats,$m_stats); }
                        }

with [root@mgmt7 ~]# rpm -qa | grep 389
389-ds-base-1.2.11.15-70.el6.x86_64
389-ds-base-devel-1.2.11.15-70.el6.x86_64
389-ds-base-debuginfo-1.2.11.15-70.el6.x86_64
389-ds-base-libs-1.2.11.15-70.el6.x86_64

Do I need to verify with some other execution as well?

Thanks,
Ami

Comment 3 Noriko Hosoi 2015-12-17 19:17:52 UTC
Hi Ami,

(In reply to Amita Sharma from comment #2)
> Hi Norkio,
> 
> This is the current logconv.pl code ::
>                        if($1 eq $rootDN){
>                                 $rootDNBindCount++;
>                         }
>                         $tmpp = $1;
>                         if($usage =~ /f/ || $usage =~ /u/ || $usage =~ /U/
> || $usage =~ /b/ || $verb eq "yes"){
>                                 $tmpp =~ tr/A-Z/a-z/;
>                                 $hashes->{bindlist}->{$tmpp}++;
>                         }
The fix by DS 48231 is correctly applied in the above code.

And without the patch, there was this symptom.

> Description: When there are autobinds with ldapi, the tool fails 
> with an syntax error:
> 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.

In addition to the verification on the code, if you don't have the problem, then you could mark VERIFIED.

Thanks!

Comment 4 Amita Sharma 2015-12-22 16:08:12 UTC
Thanks Noriko.
[root@mgmt7 6.0]# rpm -qa | grep 389
389-ds-base-1.2.11.15-70.el6.x86_64
389-ds-base-devel-1.2.11.15-70.el6.x86_64
389-ds-base-debuginfo-1.2.11.15-70.el6.x86_64
389-ds-base-libs-1.2.11.15-70.el6.x86_64

[root@mgmt7 ldapi]# logconv.pl /var/log/dirsrv/slapd-deftestinst/access
Access Log Analyzer 8.1
Command: logconv.pl /var/log/dirsrv/slapd-deftestinst/access
Processing 1 Access Log(s)...
[001] /var/log/dirsrv/slapd-deftestinst/access	size (bytes):       174366


Total Log Lines Analysed:  2058


----------- Access Log Output ------------

Start of Logs:    22/Dec/2015:11:01:37
End of Logs:      22/Dec/2015:11:04:47

Processed Log Time:  0 Hours, 3 Minutes, 10 Seconds

Restarts:                     12
Total Connections:            88
 - LDAP Connections:          -59
 - LDAPI Connections:         147
 - LDAPS Connections:         0
 - StartTLS Extended Ops:     0
Peak Concurrent Connections:  1
Total Operations:             677
Total Results:                680
Overall Performance:          100.0%

Searches:                     97            (0.51/sec)  (30.63/min)
Modifications:                139           (0.73/sec)  (43.89/min)
Adds:                         84            (0.44/sec)  (26.53/min)
Deletes:                      117           (0.62/sec)  (36.95/min)
Mod RDNs:                     3             (0.02/sec)  (0.95/min)
Compares:                     0             (0.00/sec)  (0.00/min)
Binds:                        237           (1.25/sec)  (74.84/min)

Proxied Auth Operations:      0
Persistent Searches:          0
Internal Operations:          0
Entry Operations:             0
Extended Operations:          0
Abandoned Requests:           0
Smart Referrals Received:     0

VLV Operations:               0
VLV Unindexed Searches:       0
VLV Unindexed Components:     0
SORT Operations:              0

Entire Search Base Queries:   25
Paged Searches:               0
Unindexed Searches:           0
Unindexed Components:         8

FDs Taken:                    235
FDs Returned:                 235
Highest FD Taken:             65

Broken Pipes:                 0
Connections Reset By Peer:    0
Resource Unavailable:         0
Max BER Size Exceeded:        0

Binds:                        237
Unbinds:                      231
 - LDAP v2 Binds:             0
 - LDAP v3 Binds:             235
 - AUTOBINDs:                 2
 - SSL Client Binds:          0
 - Failed SSL Client Binds:   0
 - SASL Binds:                7
    CRAM-MD5 - 2
    DIGEST-MD5 - 2
    EXTERNAL - 2
    PLAIN - 1
 - Directory Manager Binds:   183
 - Anonymous Binds:           53
 - Other Binds:               1


Cleaning up temp files...
Done.

LDAPI does not give any error here..

Hence VERIFIED.

Comment 6 errata-xmlrpc 2016-05-10 19:20:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0737.html


Note You need to log in before you can comment on or make changes to this bug.