Bug 1229799

Summary: 389-ds-base: ldclt-bin killed by SIGSEGV
Product: Red Hat Enterprise Linux 7 Reporter: Stanislav Zidek <szidek>
Component: 389-ds-baseAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED ERRATA QA Contact: Stanislav Zidek <szidek>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: edewata, extras-qa, mreynolds, msauton, nhosoi, nkinder, rmeggins, vashirov
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/fa7686d1c365139507f1920a85bead4d47408d14
Whiteboard: abrt_hash:762981e0bed94cc002eed796fdc56f9f94fa9312
Fixed In Version: 389-ds-base-1.3.5.2-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1179058 Environment:
Last Closed: 2016-11-03 20:35:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1179058    
Bug Blocks: 1284791    
Attachments:
Description Flags
Patch fixing the issue none

Description Stanislav Zidek 2015-06-09 15:59:44 UTC
+++ This bug was initially created as a clone of Bug #1179058 +++

Description of problem:
This problem also exists on RHEL-7.

# ldclt-bin -b "ou=people,dc=example,dc=com" -w password -e esearch,randombinddn,randombinddnlow=10,randombinddnhigh=99,randomattrlist=cn:sn:uid:ou:telephoneNumber:facsimileTelephoneNumber:mobile:roomNumber  -n 100 -I 32 -r 1 -R 9999 -f "uid=guestXX" -s subtree
ldclt version 4.23
Segmentation fault (core dumped)

# gdb /usr/bin/ldclt-bin core.14929
...
(gdb) bt
#0  0x00007f6ec5fd7811 in __strlen_sse2 () from /lib64/libc.so.6
#1  0x00007f6ec7990371 in parseFilter (src=0x0, head=head@entry=0x7f6ec7ba0b48 <mctx+488>, 
    tail=tail@entry=0x7f6ec7ba0b50 <mctx+496>, ndigits=ndigits@entry=0x7f6ec7ba0b40 <mctx+480>)
    at ldap/servers/slapd/tools/ldclt/ldclt.c:1225
#2  0x00007f6ec7990b19 in basicInit () at ldap/servers/slapd/tools/ldclt/ldclt.c:1441
#3  0x00007f6ec798753d in main (argc=19, argv=0x7fffc77f6898) at ldap/servers/slapd/tools/ldclt/ldclt.c:3169


Version-Release number of selected component:
389-ds-base-1.3.3.1-13.el7

Comment 1 Stanislav Zidek 2015-06-09 16:03:47 UTC
Created attachment 1036892 [details]
Patch fixing the issue

Adding patch that solves the problem for me:

# ldclt-bin -b "ou=people,dc=example,dc=com" -w password -e esearch,randombinddn,randombinddnlow=10,randombinddnhigh=99,randomattrlist=cn:sn:uid:ou:telephoneNumber:facsimileTelephoneNumber:mobile:roomNumber  -n 100 -I 32 -r 1 -R 9999 -f "uid=guestXX" -s subtree
ldclt version 4.24
Error: cannot parse bind DN...
ldclt[15220]: Ending at Tue Jun  9 18:03:24 2015
ldclt[15220]: Exit status 7 - Cannot initialize ldclt.

Comment 2 Noriko Hosoi 2015-09-24 00:22:14 UTC
Upstream ticket:
https://fedorahosted.org/389/ticket/48289

Comment 3 Noriko Hosoi 2015-10-22 01:06:43 UTC
(In reply to Stanislav Zidek from comment #1)
> Created attachment 1036892 [details]
> Patch fixing the issue

Thanks to Stanislav.  I've applied your patch (with an error message) and pushed it to the git.

# ldclt-bin -b "ou=people,dc=example,dc=com" -w password -e esearch,randombinddn,randombinddnlow=10,randombinddnhigh=99,randomattrlist=cn:sn:uid:ou:telephoneNumber:facsimileTelephoneNumber:mobile:roomNumber -n 100 -I 32 -r 1 -R 9999 -f "uid=guestXX" -s subtree -V
ldclt version 4.23
Set file number to 4096
Error: NULL source string is passed.
Error: cannot parse bind DN...
ldclt[6958]: Ending at Wed Oct 21 20:51:54 2015
ldclt[6958]: Exit status 7 - Cannot initialize ldclt.

Please note that if you want to the random bind requires -D "<bindDN_template>" as follows:
ldclt-bin -b "ou=people,dc=example,dc=com" -D "uid=guestXX,ou=People,dc=example,dc=com" -w password -e "esearch,randombinddn,randombinddnlow=10,randombinddnhigh=99,randomattrlist=cn:sn:uid:ou:telephoneNumber:facsimileTelephoneNumber:mobile:roomNumber" -n 100 -I 32 -r 1 -R 9999 -f "uid=guestXX" -s subtree -V
[root@amd-dinar-01 ~]# ldclt-bin -b "ou=people,dc=example,dc=com" -w password -e esearch,randombinddn,randombinddnlow=10,randombinddnhigh=99,randomattrlist=cn:sn:uid:ou:telephoneNumber:facsimileTelephoneNumber:mobile:roomNumber -n 100 -I 32 -r 1 -R 9999 -f "uid=guestXX" -s subtree -V
Bind DN's head     = "uid=guest"
Bind DN's tail     = ",ou=People,dc=example,dc=com"
Bind DN's range    = [10 , 99]

Comment 4 Noriko Hosoi 2015-12-09 01:22:37 UTC
*** Bug 1284786 has been marked as a duplicate of this bug. ***

Comment 5 Mike McCune 2016-03-28 23:12:48 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 7 Viktor Ashirov 2016-06-08 15:17:02 UTC
Build tested: 389-ds-base-1.3.5.4-1.el7.x86_64

# ldclt-bin -b "ou=people,dc=example,dc=com" -w password -e esearch,randombinddn,randombinddnlow=10,randombinddnhigh=99,randomattrlist=cn:sn:uid:ou:telephoneNumber:facsimileTelephoneNumber:mobile:roomNumber  -n 100 -I 32 -r 1 -R 9999 -f "uid=guestXX" -s subtree
ldclt version 4.23
Error: NULL source string is passed.
Error: cannot parse bind DN...
ldclt[2914]: Ending at Wed Jun  8 11:15:58 2016
ldclt[2914]: Exit status 7 - Cannot initialize ldclt.

Marking as VERIFIED.

Comment 9 errata-xmlrpc 2016-11-03 20:35:15 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/RHSA-2016-2594.html