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
Howard Chu
0552b1c53f
NT updates from jon@symas.com.
2001-12-07 04:03:25 +00:00
Kurt Zeilenga
b5504a1c36
Clean up some misplaced 'extern' declarations (should be headers)
2001-12-04 19:57:09 +00:00
Pierangelo Masarati
aee3600276
minor cleanup
2001-11-17 16:18:07 +00:00
Mark Adamson
8c16d30087
optimize number of calls to slap_get_time()
2001-11-13 01:38:30 +00:00
Kurt Zeilenga
d03acd7209
Fix uninitialized pointer bug.
2001-11-03 22:02:57 +00:00
Kurt Zeilenga
d9fb94f1a8
Updated busy loop protection
2001-10-23 22:17:41 +00:00
Kurt Zeilenga
17264d1ad4
Experiment with busy loop protection...
2001-10-21 00:48:14 +00:00
Howard Chu
693a81e1db
More CLDAP tweaks, to differentiate between real LDAPv2 CLDAP and "other"
...
LDAP/UDP messages. Slapd marks received CLDAP messages as LDAP_VERSION2.
The client library can generate CLDAP queries if -Protocol 2 is chosen,
otherwise not. LDAPv2 CLDAP cannot query the slapd rootDSE, gets no reply.
2001-10-02 01:02:23 +00:00
Kurt Zeilenga
44146a1cb7
Rework DB_THREAD support. CDB support needs reimplementation.
2001-10-01 06:08:46 +00:00
Stig Venaas
3c28bb413d
Removed a superfluous line left after the ai_addr == NULL fix
2001-09-29 09:40:47 +00:00
Kurt Zeilenga
e78265738d
Rework getaddrinfo() stuff for ai_addr == NULL
2001-09-29 06:33:54 +00:00
Howard Chu
647b5f84ee
Resurrection/rewrite of CLDAP (RFC1798 Connectionless LDAP).
...
Compile with -DLDAP_CONNECTIONLESS to use this code.
For slapd, use "-h cldap://" to listen on UDP.
For ldapsearch, use "-H cldap://" to query on UDP.
Client-side support is very minimal:
no automatic timeout/retries
no basedn wildcard expansion on results
no support for specifying multiple servers at once.
2001-09-28 00:18:40 +00:00
Kurt Zeilenga
2f761834b2
Fix NEW_LGGING typo
2001-08-29 19:49:05 +00:00
Stig Venaas
70f7e55344
Changed get_listener_addresses() to not use getaddrinfo() for PF_LOCAL
2001-08-26 11:03:27 +00:00
Randy Kunkee
a9097044ea
Remove global_backendsyncfreq code (code has been pushed down into back-ldbm).
2001-06-28 18:02:46 +00:00
Randy Kunkee
d492880870
Add sync_daemon to daemon.c, enabled by global configuration
...
backendsyncfreq <seconds>. Setting this automatically enables
dbnosync (because the synchronizer takes care of it).
2001-06-22 08:38:58 +00:00
Kurt Zeilenga
af2ab5f0a5
Make sure we yield() on a failed accept()
2001-05-10 17:39:10 +00:00
Kurt Zeilenga
d523048634
Fix have inet_ntop bug
2001-05-09 23:41:16 +00:00
Kurt Zeilenga
be26f1a9f7
Fix typos
2001-05-04 22:50:51 +00:00
Kurt Zeilenga
383391b460
detect and use fcntl (for BSD/OS)
...
detect inet_ntop (for MacOSX)
2001-05-03 05:53:34 +00:00
Kurt Zeilenga
3fdbff6923
SLP updates
2001-05-02 19:44:21 +00:00
Gary Williams
7c53c9ba1c
fix windows-specific logging line
2001-02-02 14:49:35 +00:00
Kurt Zeilenga
fa21f7fe86
Fix IP= port numbers
2001-01-24 00:08:15 +00:00
Gary Williams
f49fd8a98e
fix format
2001-01-17 16:35:53 +00:00
Kurt Zeilenga
8a22a0e0d0
SLP extension derived from patch provided by Caldera Systems.
...
Copyright 2000, Caldera Systems, Inc All rights reserved.
This software is not subject to any license of Caldera Systems, Inc
This is free software; you can redistribute and use it
under the same terms as OpenLDAP itself
2001-01-16 22:18:33 +00:00
Gary Williams
ffcdc6d11d
More new logging (Behind NEW_LOGGING)
2001-01-15 19:17:29 +00:00
Kurt Zeilenga
04e2da58ed
ITS#895: gai_strerror fix
2000-11-24 05:30:52 +00:00
Kurt Zeilenga
9e7accb034
This patch replaces gai_strerror with AC_GAI_STRERROR in daemon.c and also
...
uses AC_GAI_STRERROR to report getaddrinfo failures in os-ip.c
-- Stig Venass
2000-10-19 18:05:11 +00:00
Kurt Zeilenga
2dbd6c6d0e
remove lint
2000-10-18 00:35:09 +00:00
Kurt Zeilenga
a865220fd8
Bump listeners to 10
2000-10-17 06:36:22 +00:00
Kurt Zeilenga
1fb923e6e2
Replace last commit with Stig's improved version
2000-10-16 21:45:35 +00:00
Kurt Zeilenga
820965a412
ITS#839: getaddrinfo portability fix from Gabar Gombas
2000-10-16 20:32:39 +00:00
Kurt Zeilenga
fc227a8816
Remove cpp lint
2000-10-16 20:04:42 +00:00
Kurt Zeilenga
16fcdec8df
Import Stig reorganized daemon.c + style changes
2000-10-12 21:59:08 +00:00
Julio Sánchez Fernández
bdf3ec2fb3
Remove lint.
2000-10-09 19:11:46 +00:00
Kurt Zeilenga
5c66902abb
Fix typo
2000-10-02 14:10:51 +00:00
Kurt Zeilenga
fcc86b2456
Check for shutdown after successful select()
2000-09-30 05:34:34 +00:00
Kurt Zeilenga
b7b075ba75
Remove unneeded getpeername call (use accept() from).
...
cleanup #ifdef, localize variables, and misc changes.
2000-09-23 20:39:52 +00:00
Kurt Zeilenga
aa5b7d4d52
Restrict keepalive/nodelay setsockopt to IP streams
2000-09-23 19:14:40 +00:00
Kurt Zeilenga
bbae507a8f
Set TCP_NODELAY and SO_KEEPALIVE after every accept() as some accept()
...
implementations do not create new socket with all properties of
listening socket.
2000-09-21 19:08:17 +00:00
Mark Adamson
bf1ee530ea
Implementation of SASL authorization.
2000-09-21 17:32:54 +00:00
Kurt Zeilenga
434b0738dd
Don't check fd_sets until after we check fd < dtblsize
2000-09-18 19:01:21 +00:00
Kurt Zeilenga
d4a89d30f8
Minor IPv6 changes (ITS#716) suggested by Stig Venass <venaas@uninett.no>
2000-09-06 19:03:33 +00:00
Kurt Zeilenga
1c328aa9c7
Minor typedef and other clean ups
2000-08-26 01:14:05 +00:00
Kurt Zeilenga
60c474a4a0
ITS#681: Fix for problems with IPv6 and ACLs
...
from Stig Venaas <venaas@uninett.no>
---
Copyright 2000 Stig Venaas, UNINETT
All rights reserved.
Redistribution and use in source and binary forms are permitted
without restriction or fee of any kind as long as this notice is
preserved. The name of UNINETT may not be used to endorse or promote
products derived from this software without specific prior written
permission. This software is provided ``as is'' without express or
implied warranty.
2000-08-24 18:34:48 +00:00
Kurt Zeilenga
f286380c82
Check for IP using != AF_LOCAL instead of = AF_INET
2000-08-17 04:22:36 +00:00
Kurt Zeilenga
5b856458a2
s/SAFEMEMCPY/AC_MEMCPY/
...
Use AC_FMEMCPY where appropriate (-llber)
2000-07-28 01:07:07 +00:00
Kurt Zeilenga
3ad45a0662
Clean up WSAENOTSOCK code (no functional change)
2000-07-25 20:04:23 +00:00
Kurt Zeilenga
cd5aed0bbe
Use sigaction to set SA_RESTART (if appropriate).
...
Portability of this code needs to tested.
2000-07-22 00:37:51 +00:00
Kurt Zeilenga
27f674a926
Share function declarations between varients
2000-07-21 22:47:46 +00:00
Kurt Zeilenga
3c91b7e05a
Clarify message logged upon host_access() failure
2000-07-18 03:12:55 +00:00
Kurt Zeilenga
5fc22599e2
Update SASL code to reuse context through life of session.
...
Replace 'negotiated' with 'interactive' bind
Add hooks for SASL/EXTERNAL
Disable SASL security layers
Rework SASL command line and config file parameters
2000-07-13 22:54:38 +00:00
Kurt Zeilenga
1f1993989a
s/enable-unix/enable-local/
...
s/LDAP_PF_UNIX/LDAP_PF_LOCAL/
s/AF_UNIX/AF_LOCAL/
s/PF_UNIX/PF_LOCAL/
2000-07-09 21:49:36 +00:00
Kurt Zeilenga
8670bb6ba2
Add missing sockerr call
2000-06-26 05:23:33 +00:00
Kurt Zeilenga
5f20cf1ed5
Modify ldapsearch(1) significantly. Now handles LDAPv3 search
...
references, extended results, and extended partial results. LDIF
extended to support these new features and reported version 2.
-L now limits output to LDIFv1 for compatibility reasons. No
-L is now LDIFv2. Old alternative form is no longer supported.
Use LDAP_TMPDIR (in ldap_config.h) instead of hardcoded /tmp
Use LDAP_FILE_URI_PREFIX (in ldap_config.h) instead of hardcoded
file://tmp/
2000-06-25 00:35:17 +00:00
Kurt Zeilenga
ec426532b2
Reworked thread code to better support thread-library specific
...
r/w locks and thread pools. Hide internal structures (using
pthread'ish technics). Place common code in threads.c. Move
no-thread code to thr_stub.c. Move thread pool code to tpool.c.
Removed setconcurrency call from initializer, added 'concurrency'
directive to slapd. Tested code under pthreads, pth, and no-threads.
2000-06-13 02:42:13 +00:00
Kurt Zeilenga
1ef14875db
Thought I fixed these errors previously... oh well.
2000-06-10 23:06:08 +00:00
Mark Valence
3cad129608
Removed active_threads count and associated mutex/cond. Replaced with
...
ldap_pvt_thread_pool_backload() as needed. All tests run OK on pthre
ads (linux), cthreads, NT threads, and Pth.
2000-06-10 06:40:03 +00:00
Kurt Zeilenga
55dba4395f
Update PF_INET6 and PF_UNIX detection, both default to auto
2000-06-09 23:09:51 +00:00
Kurt Zeilenga
140a579e32
Additional IPv6 changes from Stig Venaas
...
Copyright 2000 Stig Venaas, UNINETT
All rights reserved.
Redistribution and use in source and binary forms are permitted
without restriction or fee of any kind as long as this notice is
preserved. The name of UNINETT may not be used to endorse or promote
products derived from this software without specific prior written
permission. This software is provided ``as is'' without express or
implied warranty.
2000-06-09 17:00:22 +00:00
Kurt Zeilenga
bb9d8a0f20
Initialize peername with EOS.
2000-06-08 23:12:52 +00:00
Mark Valence
7ec6a4363f
Use thread pool for operation threads.
2000-06-07 19:27:33 +00:00
Kurt Zeilenga
60d6c13d73
Use ldap_pvt_url_scheme2tls() to test for ldaps://
2000-06-07 17:50:58 +00:00
Mark Valence
185641cb12
ldap_is_ldaps_url takes a char *. Is there a better fix, since the ur
...
l is already parsed?
2000-06-07 17:28:01 +00:00
Kurt Zeilenga
e5ebc553ac
Rework URI parser to provide true scheme not proto/properties.
...
Plus more pthread rwlock code
2000-06-07 01:09:40 +00:00
Kurt Zeilenga
64d7227821
Basic IPv6 support...
...
Copyright 2000 Stig Venaas, UNINETT
All rights reserved.
Redistribution and use in source and binary forms are permitted
without restriction or fee of any kind as long as this notice is
preserved. The name of UNINETT may not be used to endorse or promote
products derived from this software without specific prior written
permission. This software is provided ``as is'' without express or
implied warranty.
2000-06-06 20:23:22 +00:00
Kurt Zeilenga
60802201e3
Const'ification
...
SASL mech removed from backend bind callback (as SASL is managed by frontend)
Changes to some backends are untested (as I don't have all dependent
software install)
2000-05-22 03:46:57 +00:00
Kurt Zeilenga
4bc786f34b
Y2k copyright update
2000-05-13 02:47:56 +00:00
Howard Chu
2e5e4c3f20
More fixes for NT support:
...
liblutil/ntservice.c change registry key path used for non-default
service names.
slapd/Makefile.in change to generate slapd.syms dynamically
slapd/daemon.c fix to make NT service ignore SIGBREAK
slapd/main.c fix to allow NT to retrieve listening url from registry
slapd/nt_svc.c fix for exported symbols
slapd/result.c change use of strerror to sock_errstr
slapd/slapd.syms no longer needed
2000-05-11 20:50:20 +00:00
Kurt Zeilenga
a16943d645
Per ITS#419, don't require SLAPD_RLOOKUPS when HAVE_TCPD
2000-01-11 01:12:08 +00:00
Luke Howard
9b4e3b2234
Merged in preliminary support for Cyrus SASL library;
...
support for DCE slash-delimited, left-to-right DNs;
support for a domain socket transport (enable with
--enable-ldapi); and extensions to URL parsing to
support the latter transport.
2000-01-02 01:21:25 +00:00
Kurt Zeilenga
b1639dadd6
Remove lint
...
Add copyrights
1999-12-13 04:53:59 +00:00
Kurt Zeilenga
7c28aa058c
Add password check and generation check.
...
Modify tests to use -h "ldap://localhost:port/" instead of -p port.
1999-12-12 18:45:06 +00:00
Mark Valence
31eea5f43c
On Windows, WSAENOTSOCK is treated the same as EBADF. This is needed because of a race condition (sock is selected just after another thread closes it), which needs a proper fix.
1999-12-09 22:05:00 +00:00
Howard Chu
d1841b5c1f
Fix WAKE_LISTENER hang in single-threaded server
1999-12-02 03:45:54 +00:00
Howard Chu
7eec31c8f6
Don't call FD_SET for an fd if it is already set. This causes major problems
...
on NT due to their fd_set implementation.
1999-12-02 03:21:06 +00:00
Howard Chu
e63364baac
Read a full buffer from wake_sds whenever we wake up from select().
1999-11-28 04:05:59 +00:00
Kurt Zeilenga
b7af076fee
Use centralized output directories.
...
Update single debug/release not to use service manager nor event manager.
Likely breaks MINGW32 port.
1999-11-01 21:25:22 +00:00
Kurt Zeilenga
baa34f752b
Do not attempt to obtain sizeof(sin_addr.s_addr) or &sin_addr.s_addr
...
as s_addr member of in_addr may be a bitfield.
1999-10-30 04:58:06 +00:00
Howard Chu
f68db53909
Fix Winsock-related warnings and/or bugs.
...
See README 1.27 log
1999-10-28 07:14:25 +00:00
Kurt Zeilenga
403f4479bc
Add OpenLDAP RCSid to *.[ch] in clients, libraries, and servers.
...
Replace old Id as needed (back-tcl).
Leave updating of contribWare to contributors (for now).
1999-09-08 19:06:24 +00:00
Hallvard Furuseth
f3880e5633
Remove lint
1999-09-06 04:42:20 +00:00
Hallvard Furuseth
1cde481298
Move `#include "ldap_defaults.h"' into slap.h, which #ifdefs on it.
1999-09-03 23:10:05 +00:00
Hallvard Furuseth
c09a2c63e7
Cleanup:
...
Fix printf formats, remove unused variables, add missing prototypes in slapd,
add static/const, add some return types or change to void return type.
1999-09-02 08:05:17 +00:00
Kurt Zeilenga
5b8d286d40
Fix idle timeout code.
1999-09-01 06:37:46 +00:00
Kurt Zeilenga
ac8b5468aa
Clean up soctpair for NT. Add USE_PAIR to allow pair(2) use.
1999-08-31 16:47:42 +00:00
Kurt Zeilenga
b509dd4d8c
sockpair cleanup including:
...
provide prototype in lutil.h
use LBER_SOCKET_T instead of int in prototype. (didn't use
ber_socket_t so all of lber.h wouldn't have be dragged in)
rename signal handlers, use RETSIGTYPE, and make SIGHUP wake
rename fd to sd to reflect descriptor must be usable as a socket.
renamed sel_exit_fds to wake_sds to reflect current use
improve readability of sockpeer.c including removing obtuse goto.
1999-08-31 05:18:06 +00:00
Howard Chu
0319dcad17
Use lutil_pair(), WAKE_LISTENER now uses this socket.
1999-08-31 03:26:35 +00:00
Kurt Zeilenga
9826f704b5
Back out to simple sock_errno sock_errstr macros and use WSAGetErrorString
...
instead of WSAGetLastErrorString to preserve errno like semantics.
1999-08-29 23:33:35 +00:00
Howard Chu
3925d53ccd
Replaced sock_errno()/sock_errstr() macros with SOCK_ERR(num,str)
1999-08-29 23:09:27 +00:00
Kurt Zeilenga
32aa582abe
Make sock_errstr expect an error value instead of relying on current
...
errno.
1999-08-29 20:32:34 +00:00
Howard Chu
74543e6c68
Defined tcp_read and tcp_write. Use them in daemon.c
1999-08-29 04:01:16 +00:00
Howard Chu
801bac51c9
per Hallvard's advice: fixed definition of sock_errstr().
1999-08-29 02:54:58 +00:00
Howard Chu
d75975edf8
Use sock_errno() and sock_errstr() in socket debug messages.
...
Use a UDP socket connected to itself to allow signals to terminate the
select() in slapd_daemon_task().
1999-08-29 01:51:45 +00:00
Kurt Zeilenga
5c63fd55b5
Implement ldap_dn_normalize and friends. Should be used by clients
...
to validate input dn's BEFORE sending dn's to server.
Also fixed getfilter to use REG_EXTENDED|REG_NOSUB. (and fixed one
case where REG_BASIC was still used).
s/strdup/LDAP_STRDUP/
Added ldap_pvt_str2lower/upper
1999-08-25 06:44:08 +00:00
Hallvard Furuseth
2d6460f880
plug memory leak
1999-08-19 11:44:44 +00:00
Kurt Zeilenga
8ead8c5fd9
Clean up debug messages.
1999-08-19 00:40:18 +00:00
Hallvard Furuseth
6054463eeb
Minor cleanup:
...
Fix Statlog() formats, remove an implicit int, include <ctype.h> for isspace().
1999-08-07 05:36:48 +00:00
Kurt Zeilenga
9c3ed0310b
Add copyright notices.
1999-08-06 23:07:46 +00:00
Kurt Zeilenga
9ea7a42b99
Add copyright notice and a few comments here and there
1999-08-04 23:59:13 +00:00
Kurt Zeilenga
2b79ff2c48
Initial inet_aton() detection.
1999-08-03 20:02:44 +00:00
Kurt Zeilenga
df8f7cbb9b
s/exit(1)/exit(EXIT_FAILURE)/
...
s/exit(0)/exit(EXIT_SUCCESS)/
add <ac/stdlib.h> where needed and other minor header adjustments
1999-08-03 18:14:24 +00:00
Kurt Zeilenga
008bbf56db
Fix -USLAPD_RLOOKUPS
1999-07-27 18:49:32 +00:00
Kurt Zeilenga
d147e609d2
Implement TCP_NODELAY on both client and server side.
1999-07-22 21:49:35 +00:00
Kurt Zeilenga
f0c1fc37f5
Fix IP: typo in peername
1999-07-22 20:37:56 +00:00
Kurt Zeilenga
933908f72f
ACL CHANGES:
...
by <who> <access> changed to by <who>+ <access> (joined with AND)
added peername=<regex> sockname=<regex> url=<regex>
removed addr=<regex> (use peername instead).
replace dn_upcase with str2upper and str2lower. Use where needed.
1999-07-21 20:54:23 +00:00
Gary Williams
f4eb2feba5
use rd instead of i looking for listeners (line 848)
1999-07-20 21:55:06 +00:00
Julio Sánchez Fernández
504038ffac
Move the input data exhaustion loop to connection.c from daemon.c
1999-07-20 18:03:29 +00:00
Julio Sánchez Fernández
535cc34421
If we did gethostbyname, we need no further address manipulation.
1999-07-20 11:26:44 +00:00
Kurt Zeilenga
cb94e155ae
Don't call Debug inside a signal handler
1999-07-20 07:11:56 +00:00
Kurt Zeilenga
6847e329bc
Fix new URL startup code.
1999-07-19 20:48:19 +00:00
Kurt Zeilenga
170836751a
Namespace changes
...
added slap_ and ldbm_ to many structures
added typedefs to many structures
used typedefs
New main.c argument parsing with ldap url support (replacing -a address).
New sockaddr_in handling and support for multiple listeners.
1999-07-19 19:40:33 +00:00
Hallvard Furuseth
425bab2c47
Add comment thatPass socklen_t* instead of int* to getsockopt, accept, getpeername, recvfrom
1999-07-16 18:57:11 +00:00
Julio Sánchez Fernández
0053b27ce0
Look on connection_read() if it returns positive so it has a chance
...
to exhaust all protocol units received from the transport layer.
I think this is the necessary fix for the TLS-data-ready/
socket-not-ready issue, but I have not experimented that problem
yet, so I am unsure about its effectiveness.
Now, do we need something like that for connection_write? How would
we go about implementing it?
1999-07-16 18:53:30 +00:00
Julio Sánchez Fernández
6d75d0f8fb
connection_init now takes one more argument that indicates whether to
...
use TLS right away or not on that connection.
1999-07-14 19:44:18 +00:00
Julio Sánchez Fernández
c18d6e7ecf
Only bind on TLS port if explicitly requested with -T, otherwise all
...
kind of conflicts happen when running tests.
1999-07-14 13:39:30 +00:00
Julio Sánchez Fernández
5b7babdee4
Bind and listen on TLS port too
1999-07-14 13:16:13 +00:00
Kurt Zeilenga
2fda53f375
Add missing arguments to Debug() calls... and adapt nt_debug for general
...
use.
1999-06-21 22:36:13 +00:00
Kurt Zeilenga
13ac82621b
Limit the check to a 4 tries every timeout.
1999-06-19 03:23:49 +00:00
Kurt Zeilenga
2d720643be
experimental connections_timeout_idle() implementation.
1999-06-19 03:20:01 +00:00
Kurt Zeilenga
669b8f4047
ber_int_t, ber_tag_t, ber_socket_t, ber_len_t
...
added lber_types.h.nt, lber_types.h.in
removal of NULLxxx internal macros (in favor of NULL).
ch_free added to slapd,slurpd/ch_malloc.c
#define free ch_free (should be removed after s/free/ch_free/g) in proto-slap.h
ch_malloc and friends use ber_memalloc and friends
1999-06-18 23:53:05 +00:00
Gary Williams
1971837778
fix comments (remove // style), free(ptr) in slapd_daemon_task was causing heap failure
1999-06-18 21:31:53 +00:00