1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-14 12:23:52 +03:00
Commit Graph

28 Commits

Author SHA1 Message Date
Andrew Bartlett
f5ce04b904 r25218: After discussion with Simo, remove the subclass support from LDB.
Subclass support was designed to avoid needing to spell out the full
list of objectClasses that an entry was in.  However, Samba4 now
enforces this restriction in the objectClass module, and the way
subclass matching was handled was complex and counter-intuitive in my
opinion (and did not match LDAP).

Andrew Bartlett
2007-10-10 15:06:56 -05:00
Andrew Tridgell
40c0919aaa r23798: updated old Temple Place FSF addresses to new URL 2007-10-10 14:59:15 -05:00
Andrew Tridgell
84b468b2f8 r23795: more v2->v3 conversion 2007-10-10 14:59:14 -05:00
Jelmer Vernooij
1093875d59 r22681: Fix standalone ldb build when parent directory name != ldb. 2007-10-10 14:52:00 -05:00
Stefan Metzmacher
8dda4342f6 r20168: start separating attributes and syntaxes
metze
2007-10-10 14:29:17 -05:00
Stefan Metzmacher
f129d78256 r19964: make debuging easier and report usefull error messages
metze
2007-10-10 14:28:40 -05:00
Simo Sorce
627ed8b516 r19888: make it possible to use default attrib handlers from extensions
list more DN attributes as part of samba attribute handlers
(nCName moved here)
2007-10-10 14:28:32 -05:00
Simo Sorce
3929c086d5 r19832: better prototypes for the linearization functions:
- ldb_dn_get_linearized
  returns a const string

- ldb_dn_alloc_linearized
  allocs astring with the linearized dn
2007-10-10 14:28:22 -05:00
Simo Sorce
a580c871d3 r19831: Big ldb_dn optimization and interfaces enhancement patch
This patch changes a lot of the code in ldb_dn.c, and also
removes and add a number of manipulation functions around.

The aim is to avoid validating a dn if not necessary as the
validation code is necessarily slow. This is mainly to speed up
internal operations where input is not user generated and so we
can assume the DNs need no validation. The code is designed to
keep the data as a string if possible.

The code is not yet 100% perfect, but pass all the tests so far.
A memleak is certainly present, I'll work on that next.

Simo.
2007-10-10 14:28:22 -05:00
Stefan Metzmacher
4edeef56dc r19742: fix compiler warnings
metze
2007-10-10 14:28:18 -05:00
Stefan Metzmacher
67a6a41ba3 r19196: merge from samba3:
pass always a mem_ctx to functions and a ldb_context where needed

metze
2007-10-10 14:20:52 -05:00
Andrew Bartlett
a113e47784 r18978: Fix bug found by:
http://www.ee.oulu.fi/research/ouspg/protos/testing/c06/ldapv3/

The issue here is that if the UTF8 conversion fails, because this
isn't actually UTF8 data, then we need to do a binary compare instead.

Andrew Bartlett
2007-10-10 14:20:26 -05:00
Andrew Tridgell
18542f184f r18130: the move to system/ in libreplace broke some things ... should be
happier now
2007-10-10 14:17:37 -05:00
Stefan Metzmacher
24c6e2f731 r13359: make sure we don't look at s[-1]
metze
2007-10-10 13:51:49 -05:00
Simo Sorce
e12f070958 r13347: - Now we compare values with an optimized utf8
safe function if the user provides an utf8
compliant casefold function to ldb.

- Fix toupper_m and tolower_m to not crash if
the case tables are not found

- Let load_case_table() search into the correct
directory in the search tree for the case
tables so that we can test utf8

Simo
2007-10-10 13:51:47 -05:00
Simo Sorce
6104f90086 r13335: Fix the build and add an utf8 safe ldb_hadler_fold function
based on ldb_casefold
2007-10-10 13:51:45 -05:00
Stefan Metzmacher
380938e97f r12829: fix ldb headers, to not include '<...>' files in .c files
this helps in getting symbol -fvisibility=hidden (GCC 4 feature) working later.

metze
2007-10-10 13:50:03 -05:00
Simo Sorce
72a86d74a9 r12827: This was a very well concealed bug.
Thank to Andrew Bartlet for finding out a test case that showed it up.

Simo.
2007-10-10 13:50:03 -05:00
Volker Lendecke
55b5b100e9 r11378: Fix an uninitialized variable warning. Tridge, I'm 99.999% sure this was a
simple cut&paste error, but you might recheck this.

Volker
2007-10-10 13:45:29 -05:00
Andrew Tridgell
efd7dd1a77 r10915: added a standard attribute handler for a ldap UTC time string 2007-10-10 13:39:42 -05:00
Andrew Tridgell
f6818daecc r10913: This patch isn't as big as it looks ...
most of the changes are fixes to make all the ldb code compile without
warnings on gcc4. Unfortunately That required a lot of casts :-(

I have also added the start of an 'operational' module, which will
replace the timestamp module, plus add support for some other
operational attributes

In ldb_msg_*() I added some new utility functions to make the
operational module sane, and remove the 'ldb' argument from the
ldb_msg_add_*() functions. That argument was only needed back in the
early days of ldb when we didn't use the hierarchical talloc and thus
needed a place to get the allocation function from. Now its just a
pain to pass around everywhere.

Also added a ldb_debug_set() function that calls ldb_debug() plus sets
the result using ldb_set_errstring(). That saves on some awkward
coding in a few places.
2007-10-10 13:39:41 -05:00
Simo Sorce
f6ea6e9382 r10250: the comparison is caseless so we must caseless subtract
otherwise we get the wrong result when comparing upper
case chars with lower case chars
2007-10-10 13:38:11 -05:00
Jelmer Vernooij
7ecb6988e7 r9766: Prevent erroneous OOM message
ldb_dup_val() sets out->data to NULL if in->length == 0
2007-10-10 13:34:57 -05:00
Love Hörnquist Åstrand
56fd21c806 r8394: Make sure the argument to ctype is*(3) macros are unsigned char as
required by ISO C99.
2007-10-10 13:20:14 -05:00
Simo Sorce
4eb5863042 r8373: New wildcard matching code.
This code applies correct ldap standard wildcard matching code
removes WILDCARD matching from tdb @ATTRIBUTES, that's now handled independently
adds some more tests for wildcard matching
fixes dn comparison code in ldb_match
2007-10-10 13:20:13 -05:00
Simo Sorce
624a73148d r8082: large rewite of ldb_dn.c
- we do not support multpiple attribute components anymore, makes code a lot easier
  they will be readded later if we found out they are really used, so far my tests
  show w2k3 do not handle them as well

- fix escaping issues, move component value to be in an ldb_val structure
  still need to handle binary values case

- make cononicalize functions leak less memory by giving a specific memory context

- fix tests scripts so that test-ldap can start
- make test not delete databases on completion so that I can inspect them
2007-10-10 13:19:06 -05:00
Andrew Tridgell
912fa269d2 r8041: remove a mis-spelled debug message :-) 2007-10-10 13:19:01 -05:00
Andrew Tridgell
944c5844ab r8037: a fairly major update to the internals of ldb. Changes are:
- moved the knowledge of attribute types out of ldb_tdb and into the
   generic ldb code. This allows the ldb_match() message match logic
   to be generic, so it can be used by other backend

 - added the generic ability to load attribute handlers, for
   canonicalisation, compare, ldif read and ldif write. In the future
   this will be used by the schema module to allow us to correctly
   obey the attributetype schema elements

 - added attribute handlers for some of the core ldap attribute types,
   Integer, DirectoryString, DN, ObjectClass etc

 - added automatic registration of attribute handlers for well-known
   attribute names 'cn', 'dc', 'dn', 'ou' and 'objectClass'

 - converted the objectSid special handlers for Samba to the new system

 - added more correct handling of indexing in tdb backend based on the
   attribute canonicalisation function

 - added generic support for subclasses, moving it out of the tdb
   backend. This will be used in future by the schema module

 - fixed several bugs in the dn_explode code. It still needs more
   work, but doesn't corrupt ldb dbs any more.
2007-10-10 13:19:01 -05:00