Commit Graph

254 Commits

Author SHA1 Message Date
Kurt Zeilenga
6b05425d0f Minor fixes to complete backout of initialization/startup changes. 1999-02-04 17:45:59 +00:00
Kurt Zeilenga
d27b2f811e Backout recent initialization/startup changes in prep for new
frontend->backend interface.
1999-02-04 17:33:46 +00:00
Kurt Zeilenga
fc44d42c53 Backout startup/initialization changes in preparation for new
frontend->backend interface.
1999-02-04 17:28:49 +00:00
Kurt Zeilenga
c6882d4670 Remove rwlock diag messages. 1999-02-04 17:24:26 +00:00
Kurt Zeilenga
efce9cffb4 Use LDAP_ALIAS_DEREF_PROBLEM for all problem dereferencing aliases.
LDAP_ALIAS_PROBLEM is now only used if the alias itself is mangled.
1999-02-04 17:23:34 +00:00
Will Ballantyne
be9e28907e inserted additional checks for null values, comments
fixed deadlocks
1999-02-04 00:21:57 +00:00
Kurt Zeilenga
5934367242 Another concurrency typo. 1999-02-03 18:32:25 +00:00
Kurt Zeilenga
7903584911 Use idl_fetch_one() to fetch single id_blocks instead of separate
ldbm_cache_fetch() codes.
1999-02-03 17:14:01 +00:00
Kurt Zeilenga
365f6bf69b Fix double free of filter when bad. 1999-02-03 05:51:42 +00:00
Kurt Zeilenga
a3cf741ab7 Fix slapd/tool dependencies on libraries. 1999-02-03 05:25:04 +00:00
Kurt Zeilenga
368a507c9a Plug leak of datum. Should be freed after use. 1999-02-03 05:00:41 +00:00
Kurt Zeilenga
ace9fb68c5 Fix ALLIDS bugs
Fix memory leaks
1999-02-03 04:45:08 +00:00
Kurt Zeilenga
16b3111ac7 Got that logic backwards... 1999-02-03 03:50:11 +00:00
Kurt Zeilenga
0c2ce661fb first arg of ldbm_db_errcall could be a const char * instead of char *. 1999-02-02 23:15:45 +00:00
Kurt Zeilenga
40ba9bc80b Don't try to free NULL idl. Did not cause a problem, though, as
idl_free() had insurance.
1999-02-02 22:46:21 +00:00
Kurt Zeilenga
92e71b459b Hack up a quick bandaid to make things compile. Startup/Initialization
needs work.
1999-02-02 19:26:00 +00:00
Kurt Zeilenga
2b29521596 Fix statlog... debugging change got commit by mistake. 1999-02-02 14:06:23 +00:00
Kurt Spanier
442c7e7a7b Added startup/shutdown routine for slapd back-ends. 1999-02-02 08:03:03 +00:00
Kurt Zeilenga
433e8ad645 Add a few comments to help detail some of these functions. 1999-02-02 03:40:19 +00:00
Kurt Zeilenga
3e48937ac8 Fix idl_firstid to return NOID when !(nids > 1) instead of when (nids == 1)
Fix idl_nextid not to skip an ID if ID not in list.
Both of these should not occur if used correctly, but cheap insurance
against incorrect usage is welcomed.
1999-02-02 02:46:18 +00:00
Kurt Spanier
314f3f6ed7 Introduction of a backend startup/shutdown function to make backend-specific
initialization after reading slapd.conf, and before starting the daemon
1999-02-01 17:37:43 +00:00
Kurt Zeilenga
8981a52ed3 Rebuild configure using autoconf 1.3 (with aclocal from automake 1.4). 1999-02-01 01:36:42 +00:00
Kurt Zeilenga
59a288abb5 Rewrite IDL block code to use simple array and accessor macros
instead of array with overlayed struct fields.  (which is inherently
non-portable).
Change maxid check in insert to be greater than or equal instead
of equal.
Use SAFEMEMCPY.
1999-01-31 07:55:53 +00:00
Kurt Zeilenga
163077ec93 Don't leak slap_op when op not in list.
Don't leak abandon mutex.
Use ch_malloc and friends.
1999-01-29 05:46:12 +00:00
Kurt Zeilenga
91f6792109 Add dn_rdn() function to return rdn part of dn. 1999-01-28 21:40:04 +00:00
Kurt Zeilenga
1d70b89234 Make sure e_ndn is used! 1999-01-28 17:32:59 +00:00
Kurt Zeilenga
72ba4cfb71 Use -lldap_r instead of -lldap -lthread.
Likely broke things for non-posix threadings....

Update -lldap_r implementation to:
	remove attribute support
	hide thread detachment
	provide concurrency accessors
	provide initialization function
	fix gethostby{addr,name}_r codes (not coverred by HAVE_REENTRANT_FUNCTIONS)
Update servers/libraries to use ldap_pvt_thread_ calls.
Cleanup server codes (no #ifdef HAVE_PTHREAD_THIS or _THATs)!
Removed -llthread
1999-01-28 04:34:55 +00:00
Kurt Zeilenga
4ea54855c2 Fix PHREAD typo. 1999-01-27 22:42:30 +00:00
Will Ballantyne
07f566e712 fix suffix alias compare in config.c, logic was reversed. The suffix alias
is now ignored if it is the same as the real suffix.
1999-01-27 04:58:02 +00:00
Kurt Zeilenga
bd6dfe333d LDBM/back-ldbm locking reworked!
back-ldbm was using a cache specific lock to protect non-reentrant
	database routines from being reenterred.  This is inadequate.
	Also, reentrant database systems calls were serialized unnecessarily.

	Non-reentrant database calls must have a big_mutex.  Implemented
	this within -lldbm itself.  library requires ldbm_initialize()
	be called before any other ldbm call to initialize the big_mutex
	and to do any other db specific initialization (ie: such as
	required for DB2).

The dbc_mutex, dbc_cv, & dbc_readers fileds of dbcache are history.
The "reentrant_database" (REENTRANT_DATABASE) define is also axed.
1999-01-26 20:55:54 +00:00
Kurt Zeilenga
f1e934effb Hide allocate of reentrant_database cond varible and reader count
behind REENTRANT_DATABASE.  rename reentrant_database -> REENTRANT_DATABASE.
When REENTRANT_DATABASE is defined, the simple lock is replaced
with a simple reader/writer lock.  This functionality should be removed
from back-ldbm to libldbm.
1999-01-26 17:23:50 +00:00
Kurt Zeilenga
3c67248a65 cache_set_state( cache, e, 0) cannot occur before lock on parent/root
is released.  Some other thread may have cache locked but blocking
on parent.  Must give up parent lock before acquiring cache lock.
1999-01-26 05:22:58 +00:00
Kurt Zeilenga
0181892175 Change o_private from int to void*. Use it to hold a pid_t (and hope it fits).
Have forkandexec() return pid_t instead of int.
1999-01-26 04:32:26 +00:00
Kurt Zeilenga
b83ae3b434 Add pidfile/argsfile options to default slapd.conf. 1999-01-24 21:20:00 +00:00
Kurt Zeilenga
a928abeb9e incorrect args to tcpd statslog 1999-01-24 01:29:23 +00:00
Kurt Zeilenga
29b1e1f0ba dn_parent(" ") should be NULL. 1999-01-23 19:34:02 +00:00
Kurt Zeilenga
4194c3ee85 If dn2id returns ID but id2entry returns NULL, log it.
Assume entry was deleted from underneath the dn2entry call,  hence
processing is same as if NOID had been returned.
1999-01-23 19:33:53 +00:00
Kurt Zeilenga
4863d98084 Remove configure's wait3 test as we don't care about the rusage.
Rewrite all child waits to use wait4 (for consistency only).
1999-01-23 04:03:43 +00:00
Kurt Zeilenga
637c0a8301 Use strtok_r() instead of strtok(). Remove strtok mutex! 1999-01-22 04:46:54 +00:00
Kurt Zeilenga
0f17fac37d Implement NEXTID chunking. Obtain IDs in chunks of size
SLAPD_NEXTID_CHUNK.  Code protects NEXTID file to ensure
its equal to or greater than nextid.  Updated on close
to actual nextid.  next_id_save() could be called periodically
if desired.  Default chunk size is 32.  Define to 1 to disable
chunking.
1999-01-22 02:26:19 +00:00
Kurt Zeilenga
5389e40ba5 initialize nextid with NOID not -1. 1999-01-22 01:53:39 +00:00
Kurt Zeilenga
2318ea0fd6 Don't return nextid on failed add operations for safety. 1999-01-22 01:51:53 +00:00
Kurt Zeilenga
5bfb3ac221 nextid cleanup in preparation to disable next_id_return(). 1999-01-22 01:40:39 +00:00
Kurt Zeilenga
ecdf9a354d Entry must be locked before adding it to the cache.
This removes a race condition upon the entry.
1999-01-22 00:27:50 +00:00
Kurt Zeilenga
6edeeeffd4 During cleanup always unlock root_mutex if rootlock is true
(don't make it conditional on p == NULL)
1999-01-21 22:20:03 +00:00
Kurt Spanier
68a8798594 Definition of slapd pid and args files as slapd.conf general parameters;
introduction of pid/agrs parameters to the test-suite slapd.conf files;
creation of sub-directory test/var for storage of pid/args files during test;
update of the slapd and slapd.conf man pages.
(The change reduces dependency on ldapconfig.h, since SLAPD_PIDEXT
 and SLAPD_ARGSEXT are deleted from the code.)
1999-01-21 15:53:54 +00:00
Kurt Zeilenga
127ec9c46c Fix c_cdn typo. Ouch. 1999-01-21 02:25:09 +00:00
Kurt Zeilenga
09421a74db Add c_protocol to slap_conn to track protocol version used by client.
Is initialized to 0 (unknown) and then set to 2 or 3 on bind.  Should
also be 0->3 if a special (or any) operation occurs before the bind.
1999-01-21 02:21:39 +00:00
Kurt Zeilenga
b3d383bbf5 *** empty log message *** 1999-01-21 01:12:35 +00:00
Kurt Zeilenga
19a17982c6 suffixes need to be stored in normalized uppercase format 1999-01-20 05:43:33 +00:00