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
Howard Chu
a59243ceee
Slight tweak for select descriptor checking
2004-11-14 21:27:53 +00:00
Howard Chu
95550f21a2
Fix prev commit
2004-10-06 07:26:35 +00:00
Howard Chu
7e87f54716
Revert ITS#3353 patch, it needs to be reworked.
2004-10-06 05:51:38 +00:00
Howard Chu
fda3d6260e
ITS#3353 consolidate slapd globals into a single struct
2004-10-01 07:33:16 +00:00
Pierangelo Masarati
761f287943
multiple precision with BIGNUM/gmp/ulong
2004-09-26 22:58:47 +00:00
Kurt Zeilenga
31a6de16b0
ITS#3345: reorder includes to workaround Pth signal redefine problem
2004-09-25 01:47:02 +00:00
Kurt Zeilenga
3869e3b84d
Add localSSF slapd.conf(5) directive to set SSF associated
...
with ldapi:// sessions.
2004-09-10 22:35:24 +00:00
Kurt Zeilenga
d611a4b49a
unifdef -UNEW_LOGGING
2004-09-04 04:54:28 +00:00
Pierangelo Masarati
614e5a9de6
make sure sun_path is cleared out before accept()
2004-07-30 09:56:22 +00:00
Pierangelo Masarati
cd9a9c628d
frontend stuff moved into a database structure, essentially to allow overlays to be processed before database selection; passes all tests (ITS#3080)
2004-07-26 21:26:34 +00:00
Jong Hyuk Choi
a1308f8dfa
syncrepl retry code fix for correct timing
2004-06-21 07:03:49 +00:00
Kurt Zeilenga
6e17b60648
add command line option (-S) to enable SLP registration (ITS#3132)
...
off by default. Option assignment is temporary, should be replaced
with "-o slp=<ON|off>".
Based upon patch submitted by Ralf Haferkamp (SuSE).
2004-05-24 23:28:52 +00:00
Kurt Zeilenga
44725e7303
use BER_BVNULL
2004-04-07 04:11:43 +00:00
Pierangelo Masarati
2387d2aff8
apparently accept() doesn't fill the sun_path field of the peer socket; hack it
2004-04-03 18:48:03 +00:00
Howard Chu
c9d033ae30
Fix syncrepl slapd_shutdown detection, would not stop on a gentlehup.
2004-01-15 21:35:05 +00:00
Kurt Zeilenga
3c598e89fb
Happy new year
2004-01-01 19:15:16 +00:00
Kurt Zeilenga
9647ccd945
Completely untested built-in EXTERNAL implementation
...
Needs identity mapping and proxy authorization support
2003-12-18 06:52:39 +00:00
Kurt Zeilenga
4e15a84452
Updated notices
2003-11-27 01:17:14 +00:00
Howard Chu
782d1be0ad
Fix prev commit, don't timeout outbound connections
2003-10-25 21:14:07 +00:00
Howard Chu
08676eb49d
Add support for outbound connections in main listener.
...
Restructure syncrepl/persist to use outbound connection manager.
2003-10-24 12:57:24 +00:00
Howard Chu
4c5c632d70
ITS#2769 - NT SIGBREAK handling
2003-10-15 12:16:35 +00:00
Jong Hyuk Choi
35455699e7
rq_mutex placing fix
2003-10-13 14:08:55 +00:00
Jong Hyuk Choi
85ff0377d2
runqueue locking fix (ITS#2746)
2003-10-12 09:13:04 +00:00
Jong Hyuk Choi
537ccc3f5f
fix for persistent search termination (ITS#2724)
...
- the consumer slapd did not terminate when the provider is alive
- use a timeout in ldap_result() of syncrepl.c
2003-09-17 10:34:10 +00:00
Jong Hyuk Choi
090ac0a772
unifdef LDAP_SYNC and LDAP_SYNCREPL
2003-08-27 22:16:04 +00:00
Kurt Zeilenga
6e602b5494
ITS#2607: improve socket() error logging with AF info
2003-06-21 22:55:15 +00:00
Kurt Zeilenga
3e0e06bcc5
ITS#2605: move #if 0 to fix compilation problem on Windows
2003-06-19 02:41:33 +00:00
Howard Chu
6a8cac7ac8
Fix select/yield
2003-06-06 23:52:06 +00:00
Kurt Zeilenga
86fdca5177
#if 0 debug statements in signal handlers
2003-05-24 21:12:20 +00:00
Jong Hyuk Choi
4192c4aaaa
select loop changes for persistent threads
2003-05-20 23:52:11 +00:00
Jong Hyuk Choi
2b62559aa5
runqueue update according to the idle timer change
2003-05-20 22:13:21 +00:00
Hallvard Furuseth
c702f2e50f
Fix debug statement (remove spurious '.' after '\n').
2003-05-20 18:12:14 +00:00
Hallvard Furuseth
6af256b8e1
Fix some Statslog()s: Add missing newlines. Print file descriptor as long.
2003-05-15 23:45:33 +00:00
Howard Chu
8e550fae0c
Streamlined listener/select/accept handling:
...
For ITS#2482:
added sl_is_mute flag to Listener - when set, the listener is ignored
if accept() on a listener fails with EMFILE, set the sl_is_mute flag
when removing a connection, if emfile != 0, look for a listener to unmute
For ITS#2374:
if global_idletimeout is set and there are active sessions, use a timeout
on the select() to actively detect idle sessions.
2003-05-15 13:10:52 +00:00
Pierangelo Masarati
a004061c0a
need starttime before backend db_open() is invoked
2003-05-15 01:12:17 +00:00
Howard Chu
2d22e02ef9
Another idle time tweak
2003-05-11 06:06:22 +00:00
Jong Hyuk Choi
35d1bd68b9
runqueue restructuring
2003-05-07 23:52:08 +00:00
Jong Hyuk Choi
580ae073e1
runqueue update
2003-05-07 22:29:26 +00:00
Kurt Zeilenga
e64bb13148
minor tweak
2003-05-07 22:22:21 +00:00
Jong Hyuk Choi
45776bff04
a runqueue for periodic thread execution (for syncrepl)
2003-05-07 02:06:01 +00:00
Howard Chu
0f2eab27ce
ITS#2442, ITS#2438 same check for slapd_slp_reg()
2003-04-12 08:36:35 +00:00
Kurt Zeilenga
217f45a16c
SLP fix (ITS#2438)
2003-04-11 04:25:55 +00:00
Pierangelo Masarati
f6c1079cff
safer defaults ...
2003-04-03 21:23:36 +00:00
Pierangelo Masarati
430077e2ed
partially revert previous commit
2003-04-02 23:01:21 +00:00
Pierangelo Masarati
a67b41eb69
fix listener mod handling
2003-04-02 20:27:58 +00:00
Pierangelo Masarati
f6a47ac9ea
silence warning
2003-03-11 12:25:39 +00:00
Kurt Zeilenga
0f0122abdd
need to use ch_malloc/realloc
2003-03-09 20:15:30 +00:00
Howard Chu
aa84264fc2
Technically, since the authid is expected to be a normalized DN, uidNumber
...
and gidNumber should be all lower case: uidnumber,gidnumber. Is it too late
to fix this, would it break compatibility for anything major?
2003-03-06 12:08:39 +00:00
Howard Chu
b21e69db0e
Use ldap_pvt_get_hname instead of ldap_pvt_gethostbyaddr_a
2003-03-05 01:53:32 +00:00
Kurt Zeilenga
05619c6ec7
ITS#2236. Add missing connections_shutdown() call.
2003-02-19 20:39:04 +00:00
Pierangelo Masarati
ffde204880
trim unused var
2003-01-27 21:49:32 +00:00
Luke Howard
1e8fd55cfb
Fix uninitialized sl_is_udp
2003-01-24 11:08:54 +00:00
Hallvard Furuseth
3bd76701d1
Fix printf format errors.
2003-01-19 14:07:02 +00:00
Kurt Zeilenga
6939c53170
Happy new year
2003-01-03 20:20:47 +00:00
Kurt Zeilenga
f43bf6b283
cleanup
2002-12-20 04:08:06 +00:00
Howard Chu
0e69c86461
Fix Statslog messages
2002-12-17 00:23:36 +00:00
Howard Chu
40b651afb1
Fix previous commit, was freeing name from rev-lookup too soon.
2002-12-16 00:58:05 +00:00
Howard Chu
ee571c54a4
Must use reentrant gethostbyaddr for reverse lookups. Other threads may
...
be doing lookups too (e.g., SASL/GSSAPI)
2002-12-11 16:36:36 +00:00
Kurt Zeilenga
56ebd53e51
expand authid buffer
2002-12-08 07:56:49 +00:00
Kurt Zeilenga
7c4445aed4
Avoid magic constant (32) in allocation. Use sizeof instead
2002-12-07 18:34:25 +00:00
Kurt Zeilenga
eb41333e4c
Use getpeereid(3) where available else use *_PEERCRED replacment function
2002-12-04 06:17:32 +00:00
Luke Howard
daf7d0c0eb
Support SO_PEERCRED SASL EXTERNAL authorization.
2002-12-04 04:14:44 +00:00
Kurt Zeilenga
e1f2ed9bc1
Delete some old (bad) statslog messages
2002-11-11 18:38:57 +00:00
Pierangelo Masarati
dea2420569
beautify "unknown"
2002-10-26 18:51:24 +00:00
Pierangelo Masarati
8558b8808e
actually, get_perms is needed by ldapi:// rgeardless of -DSLAP_X_LISTENER_MOD
2002-10-26 10:02:41 +00:00
Kurt Zeilenga
36569048ff
Add "allow update_anon"
...
Fix -USLAP_X_LISTENER_MOD builds
2002-10-25 18:47:24 +00:00
Pierangelo Masarati
97e526cb2d
add restrictions related to listeners in form of file permissions
...
(see in slapd(8) the description on how to enforce file permissions
on sockets in ldapi schema); at present, only user permissions are
used as follows: the url extension x-mod=-rwxrwxrwx is used; only
the user permisisons are considered, e.g. the first set of rwx;
"r" means read is allowed from that listener
"w" means write is allowed on that listener
"x" means bind is not required on that listener
these restrictions ADD to those already present, and are actually
checked AFTER the other restrictions, but BEFORE ACLs, so they can
be used to apply gross restrictions but should not be viewed as
a replacement of ACLs. To compile this, #define SLAP_X_LISTENER_MOD
2002-10-25 16:43:44 +00:00
Pierangelo Masarati
956f1d16aa
listener:
...
- use bervals for url and sockname
- pass connection_init() the listener struct pointer instead of each value
- don't copy them in the Connection struct 'cause they're not going to change
- define macros for legacy usage of c_listener_url and c_sockname
2002-10-24 10:03:52 +00:00
Pierangelo Masarati
fdd586a6b7
change socket permission syntax (to reuse function for other purposes)
2002-10-23 14:12:01 +00:00
Howard Chu
e6d10b9590
Revert previous commit. More thought needed re: IPV4 vs IPv6 failures
2002-10-09 21:18:51 +00:00
Howard Chu
2e538e19d4
ITS#2132, give up at first bind failure
2002-10-09 20:45:13 +00:00
Howard Chu
b9bd44b047
Fix ITS#2132, give up if listener fails to open
2002-10-09 18:57:50 +00:00
Howard Chu
bdf9b3ae1b
Fix ITS#1033 slapd hangs with GNU Pth - don't write to the wakefd
...
more than once at any given time.
2002-09-21 03:52:16 +00:00
Kurt Zeilenga
3eb21d8a6c
Misc cleanup
2002-09-16 21:50:55 +00:00
Kurt Zeilenga
23efa07a99
use ldap_charray_*() instead of charray_*()
2002-08-24 00:55:24 +00:00
Howard Chu
5a01db28e3
Moved slap_strcopy, slap_strncopy to lutil_strcopy, lutil_strncopy
2002-07-27 00:24:02 +00:00
Stig Venaas
bf5e3a15ca
Use AF_INET instead of AF_UNSPEC when IPv6 disabled
2002-07-12 15:36:33 +00:00
Julius Enarusai
6107ba67d2
Coverted LDAP_LOG macro to use subsystem ID int values instead of string values
2002-07-11 20:33:24 +00:00
Stig Venaas
62139b6ef3
Set peeraddr also for IPv6, fixes ITS#1918
2002-07-05 20:29:15 +00:00
Stig Venaas
804490a8b1
Use IPV6_V6ONLY on IPv6 sockets if available. This way we only get IPv6
...
packets on the IPv6 socket, and we receive only IPv6 with -6.
2002-06-27 13:20:37 +00:00
Stig Venaas
6d025001da
Ignore error if listen on socket bound to 0.0.0.0 fails and already
...
listening on socket bound to ::
2002-06-27 12:41:09 +00:00
Kurt Zeilenga
27fdd04153
Add -4/-6 flags to slapd to force use of IPv4 or IPv6
2002-06-15 22:01:39 +00:00
Kurt Zeilenga
faf91f1f1f
Update to the 'gentle SIGHUP' patch. (ITS#1679)
...
- Let write operations return unwilling-to-perform after
'gentle shutdown' has been initiated.
- Change -1 to 2 in slapd_gentle_shutdown and slapd_shutdown, since
sig_atomic_t can be unsigned (ITS#1736). The 'gentle SIGHUP' patch
is older than ITS#1736 but was applied later, so it reintroduced
the problem.
Hallvard B. Furuseth <h.b.furuseth@usit.uio.no>, June 2002.
2002-06-12 15:43:19 +00:00
Howard Chu
b89c4539b9
Fix Listeners: handles multiple addresses for a given hostname, copies
...
sockaddr into Listener structure.
2002-06-06 10:33:18 +00:00
Kurt Zeilenga
19eca33ca3
Gentile HUP shutdown from Hallvard
2002-06-03 16:47:43 +00:00
Howard Chu
efecf4e121
ITS#1733 eliminate o_abandonmutex
2002-04-11 08:03:40 +00:00
Howard Chu
98e3499b05
ITS#1736 slapd_shutdown can be unsigned
2002-04-11 07:28:30 +00:00
Pierangelo Masarati
f4dba925ff
add a switch that enables/disables reverse lookups if configured with rlookups
2002-04-03 15:40:49 +00:00
Pierangelo Masarati
6174cb6529
improvement of permission handling of local sockets (ITS#1660, issue 2)
2002-03-23 16:07:19 +00:00
Howard Chu
f0a453dfca
Fix ITS#1615
2002-03-07 20:23:48 +00:00
Pierangelo Masarati
4f2ff1c108
uses URL extensions to set socket permissions other than default
...
URL Syntax:
ldapi://[<path>[/????[!]x-mod=<mod>]]
where <path> is the URL-encoded path of the socket (i.e. use %2F instead
of '/' for UNIX filenames!) and <mod> is 3*[w|-] (all we need is write
permission to the socket, read/execute permissions are ignored; however,
they're set when opening the listener). The critical flag (the optional
'!' if not used ignores the result of the chmod() operation.
2002-01-28 20:26:55 +00:00
Pierangelo Masarati
eb14feac7e
provisions for user-supplied permissions
2002-01-28 17:57:53 +00:00
Pierangelo Masarati
f00f86bf22
another round at cleaning it up: better naming, more attributes and so
2002-01-28 17:21:52 +00:00
Pierangelo Masarati
619f772459
listener monitor
2002-01-11 11:43:35 +00:00
Pierangelo Masarati
5dfbf93687
need this outside for back monitor ...
2002-01-11 10:46:58 +00:00
Kurt Zeilenga
0e2af54a3f
Update copyright statements
2002-01-04 21:17:25 +00:00
Howard Chu
bbcb0f8a7f
Replace strcat with slap_strcopy
2001-12-26 16:25:18 +00:00
Howard Chu
8ad557e4ec
fix from jon@symas.com - inet_ntoa on uninitialized sockaddr
2001-12-17 22:46:59 +00:00
Howard Chu
826056e75b
More thorough backend_destroy. Added config_destroy. Destroy slap_listeners.
...
Plugged other small leaks.
2001-12-15 12:05:58 +00:00
Kurt Zeilenga
b4ccbc2722
ITS#1413 suggested fix
...
(I think I fixed this by other means, but this does no harm)
2001-12-07 17:25:34 +00:00