Commit Graph

226 Commits

Author SHA1 Message Date
Howard Chu
d6ae1d95de Include <sys/stat.h> for mkdir prototype 2002-07-26 13:24:37 +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
Kurt Zeilenga
3d90fcda3a authcId might be NULL 2002-06-22 21:27:38 +00:00
Howard Chu
4ac8a54b56 Builds on both Unix and NT now. 2002-05-16 11:00:37 +00:00
Howard Chu
3d491808a8 Fixes for MingW: (passes test007, with LDAP_DIRSEP tweaks in slapd.conf)
must include <ac/stdlib.h> to get MAX_PATH defined.
  use LDAP_DIRSEP instead of '/' in paths
  define truncate/ftruncate macros, etc.
2002-05-16 10:51:45 +00:00
Pierangelo Masarati
2ca323d2b5 Fixes ITS#1786: dynamically growing number of tokens in config line
for both slapd and slurpd

Copyright 2002, John Morrissey (jwm at horde dot net), All rights reserved.
This is free software; you can redistribute and use it under the same terms
as OpenLDAP itself.

Applied with changes
2002-05-02 08:48:14 +00:00
Julius Enarusai
ed8f299245 ITS#1730: Misc typos in NEW_LOGGING code from Hallvard 2002-04-25 22:12:44 +00:00
Pierangelo Masarati
d2ee0b1758 fix off-by-one bug; use s/sprintf/snprintf/ 2002-04-25 19:23:37 +00:00
Julius Enarusai
4ab3ce1651 Added LDAP_LOG Messages 2002-04-16 19:23:49 +00:00
Julius Enarusai
15fffedad7 Added LDAP_LOG Messages 2002-04-15 20:40:15 +00:00
Julius Enarusai
a1b4f71443 Added LDAP_LOG Messages 2002-04-15 20:28:16 +00:00
Julius Enarusai
7d162b6806 Added LDAP_LOG Messages 2002-04-15 20:18:47 +00:00
Julius Enarusai
714ec82ca0 Added LDAP_LOG Messages 2002-04-15 20:05:06 +00:00
Julius Enarusai
92d24de6e0 Added LDAP_LOG Messages 2002-04-15 19:37:49 +00:00
Julius Enarusai
ef4fe3fc4b Added LDAP_LOG Messages 2002-04-15 19:16:32 +00:00
Julius Enarusai
34ef718be8 Added LDAP_LOG Messages 2002-04-15 18:59:20 +00:00
Julius Enarusai
c7d183a19b Added LDAP_LOG messages 2002-04-15 17:57:44 +00:00
Kurt Zeilenga
ab3b125d1e Fix include order 2002-04-15 16:45:02 +00:00
Howard Chu
5c4a924f81 ITS#1735 unused conn.c_uthc_backend, include ldap_pvt.h 2002-04-11 07:42:57 +00:00
Howard Chu
14026284d0 ITS#1613, call ldap_pvt_tls_init after config file is read. ldap.conf doesn't
get read until much later, too late for TLS_RANDFILE to be useful.
2002-04-11 07:04:12 +00:00
Pierangelo Masarati
4a8ab5dbf2 Mostly based on patches provided by Hallvard B. Furuseth
ITS#1677 - cast away const warnings
ITS#1678 - unsigned char args to ctype funcs
ITS#1682 - don't redefine ldap_debug
ITS#1683 - uninitialized vars
ITS#1703 - ldo_debug initialization
ITS#1705 - unsigned testing
ITS#1706 - socklen_t args
ITS#1719 - back-tcl update (other cleanups/fixes/improvements; yet untested)
ITS#1724 - integerNormalize/integerFilter/integerIndexer bugs
ITS#1725 - libdes not required

Implement back-null (/dev/null style backend)
Cleanup some misc warnings ("%lu" format, unused/uninitialized vars,
        ambiguous operator precedence)

Kurt, please regenerate configure
2002-04-08 09:43:22 +00:00
Kurt Zeilenga
ce07fb958e Update libtool usage
s/-L.../libraries -lldap/.../libraries/libldap/libldap.la/
2002-02-10 22:42:51 +00:00
Howard Chu
f50b75f0c2 Added replica attr=<attribute list> support to filter replog content 2002-02-08 06:44:33 +00:00
Kurt Zeilenga
bcf37b4463 Fix SASL leak and clobber bug
Fix TLS critical rev logic bug
Suggested fixes reported by Roman.Kagan@itep.ru
2002-01-12 17:46:27 +00:00
Kurt Zeilenga
0e2af54a3f Update copyright statements 2002-01-04 21:17:25 +00:00
Kurt Zeilenga
f418f6247f use sizeof not strlen 2002-01-02 16:57:30 +00:00
Kurt Zeilenga
dc55afec67 Add reference to replication-notes 2001-12-08 07:38:14 +00:00
Pierangelo Masarati
3a16335374 wrong length in statement selection (not critical); some cleanup (sizeof()-1 instead of strlen on constant strings) 2001-11-01 18:57:21 +00:00
Kurt Zeilenga
cdc7c44d80 Use non-critical ManageDsaIT control. 2001-10-09 18:53:22 +00:00
Pierangelo Masarati
069155f667 fixes ITS #1379; the replication test has been improved by adding modrdn entries 2001-10-09 18:12:22 +00:00
Kurt Zeilenga
af37269416 Rework do_ldap retry loop to better handle server down errors.
Could likely treat other errors (LDAP_BUSY) as non-fatal errors.
2001-09-27 03:13:28 +00:00
Kurt Zeilenga
2af75ecc6a Trim both \n and \r\n from config files. 2001-09-24 22:18:02 +00:00
Kurt Zeilenga
1bfadb5608 Bump MAXARGS to 500. 2001-09-21 00:48:00 +00:00
Kurt Zeilenga
4039648a2e Use time_t not char * to represent timestamps.
Fixes billionth second since epoch bug.
2001-09-09 21:16:17 +00:00
Pierangelo Masarati
ece9bdb0eb Added the suffix=<dn> parameter to replica config directive
to allow selective replication of subtrees of a single database.
Multiple occurrences allow the same replica to handle different
subtrees
2001-07-21 14:15:23 +00:00
Pierangelo Masarati
5c0502add9 make slurpd honor include files in slapd.conf (note: the problem was signalled in ITS#131 :) 2001-07-04 20:03:49 +00:00
Kurt Zeilenga
f98a1bab88 TLS initialization fix 2001-06-22 18:08:44 +00:00
Kurt Zeilenga
a93a15d9fc Add copyright notices 2001-01-20 17:49:05 +00:00
Kurt Zeilenga
e414303e10 Make sure openldap-slurp is created 700 2000-10-16 16:43:42 +00:00
Kurt Zeilenga
cdc0a66558 ITS#798: don't block on empty replog log in one-shot mode 2000-10-03 18:50:42 +00:00
Kurt Zeilenga
318d11e9db Fix ri initialization bug (ITS#768) 2000-09-22 22:24:30 +00:00
Kurt Zeilenga
5cfb3f24a5 Fix modrdn handling 2000-09-16 00:26:24 +00:00
Kurt Zeilenga
34f8561467 Update slurpd with StartTLS and additional SASL parameters 2000-09-15 23:41:07 +00:00
Kurt Zeilenga
b1770ee098 Remove cruft (-h) 2000-09-15 22:49:14 +00:00
Kurt Zeilenga
6a3b8e281b ITS#722: disallow argument buffer overflow 2000-09-11 19:05:24 +00:00
Kurt Zeilenga
c9910bc19f Use SASL quiet mode 2000-08-21 03:06:55 +00:00
Kurt Zeilenga
a1cc95d558 Hide SASL behind HAVE_CYRUS_SASL 2000-08-19 18:47:32 +00:00
Kurt Zeilenga
b1aed76e35 clarify error messages 2000-08-18 00:58:00 +00:00
Mark Adamson
4a5498351e Added SASL authentication to slurpd for connecting to slave LDAP servers. 2000-08-17 16:30:37 +00:00
Kurt Zeilenga
27ebe8534a Move default slurpd directory to $(LOCALSTATEDIR)/openldap-slurp. 2000-08-10 02:52:01 +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
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
a34c40915b Ripe out Kbind 2000-06-26 01:23:00 +00:00
Kurt Zeilenga
7ced460520 Update slurpd to use LDAPv3 w/ ManageDSAit
Remove slurpd kbind support as this requires LDAPv2
Backout back-ldbm/referrals.c update_ndn hack
2000-06-25 22:45:28 +00:00
Kurt Zeilenga
e2fa599482 Move old files to the Attic 2000-06-25 22:01:42 +00:00
Kurt Zeilenga
a56c161bdb Misc code cleanup. 2000-06-10 22:39:30 +00:00
Kurt Zeilenga
34edec3107 Strip installed executables
better library clean
2000-05-30 18:23:56 +00:00
Kurt Zeilenga
4bc786f34b Y2k copyright update 2000-05-13 02:47:56 +00:00
Randy Kunkee
e5de6c5b0c Change count test for non-zero reference counts to check for ... non-zero. 2000-04-26 09:24:58 +00:00
Randy Kunkee
75467fb340 Rework order of things to allow restart in oneshot mode. 2000-04-26 09:24:12 +00:00
Ben Collins
32bdecbb5f for slurpd's replica directory (slurpd.status, and rej file) use a subdir of what the user specifies (add replica/ to it) to avoid /tmp races. A lot of the files that slurpd uses cannot be opened with O_EXCL, nor can we safely determine if there are any hardlinks from another file to it, so we create our own subdirectory so we can control the perms, even in /tmp 2000-04-24 17:03:45 +00:00
Ben Collins
a44adcfb43 filecheck(), we should strcpy the file passed (f arg) and not always slapd_replogfile, else this function is of little real use 2000-04-24 16:47:41 +00:00
Ben Collins
4319e67736 use strcpy instead of sprintf when all we have is two args (source and dest) 2000-04-24 16:44:16 +00:00
Ben Collins
50a41f3ee2 when opening files in /tmp use O_CREAT|O_EXCL to overcome race conditions 2000-04-24 16:42:16 +00:00
Kurt Zeilenga
870dbca576 objectclass=* -> NULL 2000-04-12 01:00:48 +00:00
Kurt Zeilenga
6437785a82 Initial implementation of Kerberos password verification for
simple bind via:
	{KERBEROS}principal
Code is disabled by default (for security reasons).  Use
--enable-kpasswd to enable.  Behind SLAPD_KPASSWD.
Reworked Kerberos detection and split out KBIND as independent
feature (--disable-kbind) (LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND).
KBIND depends upon detection of KRB4 (or KRB425) support.  Detection,
building with eBones (as distributed with FreeBSD 3.4) okay, but
wasn't able to test as I don't have a K4 KDC handy.
--with-kerberos has a number of detection options... most likely
don't work properly.
2000-01-08 18:42:11 +00:00
Kurt Zeilenga
4dfc7fc674 Fix server unavailable handling bug introduced by the ldap_open to
ldap_init change.   Fix suggested by Jay D. Allen <jay@fork.com>.
1999-12-12 20:12:39 +00:00
Kurt Zeilenga
5d5588836f Fix ldap_rename parameter order (ITS#387) 1999-12-04 17:19:11 +00:00
Kurt Zeilenga
bb1b81473b Add configure tests for ssize_t and caddr_t and remove NT preamble
(excepting WIN32_LEAN_AND_MEAN).  Rework openlog/closelog use to
eliminate need for defines.
1999-11-01 18:14:26 +00:00
Kurt Zeilenga
4cc712db53 Add <ac/param.h> to wrap <sys/param.h> 1999-11-01 17:21:24 +00:00
Howard Chu
e99eab787f Use new macros from configure.in to accomodate NT/Mingw32 environment.
See README 1.27 log
1999-10-28 07:31:59 +00:00
Ben Collins
53da7b6cda * build/top.mk: removed references to TMPROOT and added DESTDIR support
* all others: Added DESTDIR support
1999-09-22 21:51:30 +00:00
Kurt Zeilenga
e642a1b9cd Add OpenLDAP RCSid 1999-09-08 22:52:19 +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
203f5b058f Change -d option to not detach even with -d 0 or compiled with --disable-debug. 1999-09-04 20:24:40 +00:00
Hallvard Furuseth
b290faf0db Remove unused vars/function 1999-09-02 07:36:17 +00:00
Hallvard Furuseth
aa516d3e80 include ac/string.h 1999-09-01 05:28:52 +00:00
Kurt Zeilenga
85a3baa8ff Shouldn't need to restall signal handler outside of handler. 1999-08-31 01:44:33 +00:00
Kurt Zeilenga
188ad48057 do_admin should reinstall handler on called signal number and
not assume LDAP_SIGUSR2
1999-08-31 01:41:52 +00:00
Hallvard Furuseth
2330f1466d Plug memory leaks (free output from ldif_parse_line) 1999-08-27 03:21:43 +00:00
Kurt Zeilenga
6677c7ad1d Fix slurpd constification where dependent upon slap.h 1999-08-20 22:24:58 +00:00
Kurt Zeilenga
bf86644ba3 Add CSRIMALLOC Support 1999-08-19 20:01:42 +00:00
Hallvard Furuseth
bbd3d9e77c ldap_op.c: Get LDAP->ld_lberoptions from libldap/ldap-int.h.
slurp.h:   #undef ldap_debug before a #define which conflicts with ldap-int.h.
1999-08-08 15:18:38 +00:00
Kurt Zeilenga
e0691dfbc0 create SASL_LIBS to hold -lsasl
create SECURITY_LIBS (top.mk) to order $SASL_LIBS $KRB_LIBS $TLS_LIBS
use $SECURITY_LIBS in Makefile.in's instead of $KRB_LIBS $TLS_LIBS
1999-08-05 02:25:19 +00:00
Kurt Zeilenga
59c8a88c2f Needs <ac/stdlib.h> for EXIT_* 1999-08-03 18:41:55 +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
48d5465ab7 Add support for "foo:< http://localhost/path.
Requires FreeBSD's -lfetch...
Implementations to other URL APIs encouraged.
Probably should be moved to -llutil.
1999-07-31 03:23:26 +00:00
Kurt Zeilenga
b73b0c6158 Enhance LDIF handling
ldapsearch:
    use draft guidelines for determining when to use
    -t only writes binary attributes to files
    -tt writes all attributes to files
    output now lists URL instead of path to such files
    -T dir can be used to specify directory to create temp files in
    -V urlprefix can be used to change the URL prefix
    LDIF is now commented (can be disabled using -LL)
    LDIF now contains version attribute (can be disabled with -LLL)
LDIF:
    put interface changed to allow caller to specify how to encode
    put interface uses draft guidelines for determine when to base64 encode
    wrapping kludged to match old off by one bug
Tests:
    removed trailing space from some attributes (to avoid base64 encoding)
    enabled -LLL in defines.sh (should sed output to remove
        wrapping/comments/redundant separators)
Misc:
    updated codes outputting LDIF to use new put interface
TODO:
    handling of version attribute on input
    handling of URLs on input (ie: fetch URL)
1999-07-30 23:00:02 +00:00
Kurt Zeilenga
17a975b6fb Very crude LDIF changes:
add MODRDN newSuperior support
	add '#' support to ldapmodify (but not slurpd and ldbm tools)
1999-07-29 21:25:39 +00:00
Julio Sánchez Fernández
0dac59ca26 Include $(TLS_LIBS) 1999-07-13 19:15:14 +00:00
Kurt Zeilenga
c0af81253a remove obsolete file. 1999-06-29 03:01:02 +00:00
Kurt Zeilenga
c57e5952f9 Use ber_mem* and friends 1999-06-19 05:08:13 +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
Kurt Zeilenga
21e081dc5b Separate autoconf generated values from "defaults".
ldap_defaults.h incorporates non-generated ldapconfig.h values.
	ldap_config.h.in is new template for autoconf generated defaults
		(namely directories and paths)
	ldap_config.h.nt, NT template (must be manually copied)
	s/<ldapconfig.h>/<ldap_defaults.h>/
	s/DIRSEP/LDAP_DIRSEP/ & s/DEFAULT_/LDAP_/
1999-06-17 03:54:25 +00:00
Kurt Zeilenga
cb68aab469 s/ldap_open/ldap_init/ calls... ldap_open is deprecated. 1999-06-13 21:49:35 +00:00
Kurt Zeilenga
21c70857f1 s/<stdlib.h>/<ac/stdlib.h>/ 1999-06-03 00:37:44 +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
Kurt Zeilenga
dba57a312c Add mkversion script to generate version.c files. mkversion generates
identification strings compatible with ident(1) and what(1).
Uses $(VERSION) generated from configure.in.  rm build/version
rm old version .c files
1999-04-28 05:40:17 +00:00
Hallvard Furuseth
d9782e14f8 Move ldap_pvt_thread_initialize() in front of init_globals() 1999-04-13 11:10:16 +00:00
Kurt Zeilenga
d49de831ef Remove extraneous setting of shutdown variable before exiting. 1999-04-07 03:29:47 +00:00