Commit Graph

2179 Commits

Author SHA1 Message Date
Kurt Zeilenga
23bf2fb086 Fix error messages 2001-10-24 05:27:49 +00:00
Kurt Zeilenga
fcd1ce0e28 Use defined Root DSE attributes.
Developed by Julius Enarusai/IBM
Copyright IBM Corp. 2001

Use of this source code is subject to the terms of The OpenLDAP
Public License Version 2.7, 7 September 2001.  No trademarks of the
IBM Corporation are to be used to identify, endorse or promote any
products derived from this code without the prior written consent
of IBM.
2001-10-23 23:29:41 +00:00
Kurt Zeilenga
d9fb94f1a8 Updated busy loop protection 2001-10-23 22:17:41 +00:00
Julio Sánchez Fernández
aee598dba7 Remove bogus refusal to index ;binary attributes. Notice that I left
in a check.  This way you have to say:

	index userCertificate eq

If we remove it, we could say:

	index userCertificate;binary eq

I have not tried the latter.
2001-10-23 13:42:37 +00:00
Julio Sánchez Fernández
358950e8ad And this change implements indexing for certificateExactMatch. Now
you can search efficiently the directory for a certificate.

Notice that we index certificates just as serial integers.  A full
index should combine the issuer DN too, but I think in most scenarios
that would be extremely redundant and of little benefit.  We can add
an option later to do full indexing.
2001-10-23 13:39:07 +00:00
Julio Sánchez Fernández
9752cea92c No code change, added a comment warning of a possible future difficulty.
Apparently, we refuse to index ;binary attributes.  That is mostly
bogus.  Whether it is indexable or not depends on whether we know how
to or not, nothing more.  I.e., the existance of indexer and filter
functions for the matching rules that are relevant to the attribute
type.
2001-10-23 13:35:54 +00:00
Julio Sánchez Fernández
bf5ea315b6 Compares get values in the matching rule syntax (see RFC2251, 4.1.7),
so we need to tell value_find about this.
2001-10-23 09:48:18 +00:00
Julio Sánchez Fernández
cb98a604fb Replacement for value_find and compatibility macro.
Now we will be able to fix compares.
2001-10-23 09:43:20 +00:00
Julio Sánchez Fernández
de353ebeda Normalization and more error checking. 2001-10-23 09:05:04 +00:00
Julio Sánchez Fernández
dd34307cf7 When checking if an entry matches some filter, we have the list of
values as stored in the entry on the one hand and an assertion value
that is not necessarily of the same syntax.  So tell value_match this
is the case by setting SLAP_MR_VALUE_IS_IN_MR_SYNTAX in flags.
2001-10-22 20:07:06 +00:00
Julio Sánchez Fernández
5f6d5494dd Extend value_match to extract an asserted value from a full value
if needed.  This is controlled by SLAP_MR_VALUE_IS_IN_MR_SYNTAX,
a new flag that should be set when evaluating filters such as in
searches and compares and unset otherwise (such as in modify).

Now, some callers of value_match, notably value_find, don't know
whether to set it or not.  We'll see to that.
2001-10-22 20:03:30 +00:00
Julio Sánchez Fernández
5dbf4bddae Add a flag to help the value_* functions know whether they are seeing
a full value (in attribute type syntax) or a value in the syntax of
the matching rule (as happens in filters).
2001-10-22 19:57:23 +00:00
Julio Sánchez Fernández
be89c094f6 Do something with the error text. 2001-10-22 19:55:21 +00:00
Howard Chu
0185b79559 Don't free entries since the tools realloc the buffers. 2001-10-22 15:58:44 +00:00
Howard Chu
11d884b8cf Fix some uninitialized variables 2001-10-22 15:57:58 +00:00
Howard Chu
c108e66222 Fix entry_encode; must save the given e->e_dn without modification. 2001-10-22 15:01:35 +00:00
Howard Chu
c981026a6c Missed a test in AttributeDescription commit 2001-10-22 14:55:42 +00:00
Howard Chu
c05de965b5 Moved binary entry_encode/entry_decode into main code. Removed lber version. 2001-10-22 14:07:42 +00:00
Howard Chu
0e16f6acf9 Moved AttributeDescription caching into main code:
Changed AttributeDescription.{ad_cname,ad_lang} to struct berval everywhere
   Deleted ad_free() everywhere
   Added ad_mutex to init.c

The AttributeDescriptions are in a linked list hanging off of the
corresponding AttributeType.
2001-10-22 13:23:05 +00:00
Julio Sánchez Fernández
7581e304c0 It now sort of works, but needs some normalization work and proper
error reporting to client and syslog. And indexing, of course.

Now, the problem is that matching rules get called from different
places that are inconsistent in what an assertedValue is.  When doing
a modify, a full certificate value is passed (to verify it isn't
already there).  When doing a search or compare, the passed value is
in the syntax of the matching rule.

Consistency would require that the caller extracts an asserted value
from the full value before calling smr_match.  It can do this by
calling smr_convert (it was unused, was it meant to be used for
this?).

Unfortunately, the caller is typically value_find, value_match, etc.
that have themselves little knowledge of what they are dealing with,
so their interface needs to be extended, new flag values or new
arguments, so that they know if they have a value in attribute type
syntax or in matching rule syntax.
2001-10-22 06:54:30 +00:00
Kurt Zeilenga
17264d1ad4 Experiment with busy loop protection... 2001-10-21 00:48:14 +00:00
Julio Sánchez Fernández
7e1c4f272d Use the ldap syntax oid assigned by David Chadwick (no yet published). 2001-10-20 17:31:52 +00:00
Pierangelo Masarati
99e7ffe034 listen on any device 2001-10-20 17:19:56 +00:00
Julio Sánchez Fernández
4d0ab0215b First cut at certificateExactMatch, completely untested and without
indexing.
2001-10-20 10:15:09 +00:00
Howard Chu
ce6243f009 Patches for modify/modrdn to work with BDB_USE_BINARY_RW. 2001-10-19 20:28:48 +00:00
Howard Chu
98d6a4f2bf Added new bdb_encode/bdb_decode functions, must #define BDB_USE_BINARY_RW
to activate. The bdb_decode works in-place on the db data. Add/Search are
OK, I think Modify needs to be tweaked. Don't use this yet unless you want
to help finish it.
2001-10-19 11:53:15 +00:00
Kurt Zeilenga
d6730e5f50 BDB updates... haven't had a chance to work on this for a while,
committin what I have so that someone else might be able to work it.
2001-10-13 16:55:54 +00:00
Mark Adamson
290137a54f Serialize access to idl insert/delete key routines (ITS 1359) 2001-10-11 18:12:53 +00:00
Kurt Zeilenga
01bdb4650e Check for no OID. 2001-10-10 18:15:30 +00:00
Kurt Zeilenga
b6a3dad8f0 Delete attribute indices 2001-10-09 19:41:48 +00:00
Kurt Zeilenga
fdc0dd7d6a Fix some NEW_LOGGING errors 2001-10-05 21:49:04 +00:00
Kurt Zeilenga
78adfde54e BDB_INDEX code does no harm (but no good yet, not used by filters yet). 2001-10-05 20:12:16 +00:00
Kurt Zeilenga
06a50e37b1 Don't assume e_id is a long. 2001-10-05 18:38:25 +00:00
Kurt Zeilenga
9f1fc48659 Another round. BDB_INDEX almost ready for functional testing. 2001-10-05 17:00:21 +00:00
Kurt Zeilenga
83d50bd696 Minor updates 2001-10-05 02:01:37 +00:00
Kurt Zeilenga
aedf4b42fc Return unwillingToPerform instead of noSuchObject for subschema subentry 2001-10-05 01:55:14 +00:00
Kurt Zeilenga
96e0038832 Initial idl fetch code, undef BDB_INDEX for now, other cleanup 2001-10-05 01:19:58 +00:00
Kurt Zeilenga
5160da05e5 Add some initial BDB_INDEX code... needs much work. 2001-10-04 22:29:34 +00:00
Kurt Zeilenga
3120d37951 More changes to let BDB build without LDBM. 2001-10-04 06:34:03 +00:00
Kurt Zeilenga
9b98f46a5e Add prelim index code from LDBM, needs work... 2001-10-04 02:55:09 +00:00
Kurt Zeilenga
433eb73ef8 Add BDB_INDEX error handling 2001-10-03 23:49:38 +00:00
Kurt Zeilenga
3ad55b225e Add error handling to BDB_INDEX code 2001-10-03 23:39:29 +00:00
Kurt Zeilenga
191853eb51 An incremental step. 2001-10-03 23:28:20 +00:00
Kurt Zeilenga
0135c8dbb1 Add BDB index config code 2001-10-03 21:11:52 +00:00
Kurt Zeilenga
292b6c8757 Replace #if 0 with #if MACRO 2001-10-03 20:34:00 +00:00
Kurt Zeilenga
86a680a4ec Enable management of attribute indices. Not yet used by test_filter. 2001-10-03 20:20:29 +00:00
Kurt Zeilenga
f704c35caf subschemaSubentry attributes could be leaked under some conditions,
plug them.
2001-10-03 18:19:07 +00:00
Pierangelo Masarati
35c38e271d use slap_str2undef_ad for unknown attributes 2001-10-03 18:17:08 +00:00
Pierangelo Masarati
8a3768276a candidate check using new macro from Kurt 2001-10-02 19:15:05 +00:00
Kurt Zeilenga
773b1907d2 Add BDB_IDL_N() macro for ando 2001-10-02 19:04:12 +00:00