Pierangelo Masarati
761f287943
multiple precision with BIGNUM/gmp/ulong
2004-09-26 22:58:47 +00:00
Pierangelo Masarati
55e251e6e8
lots of cleanup; few improvements; fix RDN selection bug when creating connection dynamic entries; rework entries ordering - now it's more intuitive and regular; optimize counters update
2004-09-12 22:12:58 +00:00
Pierangelo Masarati
a637926bf2
use GMP for multiple precision in counters
2004-09-11 16:15:53 +00:00
Kurt Zeilenga
d611a4b49a
unifdef -UNEW_LOGGING
2004-09-04 04:54:28 +00:00
Luke Howard
2316461b93
Remove unused variable
2004-08-25 12:31:43 +00:00
Luke Howard
ea6f5bad65
This patch fixes some subtle interactions between SLAPI and syncrepl. Due to
...
SLAPI always assigning connection and operation IDs of zero for internal
operations, such operations would cause a stale contextCSN to be returned from
slap_get_commit_csn(). As a result, SLAPI internal updates would be invisible
to replicas until an external update was made. Also, SLAPI internal operations
never called slap_graduate_commit_csn() which leaked pending CSNs.
Also included in this patch is a general cleanup of some of the SLAPI code.
Note that we need to use a separate mutex on conn_nextid to avoid a deadlock
where a post-operation plugin tries to acquire connections_mutex, having locked
the per-connection mutex, while the listener thread tries to acquire the
per-connection mutex (having locked connections_mutex). connection.c needs to
be fixed to acquire mutexes in the same order.
2004-08-25 11:52:55 +00:00
Pierangelo Masarati
bde0761a04
should fix ITS#3265
2004-08-12 10:33:49 +00:00
Pierangelo Masarati
cd9a9c628d
frontend stuff moved into a database structure, essentially to allow overlays to be processed before database selection; passes all tests (ITS#3080)
2004-07-26 21:26:34 +00:00
Kurt Zeilenga
7a6b0857b6
cleanup
2004-06-29 23:52:18 +00:00
Kurt Zeilenga
e5a37f2125
SLAPD_DISCONNECT v -1 cleanup
...
misc other cleanup
2004-06-23 01:04:52 +00:00
Kurt Zeilenga
4e6ed7072d
cleanup
2004-06-22 19:49:00 +00:00
Pierangelo Masarati
528b6c7e25
clear pagedresults_state if reusing an inactive connection; prepare for more consistent behavior of pagedResults control
2004-06-21 21:31:55 +00:00
Howard Chu
9b38cd2572
ITS#3109 - added slap_tls_ctx
2004-04-26 01:10:49 +00:00
Kurt Zeilenga
1372965d89
ITS#3092: Rename sl_free() and friends to slap_sl_free()
2004-04-20 03:44:57 +00:00
Kurt Zeilenga
44725e7303
use BER_BVNULL
2004-04-07 04:11:43 +00:00
Howard Chu
81df94acaa
Silence warning
2004-03-24 10:47:31 +00:00
Kurt Zeilenga
5ff057089b
cleanup
2004-03-17 22:14:32 +00:00
Howard Chu
2821d0bdd6
Add connection_fake_init()
2004-03-17 19:33:13 +00:00
Kurt Zeilenga
3e586bd393
cleanup
2004-03-14 00:59:37 +00:00
Howard Chu
cdeda34029
Add c_conn_idx, to simplify external modules managing per-connection state
2004-03-12 18:22:37 +00:00
Kurt Zeilenga
5d0f6e75b4
Don't defer abandon due to pending
2004-02-10 00:17:21 +00:00
Kurt Zeilenga
3c1b2ed9cb
ITS#2959: provide reason for deferring operation in log message
...
Also, took away abandon operations blank check against deferment.
Abandon must be deferred in some cases (such as when other operations
are pending) and should be deferred in some other cases (such as too
many threads).
2004-02-09 21:33:21 +00:00
Howard Chu
bb1a97544d
ITS#2921, fix client connection handling for HAVE_WINSOCK
2004-01-15 20:20:17 +00:00
Kurt Zeilenga
3c598e89fb
Happy new year
2004-01-01 19:15:16 +00:00
Kurt Zeilenga
fcad25da47
Misc code cleanup
2003-12-29 22:25:43 +00:00
Luke Howard
0549d46adf
Don't require slapi to be in the path - always include slapi/slapi.h
2003-12-28 04:17:48 +00:00
Kurt Zeilenga
e9133952fb
Move experimental built-in SASL behind SLAP_BUILTIN_SASL macro
2003-12-18 20:01:47 +00:00
Kurt Zeilenga
9647ccd945
Completely untested built-in EXTERNAL implementation
...
Needs identity mapping and proxy authorization support
2003-12-18 06:52:39 +00:00
Luke Howard
516fd0ff50
First round of SLAPI cleanups - use slapi_int_XXX for internal functions
...
(slapi_x_XXX is still reserved for exported functions that are not part
of the SLAPI specification)
2003-12-16 15:49:31 +00:00
Kurt Zeilenga
4bedf015f0
cleanup
2003-12-13 18:57:00 +00:00
Kurt Zeilenga
38ccdaf7a3
unifdef -DLDAP_CONTROL_PAGEDRESULTS (as it is always defined)
2003-12-08 18:16:07 +00:00
Howard Chu
74db966ebb
Move SLAB_SIZE def to slap.h
2003-12-06 22:30:45 +00:00
Hallvard Furuseth
e491e9e522
Cleanup: Remove unused label 'no_co_op_free:' in connection_operation().
2003-11-30 16:14:40 +00:00
Kurt Zeilenga
4e15a84452
Updated notices
2003-11-27 01:17:14 +00:00
Howard Chu
b179e05ea1
For previous, assert (writewaiter==0) in conn_destroy too.
2003-11-20 00:54:46 +00:00
Howard Chu
86c0f733a4
Cleanup prev commit, assert if writewaiter != 0 in init
2003-11-18 22:55:53 +00:00
Howard Chu
43a843dbf0
ITS#2832 init conn->c_writewaiter to 0
2003-11-18 22:18:33 +00:00
Kurt Zeilenga
99ba95ab92
cleanup
2003-11-18 22:11:11 +00:00
Jong Hyuk Choi
279760a467
1. Session history support
...
- memory based session history to minimize sync traffic
- when client is covered by a session history, then
[add+delete] mode is used
- when client cookie is not covered by the history because
the cookie is too outdated and/or the history is truncated,
[add+present] mode is used
2. Sync cookie syntax : comma separated name=value pairs
- csn=yyyymmddhh:mm:ssZ#0xSSSS#r#ssssr,sid=nnn
2003-11-10 02:44:25 +00:00
Kurt Zeilenga
bfafd42163
Code and logging cleanup
2003-11-06 03:42:46 +00:00
Howard Chu
5ed0318b79
Fix retry on failure
2003-10-25 22:07:31 +00:00
Howard Chu
782d1be0ad
Fix prev commit, don't timeout outbound connections
2003-10-25 21:14:07 +00:00
Howard Chu
08676eb49d
Add support for outbound connections in main listener.
...
Restructure syncrepl/persist to use outbound connection manager.
2003-10-24 12:57:24 +00:00
Howard Chu
df74409d97
Fix prev commit
2003-10-24 06:01:55 +00:00
Howard Chu
01f7a7466b
SLAPI fix - no-op when slapi_plugins_used == 0
2003-10-24 05:58:42 +00:00
Howard Chu
102d8159a7
ITS#2779, cache group ACLs per operation instead of per-connection
2003-10-23 01:23:45 +00:00
Howard Chu
7710791382
ITS#2684 keep psearch operations on the connection's active list so they
...
can be located by connection_abandon() during an unexpected close. Remove
the operations in bdb_abandon() etc.
2003-10-19 11:20:34 +00:00
Howard Chu
c9ef0da66b
Don't timeout slow-running operations
2003-09-27 05:36:20 +00:00
Jong Hyuk Choi
4495320839
move c->c_n_ops_executing/completed to the right place
2003-09-25 20:14:53 +00:00
Kurt Zeilenga
99f968b597
Initial support for pre/post read controls.
...
TODO:
Fix transactional consistency
Add client response control handling
2003-09-16 18:56:04 +00:00
Howard Chu
41957e5129
ITS#2649, never defer Abandon requests
2003-09-13 11:15:23 +00:00
Jong Hyuk Choi
090ac0a772
unifdef LDAP_SYNC and LDAP_SYNCREPL
2003-08-27 22:16:04 +00:00
Luke Howard
c9e134f0f7
Support for SLAPI plugin extensions API.
...
This API allows a plugin to associate arbitrary context with an
internal server object such as a connection or operation.
Some documentation is at:
http://enterprise.netscape.com/docs/directory/602/plugin/function.htm#1104211
2003-07-03 19:04:18 +00:00
Jong Hyuk Choi
262f8bf11f
LCUP primitive routines removed
2003-06-27 17:39:48 +00:00
Kurt Zeilenga
c249f3ac21
Fix vrFilter compile error
2003-06-10 03:30:14 +00:00
Kurt Zeilenga
12304f64e5
Merge partial and intermediate responses
2003-05-31 05:01:49 +00:00
Howard Chu
5d0ba372e5
Fix LBER_OPT_MEMCTX behavior
2003-05-28 22:17:08 +00:00
Howard Chu
f7d7700b6e
ITS#2549, init memctx to NULL. Also reset ber memctx to NULL when freeing.
2003-05-25 01:32:39 +00:00
Jong Hyuk Choi
7e7429267e
persistent search updates with recent changes
2003-05-20 20:21:39 +00:00
Hallvard Furuseth
6af256b8e1
Fix some Statslog()s: Add missing newlines. Print file descriptor as long.
2003-05-15 23:45:33 +00:00
Howard Chu
46e2b97757
ITS#2424 use two SASL contexts per session to conform to RFC 2222
2003-05-01 04:11:57 +00:00
Howard Chu
130f6e1b7d
Memory context tweaks for other ops
2003-04-12 10:47:11 +00:00
Howard Chu
280fc819cf
Memory context tweaks for Bind
2003-04-12 06:56:42 +00:00
Howard Chu
808cb504ce
More memory context tweaks
2003-04-11 03:57:10 +00:00
Howard Chu
ece7452b05
More memory context tweaks
2003-04-11 01:29:28 +00:00
Howard Chu
374d919fc0
More memory context tweaks
2003-04-10 06:21:53 +00:00
Howard Chu
f897519d11
Minor cleanups
2003-04-09 23:37:00 +00:00
Howard Chu
ebecca7379
Eliminate getkey search
2003-04-09 17:34:58 +00:00
Howard Chu
065116c3a3
Just use a fixed size slab for now
2003-04-09 17:05:46 +00:00
Howard Chu
813d5c8ed8
First cut at thread-local malloc. Only used by search() for now...
...
Needs work in normalizers, etc.
2003-04-09 16:52:03 +00:00
Pierangelo Masarati
5f342a8431
silence warning
2003-04-03 23:08:47 +00:00
Howard Chu
9355dca9af
Consolidated slap_callbacks into one function. Removed send_search_result.
2003-04-01 04:12:18 +00:00
Howard Chu
e8c58b4e7f
Major API change - (SLAP_OP_BLOCKS) All request parameters are
...
consolidated into the Operation structure. All reply parameters
are consolidated into the new SlapReply structure. Most operations
now have identical call signatures... Changes are not #ifdef'd,
revert to -r NO_SLAP_OP_BLOCKS if necessary to back out.
2003-03-30 09:03:54 +00:00
Howard Chu
3a71bddbc4
ITS#2389 - added conn_max_pending/auth config keywords to cap the number
...
of outstanding requests on a connection. Set rate limits for request
execution:
no connection can have more than maxthreads/2 ops executing at once.
a connection that is write-blocked will not execute any new ops.
queued ops must drain before any new ops can execute.
If the queue exceeds the max_pending limit, the connection is closed.
...also fixed a bug where a connection was not marked active if it never
received a Bind.
2003-03-27 03:35:46 +00:00
Howard Chu
a5a71d4e6c
Cleanup previous commit
2003-03-26 17:42:27 +00:00
Howard Chu
13aafa46d8
struct co_arg is redundant, removed
2003-03-25 18:44:00 +00:00
Howard Chu
a63b8908cd
ITS#2389 - stop reading requests on a conn if it has more than
...
connection_pool_max/2 operations already executing. May want to tune
this to a higher value, e.g. connection_pool_max - XX, etc. Fix in
result.c throttles the connection too late, all threads are already
consumed by the time the send buffer blocks.
2003-03-20 12:40:11 +00:00
Howard Chu
d18e0989d9
ITS#2382 use ch_calloc
2003-03-16 12:34:40 +00:00
Howard Chu
0423ec0bd6
Fix ITS#2335, RFC1798 sequence layout was wrong.
2003-02-28 13:04:16 +00:00
Howard Chu
507781eeb3
Partial fix of ITS#2335, restore proper CLDAP msg format for LDAPv2
2003-02-28 08:34:31 +00:00
Kurt Zeilenga
282f6bc32d
Cancel exop updates
2003-02-09 05:54:45 +00:00
Kurt Zeilenga
48d47954a6
Rework #ifdef'ing of expermental controls to ease release engineering
...
using LDAP_DEVEL (to indicate experimental) to enable experimental features
(true for HEAD unless LDAP_REL_ENG is defined)
2003-02-08 21:53:05 +00:00
Jong Hyuk Choi
85b1783d5c
LDAP Sync Operation (draft-zeilenga-ldup-sync) as a groundwork for an LDAP replication design
2003-02-05 07:37:02 +00:00
Jong Hyuk Choi
e1bf8cc437
Intermediate Response
2003-02-03 17:28:19 +00:00
Jong Hyuk Choi
4f64bd9402
LDAP cancel misc patch
2003-01-27 17:08:51 +00:00
Jong Hyuk Choi
0c43007e55
LDAP cancel operation
2003-01-25 00:36:50 +00:00
Luke Howard
eec370af52
LDAPv3 over UDP disposition is now compatible with Active Directory
...
Stubs for PermitModify/NoReferrals controls; implementation coming soon
2003-01-23 15:12:53 +00:00
Kurt Zeilenga
6939c53170
Happy new year
2003-01-03 20:20:47 +00:00
Howard Chu
870c3cb5c6
Revert previous, it was only masking the real problem. And caused more...
2002-12-17 04:56:41 +00:00
Howard Chu
b40e40ec3c
undef CONNECTION_INPUT_LOOP, use DATA_READY_LOOP. Seems to help prevent
...
hangs in heavy load situations.
2002-12-11 18:36:02 +00:00
Pierangelo Masarati
1b70e16448
SLAPI - Netscape plugin API for slapd - based on patch contributed by Steve Omrani <somrani@us.ibm.com> as ITS#2073
2002-12-07 17:19:29 +00:00
Howard Chu
322a800c26
Fix ITS#2157, server should never attempt to unlink the client's socket.
...
It likely has no name anyway, and the client owns it after all.
2002-10-26 22:41:26 +00:00
Jong Hyuk Choi
15c5943edd
Addition of servers/slapd/lcup.c and servers/slapd/back-bdb/lcup.c for persistent search
2002-10-25 17:57:03 +00:00
Jong Hyuk Choi
8074294f1d
LCUP persistent search code drop
2002-10-25 17:51:30 +00:00
Pierangelo Masarati
956f1d16aa
listener:
...
- use bervals for url and sockname
- pass connection_init() the listener struct pointer instead of each value
- don't copy them in the Connection struct 'cause they're not going to change
- define macros for legacy usage of c_listener_url and c_sockname
2002-10-24 10:03:52 +00:00
Kurt Zeilenga
3eb21d8a6c
Misc cleanup
2002-09-16 21:50:55 +00:00
Howard Chu
9f5b28baf3
Remove c_sasl_bindmutex, Binds are already serialized.
2002-08-26 22:20:30 +00:00
Kurt Zeilenga
1c5725010e
Add a Connection pointer to the Operation.
2002-08-26 19:29:34 +00:00
Howard Chu
925714ceef
Experimental cruft to propagate valid Operation to SASL callbacks.
...
If you have a better way, jupm on in...
2002-08-24 07:34:50 +00:00
Howard Chu
8c30114d84
Added thread-pool getkey/setkey functions
2002-08-24 05:39:43 +00:00
Howard Chu
50d490be6c
Revert previous commit
2002-08-07 06:37:11 +00:00
Howard Chu
6862cfd97c
Don't strdup conn->authz into op, just reference directly. (Conn cannot
...
be freed until after all associated ops are freed.)
2002-08-07 05:19:55 +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
0fffad53c3
get data if ready
2002-07-10 22:03:32 +00:00
Howard Chu
c5c1ddb1ca
Deleted Connection->c_cdn. Use conn->c_dn instead...
2002-06-12 08:38:59 +00:00
Kurt Zeilenga
d6e7f0f630
Rework c_authzid_backend in preparation for sasl_setpass() support
2002-06-11 22:56:47 +00:00
Howard Chu
ef678b179c
ITS#1795 authid is uninit'd if tls_get_cert fails
2002-05-04 01:28:56 +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
0f966d2fdb
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.
Changed dnX509peerNormalize as above. Added debug message on failure to
retrieve client DN.
2002-04-30 13:52:49 +00:00
Howard Chu
0aa7c83a0e
Fix memory leak in previous commit
2002-04-18 15:55:05 +00:00
Howard Chu
8a5423ea8d
deleted sasl_external_x509dn_convert; X509 DNs are always converted to
...
normalized LDAP DNs now.
Changed dnDCEnormalize to dnX509normalize, added dnX509peerNormalize,
based on new ldap_X509dn2bv() etc.
2002-04-18 12:26:36 +00:00
Howard Chu
efecf4e121
ITS#1733 eliminate o_abandonmutex
2002-04-11 08:03:40 +00:00
Howard Chu
5c4a924f81
ITS#1735 unused conn.c_uthc_backend, include ldap_pvt.h
2002-04-11 07:42:57 +00:00
Pierangelo Masarati
c22f10f4ca
don't count operations per request if back-monitor is not built
2002-04-08 19:13:13 +00:00
Pierangelo Masarati
51e33154b3
count initiated/completed operations divided per request
2002-04-08 18:41:15 +00:00
Howard Chu
5c70106657
ITS#1708 ldap_pvt_tls_sb_ctx() et al
2002-04-05 06:48:03 +00:00
Pierangelo Masarati
af3a65b924
do not print -1 as %lu
2002-03-30 08:45:21 +00:00
Kurt Zeilenga
0be4d842bc
Update control framework
...
Misc cleanup
NT updates
2002-03-24 02:17:21 +00:00
Pierangelo Masarati
49f324a1fa
fix ITS#1671 and more
2002-03-23 16:53:44 +00:00
Pierangelo Masarati
fa654ae447
fix ITS#1660 (issue 1)
2002-03-23 16:06:22 +00:00
Howard Chu
f181388a5e
Fix ITS#1655, don't retrieve sd until we've checked for valid c_sb.
2002-03-20 23:47:08 +00:00
Howard Chu
35554dadf3
use ber_str2bv() instead of ch_strdup/strlen.
2002-03-18 08:57:59 +00:00
Kurt Zeilenga
a4635f3ada
CLDAP fixes
2002-03-06 20:58:20 +00:00
Kurt Zeilenga
0a31400d63
Some misc cleanup
2002-01-29 06:06:20 +00:00
Howard Chu
5e522ca882
Changed Access.a_sockurl_pat, Connection.c_listener_url etc.
...
to struct bervals
2002-01-28 11:41:07 +00:00
Howard Chu
4191f39037
Changed slap_authz_info.sai_mech to struct berval.
...
Changed sasl_* to use struct bervals.
2002-01-26 13:57:41 +00:00
Kurt Zeilenga
9a3dcc376c
Zap connection_internal_*
2002-01-13 18:05:16 +00:00
Howard Chu
f0cd9956ed
readahead is only needed on UDP, don't use it on TCP. (Save unneeded memcpy)
2002-01-10 22:00:17 +00:00
Howard Chu
ce7d8d26f2
Changed conn->c_cdn to struct berval.
2002-01-06 03:26:09 +00:00
Kurt Zeilenga
0e2af54a3f
Update copyright statements
2002-01-04 21:17:25 +00:00
Howard Chu
029306a5be
Use ldap_queue.h instead of <ac/queue.h>
2002-01-03 00:12:46 +00:00
Howard Chu
743c402265
Changed search attrs from struct berval ** to AttributeName *
2001-12-31 11:35:52 +00:00
Howard Chu
10961151ef
Use queue-compat for Connection->c_ops,c_pending_ops
2001-12-31 04:08:29 +00:00
Howard Chu
776ce133e9
More str2rdn tweaks
2001-12-30 09:42:58 +00:00
Howard Chu
2f3399265c
Changed sai_dn, sai_ndn to struct berval. (Affects op->o_dn,o_ndn,
...
conn->c_dn,c_ndn, Access->a_dn_pat)
2001-12-24 15:11:01 +00:00
Howard Chu
773b3aff16
more cleanup from jon@symas.com
2001-12-18 04:52:55 +00:00
Howard Chu
45aadbbbba
Eliminate unnecessary per-operation dn_normalize(o_ndn); it's already
...
done in do_bind() and there's space in the connection structure for c_ndn
already, just copy it.
2001-12-09 14:46:29 +00:00
Kurt Zeilenga
b5504a1c36
Clean up some misplaced 'extern' declarations (should be headers)
2001-12-04 19:57:09 +00:00
Pierangelo Masarati
aee3600276
minor cleanup
2001-11-17 16:18:07 +00:00
Mark Adamson
8c16d30087
optimize number of calls to slap_get_time()
2001-11-13 01:38:30 +00:00
Howard Chu
a0a24d73dc
Added backend_group result caching.
2001-11-12 19:25:41 +00:00
Howard Chu
693a81e1db
More CLDAP tweaks, to differentiate between real LDAPv2 CLDAP and "other"
...
LDAP/UDP messages. Slapd marks received CLDAP messages as LDAP_VERSION2.
The client library can generate CLDAP queries if -Protocol 2 is chosen,
otherwise not. LDAPv2 CLDAP cannot query the slapd rootDSE, gets no reply.
2001-10-02 01:02:23 +00:00
Howard Chu
926b454765
Set protocol to LDAP_VERSION2 on UDP session.
2001-09-28 00:49:01 +00:00
Howard Chu
647b5f84ee
Resurrection/rewrite of CLDAP (RFC1798 Connectionless LDAP).
...
Compile with -DLDAP_CONNECTIONLESS to use this code.
For slapd, use "-h cldap://" to listen on UDP.
For ldapsearch, use "-H cldap://" to query on UDP.
Client-side support is very minimal:
no automatic timeout/retries
no basedn wildcard expansion on results
no support for specifying multiple servers at once.
2001-09-28 00:18:40 +00:00
Kurt Zeilenga
77f776dfd1
Another round of TLS updates to support secure referral chasing
2001-06-25 19:17:42 +00:00
Kurt Zeilenga
cc6fab319e
Add support for separate max incoming for anonymous and authenticated
...
sessions (defaults: 256K and 16M respectively).
2001-05-29 20:00:55 +00:00
Kurt Zeilenga
4055077607
Add simple configure support for sockbuf max incoming
2001-05-05 07:29:21 +00:00
Kurt Zeilenga
abce5abf34
Quick sb_max_incoming hack, should be configurable (likely
...
with differing anonymous vs authenticated values).
2001-05-04 21:55:07 +00:00
Gary Williams
f49fd8a98e
fix format
2001-01-17 16:35:53 +00:00
Gary Williams
d531a20f52
more new logging (finally), behind NEW_LOGGING
2001-01-11 17:11:23 +00:00