[Date Prev][Date Next] [Chronological] [Thread] [Top]

slapd crashes after successful search (ITS#3224)



Full_Name: Craig Spurgeon
Version: 2.2.14
OS: Linux 2.4.26/Slackware
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (66.82.9.70)


I am using BDB backend, v 4.2.52, ldapsearch with simple bind, V2 protocol,
anonymous user. Upgraded from 2.1.30, used slapcat before install, removed bdb
files, slapadd after install. slapd runs as user ldap, chown all bdb files to
user ldap.

Had to change slapd.access.conf to specify dn.regex, had dn before.

Relevant line in slapd.access.conf:

access to dn.regex=".*,ou=People,dc=tuxnology,dc=com"
        by * read

Run ldapsearch:

ldapsearch -b "dc=tuxnology,dc=com" -P 2 -x "(uid=testuser)"

# extended LDIF
#
# LDAPv2
# base <dc=tuxnology,dc=com> with scope sub
# filter: (uid=testuser)
# requesting: ALL
#

# testuser, People, tuxnology.com
<all info for testuser follows, looks normal>
# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

slapd is run in debug -1 mode:

...
conn=0 op=1 ENTRY dn="uid=testuser,ou=People,dc=tuxnology,dc=com"
<= send_search_entry
send_ldap_result: conn=0 op=1 p=2
send_ldap_result: err=0 matched="" text=""
send_ldap_response: msgid=2 tag=101 err=0
ber_flush: 14 bytes to sd 15
  0000:  30 0c 02 01 02 65 07 0a  01 00 04 00 04 00         0....e........    
daemon: activity on 1 descriptors
daemon: activity on: 15r
daemon: read activity on 15
connection_get(15)
ldap_write: want=14, written=14
  0000:  30 0c 02 01 02 65 07 0a  01 00 04 00 04 00         0....e........    
connection_get(15): got connid=0
connection_read(15): checking for input on id=0
ber_get_next
ldap_read: want=8, got=7
  0000:  30 05 02 01 03 42 00                               0....B.           
ber_get_next: tag 0x30 len 5 contents:
ber_dump: buf=0x0818fb70 ptr=0x0818fb70 end=0x0818fb75 len=5
  0000:  02 01 03 42 00                                     ...B.             
ber_get_next
ldap_read: want=8, got=0

ber_get_next on fd 15 failed errno=0 (Success)
connection_read(15): input error=-2 id=0, closing.
connection_closing: readying conn=0 sd=15 for close
connection_close: deferring conn=0 sd=15
do_unbind
conn=0 op=2 UNBIND
daemon: select: listen=6 active_threads=0 tvp=NULL
daemon: activity on 1 descriptors
daemon: select: listen=6 active_threads=0 tvp=NULL
connection_resched: attempting closing conn=0 sd=15
connection_close: deferring conn=0 sd=15
conn=0 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
connection_resched: attempting closing conn=0 sd=15
connection_close: conn=0 sd=15
Segmentation fault

and it crashes there.

This was working perfectly under 2.1.30, same environment.
I did add Cyrus sasl 2.0.18 to get slapd to compile but am not using it here.

I have my user authentication running through that database via PAM, commands
like
su - testuser work correctly although slapd crashes as above.