Commit Graph

3284 Commits

Author SHA1 Message Date
Kurt Zeilenga
aa602e0adc Return other. 2002-08-27 05:51:35 +00:00
Kurt Zeilenga
6ec6115119 Fix bug in last commit 2002-08-27 02:43:00 +00:00
Kurt Zeilenga
433eb54dc7 no structuralObjectClass is not a schema violation, but an
internal error.  It *should* have been added.
2002-08-27 02:28:15 +00:00
Kurt Zeilenga
11236eae56 Clean up some structuralObject checks to improve readability.
Functionality not changed (excepting one error message).
2002-08-27 01:55:09 +00:00
Kurt Zeilenga
00003ac539 Fix comment 2002-08-27 01:35:43 +00:00
Kurt Zeilenga
522ee4a038 Only add LASTMOD attributes if they don't exist in input. 2002-08-27 01:27:42 +00:00
Howard Chu
9f5b28baf3 Remove c_sasl_bindmutex, Binds are already serialized. 2002-08-26 22:20:30 +00:00
Kurt Zeilenga
2c4cfd7c27 remove lint 2002-08-26 20:11:19 +00:00
Kurt Zeilenga
9be4df6b7c Prevent buffer overflow 2002-08-26 20:10:45 +00:00
Kurt Zeilenga
1c5725010e Add a Connection pointer to the Operation. 2002-08-26 19:29:34 +00:00
Kurt Zeilenga
fb7ac08ada cleanup 2002-08-26 19:13:44 +00:00
Kurt Zeilenga
6f8a3919a1 Fix last commit. 2002-08-26 18:07:58 +00:00
Kurt Zeilenga
af4cb85d8b Prevent unlocking unlocked sasl_bindmutex... 2002-08-26 18:06:55 +00:00
Pierangelo Masarati
d9da0f2bb8 silence annoying warning (BTW: who initializes be?) 2002-08-26 17:37:33 +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
Kurt Zeilenga
08059f1633 zap charray 2002-08-25 16:53:20 +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
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
1d7ee4471f Pass Operation to backend_attribute - should have been doing this all along. 2002-08-24 07:31:14 +00:00
Howard Chu
8c30114d84 Added thread-pool getkey/setkey functions 2002-08-24 05:39:43 +00:00
Kurt Zeilenga
e259c3c938 Zap 2002-08-24 00:55:56 +00:00
Kurt Zeilenga
23efa07a99 use ldap_charray_*() instead of charray_*() 2002-08-24 00:55:24 +00:00
Kurt Zeilenga
c67781d0ea use ldap_charray_free() instead of slapd's charray_free() 2002-08-24 00:40:25 +00:00
Howard Chu
77783bb4b7 Fix typo in previous commit. (Benign, code was #if'd out anyway.) 2002-08-23 22:29:08 +00:00
Pierangelo Masarati
f11c6b27e7 Final run of changes to back-sql; IBM db2 support has been tested.
Now related ITSes need be audited and possibly closed.

Enhancements:
  - re-styled code for better readability
  - upgraded backend API to reflect recent changes
  - LDAP schema is checked when loading SQL/LDAP mapping
  - AttributeDescription/ObjectClass pointers used for more efficient
    mapping lookup
  - bervals used where string length is required often
  - atomized write operations by committing at the end of each operation
    and defaulting connection closure to rollback
  - added LDAP access control to write operations
  - fully implemented modrdn (with rdn attrs change, deleteoldrdn,
    access check, parent/children check and more)
  - added parent access control, children control to delete operation
  - added structuralObjectClass operational attribute check and
    value return on search
  - added hasSubordinate operational attribute on demand
  - search limits are appropriately enforced
  - function backsql_strcat() has been made more efficient
  - concat function has been made configurable by means of a pattern
  - added config switches:
      - fail_if_no_mapping	write operations fail if there is no mapping
      - has_ldapinfo_dn_ru	overrides autodetect
      - concat_pattern		a string containing two '?' is used
				(note that "?||?" should be more portable
				than builtin function "CONCAT(?,?)")
      - strcast_func		cast of string constants in "SELECT DISTINCT					statements (needed by PostgreSQL)
      - upper_needs_cast	cast the argument of upper when required
				(basically when building dn substring queries)

Todo:
  - add security checks for SQL statements that can be injected (?)
  - re-test with previously supported RDBMs
  - replace dn_ru and so with normalized dn (no need for upper() and so
    in dn match)
  - implement a backsql_normalize() function to replace the upper()
    conversion routines
  - note that subtree deletion, subtree renaming and so could be easily
    implemented (rollback and consistency checks are available :)
  - implement "lastmod" and other operational stuff (ldap_entries table ?)
2002-08-23 08:54:08 +00:00
Pierangelo Masarati
7b4b4b34c4 fixed bug in reading size/time limits without style, in the form 'size=number', 'time=number' 2002-08-23 08:50:34 +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
Pierangelo Masarati
ff4edfa054 added assertions to catch helper function misuse 2002-08-23 08:46:45 +00:00
Howard Chu
b3ddb5734b Fix indexing bug in splitting indirect blocks 2002-08-23 03:07:33 +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
3a15afa057 Fix abstract schema check 2002-08-22 02:27:42 +00:00
Pierangelo Masarati
d4bc79864d fix previous commit 2002-08-21 18:11:30 +00:00
Jong Hyuk Choi
b81122d441 Slapadd is changed to include Operational Attributes (entryUUID, entryCSN,
creatorsName, modifiersName, createTimestamp, modifyTimestamp) when it adds
from ldif file. Month field in time format in entryCSN is changed to 1~12.
2002-08-21 00:11:32 +00:00
Kurt Zeilenga
65760c064e ITS#2004 AD lang bug fix 2002-08-20 19:08:18 +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
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
Kurt Zeilenga
041c3700e1 fix typo in last commit 2002-08-19 07:08:59 +00:00
Kurt Zeilenga
930ecd3930 Normalized form should be pretty. 2002-08-19 07:07:25 +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
Kurt Zeilenga
6e02fe2e8a Remove #if 0 code 2002-08-16 18:58:39 +00:00
Pierangelo Masarati
05348c5fc5 CHANGES:
- now all write operations appear to work correctly with PostgeSQL 7.0
- all write operations have been made transactional (atomic writes to
  entries are committed separately only in case of complete^1 success
  while all other operations are rolled-back by default)
- more cleanup and handling of exceptional conditions

TODO:
- deen to check with different databases and more up to date versions
  of both unixODBC and PostgreSQL.

^1: attribute add/modify/delete operations silently succeed if the
    appropriate add/delete proc does not exist for each attribute;
    this may be correct to hide undesired/unimplemented correspondence
    between LDAP and SQL databases; however, a more appropriate
    LDAP behavior would be a failure with LDAP_UNAVAILABLE if a
    single write operation cannot be executed for such reason
2002-08-16 16:45:24 +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
Pierangelo Masarati
3a26ef5bbb silence warnings 2002-08-16 16:33:22 +00:00
Pierangelo Masarati
a7349c100e fix printableStringValidate return value bug 2002-08-16 16:32:42 +00:00
Pierangelo Masarati
115408986c changes:
- re-style according to the style giudelines for better readability
- updated to recent frontend/backend API changes
- fixed a few quirks about normalization
- "optimized" a few memory allocation/string handling functions
- fixed a few quirks about add/modify (still have to look ad modrdn)

todo:
- there is still something broken (at least with PostgreSQL and IBM db2,
  the two RDBMS O have at hand) when adding
- move everything to struct bervals and try to save a few strlen
- try some LDAP/SQL syntax relation to use appropriate value bind if possible
- ...
2002-08-13 17:12:27 +00:00