Commit Graph

452 Commits

Author SHA1 Message Date
Pierangelo Masarati
2ad757793d make sure unsigned time_t doesn't hurt (follow-on to ITS#4872) 2007-03-17 14:45:41 +00:00
Howard Chu
0787d0c434 Always initialize global_host 2007-02-03 02:53:10 +00:00
Kurt Zeilenga
da6d9eb046 happy new year 2007-01-02 20:00:42 +00:00
Howard Chu
d0467a5961 cleanup debug msg 2006-12-27 01:15:05 +00:00
Pierangelo Masarati
97e6225cc9 implement full IPv6 support in ACLs; use URL notation (as suggested by Howard) to disambiguate parsing (ITS#4756) 2006-12-15 01:11:11 +00:00
Howard Chu
c8a000cb7b ITS#4765 init slap_daemon.sd_actives 2006-12-01 15:02:14 +00:00
Pierangelo Masarati
6f1d78b3ce s/fprintf/Debug/; improve logging 2006-11-05 09:24:51 +00:00
Pierangelo Masarati
40a893a07e temporarily change umask only if required 2006-10-15 18:28:22 +00:00
Pierangelo Masarati
8567ce8eed fix previous commit 2006-10-15 18:24:30 +00:00
Pierangelo Masarati
59e60483fa create IPC sockets with wide-open permissions (0222 might suffice; ITS#4709) 2006-10-14 17:35:50 +00:00
Pierangelo Masarati
cbc238721a typo in previous commit... 2006-09-17 22:24:41 +00:00
Pierangelo Masarati
036289f9c4 support for Solaris' /dev/poll (need to manually define SLAP_X_DEVPOLL; needs work yet) 2006-09-17 22:17:34 +00:00
Pierangelo Masarati
dd4d074068 reorganize select interface (ready for /dev/poll) 2006-09-17 22:09:50 +00:00
Pierangelo Masarati
417ad40596 destroy socket set (man page for epoll_create(2) states that close(2) must be called on the returned filedes) 2006-08-31 13:51:25 +00:00
Howard Chu
d7be822a2a Fix prev commit 2006-08-19 06:27:11 +00:00
Howard Chu
69fa2d9f93 Move ber_sockbuf_free() to slapd_remove() to avoid using AC_SOCKET_INVALID 2006-08-18 23:54:24 +00:00
Howard Chu
098153c5bb Move socket close into slapd_remove, don't close until after socket
is removed from daemon control.
2006-08-17 00:44:38 +00:00
Hallvard Furuseth
ce44bdbc37 Constify slapd_slp_attrs (assigned a const char* in main.c:slapd_opt_slp()) 2006-05-25 16:32:43 +00:00
Howard Chu
0b79eab474 Cleanup epoll read / error behavior 2006-05-14 00:26:33 +00:00
Howard Chu
d8aabb008f ITS#4537 placate braindead compiler 2006-05-11 18:04:26 +00:00
Pierangelo Masarati
af1f87b96d ldap_pvt_runqueue_next_sched() may return a pointer to data that's freed by task run earlier (ITS#4517) 2006-05-02 20:32:37 +00:00
Kurt Zeilenga
153e81817f ITS#4414: SLP attributes support from Peter Marschall 2006-04-27 19:36:40 +00:00
Howard Chu
daec2febfb ITS#4476 revert connection_write processing back into main thread 2006-04-06 04:34:37 +00:00
Howard Chu
90c8a53db4 plug leaks 2006-03-31 11:15:26 +00:00
Howard Chu
a5eef48123 Fix ITS#4395, check for non-read/write epoll events 2006-02-10 18:27:50 +00:00
Howard Chu
bebfc49d71 ITS#4370 always init slap_daemon mutexes 2006-01-25 01:36:18 +00:00
Howard Chu
2b0bccc74c ITS#4357 Solaris occasionally returns ENOSYS when selecting on a descriptor
in the midst of closing. Instead of special casing EBADF, ENOSYS, and
WSAENOTSOCK, just count if any error occurs two or more times in a row,
and log if so. Don't treat any error as fatal unless it occurs many times
in a row (SLAPD_EBADF_LIMIT).
2006-01-20 08:13:54 +00:00
Howard Chu
9b2ee679e8 Fix WAKE_LISTENER 2006-01-15 15:40:53 +00:00
Howard Chu
f16d101033 Log select() failure at DEBUG_ANY, since it triggers a shutdown. 2006-01-13 20:28:31 +00:00
Howard Chu
84429e8bcb ITS#4338 delete extraneous slapd_close() calls. Descriptors that were in
the event set must be removed using slapd_remove() and the whole sequence
must be protected with the slap_daemon.sd_mutex to close them properly.
Otherwise it will wind up closing valid, freshly opened sockets, or closing
dead sockets twice, etc. It's unnecessary to do any close management here
since connection.c already does the correct teardown sequence.
2006-01-13 17:30:03 +00:00
Kurt Zeilenga
acbb5cf689 Happy new year! 2006-01-03 23:11:52 +00:00
Luke Howard
ac64f4806b Fix CLDAP regression 2005-12-24 11:00:28 +00:00
Luke Howard
3ba381a862 Fix compile error when LDAP_CONNECTIONLESS is defined 2005-12-24 07:16:35 +00:00
Howard Chu
80143b5fc6 Fix ITS#3717 - set restriction on all backends
Fix ITS#4217 - gentleHUP is a normal shutdown condition
2005-11-25 23:16:10 +00:00
Howard Chu
ee8a946e8f Fix Win32 typos 2005-11-12 08:18:28 +00:00
Howard Chu
a028353ca1 declare waking volatile. perhaps it should only be used when NO_THREADS
is defined.
2005-11-12 08:11:11 +00:00
Kurt Zeilenga
e470116ab3 fix -USLAP_LIGHTWEIGHT_DISPACTHER sl_busy issue 2005-11-03 18:50:04 +00:00
Howard Chu
f8815bf833 ITS#4099, protect hosts_ctl with tcpd_mutex. From richton@nbcs.rutgers.edu. 2005-11-03 00:47:25 +00:00
Howard Chu
98969cc28e Fix epoll, just handle wake events in the order they arrived. 2005-10-30 00:50:59 +00:00
Howard Chu
e131aa424b ITS#4108 fix another accept/read race condition 2005-10-29 15:16:35 +00:00
Howard Chu
1f0e2f8944 Fix debug msg 2005-10-29 04:24:23 +00:00
Howard Chu
4bb234bac8 ITS#4108 Cleanup accept/close race conditions. 2005-10-29 04:17:56 +00:00
Howard Chu
638b84db6e Cleanup, fix ITS#4120 2005-10-29 02:06:32 +00:00
Howard Chu
656c6011bb Fix epoll, slapd_remove gets called multiple times for the same descriptor.
Ignore subsequent calls.
2005-10-17 17:31:48 +00:00
Kurt Zeilenga
c961673d9e Add descr # to epoll_ctl failed error message 2005-10-16 06:41:55 +00:00
Kurt Zeilenga
9bc19c5232 Revised lightweight dispatcher -- writers moved into worker threads
Presently spawns operations in separate thread to ease clr_read/wake handling.
Seems to perform reasonable well...
2005-10-15 06:54:55 +00:00
Kurt Zeilenga
577bfc477e More cleanup 2005-10-14 22:04:03 +00:00
Kurt Zeilenga
ce96e57298 cleanup 2005-10-14 21:46:44 +00:00
Kurt Zeilenga
40ff060f83 cleanup 2005-10-14 21:37:14 +00:00
Kurt Zeilenga
2dfd312fa1 Move connectionless connection init to startup (may not be in the
optimal place yet) to simply event management.  Needs testing.
Place revent clear calls immediately upon handling of event
(before any work).
Misc. other cleanup
2005-10-14 20:48:01 +00:00
Kurt Zeilenga
e21bba89db cleanup 2005-10-14 18:47:32 +00:00
Hallvard Furuseth
f21a6f7ef3 Add missing ";" in SLAP_SOCK_SET_INIT 2005-10-14 12:53:14 +00:00
Kurt Zeilenga
4d0de8b3c5 cleanup 2005-10-13 04:33:01 +00:00
Kurt Zeilenga
5085d1f8ff cleanup 2005-10-13 02:08:14 +00:00
Kurt Zeilenga
6db7e605ee Align Operation buffers using LBER_ALIGNED_BUFFER 2005-10-12 23:17:28 +00:00
Kurt Zeilenga
2890a5d035 TLS is configured after listener creation 2005-10-12 16:58:22 +00:00
Howard Chu
9aa064434c Fix writefds init on Windows 2005-10-11 02:56:56 +00:00
Howard Chu
4f0c386c68 ITS#4072 prevent ldaps listeners when TLS is not configured 2005-10-09 20:04:49 +00:00
Howard Chu
d973acec0d Silence valgrind complaint 2005-10-06 20:06:53 +00:00
Howard Chu
784554f1bb ITS#3802, #3999 skip wake_sds in epoll event loop 2005-09-04 15:04:09 +00:00
Hallvard Furuseth
00d898e7f3 Silence warnings 2005-09-03 17:03:36 +00:00
Howard Chu
d875ecb315 Remove #undef HAVE_EPOLL accidentally committed in rev 1.316 2005-09-01 23:21:46 +00:00
Luke Howard
17ffdc07b6 Don't decrement descriptor count until we have checked connection is not UDP 2005-08-08 03:44:17 +00:00
Pierangelo Masarati
4e6fd1a44f the swap was intended; please see ITS#3876 2005-07-22 01:00:21 +00:00
Luke Howard
979e64d0f0 The order of uidNumber and gidNumber was swapped in revision 1.331,
which breaks existing ACLs. This patch restores the old behaviour.
2005-07-19 06:45:57 +00:00
Pierangelo Masarati
1100973301 trim unused (wrong) code 2005-07-19 00:30:34 +00:00
Hallvard Furuseth
81ecb0b153 assert expects int. (int)<nonnull ptr/long> can be 0. Use assert(arg!=0/NULL). 2005-07-18 06:22:33 +00:00
Hallvard Furuseth
f43a823c73 Add missing "static" for functions declared static but defined non-static 2005-07-18 05:14:41 +00:00
Howard Chu
08ec8ad068 Fix SLAP_SOCK_IS_MUTE typo 2005-07-12 14:19:57 +00:00
Howard Chu
00dae75f7b ITS#3842 from jtownsend@opendarwin.org - don't free slap_listeners until
after connection_shutdown().
2005-07-07 04:21:53 +00:00
Pierangelo Masarati
5ae22791ab hardcode normalized instead of funky DN form 2005-06-29 12:37:28 +00:00
Howard Chu
58e8817fc1 ITS#3760 don't select on uninit'd writefds 2005-06-09 08:19:05 +00:00
Kurt Zeilenga
43dba4fd45 Wrap w in WAKE_LISTENER 2005-05-05 20:39:58 +00:00
Kurt Zeilenga
b9139ebf07 Increase listen() backlog to 1024, allow compile time override 2005-05-05 19:41:12 +00:00
Howard Chu
e3b66a409d ITS#3677 use LDAP_DEBUG_ANY when logging the shutdown reason 2005-04-23 15:55:26 +00:00
Howard Chu
3ead49d206 ITS#3542 - ignore timevals from deferred tasks 2005-03-17 05:03:28 +00:00
Howard Chu
9bfb4e7213 Revert prev commit, wrong fix 2005-03-17 04:50:19 +00:00
Howard Chu
d1050c5aa2 ITS#3542 if slapd processes too slowly, time diff can go negative 2005-03-17 04:44:21 +00:00
Kurt Zeilenga
f06ca8eb1f cleanup 2005-03-15 03:11:24 +00:00
Luke Howard
fd0b7e75b1 ITS#3439 (NetBSD support for getpeereid()) 2005-02-03 09:36:25 +00:00
Howard Chu
b18bc61831 ITS#3471 don't yield unnecessarily 2005-01-21 00:04:05 +00:00
Howard Chu
b0da3a0e32 Clear write events after they're processed 2005-01-12 00:57:53 +00:00
Kurt Zeilenga
dc0eacd40b Happy New Year! 2005-01-01 20:49:32 +00:00
Howard Chu
0eab783e6a ITS#3422, restore original select() behavior 2004-12-08 03:47:48 +00:00
Howard Chu
5c8fd8bf11 Rename syncrepl_rq to slapd_rq, move to daemon.c 2004-12-03 16:49:23 +00:00
Howard Chu
618cc56265 Merge op->o_sync_mode into op->o_sync 2004-11-25 18:31:31 +00:00
Howard Chu
6170a2bbb4 Fix ITS#3400, move ebadf declaration 2004-11-24 05:27:59 +00:00
Howard Chu
70d3e8f102 Don't bother including <sys/epoll.h> if we're not using epoll. 2004-11-21 02:18:26 +00:00
Howard Chu
c7a8625da7 Fix waking test 2004-11-19 00:13:00 +00:00
Howard Chu
f0372748e8 Fix prev commit 2004-11-18 23:08:57 +00:00
Howard Chu
f825367acf Check for sys/epoll.h 2004-11-18 22:07:37 +00:00
Howard Chu
fb7a5d7a55 shutdown on failure in epoll_ctl when adding a socket... 2004-11-18 19:29:24 +00:00
Howard Chu
bf0d729454 Fix prev commit, didn't mean to have HAVE_EPOLL hardcoded 2004-11-18 19:15:21 +00:00
Howard Chu
495ea2c13c epoll support works 2004-11-18 19:06:14 +00:00
Howard Chu
b4e10e194d Fix epoll compilation 2004-11-18 17:27:43 +00:00
Howard Chu
b7d4e1a5f1 First pass at macro-izing event handling method. Still only supports
select(). If you think this is too ugly, feel free to revert...
2004-11-18 16:41:04 +00:00
Howard Chu
0464155205 Allow a small number of waking events to be outstanding, not just 1
(chose 5 arbitrarily)
2004-11-18 15:40:49 +00:00
Howard Chu
69dc60e5ca Count writers, don't pass w fd_set if there are none
Deleted broken/unused FD_MANUAL_COPY code
2004-11-18 00:19:52 +00:00
Howard Chu
2415f5085d Avoid filling the wake_sds when massive numbers of connections close at once. 2004-11-16 20:26:50 +00:00
Howard Chu
04b078d6eb Fix prev commit. I wonder if we should convert the fdset bitvector into
an array like winsock does. That would speed up response time for small
number of connections with large FD_SETSIZE, but probably equalize out
as the number of active connections goes up. ??
2004-11-15 04:05:32 +00:00