[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Error code -12 with ldap_sasl_bind
- To: openldap-technical@openldap.org
- Subject: Error code -12 with ldap_sasl_bind
- From: Thilko Richter <thilko.richter@googlemail.com>
- Date: Fri, 12 Mar 2010 07:27:08 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=NcR4KxcUZsZHRveYFxfJG1iDC4US4oEAqXOE8sBWyz8=; b=gvlb5mBc+4EapeIlzGt7BK9plcAyzhlb/JftplGpxPBqcXQgWXYIhLvqsZyK4uHeiX TGlwpx0zW8No9dE33MDyAIzlHNsbe1o7BoHxJO/e2zuqJPv+i51XgHeae1CmzS45khTP 2nk+4T2Lzy+H5GD+s91a3y8lM4052nhYCRb0M=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=XiyX+NQAO5sWtDPScRpbSx0Jobg9FEDqcTuukyXZaGwLHwipQM3NSqZSD2moI2UYaC mCW+6vUD0OccBNuqmPNys3eMEnXpRcIYYOCr71m9EyNDVuPEl1vrO5lJXOMstfwxiPBD jtKWUyfe+OvgBCX7hZBzgK3zXy/NNw6COX33E=
- In-reply-to: <c93dcaf11003080327o124f72c3v9bc02417826896bc@mail.gmail.com>
- References: <c93dcaf11003080327o124f72c3v9bc02417826896bc@mail.gmail.com>
Hello,
In the following debug snippet I make an ldap_intit and an
ldap_sasl_bind_s afterwards. In the end an unbind follows.
My problem is, that I get an error code '-12' for the ldap_sasl_bind.
Does anyone has a clue why the bin doesnt work?
Mar 8 12:03:06 matrix slapd[3505]: conn=3 fd=15 ACCEPT from
IP=[::1]:56601 (IP=[::]:389)
Mar 8 12:03:06 matrix slapd[3505]: daemon: activity on 1 descriptor
Mar 8 12:03:06 matrix slapd[3505]: daemon: activity on:
Mar 8 12:03:06 matrix slapd[3505]:
Mar 8 12:03:06 matrix slapd[3505]: daemon: epoll: listen=8
active_threads=0 tvp=zero
Mar 8 12:03:06 matrix slapd[3505]: daemon: epoll: listen=9
active_threads=0 tvp=zero
Mar 8 12:03:06 matrix slapd[3505]: daemon: epoll: listen=10
active_threads=0 tvp=zero
Mar 8 12:03:06 matrix slapd[3505]: daemon: activity on 1 descriptor
Mar 8 12:03:06 matrix slapd[3505]: daemon: activity on:
Mar 8 12:03:06 matrix slapd[3505]: 15r
Mar 8 12:03:06 matrix slapd[3505]:
Mar 8 12:03:06 matrix slapd[3505]: daemon: read active on 15
Mar 8 12:03:06 matrix slapd[3505]: daemon: epoll: listen=8
active_threads=0 tvp=zero
Mar 8 12:03:06 matrix slapd[3505]: daemon: epoll: listen=9
active_threads=0 tvp=zero
Mar 8 12:03:06 matrix slapd[3505]: daemon: epoll: listen=10
active_threads=0 tvp=zero
Mar 8 12:03:06 matrix slapd[3505]: connection_get(15)
Mar 8 12:03:06 matrix slapd[3505]: connection_get(15): got connid=3
Mar 8 12:03:06 matrix slapd[3505]: connection_read(15): checking for
input on id=3
Mar 8 12:03:06 matrix slapd[3505]: op tag 0x42, time 1268046186
======== I think here is the problem
Mar 8 12:03:06 matrix slapd[3505]: ber_get_next on fd 15 failed
errno=0 (Success)
Mar 8 12:03:06 matrix slapd[3505]: connection_read(15): input
error=-2 id=3, closing.
========
Mar 8 12:03:06 matrix slapd[3505]: connection_closing: readying
conn=3 sd=15 for close
Mar 8 12:03:06 matrix slapd[3505]: connection_close: deferring conn=3 sd=15
Mar 8 12:03:06 matrix slapd[3505]: conn=3 op=0 do_unbind
Mar 8 12:03:06 matrix slapd[3505]: conn=3 op=0 UNBIND
Mar 8 12:03:06 matrix slapd[3505]: connection_resched: attempting
closing conn=3 sd=15
Mar 8 12:03:06 matrix slapd[3505]: connection_close: conn=3 sd=15
Mar 8 12:03:06 matrix slapd[3505]: daemon: removing 15
Mar 8 12:03:06 matrix slapd[3505]: conn=3 fd=15 closed
Mar 8 12:03:06 matrix slapd[3505]: daemon: activity on 1 descriptor
Mar 8 12:03:06 matrix slapd[3505]: daemon: activity on:
Mar 8 12:03:06 matrix slapd[3505]:
Mar 8 12:03:06 matrix slapd[3505]: daemon: epoll: listen=8
active_threads=0 tvp=zero
Mar 8 12:03:06 matrix slapd[3505]: daemon: epoll: listen=9
active_threads=0 tvp=zero
Mar 8 12:03:06 matrix slapd[3505]: daemon: epoll: listen=10
active_threads=0 tvp=zero
Since I try to build up a ruby Binding for OpenLdap with ffi I dont
have c code here, but the ruby snippet is:
handle = ldap_init "localhost", 389
res = ldap_sasl_bind_s handle, 'cn=admin,ou=users,dc=thilko,dc=net',
'', 'x', nil, nil, nil
p " the result: #{res}"
and the result is '-12'. Note that I am using ffi, so the function
'ldap_sasl_bind_s' is a call to the native function defined in ldap.h.
I try to use LDAP_SASL_SIMPLE.
I also tried to use a ber_val struct as password and servercred - the
same effect. I stepped through some source code in openLdap, but I
dont know where the error code '-12' comes from and where to find some
documentation.
Thx a lot for help,
Thilko