Commit Graph

51 Commits

Author SHA1 Message Date
Kurt Zeilenga
77f776dfd1 Another round of TLS updates to support secure referral chasing 2001-06-25 19:17:42 +00:00
Kurt Zeilenga
c4f5497ac6 move TLS ctx to lconn struct in prep for supporting TLS with referrals
need to rework cert check to use per lconn host name
2001-06-25 07:33:42 +00:00
Kurt Zeilenga
be9a50af25 Update copyright (including with or without modification clarification) 2001-05-29 03:29:53 +00:00
Kurt Zeilenga
c0a06f25c2 Add ldap_pvt_tls_get_peer_dn() routine. Returns peer as an LDAP DN. 2001-01-18 00:40:58 +00:00
Kurt Zeilenga
a13fb520ab Fix compilation problem when ldap.h is not included 2000-11-28 20:31:14 +00:00
Kurt Zeilenga
1f7874b724 Add ldap_url_parse_ext() prototype. Routine should likely be renamed
into ldap_pvt_ name space.
2000-11-28 19:59:57 +00:00
Kurt Zeilenga
2b82d4f486 remove lint
update bdb codes
2000-09-22 01:40:57 +00:00
Kurt Zeilenga
bfff7ce1f5 Bandaid ucdata build problems 2000-09-07 23:31:59 +00:00
Kurt Zeilenga
cee040a321 Bring UCdata infrastructure. 2000-09-03 23:48:35 +00:00
Kurt Zeilenga
b3b4342f8f Raise ldapi:// SSF to 71. ldapi:// is likely more secure than
DES or other low end encryption.
2000-08-28 19:53:49 +00:00
Kurt Zeilenga
25a9f7427d Remove CLDAP cruft 2000-08-18 04:25:00 +00:00
Howard Chu
0f8047b95e Implemented ldap_pvt_tls_get_peer() for use with SASL/EXTERNAL.
Added ldap_pvt_tls_get_strength() - return encryption strength, for
use as a SASL session security factor.
2000-08-16 23:27:41 +00:00
Kurt Zeilenga
3b03b64b77 Add char* ldap_pvt_get_fqdn(char*) which returns the FQDN of the
input.  In input==NULL, returns FQDN of local host.
Fixed copy_hostent() uninitialized pointer bug.
Replaced gethostname calls with ldap_pvt_get_fqdn( NULL ) calls.
2000-08-15 01:55:43 +00:00
Kurt Zeilenga
5fc22599e2 Update SASL code to reuse context through life of session.
Replace 'negotiated' with 'interactive' bind
Add hooks for SASL/EXTERNAL
Disable SASL security layers
Rework SASL command line and config file parameters
2000-07-13 22:54:38 +00:00
Kurt Zeilenga
0cfe5f75f8 Clarify LDAP_ATTRCHAR 2000-06-30 19:08:40 +00:00
Kurt Zeilenga
e82d2e042b Include tab in LDAP_SPACE 2000-06-30 02:19:39 +00:00
Kurt Zeilenga
aa4a44263d Fix inclusion of <sasl.h> 2000-06-29 19:36:32 +00:00
Kurt Zeilenga
9ef1a740c2 Round one of LDAP_F() macro changes. In this round we rename
macros into our namespace and limit use to headers.  A subsequent
round will add macros to separately handle forward declarations
of variables from declaration of function prototypes.  The last
round will add additional macros for declaring actual variables and
functions.
2000-06-18 19:48:07 +00:00
Kurt Zeilenga
e5ebc553ac Rework URI parser to provide true scheme not proto/properties.
Plus more pthread rwlock code
2000-06-07 01:09:40 +00:00
Kurt Zeilenga
0bb431d3b3 Y2k copyright update 2000-05-13 02:25:54 +00:00
Howard Chu
f0c4f83ea2 libldap/tls.c: change tls_verify_cb to no longer ignore verification errors.
This means a ldaps connection may drop before any LDAP protocol exchange
occurs (due to expired cert, unrecognized CAs, etc.).
  Change ldap_pvt_tls_connect to copy any TLS error string to ld_error upon
connection failure, otherwise client just sees "can't contact LDAP server."

slapd/connection.c: add flush/delay when SSL_accept fails, to allow any
TLS alerts we generated to propagate back to the client. (Which will then
be picked up by ldap_pvt_tls_connect on the client...)
2000-05-10 17:07:09 +00:00
Kurt Zeilenga
d0555fffe6 Error handling changes including separation of client v. server
SASL to LDAP translation.  plus comments and other minor changes
2000-05-03 18:59:58 +00:00
Kurt Zeilenga
c02d7e2cb6 ITS#503: Extend ldap tools to support SASL/TLS
Submitted by Gabor Gombas <gombasg@inf.elte.hu>
2000-04-20 09:23:51 +00:00
Kurt Zeilenga
0dbaf87730 Another round of changes behind -DSLAPD_SCHEMA_NOT_COMPAT
plus these changes unhidden changes:
	remove now meaning --enable-discreteaci configure option
	fix ITS#451, slapd filters
	Add ber_bvecadd() to support above
	constify ldap_pvt_find_wildcard() and misc slapd routines
	renamed some slap.h macros
	likely broken something
2000-02-14 20:57:34 +00:00
Kurt Zeilenga
9dde98577d Move ldap_unicode_t to ldap_pvt.h, typedef to ldap_ucs2_t for now.
ldap_ucs2_t is a short.  The unicode routines may break if
sizeof(short) != 2...
2000-01-27 05:27:36 +00:00
Kurt Zeilenga
4eb13130a9 typedef ber_int_t ldap_ucs4_t 2000-01-27 01:04:17 +00:00
Kurt Zeilenga
ed9969b1c4 Make ldap_utf8_bytes() act like strlen() not sizeof() 2000-01-23 23:33:01 +00:00
Kurt Zeilenga
42cc5e5333 Fix bugs in UTF-8 code. Apply to getdn and charray. 2000-01-23 23:07:24 +00:00
Kurt Zeilenga
61b509d881 Add some robustness to UTF-8 routines. 2000-01-23 18:43:30 +00:00
Kurt Zeilenga
16c903909c Add comments to UTF-8 declarations.
Add US ASCII optimizations macros.
#ifdef out unused routines
Ready to hack getdn.c and others to support UTF-8
2000-01-23 05:35:38 +00:00
Kurt Zeilenga
22ba55371e Move ldap_utf8_*() declarations from ldap-int.h to ldap_pvt.h.
We may likely want to expose the routines at a later date (ldap_utf8.h?).
2000-01-22 21:09:24 +00:00
Luke Howard
5a0bbd7eed Imported <ldap.h> in <ldap_pvt.h> so ldap_pvt_sasl_bind() has necessary
types. Changed const sasl_callback_t * to LDAP_CONST sasl_callback_t *.
2000-01-05 12:56:17 +00:00
Luke Howard
a466a64318 Added support for connecting to LDAP servers located using DNS
SRV records. Added lock around resolver library which is shared
by the DNS SRV code and the getdxbyname() code.
2000-01-03 02:33:22 +00:00
Luke Howard
57b62dc7d4 Added ldap_pvt_sasl_bind() prototype to ldap_pvt.h. This
required importing sasl.h into ldap_pvt.h, thus that import
was removed from ldap-int.h.
2000-01-03 00:15:30 +00:00
Luke Howard
9b4e3b2234 Merged in preliminary support for Cyrus SASL library;
support for DCE slash-delimited, left-to-right DNs;
support for a domain socket transport (enable with
--enable-ldapi); and extensions to URL parsing to
support the latter transport.
2000-01-02 01:21:25 +00:00
Mark Valence
454284f1ea Adds for Start TLS functionality on slapd and LDAP C API. 1999-12-09 22:33:22 +00:00
Howard Chu
eaaea51b53 Fixes for NT dynamic linking. 1999-11-27 23:40:08 +00:00
Kurt Zeilenga
5b7567b62a Add empty struct ldapoptions declaration to avoid pulling in headers. 1999-11-06 18:02:44 +00:00
Mark Valence
4a5c58c09e Added ldap_pvt_tls_* prototypes. 1999-11-06 05:02:52 +00:00
Howard Chu
0991e22550 Fixed the LDAP_F macro.
See README 1.27 log
1999-10-28 07:28:53 +00:00
Kurt Zeilenga
bd36de108f Add OpenLDAP RCS Id 1999-08-31 01:17:01 +00:00
Hallvard Furuseth
6632e41ee8 Export ldap_pvt_<find_wildcard,filter_value_unescape>() from libldap.
Use them in slapd/str2filter.c.
1999-08-31 00:44:49 +00:00
Kurt Zeilenga
5c63fd55b5 Implement ldap_dn_normalize and friends. Should be used by clients
to validate input dn's BEFORE sending dn's to server.
Also fixed getfilter to use REG_EXTENDED|REG_NOSUB.  (and fixed one
case where REG_BASIC was still used).
s/strdup/LDAP_STRDUP/
Added ldap_pvt_str2lower/upper
1999-08-25 06:44:08 +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
7574b70c6b Add charray (from slapd) to -lldap/-lldap_r (not yet used)
Add digest md5 codes to -lldap/-lldap_r (work in progress)
1999-07-07 17:58:21 +00:00
Kurt Zeilenga
83408503a7 Eliminate DECL_STRDUP check in favor of simple fix to <ac/string.h> header.
Add #undef and other protection of macros.
1999-05-24 23:01:57 +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
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
f988fdbec1 add ldap_cdef'ing. 1999-01-26 00:04:01 +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