Commit Graph

368 Commits

Author SHA1 Message Date
Pierangelo Masarati
d3ca441ae8 /*
* The original code performs ( n ) normalizations
 * and ( n * ( n - 1 ) / 2 ) matches, which hide
 * the same number of normalizations.  The new code
 * performs the same number of normalizations ( n )
 * and ( n * ( n - 1 ) / 2 ) mem compares, far less
 * expensive than an entire match, if a match is
 * equivalent to a normalization and a mem compare ...
 *
 * This is far more memory expensive than the previous,
 * but it can heavily improve performances when big
 * chunks of data are added (typical example is a group
 * with thousands of DN-syntax members; on my system:
 * for members of 5-RDN DNs,

 members         orig            bvmatch (dirty) new
 1000            0m38.456s       0m0.553s        0m0.608s
 2000            2m33.341s       0m0.851s        0m1.003s

 * Moreover, 100 groups with 10000 members each were
 * added in 37m27.933s (an analogous LDIF file was
 * loaded into Active Directory in 38m28.682s, BTW).
 *
 * Maybe we could switch to the new algorithm when
 * the number of values overcomes a given threshold?
 */
2002-09-02 19:41:03 +00:00
Kurt Zeilenga
af183089b8 unifdef -DSLAP_X_MRA_MATCH_DNATTRS 2002-09-01 00:33:20 +00:00
Kurt Zeilenga
c6052ac8b0 Add mr_usable_with_at() routine. Use both in generation
of rule uses, but also in test_filter_mra()
2002-08-31 21:23:45 +00:00
Pierangelo Masarati
e2ec62f09f add matchingRuleUse to schema; use a berval instead of _oidlen in syntax and matching rule 2002-08-31 10:45:22 +00:00
Pierangelo Masarati
7e2317c842 add server side controls to back-ldap and back-meta 2002-08-29 14:39:31 +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
Kurt Zeilenga
1086ffb438 Round one of subclass indexing for objectClass and structualObjectClasss.
add soc_cname to ObjectClass structure
2002-08-29 01:12:59 +00:00
Kurt Zeilenga
23efa07a99 use ldap_charray_*() instead of charray_*() 2002-08-24 00:55:24 +00:00
Pierangelo Masarati
a038ef68e6 added attr_merge/value_add functions that dela with single attribute; bervals for '*', '+' and '1.1' made available 2002-08-23 08:49:19 +00:00
Howard Chu
505a141c75 Use search callbacks in slap_sasl_checkpass and slap_auxprop_lookup,
use ACL_AUTH for acl checks.
2002-08-20 05:32:54 +00:00
Howard Chu
e5091f5926 Updated register_syntax, register_matching_rule for more convenient
calling from other modules
2002-08-17 01:29:18 +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
Kurt Zeilenga
1c75a7f25c Fix inverted bvmatch logic in modrdn 2002-08-12 08:45:20 +00:00
Howard Chu
07ebdca237 ITS#1893, use "schemadn" to configure subschemasubentry DN. (diff was
inaccessible, this is original code, not contributed.)
2002-08-10 03:10:52 +00:00
Howard Chu
554311a4c8 Fix cargv leak in recursive read_config() 2002-08-07 08:22:43 +00:00
Kurt Zeilenga
eb581e43e7 Fix for:
SASL regex segmentation faults with group based acls (ITS#1978)
based, in part, by patch submitted by Simon Wilkinson <simon@sxw.org.uk>.
2002-07-28 07:27:55 +00:00
Howard Chu
5a01db28e3 Moved slap_strcopy, slap_strncopy to lutil_strcopy, lutil_strncopy 2002-07-27 00:24:02 +00:00
Kurt Zeilenga
0a2a381d07 Fix for "no structuralObjectClass" when lastmod is off (ITS#1904) 2002-06-25 01:04:54 +00:00
Howard Chu
07a34489c6 Added saslAuthzTo and saslAuthzFrom to system schema.
Added sasl-authz-policy config keyword to control proxy authorization.
Moved sasl-related config processing to sasl.c:slap_sasl_config().
Moved other global defs used only in saslauthz.c into saslauthz.c.
2002-06-14 08:10:14 +00:00
Kurt Zeilenga
1410b3e7d9 An almost complete slap_sasl_setpass() 2002-06-12 00:13:29 +00:00
Kurt Zeilenga
19eca33ca3 Gentile HUP shutdown from Hallvard 2002-06-03 16:47:43 +00:00
Kurt Zeilenga
5c5b5455fb VLV updates 2002-06-03 16:45:09 +00:00
Kurt Zeilenga
bdad40c696 Disallow addition of system schema via config files. 2002-05-30 05:23:37 +00:00
Howard Chu
6f47e13147 Cyrus 2 support now requires Cyrus 2.1.3. Adds support for in-directory
SASL secrets. (Only works with plaintext userpassword tho.)
2002-05-07 23:08:23 +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
Kurt Zeilenga
af02eee0d5 Reworking backend_check_restrictions for extensions
Should resolve ITS#1781.
2002-05-01 01:04:57 +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
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
1bbd51da77 ITS#1712, rewritten dn_openssl2ldap(). Added dnDCEnormalize(), used by
dn_openssl2ldap() and sasl_external_x509dn_convert. Fixed realm handling
for foreign Kerberos realms embedded in usernames.
2002-04-16 08:46:25 +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
Pierangelo Masarati
f4dba925ff add a switch that enables/disables reverse lookups if configured with rlookups 2002-04-03 15:40:49 +00:00
Pierangelo Masarati
9bf3ccd0bf allow attribute exclusion list in selective replica 2002-03-30 08:52:20 +00:00
Kurt Zeilenga
0be4d842bc Update control framework
Misc cleanup
NT updates
2002-03-24 02:17:21 +00:00
Kurt Zeilenga
b56f7c7222 Add no-op mru_schema_info()...
Not sure how best to populate matchingRuleUses...
2002-03-11 03:06:34 +00:00
Kurt Zeilenga
c9c3a68496 Deprecate filter_print in favor of filter2bv. 2002-03-10 17:41:14 +00:00
Kurt Zeilenga
1880c23029 Replace get_filter generation of fstr with filter2bv(). 2002-03-07 03:13:11 +00:00
Kurt Zeilenga
a71cd15182 Add normalize_validate_normalize() to be use instead of value_normalize()
where value has not yet been validated.
2002-03-01 18:05:47 +00:00
Kurt Zeilenga
c0fdb1aaca Add a value_validate() function to be used by prior to value_normalize
calls as needed (compare/filters).
2002-03-01 17:36:22 +00:00
Howard Chu
81c3c311a8 Changed reqoid to struct berval 2002-02-15 16:27:31 +00:00
Kurt Zeilenga
2b71d70f2f Reverse arguments of is_object_subclass and reverse backwards calls 2002-02-09 23:55:37 +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
f50b75f0c2 Added replica attr=<attribute list> support to filter replog content 2002-02-08 06:44:33 +00:00
Kurt Zeilenga
057dda50d3 remove deadwood, e.g. slap_index2prefix() 2002-01-31 00:11:44 +00:00
Kurt Zeilenga
b6de12f552 revert constification of slap_init_user() 2002-01-29 19:01:15 +00:00
Kurt Zeilenga
0a31400d63 Some misc cleanup 2002-01-29 06:06:20 +00:00
Howard Chu
d937237987 Eliminated dn_normalize. No more migration. 2002-01-26 14:51:45 +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
Howard Chu
6bac96b0bd Changed dnParent to void instead of int. (It always returned success...) 2002-01-26 08:44:59 +00:00
Kurt Zeilenga
309870fa9c Remove deprecated routines and a little lint. 2002-01-26 07:32:13 +00:00