Howard Chu
70092b38fb
Fix ITS#1843, don't deref NULL string in ldap_pvt_str2upper
2002-06-07 13:27:25 +00:00
Howard Chu
8101798791
Better SASL_MAXBUF fix
2002-06-07 03:40:16 +00:00
Howard Chu
353f627aa4
Eliminate SASL client session_callbacks. Since proc was always NULL they
...
never did anything anyway.
2002-06-06 01:44:38 +00:00
Kurt Zeilenga
2c7dae116b
More argument handling updates
...
(don't check what we expect applications to check).
2002-06-06 00:26:50 +00:00
Kurt Zeilenga
1064f52dae
Fix typo in last commit
2002-06-05 16:39:15 +00:00
Kurt Zeilenga
40ef77a8f8
Add error handling cleanup
2002-06-05 15:51:42 +00:00
Kurt Zeilenga
99f5983fb6
Consistently don't check for NULL session handle and other pointers.
...
Application is responsible for providing valid session pointers.
2002-06-05 15:46:26 +00:00
Howard Chu
7de25993f5
Fix NT_LINK_LIBS, UNIX_LINK_LIBS
2002-05-17 23:41:26 +00:00
Howard Chu
2ca4b0ebfc
ITS#1806, Cyrus 1 doesn't give back our callbacks pointer, must stash it
...
ourselves.
2002-05-06 23:56:35 +00:00
Howard Chu
ae3a80eb09
Fix in 1.50 applies to Cyrus 1 as well as Cyrus 2.
2002-05-05 19:15:29 +00:00
Howard Chu
e8e7847175
ITS#1797 silence uninit'd var warnings
2002-05-04 10:52:05 +00:00
Howard Chu
3590877b77
Initialize authid in case ldap_pvt_tls_get_my_dn fails
2002-05-04 01:32:41 +00:00
Howard Chu
0390a171b9
Changed default tls_opt_require_cert value to LDAP_OPT_X_TLS_DEMAND; force
...
a fatal error when TLS server cert verification fails.
Changed ldap_pvt_tls_check_hostname to return LDAP_SUCCESS when no cert is
found: this can now only occur if tls_opt_require_cert was explicitly set
to NEVER or ALLOW.
In tls_verify_cb, added a text translation of the verification error code
to the debug message.
2002-05-04 00:05:48 +00:00
Howard Chu
6c1a786d6c
Fix previous commit, wrong if condition
2002-05-03 13:07:42 +00:00
Howard Chu
ed871b997c
Break up large SASL writes into units of SASL maxoutbuf size.
2002-05-03 13:04:55 +00:00
Howard Chu
931c4eb35f
For Cyrus 2, cannot free session_callbacks in ldap_int_sasl_open, must
...
wait until ldap_int_sasl_close because SASL doesn't copy our structure,
it uses it directly.
2002-05-03 12:10:47 +00:00
Kurt Zeilenga
8c152396b9
Matched Values implementation (ITS#1776) based upon submission
...
form Mikhail Sahalaev <M.Sahalayev@pgr.salford.ac.uk>.
Further work needed:
add testxxx-matchedvalues
rework ldapsearch(1) portion of patch to generalize use of options
---
Copyright 2001, Mikhail Sahalaev, All rights reserved.
This software is not subject to any license of University Of
Salford.
Redistribution and use in source and binary forms are permitted
without restriction or fee of any kind as long as this notice
is preserved.
2002-05-02 18:56:56 +00:00
Howard Chu
b732d3ec55
Fix previous commit, only zero out v3 refer_cnt if we got a SEARCH_RESULT.
...
If we got a SEARCH_REFERENCE, we need to keep going...
2002-05-02 12:08:19 +00:00
Kurt Zeilenga
d82d018f20
add an RFC 2849 check... but behind #if 0 as I'm now thinking this
...
is not appropriate.
2002-05-01 04:40:26 +00:00
Kurt Zeilenga
96483c8dcd
cleanup before working on changes
2002-05-01 04:23:59 +00:00
Howard Chu
c9699c1072
Fix previous commit - must fully init newAVA
2002-04-30 14:43:05 +00:00
Howard Chu
b005540094
Added ldap_ucs_to_utf8s to convert ASN.1 T61STRING, BMPSTRING, and
...
UNIVERSALSTRING to UTF-8 format.
Rewrote ldap_X509dn2bv to check ASN.1 types and use above function.
2002-04-30 13:57:01 +00:00
Howard Chu
de3e81cebb
Changed ldap_pvt_tls_get_my_dn and ldap_pvt_tls_get_peer_dn to store result
...
in dn parameter and return a result code.
2002-04-30 13:50:56 +00:00
Howard Chu
5528772f23
In ldap_int_tls_start, authid is very temporary, not const.
2002-04-19 04:35:16 +00:00
Howard Chu
202aa8c793
Fix memory leak in previous commit
2002-04-18 16:02:02 +00:00
Howard Chu
17ae956518
Added ldap_X509dn2bv()
...
deleted ldap_pvt_tls_get_peer()
changed ldap_pvt_tls_get_peer_dn() to use ldap_X509dn2bv()
added ldap_pvt_tls_get_my_dn()
2002-04-18 12:29:30 +00:00
Howard Chu
315ac06912
Fix warnings from sasl_errdetail
2002-04-18 12:20:55 +00:00
Howard Chu
98a416b584
Additional error reporting for Cyrus SASL 2. Attempt to get SASL-EXTERNAL
...
working ifor Cyrus 2. (Both GSSAPI and EXTERNAL are broken at the moment.)
2002-04-18 00:48:36 +00:00
Howard Chu
dc3e5fb99d
ITS#818, ITS#980, ITS#1234 ldapsearch/referral hang - set refer_cnt to 0
...
after v3refs have been chased. They are fully processed by the time we get
back, so we should just return the current result message to the caller.
2002-04-16 12:53:13 +00:00
Kurt Zeilenga
709ce4fa6c
Re: Patch: ctype functions require 'unsigned char' args (ITS#1678)
...
================
Written by Hallvard B. Furuseth and placed into the public domain.
This software is not subject to any license of the University of Oslo.
================
Here are fixes for more places where the argument to ctype.h functions
should be in the range of `unsigned char'.
Explanation of the last patch (to schema_init.c:bvcasechr()):
TOLOWER() and TOUPPER() return values in the range of `unsigned char',
but bvcasechr() then compares those values with a plain `char'. So I
convert the return values from TOLOWER()/TOUPPER() to `char' first.
Hallvard B. Furuseth <h.b.furuseth@usit.uio.no>, April 2002.
2002-04-15 20:42:42 +00:00
Howard Chu
bb17493d31
ITS#1732 signed/unsigned fixes
2002-04-11 08:47:37 +00:00
Pierangelo Masarati
4a2b9b2195
ITS#1730
2002-04-08 18:39:23 +00:00
Pierangelo Masarati
8de44663f7
ITS#1730 and completion of ITS#1701
2002-04-08 10:34:04 +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
Howard Chu
5c70106657
ITS#1708 ldap_pvt_tls_sb_ctx() et al
2002-04-05 06:48:03 +00:00
Kurt Zeilenga
b0b8546f05
Patch: More format bugs (ITS#1702)
...
================
Written by Hallvard B. Furuseth and placed into the public domain.
This software is not subject to any license of the University of Oslo.
2002-04-02 18:56:26 +00:00
Kurt Zeilenga
26b99bc35d
ITS#1701. Fix ber_scanf() return tag handling.
...
Based upon patch submitted by Hallvard B. Furuseth <h.b.furuseth@usit.uio.no>.
2002-04-02 18:40:04 +00:00
Julius Enarusai
b082ed9355
Added LDAP_LOG Messages
2002-04-02 00:22:57 +00:00
Julius Enarusai
e86782aab9
Added LDAP_LOG messages
2002-04-01 23:39:36 +00:00
Julius Enarusai
fff5d3de60
Added LDAP_LOG messages
2002-04-01 22:31:44 +00:00
Julius Enarusai
e30c52dfb7
Added LDAP_LOG Messages
2002-04-01 22:28:02 +00:00
Julius Enarusai
70c73da22c
Added LDAP_LOG messages
2002-04-01 22:08:32 +00:00
Kurt Zeilenga
111b464642
move ldap_int_put_filter to ldap_pvt_put_filter
...
and other cleanup
2002-03-30 00:42:40 +00:00
Julius Enarusai
b7bd4368d9
Added LDAP_LOG messages
2002-03-29 17:46:28 +00:00
Julius Enarusai
ae31411a0d
Added LDAP_LOG messages
2002-03-27 22:35:35 +00:00
Julius Enarusai
688f45dd06
Added LDAP_LOG messages
2002-03-27 22:23:24 +00:00
Julius Enarusai
171281f3ec
Added LDAP_LOG messages
2002-03-27 22:03:35 +00:00
Julius Enarusai
3921e1b0c2
Added LDAP_LOG messages
2002-03-27 21:38:32 +00:00
Julius Enarusai
c0325aed88
Added LDAP_LOG messages
2002-03-27 21:16:36 +00:00
Julius Enarusai
3654b0d4c0
Added LDAP_LOG messages
2002-03-27 19:51:13 +00:00
Julius Enarusai
9c90811315
Added LDAP_LOG messages
2002-03-27 19:43:07 +00:00
Julius Enarusai
a299e74d21
Added LDAP_LOG messages
2002-03-27 19:37:50 +00:00
Julius Enarusai
b4243bc119
Added LDAP_LOG messages
2002-03-27 19:28:43 +00:00
Julius Enarusai
150aa3fc7b
Added LDAP_LOG messages
2002-03-27 19:18:11 +00:00
Julius Enarusai
3ab1ea7300
Added LDAP_LOG messages
2002-03-27 19:12:18 +00:00
Julius Enarusai
e4f2c9425a
Added LDAP_LOG messages
2002-03-27 18:50:45 +00:00
Julius Enarusai
d88bc7a8b5
Added LDAP_LOG messages
2002-03-27 18:20:08 +00:00
Kurt Zeilenga
fcf9f451a5
Copyright 2001, Adrian Thurston, All rights reserved.
...
This software is not subject to any license of
Xandros Corporation.
This is free software; you can redistribute and use it under the same
terms as OpenLDAP itself.
-------------------------------------------------------------------
This patch adds an option to ldap_get_option which can be called after
ldap_start_tls in order to obtain the pointer to the SSL object used
2002-03-11 03:39:08 +00:00
Kurt Zeilenga
d50eb2e959
C translator portability changes (ITS#1609)
2002-02-23 23:47:37 +00:00
Kurt Zeilenga
3d9cf98dad
If port is zero, use default.
2002-02-21 15:39:35 +00:00
Pierangelo Masarati
c31596eb78
not-so-easy-to-spot bug in filter writing
2002-02-14 18:01:15 +00:00
Pierangelo Masarati
32e48d9e4d
disallow unescaped NULs in UTF-8 string values
2002-02-13 22:49:03 +00:00
Kurt Zeilenga
427478a753
Use memchr, not strlen, to look for embedded NULs.
2002-02-13 17:48:39 +00:00
Kurt Zeilenga
dd12660a14
Add embedded NUL check. This is one case where we don't want to
...
be liberal in what we accept.
2002-02-13 17:23:33 +00:00
Kurt Zeilenga
ee6d1a4d40
Check for NULs in DNs.
2002-02-13 16:41:41 +00:00
Pierangelo Masarati
6913aadcdf
minor cleanup
2002-02-13 14:44:08 +00:00
Pierangelo Masarati
33d5f0f8f8
honor the ber_len field to allow to exploit ldap_bv2[r]dn to handle DNs embedded in longer strings ...
2002-02-13 12:09:36 +00:00
Pierangelo Masarati
a117c5eee7
use ldap_bv2[r]dn and turn ldap_str2[r]dn into wrappers
2002-02-13 11:46:33 +00:00
Pierangelo Masarati
959edd88c0
prepare for ldap_bv2dn()
2002-02-13 10:05:22 +00:00
Kurt Zeilenga
f1cc2b7ab2
#if 0 RDN debugging
2002-02-13 08:00:31 +00:00
Kurt Zeilenga
275f3be363
Misc. DN fixes and cleanups, namely don't muck with AVA_BINARY values
...
Also, pass empty_bv when bv_val is NULL.
2002-02-13 06:35:27 +00:00
Kurt Zeilenga
defed68e82
Fix typo
2002-02-11 18:18:34 +00:00
Howard Chu
a916535a27
Fix #include of sasl.h
2002-02-11 09:39:15 +00:00
Kurt Zeilenga
d23c559646
Don't use 'shtool mkln' as ln(1) replacement.
...
Allow both <sasl/sasl.h> and <sasl.h>
2002-02-11 08:28:51 +00:00
Kurt Zeilenga
ce07fb958e
Update libtool usage
...
s/-L.../libraries -lldap/.../libraries/libldap/libldap.la/
2002-02-10 22:42:51 +00:00
Kurt Zeilenga
b315d8af34
Update Cyrus SASL detection to always look for <sasl.h> regardless
...
of version and then try -lsasl2 and -lsasl. Make SASL code
conditional on SASL_VERSION_MAJOR, not HAVE_CYRUS_SASL.
2002-02-10 17:51:19 +00:00
Howard Chu
8a4e92b259
Support for Cyrus SASLv2. Untested.
2002-02-10 14:27:23 +00:00
Howard Chu
ffa4b26343
Slightly better fix for library cleanup. Requires GCC.
2002-02-09 01:09:23 +00:00
Howard Chu
1fba3a5c13
Fix flag initialization
2002-02-08 21:53:04 +00:00
Howard Chu
7d41a446cb
Added conversion from UTF-8 to T.61.
2002-02-01 03:13:04 +00:00
Howard Chu
cb88cae005
First pass at T.61 <-> UTF-8 translation. Only does T.61 to UTF-8.
...
Feel free to inspect, not yet ready for use.
2002-01-31 13:42:06 +00:00
Howard Chu
63a4a19732
Send a warning to the client if we try to use a bad cert.
2002-01-27 03:48:08 +00:00
Howard Chu
c3c85b4062
Extended TLS_REQCERT/TLSVerifyClient syntax to 4 states: never,allow,try,
...
and hard/demand.
2002-01-27 02:56:18 +00:00
Howard Chu
c81d2bb855
Fix, errno was incorrect after SSL_read returned 0 bytes, caused slapd to
...
close the connection prematurely.
2002-01-26 13:43:22 +00:00
Howard Chu
25cd89b443
Use ber_scanf 'm' format for ignored UDP string
2002-01-17 23:30:05 +00:00
Kurt Zeilenga
7f0289a390
Move most of the new ber_*cmp routines to lber_pvt.h to keep them private,
...
rework them slightly to avoid computations which might result in underflow.
Rename them for consistency with other berval routines.
Remove some utf8 lint.
2002-01-16 18:16:15 +00:00
Pierangelo Masarati
5c1d9b4fce
fix assertion
2002-01-16 10:58:04 +00:00
Pierangelo Masarati
6c5be3006d
don't auto-detect DCE form; assert the UTF-8 charlen is legal
2002-01-16 09:57:20 +00:00
Howard Chu
40542984cd
Added some reference comments for ldap_utf8_charlen2
2002-01-15 09:01:44 +00:00
Howard Chu
2d51ad52b3
Added LDAP_UTF8_CHARLEN2() to validate shortest possible encoding
...
of UTF8 string. (Returns charlen if valid, 0 if not.)
2002-01-15 08:07:46 +00:00
Howard Chu
19f3ba216f
Fix ldap_utf8_lentab to detect illegal two-byte sequences.
2002-01-15 03:31:37 +00:00
Pierangelo Masarati
bde71e45f9
fix format
2002-01-14 19:48:09 +00:00
Pierangelo Masarati
36f6a1169a
make temporary RDN and AVA arrays rescalable if needed
2002-01-14 19:44:04 +00:00
Pierangelo Masarati
9d6ebd822e
fix typo
2002-01-14 19:42:59 +00:00
Pierangelo Masarati
2ee2e7a145
quick fix that in pretty mode escapes with hexpair the specials ',', '+' and '\'
2002-01-14 19:33:13 +00:00
Pierangelo Masarati
7887ef7e92
revert previous commit: do accept '\00'
2002-01-14 11:09:14 +00:00
Pierangelo Masarati
3a6676a082
accept '\<special>' anywhere in the string
2002-01-14 10:50:02 +00:00
Pierangelo Masarati
c4164193ad
fix behavior on improperly escaped illegal hexpair; do not accept '\00'
2002-01-14 09:56:54 +00:00
Howard Chu
923e64156d
More cleanup in ldap_pvt_tls_destroy()
2002-01-12 02:31:41 +00:00
Howard Chu
07119f7342
Fix ldap_start_tls_s, don't check for TLS present on a non-existent sockbuf
2002-01-12 02:25:22 +00:00
Kurt Zeilenga
dffb050d81
Remove lint
2002-01-10 05:30:23 +00:00
Howard Chu
627d354b98
For Windows, use getsockopt() to retrieve error if connect() fails.
...
Don't use ldap_pvt_is_socket_ready() at all on Windows, it is
totally unneeded and getpeername() misbehaves on W2K.
2002-01-10 05:12:11 +00:00
Kurt Zeilenga
f80b4ad53e
Minor const'ification cleanup
2002-01-08 20:24:56 +00:00
Kurt Zeilenga
962e351271
Minor cleanup
2002-01-07 21:22:38 +00:00
Kurt Zeilenga
c4902e88d5
Don't unlock if we've never locked.
2002-01-07 20:18:38 +00:00
Pierangelo Masarati
e5f503c24a
Passes last test (empty value); also passes many of the invalid DN tests if liberal parsing is allowed
2002-01-07 15:23:23 +00:00
Pierangelo Masarati
e15aa7b682
fix non-printable flag detection; improve dn test (passes all but last in http://www.openldap.org/ietf/ldapbis/dn.txt )
2002-01-07 15:10:50 +00:00
Pierangelo Masarati
23cd7e837a
fix domain generation for UFN
2002-01-07 13:16:53 +00:00
Kurt Zeilenga
0c36372134
Some memory allocation cleanup.
2002-01-06 02:18:37 +00:00
Kurt Zeilenga
c36352c173
Misc allocator cleanup
2002-01-05 19:38:54 +00:00
Howard Chu
bbee3551b8
Fix for Windows, don't call gethostbyname until WSAStartup has occurred.
2002-01-04 23:10:48 +00:00
Kurt Zeilenga
0e2af54a3f
Update copyright statements
2002-01-04 21:17:25 +00:00
Kurt Zeilenga
72eb26180f
Another minor filter fix (unescaped *)
2002-01-04 20:36:41 +00:00
Kurt Zeilenga
96138a8424
Fix ) in value handling
2002-01-04 05:37:19 +00:00
Kurt Zeilenga
6c80cfb2e8
Use LDAP_FREE not free
2002-01-04 03:53:13 +00:00
Kurt Zeilenga
11175ed95e
Some misc cleanup
2002-01-04 03:50:54 +00:00
Kurt Zeilenga
6fc8c3ff4e
Fix attribute description checks
2002-01-04 00:45:05 +00:00
Howard Chu
da00e5dac1
Use LDAP_FREE instead of free
2002-01-03 23:30:45 +00:00
Kurt Zeilenga
1d4e2342d2
Add LBER DN format flag (no code yet).
...
Return API result codes, not protocol result codes.
2002-01-03 20:06:29 +00:00
Kurt Zeilenga
789b81aa75
Misc cleanup
2002-01-03 20:05:29 +00:00
Kurt Zeilenga
fdb62b5650
Even larger TMP_SLOTS
2002-01-03 19:45:34 +00:00
Kurt Zeilenga
dedc7588c9
We'll need queue macros in -llber...
2002-01-03 00:49:52 +00:00
Kurt Zeilenga
73b2d62bcd
Fix queue.h include
2002-01-03 00:39:09 +00:00
Kurt Zeilenga
81d2a0f289
fix empty substrings any bug
2002-01-02 23:03:37 +00:00
Howard Chu
fca5613e98
Hide (make static) sb_bio_method and tls_sbio structures. They're
...
already completely hidden by accessor functions.
2002-01-02 22:29:11 +00:00
Howard Chu
cc60686c0d
Renamed parse_numericoid to ldap_int_parse_numericoid since it is
...
no longer static. Moved declaration to ldap-int.h and removed extern
from getdn.c
2002-01-02 21:59:26 +00:00
Kurt Zeilenga
ccc4d0d5ae
Fix extensible filters
2002-01-02 20:31:21 +00:00
Kurt Zeilenga
490ac259f4
Fix escape bug
2002-01-02 20:05:48 +00:00
Kurt Zeilenga
2931cec6c0
Fix stupid bug in last commit
2002-01-02 18:16:09 +00:00
Pierangelo Masarati
1f49164725
fix missing trailing ')'
2002-01-02 17:38:46 +00:00
Kurt Zeilenga
772b7760b8
New filter code
2002-01-02 17:10:21 +00:00
Kurt Zeilenga
3ecc6b8b2c
Add filter.c
2002-01-02 17:08:42 +00:00
Kurt Zeilenga
763c0de59b
Rework filter code
...
Misc cleanup / lint removal
2002-01-02 17:06:56 +00:00
Howard Chu
81e9e86861
Fix ldap_str2rdn, make sure to update progress pointer; don't
...
free attrType since we never allocate it
2002-01-02 09:59:37 +00:00
Howard Chu
b92710e3a5
Minor cleanup
2001-12-31 06:44:36 +00:00
Howard Chu
b7be022824
Minor fix for LDAP_DN_IS_RDN_DC macro
2001-12-30 23:10:31 +00:00
Howard Chu
776ce133e9
More str2rdn tweaks
2001-12-30 09:42:58 +00:00
Howard Chu
5d28b4555e
Reorganize LDAPAVA allocation layout
2001-12-30 06:56:57 +00:00
Pierangelo Masarati
754470162d
remove useless function
2001-12-29 12:13:11 +00:00
Howard Chu
a191392e2e
Changed LDAP_AVA struct berval * to struct berval.
2001-12-29 10:35:24 +00:00
Howard Chu
60510c5e39
Fix memory leak in ldap_explode_dn
2001-12-29 06:37:20 +00:00
Howard Chu
729fe56698
Made LDAP_UTF8_CHARLEN/ldap_utf8_charlen table-driven.
2001-12-29 02:57:32 +00:00
Pierangelo Masarati
2f3f7c6765
ldap_str2rdn() can parse without allocating a LDAPRDN* (not very clean, though); used by dn_rdnlen
2001-12-28 12:50:48 +00:00
Howard Chu
4d7e904404
Added ldap_dn2bv and ldap_rdn2bv
2001-12-28 10:03:39 +00:00
Howard Chu
06b350c04c
Moved WSAStartup/WSACleanup to libldap/init.c. Cleanup occurs in the
...
internal atexit handler.
2001-12-28 06:12:17 +00:00
Kurt Zeilenga
c214a13a59
Works... now to test our filter parser!
2001-12-28 04:33:57 +00:00
Kurt Zeilenga
bf5fc54473
Add ftest (filter test) to the mix, needs work.
...
Misc cleanup of other tests.
Add *.dsp files for tests
2001-12-28 03:39:05 +00:00
Kurt Zeilenga
52a354f753
Mark more stuff as deprecated and remove some unused deprecated
...
routines.
2001-12-27 23:01:17 +00:00
Pierangelo Masarati
1f8e4d3884
cleanup
2001-12-27 13:54:22 +00:00
Kurt Zeilenga
cddf7e0e00
More struct berval DN changes
...
decrease dependency on dn_validate/dn_normalize
2001-12-27 07:13:13 +00:00