Pierangelo Masarati
de79a7bfec
rework API functions to create/parse controls; add client API functions to handle RFC2696 paged results (ITS#4314; patch from Hans Leidekker with changes)
2006-01-08 22:03:30 +00:00
Kurt Zeilenga
bca31173d8
Update (and rename) Sort and VLV parse routines to expect actual
...
control to be directly passed in.
2006-01-08 19:34:01 +00:00
Kurt Zeilenga
8ab4786ef2
correct typo
2006-01-08 19:11:57 +00:00
Kurt Zeilenga
d88f4e8197
cleanup
2006-01-08 17:11:15 +00:00
Pierangelo Masarati
339b9c371e
rfc2589 support (ITS#4293)
2006-01-06 17:46:52 +00:00
Howard Chu
d1693d4a07
ITS#3950 tweak prev commit, s/REPLACE_SCHED_YIELD/REPLACE_BROKEN_YIELD/
2006-01-06 06:07:36 +00:00
Kurt Zeilenga
f5fd375d38
i before e and other cleanup
2006-01-06 05:50:51 +00:00
Kurt Zeilenga
21d15546d3
Make use of nanosleep/select as a sched_yeild(2) replacement
...
conditional on REPLACE_SCHED_YEILD. Configure support
needed.
2006-01-06 05:22:35 +00:00
Howard Chu
69179a5c44
ITS#3950 use select instead of yield when select does the right thing.
2006-01-06 01:02:00 +00:00
Kurt Zeilenga
acbb5cf689
Happy new year!
2006-01-03 23:11:52 +00:00
Kurt Zeilenga
cdbbed6c3b
improve LDAP_OTHER description
2006-01-03 19:45:26 +00:00
Pierangelo Masarati
0e6f61aa03
fix leaks in ldap_parse_passwd()
2006-01-02 13:27:29 +00:00
Pierangelo Masarati
ad4a21f1a4
cleanup time unparsing (don't add trailing 0s if other multiples have already been used)
2006-01-02 08:14:55 +00:00
Pierangelo Masarati
eb734a167b
add severity-aware logging (ITS#4282)
2005-12-27 16:29:37 +00:00
Pierangelo Masarati
283f79c268
improve previous commit (one line, use buffer and truncate if required)
2005-12-16 12:18:55 +00:00
Pierangelo Masarati
3edbd4fee7
log attrs
2005-12-15 19:12:09 +00:00
Pierangelo Masarati
fcda57e90f
use macros instead of numbers...
2005-12-13 20:11:26 +00:00
Pierangelo Masarati
73acecaf0f
cleanup
2005-12-13 15:53:10 +00:00
Howard Chu
341ac2a066
Fix prev commit again, relative paths are legal.
2005-11-26 22:34:23 +00:00
Howard Chu
b4b8f12439
ITS#4221 fix -r1.6
2005-11-26 21:56:58 +00:00
Kurt Zeilenga
71cf424b77
unifdef -DLDAP_SCOPE_SUBORDINATE
2005-11-26 06:35:36 +00:00
Pierangelo Masarati
f86543c770
cleanup filter escaping
2005-11-25 12:16:27 +00:00
Pierangelo Masarati
6ab23ef926
add more versatile private API for filter escaping
2005-11-25 10:41:33 +00:00
Pierangelo Masarati
c655139449
fix ldap_bv2escaped_filter_value() according to <draft-ietf-ldapbis-filter>
2005-11-25 01:12:32 +00:00
Pierangelo Masarati
d34fffcaf9
use lutil_ato*() whenever appropriate
2005-11-24 01:10:05 +00:00
Kurt Zeilenga
ec24e6293f
Another getpeerucred(3) fix.
2005-11-23 19:41:28 +00:00
Kurt Zeilenga
dc98982397
cleanup last commit
2005-11-23 19:40:08 +00:00
Kurt Zeilenga
7468c7fb58
Support Solaris 10's getpeerucred(3) (*** blind commit ***)
2005-11-23 18:55:31 +00:00
Kurt Zeilenga
54a921caa9
s/ACCRIGHTS/ACCRIGHTSLEN/
2005-11-23 18:47:52 +00:00
Kurt Zeilenga
c5c5a7f19b
s/ACCRIGHTS/ACCRIGHTSLEN/
2005-11-23 18:22:02 +00:00
Pierangelo Masarati
25fe62efde
add support for error-handling number/time parsing functions; need to replace ato{il}/strto[u]l throughout the code
2005-11-23 12:46:33 +00:00
Pierangelo Masarati
1ce491e4f4
fix library checks; implement client side of "touch" modify (ITS#4183)
2005-11-20 14:17:37 +00:00
Pierangelo Masarati
af23be3675
silence warnings...
2005-11-14 21:47:17 +00:00
Hallvard Furuseth
6a778f99f5
Fix lutil_memrchr():
...
Avoid void* pointer arithmetic.
Convert int c to unsigned char, so c=<negative char value> will match.
Do not decrement pointer below start of array (even when value is not used).
2005-11-14 15:40:01 +00:00
Pierangelo Masarati
474dfbc8fd
don't trust strchr/strrchr with bervals
2005-11-13 22:26:53 +00:00
Pierangelo Masarati
4a6f4369c0
don't malloc empty strings for matched, error
2005-11-12 18:42:03 +00:00
Howard Chu
10c94f4e58
Cleanup lbo_valid / meminuse / memfuncs
2005-11-12 18:26:17 +00:00
Howard Chu
146b2c5389
ITS#4082 tls ctx requirements are only applicable to servers, or clients
...
with tls_opt_require_cert = TRY or DEMAND. Ignore requirements for clients.
2005-11-08 13:42:10 +00:00
Pierangelo Masarati
5be72fe816
don't allow '{' in TK_BAREWORD (ITS#4116)
2005-11-07 22:53:43 +00:00
Pierangelo Masarati
a6453f28f8
silence warnings
2005-11-06 23:27:09 +00:00
Kurt Zeilenga
4f63434511
Improve SASL error handling
2005-11-06 22:43:23 +00:00
Pierangelo Masarati
e1a7fa2ee9
fix ldap_bv2escaped_filter_value
2005-11-06 11:41:42 +00:00
Howard Chu
d67a2f2044
Move lconn_tls_ctx to ldo_tls_ctx. Otherwise clients cannot set it after
...
ldap_initializ'ing an LD and before connecting on it. Really all of the
global TLS options belong in the ldapoptions struct, instead of static vars.
2005-11-05 12:49:43 +00:00
Pierangelo Masarati
f571f4b2b4
fix previous commit
2005-11-03 20:11:22 +00:00
Pierangelo Masarati
561cd3d845
don't leak hostname
2005-11-03 15:17:48 +00:00
Pierangelo Masarati
3aca011938
fix previous commit
2005-11-03 11:42:44 +00:00
Pierangelo Masarati
fde95747cb
plug leaks
2005-11-03 10:56:49 +00:00
Pierangelo Masarati
4e5eb991eb
plug (one time?) leaks
2005-11-03 10:52:58 +00:00
Kurt Zeilenga
ecd86725f2
Update result code to IANA-assigned values
...
Provide some backwards compatibility.
Misc cleanup
2005-11-03 01:27:07 +00:00
Howard Chu
6fcfaedf90
ITS#4137 was returning with tls_def_ctx_mutex locked.
2005-11-02 23:43:19 +00:00
Kurt Zeilenga
461ed37970
cleanup
2005-11-01 20:33:49 +00:00
Pierangelo Masarati
9c056f95fe
consistently use HSTRERROR (ITS#4124)
2005-10-31 15:04:37 +00:00
Howard Chu
f80e9d11fa
Fix prev commit, spawns unnecessary threads.
2005-10-28 10:31:21 +00:00
Howard Chu
4ebed09d81
ITS#4017, additional revisions for DH parameters
2005-10-28 05:35:19 +00:00
Howard Chu
71514ffb92
Fix pool_submit, create threads as long as we're under the max count.
2005-10-27 21:55:18 +00:00
Kurt Zeilenga
551d94c6e8
Additional serverSaslCred trace messages.
...
Misc. cleanup
2005-10-20 03:49:22 +00:00
Howard Chu
5e416949e0
Fix ldapi DN ordering
2005-10-17 12:57:53 +00:00
Pierangelo Masarati
d277c5b3d6
silence SLAP_SEM_LOAD_CONTROL related warnings...
2005-10-16 08:58:06 +00:00
Kurt Zeilenga
533394d641
disable SLAP_SEM_LOAD_CONTROL by default, needs additional review/work
...
Misc. other cleanup
2005-10-16 00:17:58 +00:00
Kurt Zeilenga
279033fc1c
ITS#3440: (blind) fix for VxWorks inet_ntoa(3) leak,
...
use inet_ntoa_b(3) instead.
2005-10-14 03:40:03 +00:00
Kurt Zeilenga
408fa06f95
missed \
2005-10-13 06:53:32 +00:00
Kurt Zeilenga
a534d5fb6b
Add ldap_bv2escaped_filter_value (ITS#2535)
2005-10-13 06:35:28 +00:00
Kurt Zeilenga
6db7e605ee
Align Operation buffers using LBER_ALIGNED_BUFFER
2005-10-12 23:17:28 +00:00
Kurt Zeilenga
0ea43c9d7d
Assume TLS is properly configured if any one of
...
keyfile, certfile, cacertfile, or cacertdir is
provided. Note that TLS can be properly configured
without any of these when non-X.509 cipher suites
are used, so this might have be rethought.
2005-10-12 20:31:04 +00:00
Howard Chu
bb3c3f654f
Fix typo
2005-10-12 00:31:05 +00:00
Howard Chu
f18c63fa13
Add LDAP* to debug messages to aid tracking
2005-10-12 00:23:30 +00:00
Howard Chu
e8b1b004d4
Fix ITS#3832 must mutex protect ld->ld_conns
2005-10-12 00:05:43 +00:00
Howard Chu
f54bc26357
ITS#4072 ldap_pvt_tls_init_def_ctx() returns LDAP_NO_SUPPORT if not
...
sufficiently configured. Update slapd/slurpd to act appropriately.
2005-10-09 19:55:39 +00:00
Howard Chu
2ea5a66be2
ITS#2942 skip referrals that we've already chased
2005-10-09 10:01:38 +00:00
Howard Chu
a8a23840b8
Simplify lm_chain_tail handling, support LDAP_MSG_RECEIVED
...
Drop support for LDAP_MORE_RESULTS_TO_RETURN
2005-10-08 18:51:14 +00:00
Howard Chu
fc79957ad6
Don't set ndelay on socket connect if no timeout was specified
2005-10-08 18:19:50 +00:00
Howard Chu
9095af5928
ITS#4017 support Diffie-Hellman parameters for multiple key lengths
2005-10-05 20:01:52 +00:00
Howard Chu
c82ae524b9
Make time counter zero based
2005-10-05 15:45:22 +00:00
Pierangelo Masarati
385aebc806
plug potential ld_error leak (ITS#4064)
2005-10-04 21:30:30 +00:00
Howard Chu
a0f6fdb730
ITS#4048 plug leak
2005-09-30 06:20:56 +00:00
Howard Chu
d918bd4dc0
ITS#4053 free cldap peer address
2005-09-30 06:04:38 +00:00
Kurt Zeilenga
9449c5709e
ITS#4021: add new {CLEARTEXT} kludge as bv_len=0 kludge no
...
longer works well.
2005-09-29 20:30:09 +00:00
Howard Chu
0f9ad702c3
ITS#4046 fix recvfrom len
2005-09-28 08:36:24 +00:00
Howard Chu
8c3e9ddb1c
avl_delete...
2005-09-26 08:57:19 +00:00
Howard Chu
4c89b0e80c
Tweak branches in avl_find
2005-09-26 08:21:10 +00:00
Howard Chu
dee98ccd47
Replace avl_insert/delete with iterative version
2005-09-26 08:15:55 +00:00
Howard Chu
53833c6ae6
Fix tavl_delete
2005-09-26 08:15:37 +00:00
Hallvard Furuseth
55fa9241a4
Remove unused variable
2005-09-26 04:36:19 +00:00
Howard Chu
3a018600d3
Revert prev commit
2005-09-23 06:27:16 +00:00
Howard Chu
e840a34fef
Fix end conditions for tavl_end and tavl_next
2005-09-23 06:25:13 +00:00
Howard Chu
0951e71df4
tavl_delete: copy balance factor
2005-09-22 01:16:28 +00:00
Howard Chu
495f7e5629
tavl_delete - swap whole structures, not the data pointers.
2005-09-21 19:18:40 +00:00
Howard Chu
fcac0626ad
Fix tavl_delete threading
2005-09-21 15:19:36 +00:00
Howard Chu
ecc5186955
Add testtavl, add tavl_end and tavl_next. tavl_delete still needs work.
2005-09-21 14:45:35 +00:00
Howard Chu
cbb86907a2
Add threaded AVL functions
2005-09-21 11:27:14 +00:00
Hallvard Furuseth
123948bd5e
Add thread debugging wrapper thr_debug.c and ldap_thr_debug.h in libldap_r/,
...
enabled with LDAP_THREAD_DEBUG (cpp macro and environment variable):
Move any ldap_pvt_* definitions from ldap_int_thread.h to ldap_pvt_thread.h.
#define ldap_int_thread_equal/ldap_pvt_thread_equal instead of tpool.c:TID_EQ.
Define some ldap_debug_*_t types, and LDAP_UINTPTR_T, in ldap_int_thread.h.
ldap_int_thread.h/ldap_pvt_thread.h can now be included multiple times, giving
different results depending on whether libldap_r/ldap_thr_debug.h was included.
Add some cleanup and some preprocessor hacks.
#define LDAP_THREAD*_IMPLEMENTATION in libldap_r/*.c, used by ldap_thr_debug.h.
Add PTHREAD_MUTEX_ERRORCHECK/PTHREAD_MUTEX_ERRORCHECK_NP in thr_posix.c.
2005-09-17 23:28:08 +00:00
Pierangelo Masarati
f8d49b01be
address ITS#4023
2005-09-16 18:12:57 +00:00
Howard Chu
2807a2596b
Simplify array operations
2005-09-13 07:51:51 +00:00
Hallvard Furuseth
f9a6f7c41a
Format fixes. #include <ac/ctype.h>. Cast isspace() arg to unsigned char.
2005-09-13 03:32:19 +00:00
Pierangelo Masarati
52cf1f5f0a
cleanup
2005-09-10 19:20:14 +00:00
Pierangelo Masarati
9129a2f7ee
silence warnings
2005-09-10 18:59:35 +00:00
Howard Chu
6be50f1b0f
ITS#4006 add stub for ldap_pvt_thread_pool_context_reset()
2005-09-06 22:11:26 +00:00
Howard Chu
595169b64f
Fix XXHEADERS dependency
2005-09-04 15:23:35 +00:00
Kurt Zeilenga
c6e4254b8f
Fix multicast bit
2005-09-04 09:01:46 +00:00
Pierangelo Masarati
6aa5b4f775
address ITS#3925; please test
2005-09-01 01:59:36 +00:00
Pierangelo Masarati
fe4b006e17
wait also if PAUSING; silence warnings and improve readability with gdb
2005-09-01 01:54:00 +00:00
Hallvard Furuseth
2e19c67235
Handle LDAP_INT_GLOBAL_OPT() failure in ldap_int_destroy_global_options()
2005-08-31 18:59:27 +00:00
Howard Chu
4cc7efdadc
Revert ITS#3577 patch, breaks Windows build and not needed in RE23.
2005-08-26 02:20:45 +00:00
Kurt Zeilenga
f07015dad2
Update build tools based upon OPENLDAP_AC work
2005-08-25 20:09:26 +00:00
Howard Chu
6cfcae11f2
Improve check for schemes vs cleartext passwords
2005-08-24 03:52:00 +00:00
Howard Chu
1f78e2b831
ITS#3961 better fix - provide a context for the main thread. The context
...
must be reset by the caller to clear out temp allocations etc.
2005-08-23 04:12:57 +00:00
Howard Chu
468112e2ba
ITS#3961 provide ldap_pvt_thread_pool_fake_context_init/destroy, don't
...
use arbitrary context pointers.
2005-08-23 03:25:21 +00:00
Pierangelo Masarati
21e33fed33
treat TRUE/FLASE like SUCCESS; don't chase "" referrals
2005-08-22 09:41:36 +00:00
Pierangelo Masarati
f5737d72b0
cosmetic changes (easier to inspect under gdb)
2005-08-20 19:54:56 +00:00
Pierangelo Masarati
3dd05cdb2d
fix SASL numeric secprops parsing (ITS#3955)
2005-08-20 14:22:42 +00:00
Pierangelo Masarati
52ce57f525
don't try to print NULLs on Solaris...
2005-08-19 15:47:52 +00:00
Pierangelo Masarati
7732236996
plug yet another one-time leak
2005-08-19 15:05:03 +00:00
Pierangelo Masarati
a0e46c6289
allow oidmacros in syntax (e.g. AD)
2005-08-18 23:34:10 +00:00
Pierangelo Masarati
a324dc8050
clear code before calling functions that may modify it
2005-08-18 18:48:02 +00:00
Pierangelo Masarati
e441f32374
little bit easier to track from inside gdb...
2005-08-18 13:38:59 +00:00
Pierangelo Masarati
90255dfc42
back out fix to ITS#3932
2005-08-17 08:32:47 +00:00
Pierangelo Masarati
4f5502ef9f
rework internal functions - need the parsed list of URIs before massaging; no impact on exposed funcs
2005-08-17 07:50:28 +00:00
Pierangelo Masarati
388c076768
fix ITS#3932 - regex/rewrite concurrency issue
2005-08-13 18:43:20 +00:00
Kurt Zeilenga
f799a2e4ba
replace struct msghdr macros
2005-08-13 02:17:12 +00:00
Kurt Zeilenga
77173d35e9
Replace PW_GECOS/PASSWD macros
2005-08-12 22:28:17 +00:00
Pierangelo Masarati
3638b6c722
solve a deadlock during unbind: ldap_send_unbind() is called by ldap_free_connection() only, and just in case the last arg is not 0; but most of the times ldap_free_connection() is called with ld_req_mutex locked, so it shouldn't be locked again from inside ldap_send_unbind()
2005-08-11 17:11:41 +00:00
Pierangelo Masarati
b3f366e0ba
essentially address 3791 with a reworked patch
2005-08-11 15:13:29 +00:00
Pierangelo Masarati
ad62d9da1b
expose ldap_tls_inplace()
2005-08-11 12:14:24 +00:00
Pierangelo Masarati
228af40058
cleanup
2005-08-11 12:13:43 +00:00
Hallvard Furuseth
d50820cdd6
Read LDAPResult.resultCode & ModifyRequest.modification.operation
...
and send SortResult.sortResult as BER ENUMERATED, not BER INTEGER.
libldap: ldap_parse_extended_result, try_read1msg, build_result_ber,
ldap_parse_sasl_bind_result. slapd: do_modify, send_ldap_controls.
2005-08-10 00:54:38 +00:00
Pierangelo Masarati
a3a9bb9bfa
little more about potential concurrency issues
2005-08-03 16:54:08 +00:00
Hallvard Furuseth
d47eaa0ecc
Fix printf formats for LDAP_MEMORY_TRACE
2005-08-02 14:08:30 +00:00
Howard Chu
834f1bd253
ITS#3578 increment parent's referral count
2005-08-02 11:24:52 +00:00
Hallvard Furuseth
b295d66a2c
assert expects int. (int)<nonnull ptr/long> can be 0. Use assert(arg!=0/NULL).
2005-08-02 10:57:42 +00:00
Pierangelo Masarati
01dc0183a3
plug leaks; cleanup
2005-08-01 23:35:44 +00:00
Hallvard Furuseth
f9e505727e
Plug memory leaks - free() controls in LDAP*
2005-08-01 03:51:53 +00:00
Hallvard Furuseth
5c5a834db8
Handle LBER_SB_OPT_[GS]ET_FD arg as ber_socket_t like elsewhere, not as int.
2005-08-01 03:48:53 +00:00
Hallvard Furuseth
d49a477702
Cleanup
2005-07-31 18:05:51 +00:00
Pierangelo Masarati
5ff31144a7
cleanup
2005-07-30 16:26:25 +00:00
Hallvard Furuseth
fbce398466
Also declare copy_hostent() if LDAP_R_COMPILE && HAVE_GETHOSTBYADDR_R.
...
Only declare safe_realloc() if LDAP_R_COMPILE.
Indentation cleanup.
2005-07-26 04:21:19 +00:00
Hallvard Furuseth
2340954bd0
lmPasswd_to_key() arg1 was passed char*. Change it to that from unsigned char*.
2005-07-25 21:01:06 +00:00
Pierangelo Masarati
7fade0d585
(yet) another potential concurrency issue
2005-07-23 22:04:04 +00:00
Hallvard Furuseth
f0091b101f
Cast LDAP_BOOL value to LDAP_BOOLEANS; it could only use flags fitting in int.
2005-07-22 13:24:47 +00:00
Pierangelo Masarati
aa0b0f642f
don't malloc when not required?
2005-07-21 19:10:16 +00:00
Pierangelo Masarati
1b11741a30
mostly revert previous commit
2005-07-20 19:26:46 +00:00
Pierangelo Masarati
c789d494c4
allow to unregister (and free) memory handling functions
2005-07-20 19:07:04 +00:00
Hallvard Furuseth
81ecb0b153
assert expects int. (int)<nonnull ptr/long> can be 0. Use assert(arg!=0/NULL).
2005-07-18 06:22:33 +00:00
Hallvard Furuseth
f43a823c73
Add missing "static" for functions declared static but defined non-static
2005-07-18 05:14:41 +00:00
Hallvard Furuseth
ab1ef34c51
size_t peercredlen -> socklen_t peercredlen in #if defined(SO_PEERCRED)
2005-07-18 04:42:28 +00:00
Hallvard Furuseth
bf1d1a84bd
Remove unused type: struct token
2005-07-17 11:53:35 +00:00
Pierangelo Masarati
19c1c6d671
some (stupid) editors complain because 'new' is a reserved word in C++
2005-07-16 15:38:33 +00:00
Pierangelo Masarati
5e84975adf
paranoid check
2005-07-16 15:37:01 +00:00
Pierangelo Masarati
e790055467
be liberal: accept empty oid lists
2005-07-15 00:46:30 +00:00
Hallvard Furuseth
d449c9d08b
Silence "unused variable" warnings
2005-07-14 19:18:55 +00:00
Hallvard Furuseth
3d8aceab81
Fix typos GETNAMEINFO->HAVE_GETNAMEINFO, HAVE_HERROR->HAVE_HSTRERROR
2005-07-14 19:17:05 +00:00