[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Can't call ldap_search_s?
- To: openldap-software@OpenLDAP.org
- Subject: Can't call ldap_search_s?
- From: Greg G <ggersh@ctc.net>
- Date: Thu, 04 Mar 2004 14:06:10 -0500
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
I can't get pamldap to work on my Solaris 8 system, so I'm attempting to
roll my own. However, I'm getting a really weird result when I make the
call to ldap_search_s from my pam module. I'm including headers and
libraries from OpenLDAP 2.1.25.
115 rc = ldap_search_s (ld, base, LDAP_SCOPE_SUBTREE, filter,
attrs, 0, &res);
(gdb) print ld
$2 = (LDAP *) 0x8e800
(gdb) print *ld
$3 = {ld_sb = 0x2f6c6962, ld_options = {ldo_valid = 27748,
ldo_debug = 8923784, ldo_tm_api = 0x7e1250, ldo_tm_net = 0x49,
ldo_version = 8904656, ldo_deref = 0, ldo_timelimit = 14006120,
ldo_sizelimit = 14006248, ldo_defludp = 0xd5b838, ldo_defport =
14006456,
ldo_defbase = 0x0, ldo_defbinddn = 0x0, ldo_refhoplimit = 0,
ldo_sctrls = 0x0, ldo_cctrls = 0x0, ldo_rebind_proc = 0x80000,
ldo_rebind_params = 0x7e1250, ldo_booleans = 56}, ld_lberoptions = 135,
ld_errno = 6, ld_error = 0x0,
ld_matched = 0x882af0 <Address 0x882af0 out of bounds>,
ld_referrals = 0x9a5d0, ld_msgid = 4073, ld_requests = 0x28,
ld_responses = 0x883b30, ld_abandoned = 0x87e3a8, ld_cache = 0x64697600,
ld_defconn = 0x0, ld_conns = 0x5f667374, ld_selectinfo = 0x61740000}
(gdb) print base
$4 = 0xff0b1350 ""
(gdb) print filter
$5 = 0x89818 "((uid=ggersh))"
(gdb) print attrs
$6 = {0xff0b1338 "uid", 0xff0b1340 "UserPassword", 0x0}
(gdb) print res
$8 = (LDAPMessage *) 0x1
(gdb) s
Program received signal SIGSEGV, Segmentation fault.
0xff3c6e4c in ?? ()
(gdb) where
#0 0xff3c6e4c in ?? ()
#1 0xff3b2c30 in ?? ()
#2 0xff0c14b4 in _PROCEDURE_LINKAGE_TABLE_ ()
from /usr/lib/security/pam_ldap_ctc.so.1
(gdb)
pam_dlap_ctc.so.1 is the pam module that I'm trying to build. I've
built the OpenLDAP with debug enabled, and I can list the
libraries/libldap/search.c from the debugger, but I can't seem to step
down into it.
Can anyone give me a hint as to what's happening here?
Thanks.
-Greg G