Commit Graph

11097 Commits

Author SHA1 Message Date
Hallvard Furuseth
bdb078a778 ITS#6758 Reset dangerous REP_ENTRY_* flags.
If SlapReply.sr_un cannot contain an entry but does or soon may
contain another member than sru_search: Ensure nothing will see
leftover REP_ENTRY_* flags and try to clean up the "entry" there.
2010-12-31 20:53:17 +00:00
Hallvard Furuseth
b26c767ed6 ITS#6758 slap.h: Cast REP_* #defines to slap_mask_t 2010-12-31 20:02:41 +00:00
Hallvard Furuseth
9467059b0b ITS#6758 fix/add slap_send_search_entry() comments 2010-12-31 19:57:53 +00:00
Hallvard Furuseth
a4c2d54127 ITS#6758 result.c:Use rs_*(). Frees entries earlier.
For readability, use rs_flush_entry() where slap_send_search_entry() and
slap_send_search_reference() release entries before network operations.

This change also frees entires marked MUSTBEFREED earlier.
2010-12-31 18:14:31 +00:00
Hallvard Furuseth
f4a3304477 ITS#6758 Use rs_*() to manage SlapReply entries.
Some noop changes + fixes entry leaks and REP_ENTRY_MODIFIABLE flag leaks.
2010-12-31 17:55:36 +00:00
Hallvard Furuseth
15aa7c472a noop commit: cleanup 0 -> REP_RESULT in SlapReply 2010-12-31 14:08:34 +00:00
Hallvard Furuseth
713886ec07 ITS#6758, pcache.c: Avoid SlapReply reuse.
refresh_merge(): Do not reuse Search SlapReply parameter for a Modify,
use a local one and copy its sr_err to the parameter.  The parameter is
from refresh_query().  Move its SlapReply parameter to a local variable.
2010-12-31 13:46:48 +00:00
Hallvard Furuseth
6d7c1880a8 ITS#6758 Avoid SlapReply reuse.
Caller provides a SlapReply and reads the result after the operation,
then reuses it.  Reinitialize before reuse, or move declaration inwards.
2010-12-31 13:08:11 +00:00
Hallvard Furuseth
04f8fa5619 ITS#6760: Fix rwm entry handling 2010-12-31 12:01:03 +00:00
Hallvard Furuseth
13f52646b2 ITS#6758 Avoid SlapReply reuse, simple cases.
Caller provides and reuses a SlapReply it does not read after
initialization.  So reinitialize or move the declaration inwards.
In case of refint, move the rs parameter into refint_repair().
2010-12-31 10:46:22 +00:00
Hallvard Furuseth
cb15a4c687 ITS#6758 rs_reinit() += slap_reply_t parameter 2010-12-31 09:45:16 +00:00
Hallvard Furuseth
b120b2a05b ITS#6758 config_build_entry, avoid SlapReply reuse
Do not use the 'SlapReply *rs' passed to config_build_entry().  Instead
pass a new one to op->o_bd->be_add() and copy the output sr_err to rs.
This takes care of most SlapReply reuse in bconfig.c.
2010-12-31 09:02:34 +00:00
Hallvard Furuseth
ab1bc728fa ITS#6758 bconfig.c: ensure sr_text==NULL if sr_err==LDAP_SUCCESS
config_modify_internal(): Do not send rs->sr_text with success.
config_back_modify(): When slap_bv2ad() can set rs->sr_text,
set sr->sr_err too and catch failure.
2010-12-31 08:45:48 +00:00
Howard Chu
089cf2d421 ITS#6670 partial fix - ignore member/memberof pointing to same entry 2010-12-31 01:38:24 +00:00
Hallvard Furuseth
abf7f2efce ITS#6758 back-bdb: Delay setting sr->sr_entry until we know it will be used 2010-12-31 00:04:38 +00:00
Hallvard Furuseth
1ea8de9fda ITS#6758 Do not set sr_err=error before be_search.
glue_op_search() set LDAP_UNWILLING_TO_PERFORM before be_search() as
well as when there was no be_search.
2010-12-30 23:59:23 +00:00
Hallvard Furuseth
d2b024be4a ITS#6758 Reset some SlapReply flags & data.
Reset data more consistenlty.  When resetting sr_entry after sending
data, reset sr_flag as well.  Reset rs_attrs and Extended Operation
oid/data after setting and sending them.
2010-12-30 23:55:07 +00:00
Hallvard Furuseth
f7a77545ad noop commit for ITS#6758: simplify future commits 2010-12-30 23:48:41 +00:00
Hallvard Furuseth
98966abeef noop commit for ITS#6758: Remove no-effect code.
Unused variable resets, unused SlapReply parameters to some functions.
2010-12-30 23:43:12 +00:00
Hallvard Furuseth
cd6e9156e7 Remove lint (unused vars/labels/funcs/default:s) 2010-12-30 23:34:55 +00:00
Hallvard Furuseth
5c3f806fca ITS#6758 Add rs_reinit(), rs_flush_entry() 2010-12-30 23:32:07 +00:00
Hallvard Furuseth
ea2b675dca ITS#6758 Add rs_assert*, RS_ASSERT, USE_RS_ASSERT 2010-12-30 23:29:46 +00:00
Hallvard Furuseth
c9e85af35c ITS#6759: assert;Debug -> Debug;assert 2010-12-30 23:19:02 +00:00
Pierangelo Masarati
7443e6fc8c op->o_conn->c_sb may be 0 for internal operations 2010-12-30 21:41:07 +00:00
Rein Tollevik
a1a5affeb0 ITS#6754: Fail if there are unrecognized command-line arguments. 2010-12-30 19:45:08 +00:00
Howard Chu
97d9b07814 ITS#5862 Assert control for rootDSE/subschema 2010-12-30 17:28:19 +00:00
Hallvard Furuseth
027b6812ee ITS#6686 Fix last commit (declaration after code) 2010-12-28 15:59:48 +00:00
Howard Chu
e907ba219b ITS#6686 add multiple sorts per connection, from Raphael Ouazana @ Linagora 2010-12-23 22:29:57 +00:00
Howard Chu
56888eac30 Move assertion checking to slap_compare_entry() 2010-12-23 21:53:05 +00:00
Howard Chu
9bb47f74ae ITS#6753 use slap_compare_entry() 2010-12-23 21:45:36 +00:00
Howard Chu
149313fd25 ITS#6573 export compare_entry as slap_compare_entry() 2010-12-23 21:36:57 +00:00
Howard Chu
0393fe8974 Cleanup for #6660 2010-12-23 04:40:57 +00:00
Howard Chu
f58a646ad6 ITS#6660 preliminary fix. debug additions need to be cleaned up. 2010-12-23 00:16:19 +00:00
Hallvard Furuseth
720aa4b77e Plug mutex/rwlock leaks (destroy them) 2010-12-20 10:57:06 +00:00
Hallvard Furuseth
78a0be6a42 Plug memory leaks 2010-12-20 10:51:14 +00:00
Hallvard Furuseth
9e6331f14f ITS#6752 Remove OpenLDAP 2.[23] dynlist code 2010-12-20 10:25:11 +00:00
Hallvard Furuseth
e7df2ef95f ITS#6752 Handle REP_ENTRY_* flags correctly 2010-12-20 10:22:19 +00:00
Hallvard Furuseth
42a0f5efc2 ITS#6752 Fix dynlist Compare callback
Replace dynlist_sc_save_entry() with dynlist_sc_compare_entry() which
compares instead of saves the entry.  Check rs->sr_type == REP_SEARCH.
2010-12-20 10:20:38 +00:00
Hallvard Furuseth
abbf57fd79 ITS#6752 dynlist: Do less work, simplify a bit.
Rearrange dynlist_compare(), tweak dynlist_response().
2010-12-20 10:19:21 +00:00
Hallvard Furuseth
2a9c5154ef ITS#6748 Drop possibly-broken memberof log message 2010-12-14 15:26:42 +00:00
Hallvard Furuseth
5feeec67d7 ITS#6747 Fix LDAP_CONNECTIONLESS Debug(), warnings 2010-12-14 15:06:32 +00:00
Hallvard Furuseth
0aa8c028b3 ITS#6746: Preserve error code, plug entry leak 2010-12-14 13:35:42 +00:00
Rein Tollevik
b4aa8dc68c ITS#6716: Keep sessionlog sorted by csn, compare mincsn with head. 2010-12-12 18:12:05 +00:00
Pierangelo Masarati
351bc07fcc re-fix ITS#6645 commit 2010-12-07 11:58:38 +00:00
Pierangelo Masarati
615d1c7703 fix ITS#6645 commit 2010-12-07 11:55:27 +00:00
Pierangelo Masarati
15f1e7bdb7 move ctxcsn and schema check code in helpers; also apply to slapmodify (ITS#6737) 2010-12-07 10:50:54 +00:00
Pierangelo Masarati
dc156d7f6e allow to set LDIF max line width (ITS#6645) 2010-12-07 10:14:51 +00:00
Hallvard Furuseth
87a9ee9e83 For ITS#6739: Fix last commit (private debuging) 2010-12-06 09:27:30 +00:00
Hallvard Furuseth
5fc18b9d66 For ITS#6739: Move variables into do_syncrep2 loop 2010-12-06 09:23:44 +00:00
Hallvard Furuseth
a5d1029f53 ITS#6736: Delay destruction of slap_listeners[] 2010-12-06 08:17:00 +00:00