Commit Graph

271 Commits

Author SHA1 Message Date
Bart Hartgers
8153a4039b The new&improved Sockbuf. This adds the infrastructure on which
support for TLS and SASL will be build.

Please inform me of any problems.
1999-03-02 20:23:14 +00:00
Kurt Zeilenga
246a738c00 Fix typo in previous commit. 1999-03-02 03:09:04 +00:00
Kurt Zeilenga
4e160e83b6 Replace IFP() with appropriate full prototypes:
AVL_CMP, AVL_DUP, AVL_FREE, AVL_APPLY.
Apply casts as needed.
Change data pointer from caddr_t to void *.
1999-03-02 00:32:59 +00:00
Kurt Zeilenga
a8a05cbe48 Update NT port with support for -lldap_r and -lldbm.
Also add initial slapd .dsw/.dsp files.  Still needs work (mainly syslog).
1999-03-01 22:37:05 +00:00
Kurt Zeilenga
a2aa1c38ec Fix HAVE_WINSOCK for winsock32.lib 1999-03-01 21:08:07 +00:00
Kurt Zeilenga
fd9fbb3306 Update libpath. 1999-03-01 21:07:10 +00:00
Bart Hartgers
e26de67770 Patch to support to determine the number of args of the
gethostby{name,addr}_r functions.
Contributed by Juan Carlos Gomes IT#68 (apparently).

Also includes support for detecting ssleay in configure.in.
1999-02-25 13:07:27 +00:00
Hallvard Furuseth
73db912500 Cast char' arguments to ctype.h functions to unsigned char'.
These functions require their arguments to be in the range of `unsigned char'.
1999-02-22 17:57:22 +00:00
Kurt Zeilenga
aa17fdd0bd Use ldap_pvt_strtok directly and unconditionally.
Implementation no longer uses strtok_r(), it may be broken
or have an odd prototype.
Update configure not to check for strtok/strtok_r nor require
strtok_r to LDAP_API_FEATURE_X_OPENLDAP_REENTRANT.
1999-02-20 20:12:03 +00:00
Kurt Zeilenga
9cc9a84527 Remaining LDAP_COMPILING_R should be LDAP_R_COMPILE. 1999-02-20 18:33:24 +00:00
Hallvard Furuseth
d7451444c2 cast avl_free argument to IFP 1999-02-20 08:16:33 +00:00
Kurt Zeilenga
102f6f2f43 print.c doesn't belong in libldif.dsp. 1999-02-11 23:05:29 +00:00
Kurt Zeilenga
e4a589d99e Updates for MSVC 5.0. Fix libraries names to be ol{ber,dap,..}32.lib.
Fix library/include paths for building "Release".
Create getpass() from ud's mygetpass().
1999-02-11 21:16:03 +00:00
Kurt Zeilenga
4a19ae3567 Fix text2time to handle 4 digit years. Fix YEAR() to handle
tm_year being 100+.
1999-02-09 06:31:34 +00:00
Kurt Zeilenga
a3a576c3b9 Don't provide ldap.OpenLDAP.org and dc=OpenLDAP, dc=Org as the defaults.
Just use compiled in defaults.
1999-02-08 18:59:05 +00:00
Kurt Spanier
42f6e78dd4 Integration of the BDB2 backend into the new init/startup/shutdown schema.
Integration into ./configure ( --enable-bdb2 ).
Adaptation of the test-suite ( 'make' -> ldbm; 'make bdb2-local' -> bdb2 ).
Minor fixes in slapd/libldbm.
1999-02-08 11:42:14 +00:00
Kurt Zeilenga
216049bd12 New Frontend->Backend Interface
Separates per backend type from per backend database initialization
	and startup.  Also supports per type / per backend shutdown.
New frontend startup/shutdown routines are also provided:
	slap_init() slap_startup() slap_shutdown() slap_destroy()
New frontend->backend startup/shutdown is managed by:
	backend_init() backend_startup() backend_shutdown backend_destroy
backend_init() now calls bi_init() to initial all function pointers
for the backend (excepting bi_init() which is now the only hardcoded
entry point).  New entry points are detailed in slap.h struct
backend_info.  backend_info is a per database type structure.
Besides the new startup/shutdown entry points, the new interface
also supports per backend type configuration options.  One could have:

	backend bdb2	(new Berkeley DB 2 backend)
	bdb2_home	/directory

	database bdb2
	...

	*** This code is fairly experimental ***
	*** Much cleanup and testing is still needed ***

see slap.h for details on struct backend_db and backend_info.
1999-02-05 09:03:47 +00:00
Kurt Zeilenga
0482baa520 Need KRB_LIBS to link test programs. 1999-02-04 19:21:04 +00:00
Kurt Zeilenga
e15e035bbb Fix XXDIR to use $(srcdir) so that VPATH works. 1999-02-04 18:13:51 +00:00
Kurt Zeilenga
366701bdf7 Fix dbcache/entry lock deadlock. If dbcache lock is held, it's
okay to read and write LDBM specific fields (state, refcnt,
LRU.  The id field, though is read-only once set.
cache_find_entry_dn2id(), hence, does not require any entry locks.
cache_find_entry_id() must do a entry_rdwr_trylock() and back
off if busy.
Add new rdwr lock code with trylock() functionality.
Implement entry_rdwr_trylock().
1999-02-04 18:00:50 +00:00
Kurt Zeilenga
463b64a94c Backout recent init/startup changes in preparation for new
frontend-backend interface.
Includes a number changes to share common routines between
database api types.
1999-02-04 17:41:19 +00:00
Kurt Zeilenga
a68daccf16 Fix DB_ENV typo. 1999-02-04 05:14:38 +00:00
Kurt Zeilenga
d671c49b94 Fix set concurrency typos. 1999-02-03 18:29:27 +00:00
Kurt Zeilenga
c61114a4ff Fix typo suggested by Heiko W.Rupp in ITS#63 1999-02-02 20:38:45 +00:00
Kurt Zeilenga
bbc2dfa105 gdbm_nextkey() takes two arguments not one. 1999-02-02 20:36:10 +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
ba0c0e022c Fix ldap_send_initial_request() to open connection if not already
openned (by ldap_open()).  This allows ldap_init() to function
properly!
1999-01-31 01:09:00 +00:00
Kurt Zeilenga
4040fc39ca zap ber buf pointer on free. 1999-01-29 06:07:02 +00:00
Kurt Zeilenga
26d29bb2f4 Add (back in) destroy functions... 1999-01-29 06:05:18 +00:00
Kurt Zeilenga
2c4e2fbfb2 ldap_sort_entries() should try to malloc(0) when the count is zero.
should also return error in ldap_count_entries returns an error.
1999-01-29 03:56:18 +00:00
Kurt Zeilenga
98f2462af0 ldap_pvt_thread_cond_broadcast() was missing from stubs.
I probably deleted it by mistaked when axing cond attrs.
1999-01-28 23:40:26 +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
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
321354ecff Add lber_pvt.h with prototypes of lber_pvt_log_print{,f}.
Ripple name change through -llber & -lldap.
Update -lldif to use lber_pvt_log_printf() instead of Debug.
1999-01-26 01:21:35 +00:00
Kurt Zeilenga
7eec267436 Add lber_log_print support to libldap.
Redefine Debug macro to call ldap_log_printf(NULL, lvl, fmt, ...)
Should replace each Debug statement with direct call to ldap_log_printf
passing LDAP session if available.
1999-01-26 00:27:51 +00:00
Kurt Zeilenga
d7079a10c3 Add support for LBER_OPT_LOG_PRINT_FN option. 1999-01-25 22:55:00 +00:00
Kurt Zeilenga
941087a09d Forgotten commit of string rearrangement. 1999-01-24 01:32:04 +00:00
Kurt Zeilenga
97a6648832 Forgot to add new string.c. 1999-01-24 01:07:52 +00:00
Kurt Zeilenga
ddb0752b8f Move libldap/strdup.c to string.c.
libldap/string.c will hold various string.h replacements.
Removed liblutil/strdup.c
Moved ldap_pvt_strtok to string.c.
Moved prototype of ldap_pvt_strtok to <ac/string.h>.
Added #define strtok_r ldap_pvt_strtok (if strtok_r doesn't exist).
1999-01-22 04:33:29 +00:00
Kurt Zeilenga
eed7408e7e Update ldap_first_attribute/ldap_next_attribute to handle
BerElement argument per latest IETF ldapext draft c api spec.
That is, caller is solely responsible for freeing the BerElement
allocated and returned by ldap_first_attribute.
Update man pages accordingly.
Update applications accordingly.
1999-01-20 20:21:38 +00:00
Kurt Zeilenga
e90c6566b8 Reorder build order: libavl depends on libldap (for str*). 1999-01-17 17:50:01 +00:00
Bart Hartgers
c149f48e5c Added OpenLDAP copyright to files. 1999-01-17 15:46:19 +00:00
Kurt Zeilenga
f1c89effeb Add reference to ldap.conf(5). 1999-01-16 01:50:12 +00:00
Bart Hartgers
0c1cb93c69 Changes to support threads from libldap_r. 1999-01-15 14:54:25 +00:00
Bart Hartgers
027d2fadc6 Updates regarding threads and names. 1999-01-15 14:49:03 +00:00
Kurt Zeilenga
d66a450344 Update init and ldap.conf(5) to handle LDAPNOINIT, LDAPCONF, LDAPRC
environment settings.
1999-01-14 23:04:08 +00:00
Bart Hartgers
f6a47058b6 Improved ldap_int_strtok. If strtok_r does not exists, it will be worked
simulated with strspn and strpbrk. If strspn or strpbrk aren't there, they
will be supplied.
In addition, the memory-handling of the ldap_int_gethostby's is better now.
1999-01-14 15:19:29 +00:00
Kurt Zeilenga
4de6a10ce2 Insert missing ')'... 1999-01-14 06:28:50 +00:00
Kurt Zeilenga
a784654da9 Modify build order to have lutil first and lthread last (libldap_r
will eventually be very last).  Add lthread/lutil to libldap_r test
program linkage.
1999-01-14 01:38:32 +00:00
Kurt Zeilenga
28a671d10d Revamp build system yet again to move all external libraries to
end of link.    Basic order is:
	$LDFLAGS internal-libs external-libs $LIBS $LTHREAD_LIBS

LTHREAD_LIBS is last as -lpthread (or equiv) must be last on many systems.
LIBS is next to last as some user might have put -lpthread (or equiv)
in $LIBS.
1999-01-14 01:31:43 +00:00