Commit Graph

384 Commits

Author SHA1 Message Date
Kurt Zeilenga
404f953ef0 New pthread_try_link test. Looks for pthread_create and pthread_detach
and, if LinuxThreads, pthread_kill_other_threads_np().
1999-04-07 02:47:15 +00:00
Kurt Zeilenga
bbb7964508 New LinuxThreads detection. Correctly detects FreeBSD's LinuxThreads port
(but not sure if it's usable yet).  Needs to be tested on various versions
of Linux native LinuxThreads.
1999-04-06 23:44:27 +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
Hallvard Furuseth
e78f4140d7 Use macros for the dummy definitions of sys_errlist/sys_errno 1999-04-06 01:25:03 +00:00
Kurt Zeilenga
b4658cbe24 Cleanup socket() detection.
Move select() detection forward, error if not available.
Move select() args type check forward so it can be used in subsequent tests.
1999-04-04 20:36:35 +00:00
Kurt Zeilenga
82453169fc Add select args type & vfork tests for experimentation purposes. 1999-04-04 00:59:32 +00:00
Hallvard Furuseth
9ebd9a0289 Add -U and -G options to set user and group id.
Move socket setup to set_socket(), called before the uid/gid change.
1999-04-03 03:19:07 +00:00
Gary Williams
92d4ccf906 NT port 1999-04-01 16:38:11 +00:00
Kurt Zeilenga
f626fbbd57 Rebuild configure due to MDBM addition. 1999-03-30 04:46:17 +00:00
Juan Gomez
8c23e997e9 MDBM support added. 1999-03-30 04:39:41 +00:00
Juan Gomez
009038a795 MDBM detection feature. 1999-03-30 04:25:52 +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
30f953160f Add wait4/3 detection.
Modify slapd_tester to use pid_t and wait macros.  May need to
implement additional macros in ac/wait.h (in addition to
WEXITSTATUS and WIFEXITED).
1999-03-29 01:40:17 +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
f4161b5bf8 NT doesn't have waitpid() 1999-03-28 22:42:13 +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
Kurt Zeilenga
11add79cb1 Update locking codes. 1999-03-26 17:43:23 +00:00
Ben Collins
cfe36cb71f Added extra checks to locking definitions 1999-03-26 15:10:06 +00:00
Kurt Zeilenga
81acad8937 Add LDAP_DEBUG promotion and include of ac/insert.h 1999-03-26 04:37:39 +00:00
Kurt Zeilenga
61f6d5d8ca Add check for <assert.h> and put include in right file (acconfig.h) 1999-03-20 03:21:19 +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
Kurt Zeilenga
5a4babde00 Add DEFAULT_EDITOR to ldapconfig.h. Used by ldbmtest and ud. 1999-03-17 22:34:17 +00:00
Kurt Zeilenga
96b2ae55ac Add OL_STRUCT_PASSWD_PW_GECOS test. Checks for pw_gecos in struct passwd. 1999-03-17 22:23:29 +00:00
Kurt Zeilenga
98d3206c42 Rebuild configure and portable.h.in... 1999-03-17 22:10:31 +00:00
Kurt Zeilenga
8694a8395c Add EBCDIC test in preparation for VM port. 1999-03-15 19:31:13 +00:00
Kurt Zeilenga
5f3c7a88dc Add 'extern' to externals. 1999-03-15 01:06:02 +00:00
Ben Collins
13f169ee54 Only declare strdup() if DECL_STRDUP is defined 1999-03-15 00:19:46 +00:00
Ben Collins
e732e12279 configure.in now includes OL_DECL_STRDUP, configure and portable.h.in
rebuilt to reflect it.
1999-03-15 00:18:49 +00:00
Hallvard Furuseth
7927ffe7f3 Add missing parens around Debug macro parameter 1999-03-14 07:15:58 +00:00
Ben Collins
4e733cf024 Macros for file locking/unlocking added (ldap_lockf/ldap_unlockf) 1999-03-13 20:31:55 +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
ebce51b2db actually define HAVE_SYS_ERRLIST if we have it, if not then declare it locally in ac/errno.h 1999-03-13 18:19:11 +00:00
Ben Collins
362f051a57 Added check for <arpa/inet.h> 1999-03-13 02:17:34 +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
Ben Collins
8f0aae9b72 #ifdef for <arpa/inet.h> 1999-03-13 01:12:54 +00:00
Kurt Zeilenga
e2d90b3acb Update configure to:
-- fixed gethostbyaddr_r/gethostbyname_r compile warnings
  -- relocated Pthread -mt test to be before -kthread test
1999-03-10 23:31:06 +00:00
Hallvard Furuseth
6de5ba2834 Fix typo -lxttp => -lxtpp in HAVE_XTPP comment 1999-03-09 08:05:27 +00:00
Kurt Zeilenga
53fc115b6f Add LDIF_ to LINE_WIDTH 1999-03-09 00:50:41 +00:00
Kurt Zeilenga
6570ec368c Regenerate configure and friends. 1999-03-08 20:01:17 +00:00
Kurt Zeilenga
8d3f492698 Add GNU readline detection. Needed for saucer enhancement (ITS#96). 1999-03-08 01:48:45 +00:00
Kurt Zeilenga
9e71e09bac Relocate reentrant function checks to before thread library checks.
Disable ctime_r() type check.  Need better test.
1999-03-07 00:22:11 +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
Juan Gomez
e46c2e494e Added prototypes for ldap_rename2() and ldap_rename2_s(), which generate
a MODDN or MODRDN request depending on the newSuperior parameter.
1999-03-04 03:14:31 +00:00
Kurt Zeilenga
ce6836dbed Apply Hallvard's D4 pthread detection patch. 1999-03-03 23:32:00 +00:00
Juan Gomez
cd90353f10 Added LDAP_TAG_NEWSUPERIOR tag and a brief description about tag
construction which may be useful later when adding new tags. This
in preparation to support moddn v3.
1999-03-03 22:51:43 +00:00
Hallvard Furuseth
45bf79315e Correct typo ldap_count_reference -> ldap_count_references 1999-03-03 17:45:15 +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
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
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
180eed16fe Rebuild autoconf/autoheader generated files after TLS and gethostbyname_r
changes.
1999-03-01 18:55:52 +00:00
Hallvard Furuseth
79f7c85067 Add locale support (slapd.conf keyword "locale") to slapd if HAVE_LOCALE_H 1999-02-22 21:01:24 +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
84bafea62e #undef symbols before #defining them. This provides a little protection
when symbol being replaced was defined as a macro.
1999-02-20 18:31:56 +00:00
Hallvard Furuseth
19c2a483e6 fix TOLOWER, it was equal to TOUPPER 1999-02-20 16:22:10 +00:00
Kurt Zeilenga
a71f328831 Import Ben Collins <bcollins@debian.org> Back-TCL for SLAPD. 1999-02-14 19:20:14 +00:00
Kurt Zeilenga
a362bde4a7 Forgot changes made in portable.h need to be imported back into portable.h.nt 1999-02-11 22:33:19 +00:00
Kurt Zeilenga
6e2557f051 Update features for MSVC 5. 1999-02-11 21:49:35 +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
859b1ae451 Detect pthread_detach using #include <pthread.h> (using AC_TRY_LINK)
instead of AC_CHECK_FUNCS() as symbol may be mangled.
1999-02-08 22:54:40 +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
f4dd466315 Build environment changes including:
Kerberos detection of des_debug
	detection of resolv.h and arpa/nameserv.h
Updated affected codes.
1999-02-04 21:54:38 +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
1e53519136 Backout recent initialization/startup changes in preparation for
new frontend-backend interface.
1999-02-04 17:36:06 +00:00
Kurt Zeilenga
d671c49b94 Fix set concurrency typos. 1999-02-03 18:29:27 +00:00
Kurt Zeilenga
ee05cd8038 Update AC_DEFINES to use autoconf 1.3 descriptions.
Update acconfig.h to use @TOP@ and @BOTTOM@ to rid ourselves of
the .top/.bot files.
1999-02-03 01:05:41 +00:00
Kurt Zeilenga
fb0489d922 Added --enable-bdb2 for Ksp's Berkeley DB 2 specific slapd backend.
Supports 'yes', 'no' (default), and 'auto'.
1999-02-01 22:19:42 +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
9f96ab2fb0 Add ac/sysexits.h for GNU win32 environments.
Fix LDAP_API_VENDOR_VERSION -> LDAP_VENDOR_VERSION bug
1999-02-01 02:47:39 +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
30d106079d Add cond/rdwr destroy routines. 1999-01-29 05:52:40 +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
c32dcd6365 Fixup begin/end declaration tags
Assume portable.h has been included
Include ldap_cdefs.h at the top.
1999-01-27 21:11: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
f988fdbec1 add ldap_cdef'ing. 1999-01-26 00:04:01 +00:00
Kurt Zeilenga
d7079a10c3 Add support for LBER_OPT_LOG_PRINT_FN option. 1999-01-25 22:55:00 +00:00
Kurt Zeilenga
a31de60768 Minor cleanup of various detections... 1999-01-24 01:33:22 +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
7c2bcc4e12 Add LDAP_API_FEATURE_X_OPENLDAP to imply this implementation
has OpenLDAP extensions.  (This may be defined on non-OpenLDAP
implmentations that implement features of our API).
The extensions implied by this flag are TBD.
1999-01-23 03:39:06 +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
2a7794de09 Fix minor typo in lthread.h (which was copied into ldap_pvt_thread.h). 1999-01-22 03:48:31 +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
e2a15115b0 Update slap_conn to maintain client provided dn and bound dn.
Update slap_op to maintain dn and ndn (derived from conn->c_dn).
Update ldbm_back_bind to return actual bound dn (including rootdn)
	for use in slapd_conn.  Other backends use client dn.
Modify other codes to use ndn (normalized uppercase dn) most everywhere.
Aliasing, Suffixing and modrdn could use more work.
Applied suffixing to compare and modrdn.
1999-01-19 05:10:50 +00:00
Bart Hartgers
41234c2819 Fixed my own stupid mistake of not noticing the 'n' in #ifndef. strdup
should work as it was again...
1999-01-17 15:27:30 +00:00
Kurt Zeilenga
c09da45c85 Run autoconf/autoheader to generate new configure/portable.h.in 1999-01-16 00:59:49 +00:00
Bart Hartgers
b896152290 Updates for the new threading and utility stuff in libldap{_r}. 1999-01-15 14:31:12 +00:00
Kurt Zeilenga
b7beec1663 Initial version of the experimental 'back-perl'
John's still working on the 'perl-test' (the perl backend test module).
1999-01-14 06:33:09 +00:00
Kurt Zeilenga
cb31c7aa9a Update check for res_search. If not available in $LIBS, check
in -lbind then in -lresolv.
1999-01-13 01:11:28 +00:00
Kurt Zeilenga
318531a437 Use pthread_detach() to detach connection threads instead of
creating them detached.  This hopefully will reduce problems on
draft4 pthread implementations related to creating detached
threads (which is _np under draft4) on some platforms without
causing problems with other thread implementations.
1999-01-11 19:04:34 +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
de8c07c62c Updated SLAPD args/pid file codes to use DEFAULT_RUNDIR and DEFAULT_DIRSEP.
Removed old defines.
1999-01-07 18:16:40 +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
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
cfa450d078 Fix schema check bug... actually charray needs to dup strings on
add/merge as we now free strings agressively.  Improved debug
message to include name of missing required attribute and added
check for 'operational attributes'.  This check should be used
everywhere we need to test for operational attributes (add/modify).
Also, enabled schema checking for tests (and fixed resulting
problems by adjusting oc.conf).
1998-12-28 23:43:04 +00:00
Kurt Zeilenga
7fc7988b8e Add OpenLDAP Copyright to headers 1998-12-28 19:51:35 +00:00
Kurt Zeilenga
cafa0e5ac1 Add more C-API prototypes (not yet implemented). 1998-12-28 19:37:02 +00:00
Kurt Zeilenga
f08b68992b Apply NT fixes from Release Engineering. 1998-12-26 18:52:45 +00:00
Kurt Zeilenga
2eb55b91ff We'll put ldap_x_message() functions in messages.c
We'll put ldap_x_reference() functions in references.c
1998-12-24 04:41:27 +00:00
Kurt Zeilenga
578fae946b Add prototypes for C-API _ext routines (coming soon). 1998-12-24 03:55:41 +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
7fe153acaa Add LDAP_DEBUG_DEPRECIATED to enable warnings when 'depreciated'
interfaces are used.  Added comments to ldap_cdefs.h
1998-12-23 20:01:15 +00:00
Kurt Zeilenga
bd6e10aea0 Fix --disable-debug compiling problems. New -llber (and -lldap when
implemented) logging requires LDAP_DEBUG_XXX levels always be defined.
1998-12-23 04:18:50 +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
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
e5a5f44fb8 That second abandon should have been an extended. 1998-12-21 02:12:08 +00:00
Kurt Zeilenga
b1869acd5b Remove internal strings 1998-12-21 02:09:44 +00:00
Kurt Zeilenga
40d08ee8aa Add LDAP v3 protocol defines 1998-12-21 01:44:58 +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
362d6cbf2a Add configure code for setting LDAP_SYSLOG but actually use hardcoded
LDAP_SYSLOG in slap.h/slurp.h.
1998-12-20 21:56:44 +00:00
Kurt Zeilenga
a5eee14f72 Add detection of dmalloc library. 1998-12-20 19:12:20 +00:00
Kurt Zeilenga
b5973eba5d Minor change to signal handler. Changed _shutdown flag to
type 'sig_atomic_t' and marked it volatile.  Add detection to
configure to ensure sig_atomic_t and volatile are supported.
1998-12-20 18:16:03 +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
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
9db062bb71 Update pthread checks:
Add plain -lpthread check.
	Move *_r() checks so that they are checked for regradless
		of thread libs used.  Before they were only being checked
		when using threads.
	Fix yields test such that compile/link/odd runtime failures results in
		'yes' instead of 'no'.
1998-12-14 00:23:22 +00:00
Kurt Zeilenga
76dc7b2673 Add checks for gethostby{name,addr}_r. Only should be used if
linking with $LTHREAD_LIBS.
1998-12-04 04:21:19 +00:00
Kurt Zeilenga
514c44a5c8 Add checks for reentrant functions when LTHREAD_LIBS is used.
Don't use new HAVE_FUNC_R on the client side (apps or libs).
1998-12-04 02:31:41 +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
febafbdf28 Add varients of REENTRANT... 1998-11-30 20:40:42 +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
30cefc46de Add KRB_LIBS to makefiles. 1998-11-25 23:49:12 +00:00
Kurt Zeilenga
0e2a772173 Fix ldap_sigusr2 vs 1 typo for Linux on alpha & sparc. 1998-11-25 23:35:04 +00:00
Hallvard Furuseth
ee2a3e7871 Add crypt() declaration 1998-11-23 08:14:40 +00:00
Kurt Zeilenga
e020da90c1 Need to add unistd.h and sys/time.h checks back in now that
now that the mktime check is commented out.
1998-11-23 06:02:47 +00:00
Hallvard Furuseth
abfcf15d48 Cast memcpy #defined as bcopy to void, to avoid use of unspecified values.
Clarify a few comments.
1998-11-23 04:29:01 +00:00
Kurt Zeilenga
1650f15d9d Remove mktime/stdtod checks. They are not currently needed. 1998-11-23 03:08:26 +00:00
Kurt Zeilenga
61e8984d7a Add basic NT thread support. 1998-11-23 00:14:12 +00:00
Kurt Zeilenga
53100db1a5 Update portable.h for NT 1998-11-22 23:29:51 +00:00
Kurt Zeilenga
baf8e2f010 Axe the SunOS 5.6 define and use Pthreads. 1998-11-22 23:18:46 +00:00
Kurt Zeilenga
0f518857f0 Update configure with new yielding select test. 1998-11-22 20:25:52 +00:00
Kurt Zeilenga
04d91569e1 Replaced PREEMPTIVE_THREADS with HAVE_YIELDING_SELECT to clarify
the exact nature of the functionality being tested.  -DNO_THREADS
does NOT have a yield select, hence the macro is not defined.
The slapd/daemon code has been changed to test both no threads
and yielding select before using a timeout of NULL.
1998-11-22 20:08:14 +00:00
Hallvard Furuseth
61a3251cf7 Typo: '#ifdef defined(...)' 1998-11-22 10:26:51 +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
b35e18c03f Build library test programs. Fix compiling issues. 1998-11-21 20:39:24 +00:00
Kurt Zeilenga
8dcc4b6c8f Update string.h to unconditional declare forwards for
strdup(), strcasecmp(), strncasecmp().  Should test to see
if these are truely needed.  Hopefully their addition will
not break other platforms.
1998-11-20 07:04:20 +00:00
Kurt Zeilenga
2a0715d947 Remove lint in UserDirectory found on NT 1998-11-18 20:08:02 +00:00
Kurt Zeilenga
3111cfa3bd Update LinuxThread signal handling. Hide #ifdef hell in ac/signal.h. 1998-11-18 17:45:32 +00:00
Kurt Zeilenga
3474bbaed5 Need to add SIZEOF defines. 1998-11-18 06:10:11 +00:00
Kurt Zeilenga
a8586a141b Fix multiple define protection. 1998-11-18 05:11:12 +00:00
Kurt Zeilenga
f05554bddc Shouldn't have removed uint32's multiple defined protection... 1998-11-18 05:09:05 +00:00
Kurt Zeilenga
bda79e1324 Add missing check for crypt.h
Sync portable.h.nt with portable.h.in
1998-11-18 04:48:16 +00:00
Kurt Zeilenga
fb7d6ce5df Move byte orderring stuff to ac/bytes.h 1998-11-17 22:49:47 +00:00
Kurt Zeilenga
05e597d869 Add sizeof checks to configure.in.
Add ac/bytes.h to provided sized types.
Use new sized type in md5/sha1 header through simple typedef.
Should substitute old type for new everywhere.
1998-11-17 22:49:15 +00:00
Kurt Zeilenga
a240efce5c Add AC_C_BIGENDIAN check for <ac/socket.h>. Code should be rewritten
not to require knowledge of byte order such that this check can be removed.
1998-11-17 19:44:59 +00:00
Kurt Zeilenga
5413a9598a NT doesn't have fork. Need to define HAVE_SPAWNLP 1998-11-17 19:14:11 +00:00
Kurt Zeilenga
34780e1dc3 Remove recently added externs. Some may not actually be bogus. 1998-11-17 19:08:29 +00:00
Kurt Zeilenga
da42acb93a Update handling of string headers.
Update NT port.
1998-11-17 19:05:48 +00:00
Hallvard Furuseth
b581bdd23c Back out K&Rification change; would only be needed in ldap.h and lber.h. 1998-11-17 04:07:31 +00:00
Hallvard Furuseth
b1ab654fbe Kill off #elif in ldap/include/. K&R does not support it. 1998-11-17 01:25:45 +00:00
Kurt Zeilenga
b5494457d8 Remove extern declarations of library functions from source.c.
This could cause problems on odd systems.  The generic
  headers should be extended as needed to include necessary
  system headers or, if necessary, make explicit declarations.
Extended ac/string.h header to look for string.h/strings.h if
  STDC_HEADERS is not defined.  Also provide basic declarations for
  str*() functions.  This could cause problems on odd systems.
Extended ac/unistd.h header to define basic declaration for misc
  functions that might be missing from headers.   This includes
  externs for getenv(), getopt(), mktemp(), tempname().
Protect fax500.h from multiple inclusion.  Moved includes of
  system/generic headers back to source files.
Made mail500 helper functions static.
Fixed includes of ctype.h, signal.h, etc. to use generics.
lutil/tempname.c: was including stdlib.h twice, one should stdio.h.
Wrapped <sys/resource.h> with HAVE_SYS_RESOURCE_H.
lber/io.c/ber_get_next(): Changed noctets back to signed.
  Used with BerRead which expects signed int as second arg and
  returns signed int.
1998-11-16 05:07:27 +00:00
Kurt Zeilenga
24c5b0e791 Add checks for string.h and strings.h and apply them in generic header. 1998-11-16 02:02:45 +00:00
Hallvard Furuseth
7e6ad5100c Protoized, moved extern definitions to .h files, fixed related bugs.
Most function and variable definitions are now preceded by its extern
definition, for error checking.  Retyped a number of functions, usually
to return void.  Fixed a number of printf format errors.

API changes (in ldap/include):
  Added avl_dup_ok, avl_prefixapply, removed ber_fatten (probably typo
  for ber_flatten), retyped ldap_sort_strcasecmp, grew lutil.h.

A number of `extern' declarations are left (some added by protoize), to
be cleaned away later.  Mostly strdup(), strcasecmp(), mktemp(), optind,
optarg, errno.
1998-11-15 22:40:11 +00:00
Kurt Zeilenga
1c91859e9b Remove #ifdef sunos in lthread HAVE_LWP code. 1998-11-15 22:05:28 +00:00
Hallvard Furuseth
63a818078c Added declarations of common str*() functions 1998-11-15 21:52:56 +00:00
Kurt Zeilenga
5c2334c8a4 Updates based upon latest NT UserDirectory changes:
configure checks for getpwuid(), sys/resource.h, and pwd.h
	Fix !TERMIOS && !SGTTY ifdef in ud/util.c
1998-11-12 23:25:53 +00:00
Kurt Zeilenga
a9d6d0c6a1 Move extern declarations to headers.
Update NT portable.h and features.h
1998-11-12 21:07:28 +00:00
Kurt Zeilenga
8c5a6151b1 Rework prototype ifdef to use __NO_PROTOTYPES and __NEED_PROTOTYPES
to force no prototypes or require them.
Remove _WIN32 clause.  Will update portable.h.nt to define __NEED_PROTOTYPES.
1998-11-12 20:30:42 +00:00
Hallvard Furuseth
523fd2c891 Fix most `wider type truncated to int' bugs on OSF1 due to implicit decls:
#include <stdlib.h>    to get malloc & co various places,
 #include <ac/string.h> to get strlen & co in (liblutil/setproctitle.c),
 declare ch_malloc & co (slurp.h), avl_find_lin (avl.h), Malloc (ud/edit.c).
Also changed ch_malloc & co from char* to void* functions.
1998-11-11 23:37:38 +00:00
Kurt Zeilenga
d6e05ecbd7 Update NT4 port. 1998-11-11 05:50:51 +00:00
Kurt Zeilenga
dcec4bf292 Add/Remove defines to make current with ldapconfig.h.edit 1.8 1998-11-11 03:13:55 +00:00
Kurt Zeilenga
10a013f8ce Create feature file for NT build environment. 1998-11-11 03:03:03 +00:00
Kurt Zeilenga
376e1e02ff Update configure to handle DEC OSF1 3.2 special cases.
-thread & -pthread are still treated as libraries, will need
additional work to use them as CFLAGS.
Eliminated HAVE_DCE define (was redundant) and its use.  Code
now relies on draft4 and function existance tests.
1998-11-11 00:24:22 +00:00
Kurt Zeilenga
1fc810bfe5 Added support for ldap.conf file. See ldap.conf(5) for details.
Modified clients to reduce use of ldapconfig.h.edit.
ldap_{get,set}_option support is relatively complete.  Needs
to be extended to support other "features" of OpenLDAP.
1998-11-10 23:37:30 +00:00
Kurt Zeilenga
962b8dc246 HAVE_PTHREAD_ATTR_SETDETACHSTATE_NP should be HAVE_PTHREAD_ATTR_SETDETACH_NP 1998-11-10 22:42:19 +00:00
Kurt Zeilenga
1f4b479b2b Update thread detection:
ifndef HAVE_PTHREAD_KILL pthread_kill() code and prototype.
  Fix HAVE_FUNC_PTHREAD defines from previous change.
1998-11-09 21:15:56 +00:00
Kurt Zeilenga
8cb0ff3a68 Fix rwlock pthread draft4 compatibility.
Fix pthread_attr_init/destroy pthread draft4 compatibility.
1998-11-09 20:50:52 +00:00
Kurt Zeilenga
a48b606a2f Initial LDAP_API_FEATURE_X_OPENLDAP commit:
configure generates ldap_features.h based from ldap_features.h.in
  LDAP_REFERRALS -> LDAP_API_FEATURE_OPENLDAP_V2_REFERRALS
  LDAP_DNS -> LDAP_API_FEATURE_OPENLDAP_V2_DNS
1998-11-09 19:41:09 +00:00
Kurt Zeilenga
a5ee7b5842 Add -lresolv check for LDAP_DNS.
Updated portable.h.nt based upon portable.h.in (1.11).
1998-11-08 19:37:03 +00:00
Kurt Zeilenga
54c66420f0 Add additional LDAPD/ISODE checks 1998-11-08 00:26:20 +00:00
Kurt Zeilenga
d4a4a4cd25 Add lutil_passwd() 1998-11-06 22:04:14 +00:00
Kurt Zeilenga
fb45c9baba Add LDAPD library checks.
Remove AC_GCC_TRADITIONAL check.  Likely to cause more harm than good.
1998-11-06 21:14:19 +00:00
Kurt Zeilenga
36378ea411 Updated MSVC5 workspaces and projects.
Added ac/stdarg.h and updated liblber encode/decode to use it.
1998-11-06 01:18:49 +00:00
Kurt Zeilenga
0221763eac Generic variable argument header. Hides ugly ifdef. 1998-11-06 01:03:14 +00:00
Kurt Zeilenga
aacfd00141 Updated to 1.8 1998-11-05 19:39:26 +00:00
Kurt Zeilenga
4646b76608 define _REENTRANT & _THREAD_SAFE to pull in reentrant/threadsafe prototypes.
modify apps to use TOLOWER/TOUPPER macros to ensure isupper/islower is
called when approprate.
1998-11-05 06:11:47 +00:00
Hallvard Furuseth
83ec12246e Enclose debug variables in #ifdef LDAP_DEBUG 1998-11-05 05:03:12 +00:00
Kurt Zeilenga
c230adae6b Add cross compiling warnings and errors.
Now require --enable-x-compile if cross compiling.
Add tests for threadsafe/reentrant functions.
Add tests for setconcurrency functions.
1998-11-05 02:50:28 +00:00
Hallvard Furuseth
71eef8a424 Added lutil_detach() 1998-11-05 01:22:42 +00:00
Kurt Zeilenga
efca851ac7 Favor termios over sgtty. 1998-11-05 00:09:41 +00:00
Hallvard Furuseth
f81ee9b63e Added ldap_msgtype() and ldap_msgid() 1998-11-04 23:51:31 +00:00
Kurt Zeilenga
5009ee7b13 Add tests for vsnprintf and snprintf. 1998-11-04 23:29:52 +00:00
Hallvard Furuseth
41e25b4041 Added ldap_explode_rdn() 1998-11-04 23:28:51 +00:00
Kurt Zeilenga
6f3bb4adfb Add additional defines to allow more compile time API checks. 1998-11-04 20:09:57 +00:00
Kurt Zeilenga
8333a03346 struct ldap is now opaque to clients.
updated clients to use ldap_get/set_options
ld_options is renamed ld_booleans.  ldap-int.h has accessor macros.
updated libldap to use new accessor macros.
1998-11-04 01:41:00 +00:00
Kurt Zeilenga
1203736b7b Add setproctile to liblutil 1998-11-04 01:36:44 +00:00
Kurt Zeilenga
0300aebdc5 autoconf update 1998-11-04 01:35:21 +00:00
Kurt Zeilenga
1c0f451699 Check in mach cthread fixes. Should make non-pthread detection
work better.
1998-11-01 18:11:11 +00:00
Kurt Zeilenga
34c945b86d added ber_print_error() and renamed lber_bprint into ber_ namespace. 1998-10-27 07:50:07 +00:00