ando(a)sys-net.it wrote:
> Apparently, the cache lru is not initialized. Backtrace:
>
works for me, now. Thanks, p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office: +39.02.23998309
Mobile: +39.333.4963172
Email: pierangelo.masarati(a)sys-net.it
------------------------------------------
ando(a)sys-net.it wrote:
> fcusack(a)fcusack.com wrote:
>> But still you can do the bind async, and just close the fd on the client
>> side on timeout. I don't see why connect() timeout can't be handled
>> the same way. (ignoring the problem that there is no API call AFAICT
>> to just drop the connection)
>>
> I'll note that there's been some interest in that area --- I loosely
> have the same need (see
> <http://www.openldap.org/lists/openldap-devel/200611/msg00000.html>) but
> unfortunately it's not in my priority list, considering that it might
> have relevant impact on the client library.
Eventually, this got on top of my priority list, and it's now
implemented in HEAD. One needs to:
- set LDAP_OPT_NETWORK_TIMEOUT to a value greater than 0
- set LDAP_OPT_CONNECT_ASYNC to TRUE
- perform the first operation asynchronously (e.g. ldap_sasl_bind(3))
the library call might return LDAP_X_CONNECTING if poll(2)'ing after
connect(2) didn't succeed yet and LDAP_OPT_NETWORK_TIMEOUT didn't expire
yet. In that case, the client should resubmit the request until it
either succeeds or LDAP_OPT_NETWORK_TIMEOUT expires.
Note that, right now, there's no means to set LDAP_OPT_CONNECT_ASYNC
other than via ldap_set_option(3), and none is foreseen, because only
specially crafted clients would be able to handle LDAP_X_CONNECTING
appropriately.
Please test.
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office: +39.02.23998309
Mobile: +39.333.4963172
Email: pierangelo.masarati(a)sys-net.it
------------------------------------------
lrm(a)interlinknetworks.com wrote:
> I have already tried this. It does not have any affect on SSL connection
> negotitation.
>
> There is a very interseting comment in the code which indicates someone was
> aware of the problem. From the 2.3.20 source distribution, file
> libraries/libldap/tls.c (line 1445):
>
> /*
> * Fortunately, the lib uses blocking io...
> */
> if ( ldap_int_tls_connect( ld, conn ) < 0 ) {
> ld->ld_errno = LDAP_CONNECT_ERROR;
> return (ld->ld_errno);
> }
>
> And in ldap_int_tls_connect(), there is a call to SSL_connect( ssl ) that has no
> provision for asynchronous operation. There is no setting of the non-blocking
> option that I can find in this code sequence.
>
>
> To reproduce the problem, simply point your ldaps: URL to a TCP server port that
> accepts connections, and does nothing with them. The LDAP client will hang
> forever (or until the server ephemeral port is closed).
Is it an option for you to use Start TLS instead of ldaps? In this
case, code in right HEAD should fix all non-blocking issues, as soon as
you specify a network timeout and LDAP_OPT_CONNECT_ASYNC (undocumented
yet, it's been committed just hours ago).
The usage I suggest is to set LDAP_OPT_NETWORK_TIMEOUT to a positive
value; then set LDAP_OPT_CONNECT_ASYNC to TRUE before performing the
first operation, and reset it to FALSE after the first operation
succeeds. In your case, the first operation would be ldap_start_tls[_s](3).
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office: +39.02.23998309
Mobile: +39.333.4963172
Email: pierangelo.masarati(a)sys-net.it
------------------------------------------
robb(a)wtg.cw.com wrote:
> Pierangelo Masarati wrote:
>> In any case, since the behavior you report is very data and meta-data
>> dependent, you don't provide enough info for debugging, and at a very
>> first glance this is not indicative of a software bug.
>
> Pierangelo,
>
> the problem is indeed with the meta-data:
>
> the object at the root of the sql tree "dc=sql,dc=example,dc=org" was
> defined purely as dcObject, it needs a structural objectClass in order
> to be valid.
>
> If we define it as an organizationalUnit and dcObject (using
> ldap_entry_objclasses) then all works as expected.
>
> Oddly doing the opposite doesn't seem to work.
Because somewhere a constraint stepped in, which requires objectClasses
in ldap_objectclasses to be structural; it makes sense, all in all.
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office: +39.02.23998309
Mobile: +39.333.4963172
Email: pierangelo.masarati(a)sys-net.it
------------------------------------------
Pierangelo Masarati wrote:
> In any case, since the behavior you report is very data and meta-data
> dependent, you don't provide enough info for debugging, and at a very
> first glance this is not indicative of a software bug.
Pierangelo,
the problem is indeed with the meta-data:
the object at the root of the sql tree "dc=sql,dc=example,dc=org" was
defined purely as dcObject, it needs a structural objectClass in order
to be valid.
If we define it as an organizationalUnit and dcObject (using
ldap_entry_objclasses) then all works as expected.
Oddly doing the opposite doesn't seem to work.
Many thanks,
Rob
--
Robert Brooks, Network Manager, Cable & Wireless UK
<robb(a)wtg.cw.com> http://wtg.cw.com/
Tel: +44 (0)20 7339 8600 Fax: +44 (0)20 7339 8601
- "What was your username again?" - BOFH -
Full_Name: Radovan Skolnik
Version: JLDAP CVS version
OS: Windows/Java
URL: http://www.skolnik.info/LDAPPagedResults.zip
Submission from: (NULL) (82.119.120.128)
Hello,
I hope this is the right place to make this submission ;-) Recently I found that
JLDAP does not support simple paging mechanism via control as stated in RFC2696
(control OID 1.2.840.113556.1.4.319). So I made an attempt to implement it and
it seems to me it works as it's supposed to. I would like to contribute it to
the project for the benefit of others. The files can be found at
http://www.skolnik.info/LDAPPagedResults.zip If there is something more needed
from me please let me know.
Best regards
Radovan Skolnik