Commit Graph

176 Commits

Author SHA1 Message Date
Ralf Haferkamp
c728ebf586 ITS#7428 Use non-blocking IO during SSL Handshake
If a timeout is set, perform the SSL Handshake using non-blocking IO.  This way
we can timeout if SSL Handshake gets stuck for whatever reason.

This code is currently hidden behind #ifdefs (LDAP_USE_NON_BLOCKING_TLS) and
disabled by default as there seem to be some problems using NON-blocking
I/O during the TLS Handshake when linking against NSS (either a bug in NSS
itself of in tls_m.c, see discussion on -devel)

This patch adds an additional parameter to ldap_int_poll() in order to indicate
if we're waiting in order to perform a read or write operation.
2012-11-21 14:25:18 +01:00
Howard Chu
33f6bc4fe6 ITS#7167 only poll sockets for write as needed 2012-02-20 14:51:30 -08:00
Kurt Zeilenga
2bbf9804b9 Happy New Year! 2012-01-01 07:10:53 -08:00
Howard Chu
33f3de77f1 ITS#6828 fix TLS setup with async connect 2011-06-08 18:27:54 -07:00
Kurt Zeilenga
966cef8c9a Happy New Year 2011-01-05 00:42:37 +00:00
Howard Chu
0f30db1c46 ITS#6625 concurrency patch from Doug Leavitt @ Oracle .com 2010-10-22 21:45:48 +00:00
Howard Chu
0b660dc9f6 ITS#6672 mutex cleanup 2010-10-13 08:43:15 +00:00
Pierangelo Masarati
6c6e187b98 do not alter ld_nextref_proc (ITS#6602) 2010-07-27 00:55:51 +00:00
Pierangelo Masarati
d27038f6b4 fix previous commit 2010-07-26 19:45:36 +00:00
Pierangelo Masarati
c2ab1778a0 check mutex ownership 2010-07-26 19:26:59 +00:00
Howard Chu
d3a1be4e3f ITS#6568 plug cldap memleaks 2010-06-02 03:10:39 +00:00
Kurt Zeilenga
3dadeb3efe happy belated New Year 2010-04-13 22:17:29 +00:00
Howard Chu
ee5b6762ae ITS#5980 - find_connection should match URLs with empty hostname 2009-03-03 17:56:44 +00:00
Howard Chu
fbf42baefa ITS#5934 fix NULL pointer deref 2009-02-09 21:14:46 +00:00
Kurt Zeilenga
4af9eb9715 Update copyright notices 2009-01-22 00:40:04 +00:00
Hallvard Furuseth
1c85cf3c88 Warning cleanup: signed meets unsigned. ber_flatten2() returns -1 on
error, not LBER_ERROR.
2008-10-13 08:44:54 +00:00
Howard Chu
f7484f78e6 ITS#5369 SASL/GSSAPi refactoring from Stefan Metzmacher <metze@samba.org>
and Rafal Szczeniak <mimir@samba.org>, with minor cleanups
2008-10-09 10:51:28 +00:00
Howard Chu
c51252633b Accept X-starttls for prev commit 2008-10-07 03:13:00 +00:00
Howard Chu
809548c88b Handle StartTLS in URL extensions 2008-10-07 03:06:44 +00:00
Howard Chu
80d1dba901 Add LDAP_OPT_CONNECT_CB connection callbacks 2008-08-14 04:54:32 +00:00
Howard Chu
96550c885d ITS#5518,#5525 cleanup ld_defconn if it was freed 2008-05-23 09:53:42 +00:00
Kurt Zeilenga
c890c96d13 Happy New Year (belated) 2008-01-08 00:19:56 +00:00
Howard Chu
469a45a62f ITS#4992 fix cldap 2007-06-08 09:40:17 +00:00
Howard Chu
431f6fd810 ITS#4955 fix typo in referral chasing 2007-06-08 09:17:00 +00:00
Hallvard Furuseth
7b7b137832 Cast Debug(%p) pointer argument to void* 2007-05-09 18:38:10 +00:00
Pierangelo Masarati
f29a4e140e don't assert(0); apparently, other responses may result from a simple bind (but log them, at least; ITS#4924) 2007-04-11 08:57:41 +00:00
Pierangelo Masarati
687ed8861a don't play with URL list if connect(2) is asynchronous 2007-02-21 22:26:26 +00:00
Howard Chu
0c542682b1 Timeouts should not be malloc'd 2007-02-05 20:32:44 +00:00
Howard Chu
bec25494fe ITS#4799 remove kerberos / kbind references 2007-01-10 00:20:42 +00:00
Pierangelo Masarati
9b5ea6a205 honor network timeout even when doing full async 2007-01-07 22:05:33 +00:00
Pierangelo Masarati
aa3c9bad3e First cut to truly async connect:
- after connect(2), if async the connection is in "connecting" state
	- the first time a request is sent, "connecting" conns are polled
		- in case of success, the request is sent
		- in case still connecting, LDAP_X_CONNECTING is returned;
		  clients are expected to retry later
	- the "async" behavior must be explicitly enabled by setting
	  the LDAP_OPT_CONNECT_ASYNC option

"local" connections need work
2007-01-07 19:20:46 +00:00
Kurt Zeilenga
da6d9eb046 happy new year 2007-01-02 20:00:42 +00:00
Pierangelo Masarati
5a000a9b91 fix warnings after previous commit 2006-12-04 00:11:12 +00:00
Pierangelo Masarati
a76b702d4c fix request/result abandon 2006-12-03 20:56:25 +00:00
Pierangelo Masarati
3c1df853e4 fix endless loop in canceling child requests; cleanup 2006-11-12 14:22:24 +00:00
Pierangelo Masarati
dc871de33d cleanup prvious commit; log number of abandoned requests waiting for response... 2006-11-02 19:11:18 +00:00
Howard Chu
57c329a3af ITS#4606 errno is not per-thread on WIN32, always use WSAGet/SetLastError
(with notable exceptions: ignore tests for EINTR which winsock never sets)
2006-09-14 06:35:34 +00:00
Pierangelo Masarati
06b491a446 better function name 2006-09-01 16:21:20 +00:00
Pierangelo Masarati
b45c0c881d keep count of requests in use 2006-09-01 14:00:58 +00:00
Pierangelo Masarati
cb3248f173 cleanup 2006-09-01 10:01:36 +00:00
Pierangelo Masarati
7a3ff8ddc2 count requests and responses in logs 2006-05-27 10:17:34 +00:00
Pierangelo Masarati
6b889b0a8a s/fprintf/Debug/ (ITS#4553); lock ld_conn_mutex before accessing conn(s) 2006-05-18 00:59:13 +00:00
Pierangelo Masarati
86b566f029 cleanup 2006-05-18 00:37:56 +00:00
Pierangelo Masarati
2b29cf4909 fix rev 1.125 commit 2006-05-17 22:13:39 +00:00
Howard Chu
ff40a705da ITS#4541 better fix 2006-05-12 06:33:27 +00:00
Howard Chu
7b10f413d9 Fix ITS#4533 don't destroy input request 2006-05-10 15:01:50 +00:00
Pierangelo Masarati
373ded8d24 add URI list resorting feature (ITS#4524) 2006-05-06 16:15:25 +00:00
Pierangelo Masarati
77e7acc4f9 cleanup; make sure no spurious error code slip thru 2006-04-24 12:12:14 +00:00
Pierangelo Masarati
dfc8e7f6b8 better fix for ITS#4483 2006-04-09 22:29:42 +00:00
Pierangelo Masarati
74b6ab9029 more cleanup 2006-04-08 11:01:19 +00:00