Commit Graph

525 Commits

Author SHA1 Message Date
Hallvard Furuseth
ff2a3201cb Call node_find_cmp() with (void *)&ulong instead of (void *)ulong.
The old code assumed sizeof(long) == sizeof(void *), among other things.
2002-12-14 21:01:08 +00:00
Hallvard Furuseth
486eaa69b6 Rename "lang(uage)" to "tag(s)". (Cleanup after attribute options patch.) 2002-12-13 19:15:20 +00:00
Howard Chu
e39f9848ac Fix previous commit, check for dup in avl_insert 2002-12-10 20:56:08 +00:00
Howard Chu
349e05ff4d Added config keyword "searchstack" for setting search stack cache depth.
Default is still 16.

Added IDL caching, modified from ITS#2182. Uses "idlcachesize" config
keyword. Code is #ifdef'd, currently defined, with default cache of 0.
2002-12-10 20:33:49 +00:00
Howard Chu
d4a422329b From ITS#2183, use a long-lived IDL stack per thread. 2002-12-10 17:59:21 +00:00
Howard Chu
09679eb715 Added SLAP_MR_VALUE_NORMALIZED_MATCH, avoid redundant normalize when
calling value_find with already-normalized DNs
2002-12-04 18:19:46 +00:00
Julius Enarusai
9b5ec8f43b Fixed minor compile errors in LDAP_LOG debug statements. 2002-12-03 17:06:58 +00:00
Pierangelo Masarati
a7c5307279 perhaps the assert can be removed; should work now 2002-11-28 08:25:12 +00:00
Kurt Zeilenga
8754c8f2a3 #unifdef paged results, remove lint 2002-11-28 04:38:41 +00:00
Kurt Zeilenga
4e223d588b Reorder header inclusion to resolve ITS#2204. 2002-11-26 20:22:24 +00:00
Pierangelo Masarati
415a8d325f add limits to entries count for paged results 2002-11-21 20:49:02 +00:00
Pierangelo Masarati
2b639068b6 seems to be leaking a ber 2002-11-21 20:21:22 +00:00
Pierangelo Masarati
59aea47963 improve limits handling and consistency; return "Admin limit exceeded" instead of "Unwilling to perform" 2002-11-21 12:58:59 +00:00
Pierangelo Masarati
b26ecba01a - allow interactive pagedResults size change
- implement pagedResults abandon by setting size=0
- misc code cleanup
2002-11-21 03:36:37 +00:00
Pierangelo Masarati
c354bb23bf Support for RFC 2696:
LDAP Control Extension for Simple Paged Results Manipulation

contributed by Lynn Moss <lynnmoss@us.ibm.com> (ITS#2189)

applied with changes.
2002-11-21 02:16:53 +00:00
Pierangelo Masarati
498d1f043d silence warnings; fix messages 2002-11-10 20:00:44 +00:00
Pierangelo Masarati
76bf91f553 remove #ifdef SLAP_FILTER_HASSUBORDINATES 2002-11-10 19:48:36 +00:00
Stig Venaas
0f86bbde87 Fix referrals and alias. For ldbm and I think for bdb, this is necessary
now that we normalize to lower case. Should be merged into 2.1.
2002-10-31 16:48:04 +00:00
Jong Hyuk Choi
ca8ab9d809 changes in bdb_psearch() - search scope check 2002-10-29 08:05:45 +00:00
Jong Hyuk Choi
3a9229a3e9 Use of slap_schema.si_ad_entryUUID in bdb_psearch() 2002-10-28 23:57:54 +00:00
Kurt Zeilenga
293158f432 code cleanup 2002-10-27 03:42:32 +00:00
Pierangelo Masarati
7b3f889ec1 fix hasSubordinate filtering; now it can be safely turned on 2002-10-26 16:18:31 +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
Kurt Zeilenga
2b2e406b46 Make sure that newSuperior isn't old superior 2002-10-25 01:09:50 +00:00
Kurt Zeilenga
cb73d243fb More "entry" level ACLs for entry add, delete, and rename. 2002-10-07 19:19:29 +00:00
Kurt Zeilenga
d19db4b7ed Fix up last commits 2002-10-04 23:42:27 +00:00
Kurt Zeilenga
9fbcc90bd5 Add "entry" ACL checks for add/delete/rename ops 2002-10-04 23:26:28 +00:00
Kurt Zeilenga
33248a02e1 Code cleanup (no functional changes) 2002-10-01 04:07:55 +00:00
Howard Chu
104f8cc409 Simpler fix for NO_THREADS 2002-09-19 06:34:53 +00:00
Howard Chu
ff9e580d33 Updated BDB_HIER for current API 2002-09-19 06:08:12 +00:00
Howard Chu
6fa0363d09 Don't set bdb yield with NO_THREADS 2002-09-19 01:38:00 +00:00
Howard Chu
919274432b Fixes for NO_THREADS
Use a per-env locker ID
	Always set lock_detect, since we allow slapadd etc. concurrently
Also removed unused lock_detect_task code. lockdetect config keyword only
needs <policy>, no <seconds> argument.
2002-09-19 01:13:27 +00:00
Kurt Zeilenga
a1da292989 Wrap csn filter frees with sync mode check. 2002-09-15 22:42:50 +00:00
Kurt Zeilenga
0ad91236fd Add LDAP_CONTROL_CLIENT_UPDATE to list of supported controls 2002-09-15 22:28:38 +00:00
Kurt Zeilenga
2a9783bd5e Fix typos in last commit 2002-09-15 22:13:25 +00:00
Kurt Zeilenga
629a0219f2 Cleanup up LDAP_CLIENT_UPDATE code... including some bug fixing. 2002-09-15 21:08:34 +00:00
Jong Hyuk Choi
1509e321de LCUP Response Control Code 2002-09-14 00:29:06 +00:00
Howard Chu
3e61f0630d Fix ITS#2082, bdb_idl_intersection 2002-09-13 20:19:56 +00:00
Howard Chu
7e493b87be Fix debug messages 2002-09-13 20:19:15 +00:00
Howard Chu
a8297e6d22 Fix test of uninit'd rc at LOCK_ID 2002-09-13 12:32:08 +00:00
Howard Chu
1263e40b55 Set BDB's global allocators to ber_*, don't bother with the per-env setting. 2002-09-12 02:47:18 +00:00
Howard Chu
35e8b8325d Unifdef BDB_IDL_MULTI. 2002-09-10 04:20:45 +00:00
Kurt Zeilenga
e6fdfd4cee only optimize objectClass filters when (objectClass=*) is
presented... avoids (&(objectClass=*)(objectClass=foo)) problems.
2002-09-09 23:25:22 +00:00
Howard Chu
9953574b47 Fix: if slapadd was used with an un-ordered LDIF file, we can't rely on
entries having ascending entry IDs. Always start from the beginning of
the candidate list. (This should be fine in the general case as well,
since the subtree index will also have refined the candidates.)
2002-09-09 04:24:38 +00:00
Kurt Zeilenga
37d9880495 Some LCUP clean up 2002-09-06 00:29:20 +00:00
Kurt Zeilenga
ab80b03057 back_attribute() should use ACL_AUTH not ACL_READ (at
least for current callers, may need to pass it the
permission level)
2002-09-05 02:37:10 +00:00
Jong Hyuk Choi
4b48c05a8e LDAP Client Update Protocol - non-persistent update (TODO: response control ...) 2002-09-04 02:00:42 +00:00
Pierangelo Masarati
966dd1bdca definitely fix NOOP in back-bdb 2002-08-31 17:03:42 +00:00
Pierangelo Masarati
0d5fe062e2 improved support for NOOP; add is fine, the other write funcs still need work 2002-08-31 12:00:39 +00:00
Pierangelo Masarati
aea52e5bc9 define macros for appropriate sizing of lutil buffers 2002-08-31 10:48:02 +00:00
Howard Chu
0614b5fdbf Fix unindent commit 2002-08-30 11:48:47 +00:00
Howard Chu
4a3a557827 Use DB_NODUPDATA when adding IDs. Silence log for DB_NOTFOUND in delete_key,
let caller log it if they care.
2002-08-30 11:37:43 +00:00
Howard Chu
9d4f5e13e8 Unindented a level. Fixed logging of keys. 2002-08-30 11:21:20 +00:00
Howard Chu
f32803e738 Don't mask DB_KEYEXIST errors in bdb_idl_insert_key, let dn2id see them.
Ignore DB_KEYEXIST and DB_NOTFOUND errors in key_change.
2002-08-30 10:41:46 +00:00
Pierangelo Masarati
82cb585d32 trim unused var 2002-08-29 12:41:07 +00:00
Pierangelo Masarati
c38f1a63b0 this test is useless, since noop is masked SLAP_CTRL_UPDATE 2002-08-29 12:17:28 +00:00
Pierangelo Masarati
fbc11bd16a - added the capability to filter based on hasSubordinate attribute
to back-bdb, back-ldbm and back-sql (the latter with limitations);
- added handling of ":dn" attributes to extended rfc2254 filters
  and to matched value filter
- altered the behavior of get_mra() when a matching rule is given:
  now it checks whether it is compatible with the attribute syntax
  and, in case it is, the given mr is used.  In case of no type,
  the check is delayed when filtering
2002-08-29 10:55:48 +00:00
Pierangelo Masarati
f4c5362955 add bdb_hasSubordinates() helper 2002-08-29 10:50:53 +00:00
Howard Chu
9fa8eded08 ITS#2040 - in bdb_idl_fetch_key() use a large enough buffer to get the
entire IDL at once, to avoid triggering BDB resource leaks.
2002-08-27 15:11:04 +00:00
Kurt Zeilenga
fb7ac08ada cleanup 2002-08-26 19:13:44 +00:00
Howard Chu
53b194fa32 Fix oc_filter, it could exit early before counting the full depth of the
filter tree. Also, only give special treatment to objectclass=*.
2002-08-26 12:04:53 +00:00
Howard Chu
5ff509f2d3 Fix previous commit, BDB_REUSE_LOCKERS was inside a BDB version #ifdef
but is not version-dependent.
2002-08-25 11:06:35 +00:00
Howard Chu
1524f86778 Fix ITS#2044 duplicate search results due to broken bdb_idl_union 2002-08-25 10:18:01 +00:00
Howard Chu
5d9479a3e8 Add debug if bdb_cache_entry_db_lock fails to get a lock
to assist in diagnosing ITS#1986
2002-08-24 19:23:30 +00:00
Howard Chu
d6449b1d57 Experimental code that uses one locker ID per thread. Seems to work OK,
is enabled by default. #undef BDB_REUSE_LOCKERS in back-bdb.h to disable.
Probably needs to be disabled when built with NO_THREADS.
2002-08-24 08:11:08 +00:00
Kurt Zeilenga
23efa07a99 use ldap_charray_*() instead of charray_*() 2002-08-24 00:55:24 +00:00
Howard Chu
cd60deb4a9 OS/390 EBCDIC support 2002-08-22 04:39:59 +00:00
Howard Chu
3b9f4a82ee Added support for BDB 4.1.17 2002-08-22 04:00:06 +00:00
Kurt Zeilenga
e1536926b7 Quick check of LOCK_ID() return. Likely should retry... but not forever. 2002-08-20 03:10:08 +00:00
Kurt Zeilenga
9fc4a749dc More places where LOCK_ID() calls need to be checked. 2002-08-20 02:57:06 +00:00
Pierangelo Masarati
b95ab4ac64 add function slap_modrdn2mods that prepares modifications list for delete/add old/new rdn values 2002-08-16 16:35:16 +00:00
Howard Chu
9fad71dc9b Never use DB_RECOVER flag when opening DB_ENV. Recovery must be done
manually. Automatic recovery would interfere with gentlehup restarts.
2002-08-11 00:30:46 +00:00
Howard Chu
f7859e9913 ITS#2015 give correct index key back to presence_candidates 2002-08-08 17:27:50 +00:00
Howard Chu
44ac8a3564 Plug config leaks 2002-08-07 08:43:52 +00:00
Howard Chu
771f70eb0f Fix ITS#1994, Windows heap consistency 2002-08-03 02:57:52 +00:00
Howard Chu
d01375b200 Fix bdb_idl_union of range and list (related to ITS#1969 2002-07-31 23:43:56 +00:00
Kurt Zeilenga
838643d5ad operationsError != Internal Error
hence, s/LDAP_OPERATIONS_ERROR/LDAP_OTHER/
2002-07-31 22:49:02 +00:00
Howard Chu
5a01db28e3 Moved slap_strcopy, slap_strncopy to lutil_strcopy, lutil_strncopy 2002-07-27 00:24:02 +00:00
Howard Chu
aab953ba3f Change list->range conversion again, avoid extra c_put. 2002-07-19 23:19:53 +00:00
Jong Hyuk Choi
db490b4cef change in the IDL conversion from a list to a range 2002-07-18 15:34:51 +00:00
Howard Chu
e514685144 Tweak: For slap tools, don't set DB_RECOVERY flag when opening DB environment.
This allows slapcat to run while slapd is running, otherwise causes db
corruption.
2002-07-13 00:18:15 +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
Howard Chu
7e8c77c5de Fix dynamic module linking 2002-06-21 01:34:53 +00:00
Jong Hyuk Choi
09a2a8fbce DB_RMW flag to dn2id and id2entry 2002-06-10 19:02:25 +00:00
Howard Chu
3304d125c4 ITS#1837, one-level searches on leaf entries 2002-06-06 11:27:52 +00:00
Jong Hyuk Choi
976fb2265f remove dbenv->lock_put() call from transaction-protected operations 2002-06-06 10:14:14 +00:00
Kurt Zeilenga
26649fb164 Minor cleanup 2002-06-01 20:21:59 +00:00
Kurt Zeilenga
d6d18049dc reference scope checks 2002-06-01 20:01:32 +00:00
Jong Hyuk Choi
7341dc5db6 redesign of back-bdb locking :
cache entry is locked by Berkeley DB lock primitives.
2002-05-31 20:49:19 +00:00
Kurt Zeilenga
02fb60d3da Delete extranous assert() 2002-05-23 03:17:58 +00:00
Howard Chu
3831d98237 Turn these functions on again. Need backend_attribute for SASLauthz stuff.
Fix to work with NULL op.
2002-05-07 22:35:01 +00:00
Howard Chu
a352bcaa16 Fix DN freeing in BDB_HIER case. (BDB_HIER is still broken, seems to have
a bad interaction with the entry cache.)
2002-05-03 14:47:29 +00:00
Pierangelo Masarati
033631f30a s/LDAP_UNWILLING_TO_PERFORM/LDAP_ADMINLIMIT_EXCEEDED/ when search candidates exceed unckecked limit 2002-05-03 10:27:37 +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
7fae7fe155 Changed be_[n]suffix, be_[n]suffixAlias to BerVarray. No more bvec's anywhere. 2002-05-01 18:50:14 +00:00
Jong Hyuk Choi
5291b41336 pointer initialization 2002-04-29 16:42:41 +00:00
Pierangelo Masarati
d3058532c9 honor limits if below soft limit 2002-04-29 10:12:50 +00:00
Howard Chu
43167d0fa6 Fix ITS#1774, BDB keys need ulen and flags to be initialized because BDB
tries to retrieve both the key and the data.
2002-04-25 05:16:15 +00:00
Jong Hyuk Choi
60b1ee1ba9 Patch for ITS# 1643 2002-04-19 21:41:32 +00:00
Jong Hyuk Choi
b7f0983efa Hallvard B. Furuseth's patch for cache lock and mutex 2002-04-16 14:03:13 +00:00
Jong Hyuk Choi
efa7b93b23 concurrent cache access: separation of cache lock (reader/writer) and lru lock (mutex) 2002-04-15 16:40:04 +00:00
Jong Hyuk Choi
737aee17b0 fix: changing bdb_cache_return_entry_w() to bdb_cache_return_entry_r() 2002-04-11 23:17:36 +00:00
Howard Chu
efecf4e121 ITS#1733 eliminate o_abandonmutex 2002-04-11 08:03:40 +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
ca4cbc4a49 ITS#1709 j was logged uninitialized 2002-04-05 06:55:25 +00:00
Howard Chu
11bbd076a8 ITS#1711 txn was uninitialized 2002-04-05 06:54:39 +00:00
Howard Chu
ba5a584729 ITS#1716 is_entry_subentr/ies/y/ 2002-04-05 06:28:52 +00:00
Howard Chu
380806eebe ITS#1726, always use bdb_db_hash(). 2002-04-05 05:59:04 +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
Pierangelo Masarati
031991e0b4 do not return a pointer to an automatic variable in case of success 2002-03-30 08:44:29 +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
5f154f2e57 Added LDAP_LOG messages 2002-03-26 22:40:31 +00:00
Julius Enarusai
82cd035505 Added LDAP_LOG messages 2002-03-26 22:17:08 +00:00
Julius Enarusai
73fcfa6e59 Added LDAP_LOG messages to operational.c and fixed compile error in dn2id.c 2002-03-26 21:34:03 +00:00
Julius Enarusai
7b05699803 Added LDAP_LOG messages 2002-03-26 21:14:23 +00:00
Julius Enarusai
437bf1ba70 Added LDAP_LOG messages 2002-03-26 20:04:30 +00:00
Julius Enarusai
5f466ae128 Added LDAP_LOG messages 2002-03-26 18:52:36 +00:00
Julius Enarusai
bb38d574ac Added LDAP_LOG messages 2002-03-26 18:01:58 +00:00
Julius Enarusai
d881efa172 Added LDAP_LOG messages 2002-03-26 17:47:52 +00:00
Julius Enarusai
2027e7322a Added LDAP_LOG messages 2002-03-26 17:34:57 +00:00
Julius Enarusai
4d501cacd9 Added LDAP_LOG messages 2002-03-26 17:00:14 +00:00
Kurt Zeilenga
4216f19ed1 cleanup 2002-03-24 02:14:00 +00:00
Pierangelo Masarati
50baa90139 port hasSubordinates handling to back-bdb 2002-03-23 11:04:09 +00:00
Howard Chu
780d427fa6 In bdb_idl_fetch_key, the DB_MULTIPLE buffer must be a multiple of 1024
bytes in size.
2002-03-20 01:27:08 +00:00
Howard Chu
9a154f89b0 Rewrote bdb_idl_insert_key and bdb_idl_delete_key for BDB_IDL_MULTI,
parses range IDLs directly to correctly handle changes to the range
boundaries. (bdb_idl_insert_key used to call bdb_idl_fetch_key to
handle ranges; bdb_idl_delete_key never handled ranges before.)
2002-03-20 00:51:34 +00:00
Julius Enarusai
5af8610ba0 Added LDAP_LOG messages 2002-03-19 17:44:11 +00:00
Howard Chu
cc21d814b3 Use a single malloc'd block for all the temporary IDL storage in the
filter processing, to avoid runtime stack blowout. Also removes the
need for gigantic thread stacks.
2002-03-18 11:40:58 +00:00
Howard Chu
7e68108d4a Fix previous commit, missing semicolon 2002-03-18 08:55:21 +00:00
Kurt Zeilenga
9fead9d2ce fix compilation error 2002-03-17 23:39:45 +00:00
Julius Enarusai
a61d2b914d Added LDAP_LOG messages 2002-03-15 18:57:12 +00:00
Julius Enarusai
e89c8b4f63 Added/Modified LDAP_LOG messages to match the existing Debug messages 2002-03-15 17:50:28 +00:00
Julius Enarusai
d8413fac32 Added LDAP_LOG messages to match existing Debug messages 2002-03-15 17:21:06 +00:00
Julius Enarusai
35bc1bf43c Added LDAP_LOG messages to these files to match the existing Debug messages 2002-03-14 22:23:44 +00:00
Julius Enarusai
02412251f1 Added LDAP_LOG messages to the above files to match the existing Debug messages 2002-03-14 16:34:24 +00:00
Kurt Zeilenga
dbfc18985a Align with back-ldbm version 2002-03-12 22:46:13 +00:00
Kurt Zeilenga
93a45a02aa Update handling of AND/OR indexing where element is undefined. 2002-03-04 22:32:33 +00:00
Kurt Zeilenga
ef7883c028 Fix substring index error handling 2002-03-01 19:07:15 +00:00
Kurt Zeilenga
348e489b35 #ifdef experimental controls 2002-02-18 19:48:27 +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
Kurt Zeilenga
9b18295f4f Don't print unprintable keys 2002-02-12 19:29:27 +00:00
Kurt Zeilenga
0006ec0a46 Revert most of last change 2002-02-12 01:30:35 +00:00
Kurt Zeilenga
c912616590 Fix bug in last commit 2002-02-11 21:07:55 +00:00
Kurt Zeilenga
488862105f Use UUID to generate a GID for txn_prepare. Based upon submission
from Jong Hyuk Choi <jongchoi@us.ibm.com> (ITS#1585 for ITS1575).
2002-02-11 17:45:39 +00:00
Kurt Zeilenga
4554557171 Move BDB backend initialization to bdb_open. bdb_initialize()
shouldn't do much more than register callbacks.
2002-02-11 17:31:09 +00:00
Kurt Zeilenga
32fb8b0bff Add ACL state recording to avoid multiple evaluation of
value-independent access controls.
2002-02-09 05:14:17 +00:00
Howard Chu
b2eec644fa Minor IDL tweaks 2002-02-08 06:42:34 +00:00
Kurt Zeilenga
6b29def1c8 switch to openldap-data directory 2002-02-02 06:26:06 +00:00
Kurt Zeilenga
6df9b54592 Switch to openldap-data directory 2002-02-02 06:25:05 +00:00
Kurt Zeilenga
1bf1621efe Add cache txn_prepare code based upon submission (ITS#1575) by
Jong Hyuk Choi <jongchoi@us.ibm.com>.  Needs a bit more work
(GID should be globally unique).
2002-02-02 03:28:32 +00:00