Commit Graph

512 Commits

Author SHA1 Message Date
Kurt Zeilenga
042898d2f0 Version.c deprecated in favor of mkversion.
Minor cleanup to lber files.
1999-05-20 19:38:03 +00:00
Kurt Zeilenga
1975433234 Deprecated in favor of mkversion. 1999-05-20 19:35:07 +00:00
Kurt Zeilenga
d42e658fcb Fixed bug in dtest code. 1999-05-20 00:04:16 +00:00
Kurt Zeilenga
e27ba3f0ee Improving e/d test (until I find the my damn bug) 1999-05-19 20:38:02 +00:00
Kurt Zeilenga
6c00e11fbc Enhance encode/decode test programs to encode sets, ie:
./etest '{sis}' | ./dtest '{sis}'
1999-05-19 19:10:55 +00:00
Kurt Zeilenga
8ef7993047 Removed lint. 1999-05-19 07:20:06 +00:00
Kurt Zeilenga
f9bbdb34c5 Add UL to more BER tags. 1999-05-19 06:27:35 +00:00
Kurt Zeilenga
6ee995f528 Add UL to LBER tags. 1999-05-19 06:13:44 +00:00
Kurt Zeilenga
f01a7dad53 s/HAVE_SYSLOG/LDAP_SYSLOG/g
Use <ac/syslog.h>
1999-05-19 01:58:23 +00:00
Kurt Zeilenga
df616d76ce Replace #ifndef WIN32 with #ifdef HAVE_SYSLOG 1999-05-19 01:54:33 +00:00
Kurt Zeilenga
3b16742eba Add LDAP_CONST to kerberos bind routines 1999-05-19 01:53:09 +00:00
Kurt Zeilenga
ddf8624abc Add LDAP_CONST to ldap_set_option() invalue 1999-05-19 01:52:46 +00:00
Kurt Zeilenga
11c052fae6 Missing LDAP_CONST from ldap_set_option() declaration. 1999-05-19 01:42:29 +00:00
Kurt Zeilenga
dc07e765f2 Vienna Bulk Commit
This commit includes many changes.  All changes compile under NT but
have not been tested under UNIX.

A Summary of changes (likely incomplete):

NT changes:
	Removed lint.
	Clean up configuration support for "Debug", "Release", "SDebug",
		and "SRelease" configurations.
	Share output directories for clients, libraries,
		and slapd.  (maybe they should be combined further
		and moved to build/{,S}{Debug,Release}).
	Enable threading when _MT is defined.
	Enable debuging when _DEBUG is defined.
	Disable setting of NDEBUG under Release/SRelease.  Asserts
		are disabled in <ac/assert.h> when LDAP_DEBUG is not
		defined.
	Added 'build/main.dsp' Master project.
	Removed non-slapd projects from slapd.dsp (see main.dsp).
	Removed replaced many uses of _WIN32 macro with feature based
		macros.

ldap_cdefs.h changes
	#define LDAP_CONST const
		(see below)
	#define LDAP_F(type) LDAP_F_PRE type LDAP_F_POST
		To allow specifiers to be added before and after
		the type declaration.  (For DLL handling)

LBER/LDAP changes
	Namespace changes:
		s/lber_/ber_/ for here and there.
		s/NAME_ERROR/LDAP_NAME_ERROR/g
	Deleted NULLMSG and other NULL* macros for namespace reasons.
	"const" libraries.  Installed headers (ie: lber.h, ldap.h)
		use LDAP_CONST macro.  Normally set to 'const' when
		__STDC__.  Can be set externally to enable/disable
		'constification' of external interface.  Internal
		interface always uses 'const'.  Did not fix warnings
		in -lldif (in lieu of new LDIF parser).

	Added _ext API implementations (excepting search and bind).
		Need to implement ldap_int_get_controls() for reponses
		with controls.

	Added numberous assert() checks.

LDAP_R
	_MT defines HAVE_NT_THREADS
	Added numberous assert() checks.
	Changed ldap_pthread_t back to unsigned long.  Used cast
	to HANDLE in _join().

LDBM
	Replaced _WIN32 with HAVE_SYSLOG

ud
	Added version string if MKVERSION is not defined.  (MKVERSION
		needs to be set under UNIX).

slapd
	Made connection sockbuf field a pointer to a sockbuf.  This
		removed slap.h dependency on lber-int.h.  lber-int.h now only
		included by those files needing to mess with the sockbuf.
	Used ber_* functions/macros to access sockbuf internals whenever
		possible.
	Added version string if MKVERSION is not defined.  (MKVERSION
		needs to be set under UNIX).
	Removed FD_SET unsigned lint

slapd/tools
	Used EXEEXT to added ".exe" to routines.  Need to define EXEEXT
		under UNIX.

ldappasswd
	Added ldappasswd.dsp.  Ported to NT.  Used getpid() to seed rand().

nt_debug
	Minor cleanup.  Added "portable.h" include and used <ac/*.h> where
	appropriate.  Added const to char* format argument.
1999-05-19 01:12:33 +00:00
Hallvard Furuseth
bd30767a4f Fix typo EEE -> EE in LDAP_API_FEATURE_X_OPENLDAP_REEENTRANT 1999-04-30 11:48:36 +00:00
Hallvard Furuseth
c35af39248 Fix typo LDAP_END_SEQORSET -> LBER_END_SEQORSET 1999-04-30 08:23:32 +00:00
Hallvard Furuseth
fb1227a547 Remove superfluous \ at end of lines outside macros; DEC cc doesn't like them. 1999-04-30 06:39:19 +00:00
Hallvard Furuseth
786bbe4fc1 enclose macro arguments in () 1999-04-30 00:35:27 +00:00
Kurt Zeilenga
a80ff50a67 Lint removal: signed i < unsigned j 1999-04-27 05:19:32 +00:00
Kurt Zeilenga
504fac55c8 Clean up valid flag: _VALUE -> _VALID. 1999-04-27 05:18:21 +00:00
Julio Sánchez Fernández
bb7a0b816e Move declaration of st 1999-04-19 17:56:48 +00:00
Kurt Zeilenga
2813272234 Wrap stat() st_blksize use behind HAVE_ST_BLKSIZE 1999-04-17 03:28:20 +00:00
Gary Williams
2948d34f0a adjust project settings 1999-04-14 17:08:31 +00:00
Kurt Zeilenga
73b846c011 Add ldap_pvt_thread_destory() to un-ldap_pvt_thread_initialize().
Move all SunOS routines (ie: _sleep() and its helpers) to thr_lwp.c
so that it's internals can be 'static'.  Add 'static' to thr_lwp.c.
Add comment to LWP:  NEEDS WORK, may not compile!  Need some
SunOS user to sort out the details.  Volunteers?
1999-04-06 21:57:16 +00:00
Kurt Zeilenga
33dae09abd Don't hide the unlock fix behind SLAP_CLEANUP... 1999-04-06 03:23:40 +00:00
Hallvard Furuseth
d9d11a315f ifdef SLAP_CLEANUP: close db files, free memory, some other cleanup before exit 1999-04-06 01:55:11 +00:00
Hallvard Furuseth
d60bcb02c4 Plug memory leak in avl_free() 1999-04-04 21:29:22 +00:00
Hallvard Furuseth
24fd4404d2 Plug a few memory leaks 1999-04-04 05:04:48 +00:00
Hallvard Furuseth
a0b741102d Add missing \n's in Debug statements 1999-04-03 03:39:16 +00:00
Gary Williams
df02a81f6c put single and multi-threaded output in different directories 1999-04-02 15:33:41 +00:00
Gary Williams
30a51ac013 create single-thread configurations 1999-04-01 21:46:48 +00:00
Kurt Zeilenga
dda1fb4ba0 Updates for NT4 (MSVC5++).
Removed external include/library paths from projects.  External paths should
be set via Tools | Options | Directories.  This allows each developer the
freedom to install external libraries where they desire.
Used libdb.lib instead of libdbs.lib to avoid thread conflicts.
Added hs_regex.lib to library input.  We require some form of regex, this
library works (and is relatively easy for the user to install).
Removed a little lint which MCVC5 detected.
Need to sort out single-threaded vs multithreaded library generation.
1999-04-01 20:26:09 +00:00
Gary Williams
b454005ea8 NT port 1999-04-01 16:06:08 +00:00
Gary Williams
e86e39ad31 NT port 1999-04-01 16:00:24 +00:00
Gary Williams
3146c94e03 update project settings 1999-04-01 15:57:57 +00:00
Gary Williams
5fc6a9b0ca NT port 1999-04-01 15:51:11 +00:00
Juan Gomez
01d9ac9168 MDBM Support added. 1999-03-30 04:39:08 +00:00
Kurt Spanier
80400aba52 Fix ldbmcat crash problem: first use the key before deleting it! 1999-03-29 16:01:59 +00:00
Kurt Zeilenga
b9109a9f20 add wait macros. add LDAP_SIGCHLD. and other misc NT cleanups. 1999-03-29 09:04:35 +00:00
Kurt Zeilenga
db721ca821 Add ioctl_t for arg type (Unix requires 'int', Winsock requires 'u_long'). 1999-03-29 05:28:29 +00:00
Kurt Zeilenga
ff23537bcb Rework ac/socket.h for HAVE_WINSOCK:
tcp_close -> closesocket
  ioctl -> ioctlsocket
Modify codes to use tcp_close() instead of close() for sockets.
Modify ioctl codes to be compatible with WINSOCK.
1999-03-29 05:15:59 +00:00
Kurt Zeilenga
30665cb19a Misc header cleanup 1999-03-29 02:07:18 +00:00
Kurt Zeilenga
598b7473fe All implementations of lutil_lockf (aka ldap_lockf) block until
the lock is acquired.  Add comments to that effect.  Remove
unnecessary busy loops from slapd/lock.c and slurpd/lock.c.
1999-03-28 22:43:43 +00:00
Kurt Zeilenga
7adc0a65d0 Update lutil_lockf (aka: ldap_lockf) to hide implementation in
library, not header.  Eliminate need for <ac/unistd.h> to sometimes
include <fcntl.h> and/or <sys/file.h>.  Change lock API to expect
fd not FILE*.  Allows wider use and eliminates requirement that
lutil_lockf.h depencency on stdio.h.
Implemented lockf, fcntl, and flock locking in lutil/lockf.c.
Additional implementations (including no-op) may be needed.
Update slapd/lock.c and slurpd/lock.c to use new API.
1999-03-28 21:39:02 +00:00
Ben Collins
5c931bdffa If we are using lutil_lock functions then define NEED_SIMPLE_LOCKING or
liblutil/lockf.c wont be compiled.
1999-03-28 18:07:44 +00:00
Hallvard Furuseth
2527e0d878 ROTATE<LEFT/RIGHT> error messages to stderr, not stdout 1999-03-27 18:12:58 +00:00
Kurt Zeilenga
11add79cb1 Update locking codes. 1999-03-26 17:43:23 +00:00
Kurt Zeilenga
af2183c35e close ldap.conf after reading it. 1999-03-25 22:19:42 +00:00
Kurt Zeilenga
f999e1350d Provide global assert solution. <ac/assert.h> (new) is now included
by portable.h with NDEBUG undefined.  This makes assert() is always
available and automatically disables itself when LDAP_DEBUG is undefined.
I've included a basic assert() for pre-STDC compilers.  It relies on
abort() which may not actually be available.  (well replace abort()
with whatever is appropriate if and when we're faced with a pre-STDC
compiler that doesn't have assert()).
1999-03-20 03:13:24 +00:00
Hallvard Furuseth
520ea9b87f Parameters in front of va_alist are unportable; use va_arg instead. 1999-03-13 22:59:18 +00:00
Hallvard Furuseth
212e3d0f01 Add missing newline at end of file 1999-03-13 21:38:40 +00:00
Ben Collins
75d6e3f738 Added lockf.o to list of OBJS and lockf.c to list of SRCS 1999-03-13 20:32:40 +00:00
Ben Collins
9d2ea940e0 Check that FIONBIO is defined, also add defined(__BEOS__) to list for send/recv defines 1999-03-13 20:29:35 +00:00
Ben Collins
615923f0d1 Functions for using fcntl to lock/unlock files in case lockf is not available 1999-03-13 19:25:15 +00:00
Ben Collins
c0b11aa8b5 Added check for getpass() as well as adding it to the -llutil Makefile.in (BeOS will need this) 1999-03-13 02:08:42 +00:00
Hallvard Furuseth
b6d85256e7 "const"ify some static arrays, and related parameters/variables 1999-03-09 08:40:36 +00:00
Hallvard Furuseth
083455be6b Bugfix: Move handling of boolean options in front of invalue==NULL error check 1999-03-09 07:49:56 +00:00
Hallvard Furuseth
26f257f40d Replace (int)LDAP_BOOL_GET(...) with LDAP_BOOL_GET(...)==LDAP_OPT_ON 1999-03-09 07:42:17 +00:00
Kurt Zeilenga
53fc115b6f Add LDIF_ to LINE_WIDTH 1999-03-09 00:50:41 +00:00
Kurt Zeilenga
96a5f20d41 Don't install CFFILES in ldap_r. 1999-03-08 23:14:43 +00:00
Hallvard Furuseth
3f65f687e5 Put the ATTR_BOOL option numbers in attrs.offset instead of attrs.data,
to avoid unportable casts of integers to pointers and back.
1999-03-06 18:31:19 +00:00
Kurt Zeilenga
2c06d0da09 Change (int) invalue == (int) LDAP_OPT_ON to invalue == LDAP_OPT_ON. 1999-03-06 17:11:35 +00:00
Hallvard Furuseth
509a927fcd Make block non-static and properly aligned 1999-03-06 16:31:13 +00:00
Hallvard Furuseth
3277a27b10 Remove unused variables 1999-03-06 16:29:05 +00:00
Kurt Zeilenga
94fea2a17e defined USE_NONBLOCK for now... need to implement configure detection.
rewrote sockbuf_buf_init macro not to expand its argument multiple times.
1999-03-06 07:52:33 +00:00
Hallvard Furuseth
4d7138a45c include ldap_pvt_thread.h, to verify func declarations against their definitinos 1999-03-06 06:24:15 +00:00
Hallvard Furuseth
c35f2086d8 Fix typo .size -> .dsize in ldbm_datum_free() 1999-03-06 04:25:50 +00:00
Hallvard Furuseth
9bef1a2bc1 Obey CTIME_R_RETURNS_INT 1999-03-06 04:23:17 +00:00
Ben Collins
caddcf8600 Moved 'key.flags = 0;' inside of DB2 defines, it isn't available in DB1 1999-03-06 04:15:18 +00:00
Kurt Zeilenga
553b601161 Move lber_get/set_option stuff to a private structure. 1999-03-06 02:36:21 +00:00
Kurt Zeilenga
588a458d78 MSVC5 cleanup...
lber: ifdef'ed out lber_..set_nonblock() function because it used ioctl's.
  If it remains, it needs to be written to support various methods for
  setting non-blocking.  ioctls should probably be last choice.  configure
  could detect existance of fcntl(), ioctl(), etc.
bdb2:
  added .dsp/.dsw files and did some basic cleanup (still needs work).
1999-03-06 00:57:25 +00:00
Kurt Spanier
6da27229d9 1. Fix of ldbmcat segmentation fault bug (ITS#85 and #81).
2. Make ldbm_Env a failure-safe entity.
1999-03-05 11:24:42 +00:00
Hallvard Furuseth
3b5a5b792c Remove spurious backslash-newlines 1999-03-05 01:21:44 +00:00
Hallvard Furuseth
a2ee841121 Change LDAP.ld_lberoptions to `short', to realign with BerElement.ber_options 1999-03-05 01:20:55 +00:00
Hallvard Furuseth
61174d1960 Cast char* argument to hh_to_c() to Byte* 1999-03-05 01:04:56 +00:00
Hallvard Furuseth
921158f6fc Remove LDAP_P() from prototypes with 'Byte' arguments 1999-03-05 01:03:13 +00:00
Hallvard Furuseth
ac687014ec K&R varargs branch of ldap_log_printf() was bogus 1999-03-04 12:55:59 +00:00
Juan Gomez
00558f962b Added the functions ldap_rename2() and ldap_rename2_s() to support LDAP
v3 MODDN (MODRDN) operation on the client side.
1999-03-04 03:16:29 +00:00
Hallvard Furuseth
5b83a959d2 Don't choke if gethostby{name,addr}_r's number of arguments differ
from what the current code can handle.
1999-03-03 21:34:49 +00:00
Hallvard Furuseth
69c00e27da Posix Draft 4 (HAVE_PTHREADS_D4) fixes:
Use pthread_*attr_default.
Don't use a void return value from pthread_yield.
1999-03-03 21:21:40 +00:00
Hallvard Furuseth
74f808f44c Bugs with !HAVE_PTHREAD_KILL: include errno.h. Typo: sig should be signo. 1999-03-03 17:52:40 +00:00
Hallvard Furuseth
c98892cb17 cast printf(%s) argument from void* to char* 1999-03-03 17:32:26 +00:00
Hallvard Furuseth
7f79f57167 Remove untrue /*NOTREACHED*/: return 0 on EOF from stdin 1999-03-03 17:30:55 +00:00
Bart Hartgers
a81ca18845 Added support in liblber and libldap for partial reads, i.e. situations in
which only part of a LDAPMessage is available on a socket.

The server-code seemed to handle this correctly already, so I didn't touch
it.

My apologies for the hack in ber_get_next :-).
1999-03-03 16:38:56 +00:00
Hallvard Furuseth
7bac8381a6 function pointers are incompatible with `void *'; remove NULL or replace with 0 1999-03-03 16:02:00 +00:00
Hallvard Furuseth
eaedc9228b function pointers are incompatible with void *'; remove != NULL' from tests. 1999-03-03 15:57:57 +00:00
Hallvard Furuseth
81e7f98e30 include lber-int.h to get lber_pvt_* declarations 1999-03-03 15:46:50 +00:00
Hallvard Furuseth
52e57a195a ber_scanf returns LBER_ERROR, not -1, on failure. 1999-03-03 15:45:06 +00:00
Hallvard Furuseth
8573316a16 Declare lber_pvt_sb_* functions from io.c in lber-int.h 1999-03-03 15:39:57 +00:00
Hallvard Furuseth
2e68514409 Back out previous change; it was an accidental commit 1999-03-03 15:35:29 +00:00
Hallvard Furuseth
d00b99fd37 Declare lber_pvt_sb_* functions from io.c in lber-int.h 1999-03-03 15:25:44 +00:00
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
Kurt Zeilenga
82b94e2258 Change SLAPD shutdown to do a cond wait on active threads instead
of a busy wait and allow the pthread_yield within the loop to be
removed.  This was the only pthread_yield which was necessary
when usng non-preemptive threads.  As such, the configure.in
sched_yield/pthread_yield missing error can be removed from
configure.in.  If explicit yield function is missing, just provide
a no-op replacement.
Moved declaration of various slapd globals from main.c to init.c
so they can be shared with ldbm tools.
1999-01-11 18:36:40 +00:00
Kurt Zeilenga
334768c1bb Update build environment to fix VPATH support.
make depend, make tests, and make install all work when build directory
  is not the $srcdir.
Also modified library handling such that -lpthread more likely to be last.
WARNING: new orderring requires use of LDFLAGS to set global loader options
  such as -L/usr/local/lib.  If you put this in LIBS, some libraries
  may not be found a link time.
Likely broke Kerberos/LDAPD support.  Don't have those in my testbed.
1999-01-10 02:25:41 +00:00
Kurt Zeilenga
959f370e57 Backout extraneous changes made by last commit. 1999-01-07 17:51:23 +00:00
Kurt Spanier
9c6d384b9a - Make install creates $(RUNDIR)/var for pid and args files of slapd.
- slapd's pid/args file names are based on the servers binary file names,
  providing for multiple servers beeing run on one host.
- slapd supports the -l command line parameter for selection of a
  syslog LOCAL user (-lLOCAL0 .. -lLOCAL7)
- db_appinit() is called during first ldbm_open() in DB 2.x to initialize
  DB debugging features (good to find bugs in the DB code :-)
- a patch for a non-initialized variable in DB's 2.x db_open is provided.
1999-01-05 15:40:58 +00:00
Kurt Zeilenga
114a0cd339 Update ctime_r() argument macro to cache results and to produce
one preprocessor macro instead of two.  Ran aclocal, autoconf,
autoheader to update derived files.  Modify util-int.c to use
CTIME_R_NARGS define and fallback to ctime() if not set.
Made LDAP_API_FEATURE_X_OPENLDAP_REENTRANT dependent upon result.
1999-01-02 23:40:31 +00:00
Bart Hartgers
f9d26dacd4 Teached autoconf to figure out how may arguments ctime_r expects.
Updated util-int.c to use this information.
1999-01-02 00:56:45 +00:00
Dave Storey
2ee0dcfc0a Added salted MD5 and SHA support. (SSHA,SMD5) 1998-12-30 05:32:17 +00:00
Kurt Zeilenga
695508813d Fix --disable-crypt and --disable-cleartext
mutex declaration should be moved from slapd/main.c to slapd/init.c
so we don't have ripple changes through slapd/tools.
1998-12-29 21:45:08 +00:00
Kurt Spanier
bfb27120be Patch for Berkeley DB 2.6.4 (beta) (DB)->cursor() call.
Introduction of ldbm_datum_init().
Patch for non-NULL pointer test befor call to ldbm_datum_free().
1998-12-29 17:28:45 +00:00
Kurt Zeilenga
54fbeeb427 Set 'expected' defaults 1998-12-29 05:52:27 +00:00
Kurt Zeilenga
4d2761a6a6 Add simple copyright notice. 1998-12-28 20:53:15 +00:00
Kurt Zeilenga
763ce84f7c Minor update to copyright (forgot 'portions') 1998-12-28 20:46:13 +00:00
Kurt Zeilenga
88ec459a5f Add simple copyright notice 1998-12-28 20:38:04 +00:00
Kurt Zeilenga
ff447a31e2 Added ldap_get_entry_contols() and ldap_parse_reference(), but
have not implemented ldap_get_ber_controls() helper function yet.
1998-12-27 21:59:12 +00:00
Hallvard Furuseth
521f6cfda9 Change overlapping strcpy( x, y )' to SAFEMEMCPY( x, y, strlen( y ) + 1 )' 1998-12-27 02:15:08 +00:00
Hallvard Furuseth
c3a692787c Change overlapping strcpy( x, y )' to SAFEMEMCPY( x, y, strlen( y ) + 1 )' 1998-12-27 02:00:08 +00:00
Kurt Zeilenga
1d718296b4 Needs ldap-int.h 1998-12-26 18:55:46 +00:00
Hallvard Furuseth
aa3fa58f4c Plug memory leaks when ber input fails: Let ber_scanf & co set the
free the memory they have allocated, and set the arguments to NULL.
1998-12-26 09:05:57 +00:00
Kurt Zeilenga
138d76ecf4 getentry.c: LDAP_RES_SEARCH_REFERENCE changes after fixing loop initializer.
references.c: fix same bug here.  need to implement parsing.
Still need to implement chasing in cldap.c/result.c
1998-12-24 06:00:53 +00:00
Kurt Zeilenga
090b7ccca0 Backout previous entry... causes runaway ldapsearch. 1998-12-24 05:39:14 +00:00
Kurt Zeilenga
a4822cf328 Initial versions of functions to step through messages and references.
Fixed entry step through functions to check specifically fore entries.
1998-12-24 04:45:54 +00:00
Randy Kunkee
a451ccc50b Fix line 62 of bprint.c "#elif" line with no expression.
Add check for to configure.in vsprintf, since HAVE_VSPRINTF is presumably
what was intended there.  Finally, also protected a bunch of if test
expressions with double quotes, as they were producing illegal test
commands.
1998-12-24 01:31:40 +00:00
Kurt Zeilenga
2f5ef0d1a8 Initial version of control free/dup functions. 1998-12-23 02:31:35 +00:00
Kurt Zeilenga
52d7a2d8b2 Add client/server control free/dup functions and
ldap_set/get_option support for controls.
1998-12-23 02:30:44 +00:00
Kurt Zeilenga
60f52adc86 Fix get/set error string bugs. 1998-12-23 00:42:38 +00:00
Kurt Zeilenga
32d9cc239c Add ldap_memfree() to the mix. 1998-12-22 18:42:02 +00:00
Kurt Zeilenga
e795f9168d Update main comment and remove unneeded <ac/time.h> inclusion. 1998-12-22 18:27:14 +00:00
Kurt Zeilenga
a64c2a3954 Allow LDAP session errno and error strings to be set. 1998-12-22 04:49:56 +00:00
Kurt Zeilenga
a36412440c Update error codes based upon draft-ietf-ldapext-ldap-c-api-01
Remove ldap_get_lderrno().
1998-12-22 04:45:14 +00:00
Kurt Zeilenga
2d39f617b8 Add LDAP_OPT_API_FEATURE_INFO to obtain feature info (ie: version)
at runtime.
1998-12-22 03:17:25 +00:00
Kurt Zeilenga
811cfab91f Move LDAPServer, LDAPConn, LDAPRequest, and LDAPCache
from ldap.h to ldap-int.
1998-12-22 02:39:24 +00:00
Kurt Zeilenga
a3ac3be6a7 Added lber_get/set_option. Removed lber_debug/ldap_debug.
Updated other codes as needed.
1998-12-22 01:34:01 +00:00
Kurt Zeilenga
2d15a94d16 LDAP C-API changes
struct friendly (Friendly) changed to ldap_friendly (LDAPFriendly)
	  ldap_friendly friend prefix changed to 'lf_' from 'f_'
	removed mod_next field from LDAPMod (struct ldapmod)
	modified slapd to use new LDAPModList (struct ldapmodlist) struct.
Added LDAPv3 result codes to ldap.h
1998-12-21 00:21:58 +00:00
Kurt Zeilenga
5c6ad6c5b1 ldif'ize ldif library (ie: everything is now in the ldif_ namespace) 1998-12-20 22:28:33 +00:00
Kurt Zeilenga
8aba5c5059 Provide framework for ldap_r and reentrant/thread safety levels.
-lldap_r can now be implemented...
1998-12-20 00:58:55 +00:00
Kurt Zeilenga
d44a54e543 Don't include -lldap_r in make all (yet). 1998-12-19 16:59:51 +00:00
Kurt Zeilenga
27e8d218ee Add -lldap_r build environment (no code yet). 1998-12-19 03:24:36 +00:00
Kurt Zeilenga
0024cf2f4b -lldap reentrantancy improvements from Bart Hartgers <A.Hartgers@phys.tue.nl>
including use of ctime_r, gethostby*_r, etc..  Also reworked ldap_sort_entries
to be reentrant.
Need to add code to properly set LDAP_API_FEATURE_THREAD_SAFE.
1998-12-19 01:27:20 +00:00
Kurt Zeilenga
3a5e383dbd Add draft-ietf-ldapext-ldap-c-api-01 routines ber_init()
and ber_flatten() to the -llber.
1998-12-18 21:08:28 +00:00
Kurt Zeilenga
c65938abe0 Make sure that four characters, rather than only the first three,
are being analysed in the transaltion to base64.
From: Lucio de Re <lucio@proxima.alt.za>
1998-12-14 04:21:04 +00:00
Kurt Zeilenga
bfd6702f9f testavl wasn't being linked. 1998-12-04 02:17:57 +00:00
Kurt Zeilenga
6232170a03 Commit preliminary fix for ldap.conf base usage. 1998-12-01 20:08:39 +00:00
Kurt Zeilenga
c1cef27bda Update slapd to use lutil_passwd() for both user and root passwords.
Remove MD5 and SHA1 options (both are now always on).  Rename
functions to be lutil_ instead of ldap_.
Create --enable-cleartext option.  Default is currently 'on'.
1998-12-01 03:36:37 +00:00
Kurt Zeilenga
ff559f551a Remove LDAP_PORT dependencies so that ldap.conf defaults take over. 1998-11-30 03:55:49 +00:00
Kurt Zeilenga
edd464ee8f Update build environment:
default sysconfdir subdirectory is openldap instead of ldap.
    This removes conflicts with other ldap subsystems.  Should
    be configure option.
  *.conf files are now preserved.  A *.conf.default are always
    created with the latest conf.
  *.help and ldapfriendly are now placed in $(datadir)/$(ldap_subdir)
  updated man pages to reflect changes.
1998-11-29 19:48:28 +00:00
Kurt Zeilenga
21b249ca6e Change init_w_userconf to not interpet the filename. If it's
give "/foo", then it will check $HOME/foo, $HOME/./foo, then /foo.
This might not be what the installer hand it mind... but then again
may be it is.
w_userconf and w_conf both now use NULL arguments to disable conf loading.
1998-11-23 03:03:06 +00:00
Kurt Zeilenga
1494cf2a44 Update code to use HAVE_STDARG and to properly include <ac/stdarg.h> 1998-11-23 02:41:30 +00:00
Hallvard Furuseth
7273fd47fd gcc -W cleanup 1998-11-23 01:46:32 +00:00
Hallvard Furuseth
185586f5c2 Plug memory leak 1998-11-23 01:44:24 +00:00
Kurt Zeilenga
07a03d2245 Should use right define HAVE_NT_THREADS... 1998-11-23 00:17:23 +00:00
Kurt Zeilenga
61e8984d7a Add basic NT thread support. 1998-11-23 00:14:12 +00:00
Kurt Zeilenga
baf8e2f010 Axe the SunOS 5.6 define and use Pthreads. 1998-11-22 23:18:46 +00:00
Hallvard Furuseth
e2b8daf62b gcc -W cleanup: Remove implicit int, remove unused idtest:usage() 1998-11-22 06:43:49 +00:00
Kurt Zeilenga
6f92e197dc Add libtool support based upon patch by Bart Hartgers <Hartgers@kfm1.phys.tue.nl>
Updated to use libtool 1.2 (with FreeBSD3.0 a.out v. elf detection).
  Updated autoconf to 1.12 with sed patch (don't use stock 1.12).
  aclocal.m4 is built using automake's aclocal, v1.3.
  Updated mkdep to support libtool .lo files.
Updated automake provided macros for TERMIOS, STRTOD, MKTIME, PTRDIFF_T
Autoconf now checks to ensure C compiler supports ANSI C prototypes.
Updated make files templates.
1998-11-22 04:22:28 +00:00
Kurt Zeilenga
1941422b2d LIBS needs to be redefined to link test programs. 1998-11-21 20:50:35 +00:00
Kurt Zeilenga
b35e18c03f Build library test programs. Fix compiling issues. 1998-11-21 20:39:24 +00:00
Hallvard Furuseth
de808662ac stack.c did not compile, needed ldap_log.h for its debugging statements. 1998-11-20 11:44:19 +00:00
Kurt Zeilenga
d693e3015a Add strdup.c to project file. 1998-11-20 07:38:09 +00:00
Kurt Zeilenga
120b7fedae Add strdup.c from -llutil, renamed to ldap_strdup() and always used.
This will allow us to substitute malloc() at a later date.
1998-11-20 07:02:39 +00:00