1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00
Commit Graph

34 Commits

Author SHA1 Message Date
Derrell Lipman
f021dffb69 r7601: ldb_sqlite3 work in progress
(This used to be commit 0a64948152)
2007-10-10 13:18:13 -05:00
Andrew Tridgell
4b0e5bd753 r7527: - added a ldb_search_bytree() interface, which takes a ldb_parse_tree
instead of a search expression. This allows our ldap server to pass
  its ASN.1 parsed search expressions straight to ldb, instead of going
  via strings.

- updated all the ldb modules code to handle the new interface

- got rid of the separate ldb_parse.h now that the ldb_parse
  structures are exposed externally

- moved to C99 structure initialisation in ldb

- switched ldap server to using ldb_search_bytree()
(This used to be commit 96620ab2ee)
2007-10-10 13:18:06 -05:00
Derrell Lipman
a1ba224107 r7276: - moved static tdb function ltdb_dn_fold() into common/ so that it can be
called from multiple backends.  (ldb_sqlite3 needs it too.)  Added parameter
  for a callback function that determines whether an attribute needs case
  folding.
- begin to prepare for sqlite3 in build process
- work-in-progress updates, on ldb_sqlite3
(This used to be commit a80bced0b9)
2007-10-10 13:17:35 -05:00
Simo Sorce
ca4e0c8539 r6867: this code will change the way the @ATTRIBUTES object is handled
this object properties are now used as multivalue attributes
now all values inserted are checked against a "valid values table"

eg:

this form is now accepted:

dn: @ATTRIBUTES
uid: CASE_INSENSITIVE
uid: WILDCARD

this form is now rejected:

dn: @ATTRIBUTES
uid: CASE_INSENSITIVE WILDCARD

please update your .ldb files if you make use of @ATTRIBUTES
(sam.ldb heavily uses it)

the code passes all make test tests for both tdb and ldap, it also
passes the new test to check for wrong @ATTRIBUTES attribute values

Simo.
(This used to be commit 1295b891a2)
2007-10-10 13:16:52 -05:00
Andrew Tridgell
425350bb61 r6560: added a tdb_chainlock_read() call in ldb_search(). This guarantees
that ldb_search() sees a single consistent view of the database (by
blocking writes during a ldb_search)
(This used to be commit 917f2a8a07)
2007-10-10 13:16:25 -05:00
Simo Sorce
fe4d985b6f r6470: Remove ldb_search_free() it is not needed anymore.
Just use talloc_free() to release the memory after an ldb_search().
(This used to be commit 4f0948dab0)
2007-10-10 13:11:40 -05:00
Simo Sorce
b1b14817ea r5585: LDB interfaces change:
changes:
- ldb_wrap disappears from code and become a private structure of db_wrap.c
  thanks to our move to talloc in ldb code, we do not need to expose it anymore

- removal of ldb_close() function form the code
  thanks to our move to talloc in ldb code, we do not need it anymore
  use talloc_free() to close and free an ldb database

- some minor updates to ldb modules code to cope with the change and fix some
  bugs I found out during the process
(This used to be commit d58be9e74b)
2007-10-10 13:10:55 -05:00
Andrew Tridgell
5a88d5211b r5374: - changed the dn key code in the ldb tdb backend to correctly honor
the case sensitive/insensitive flags on sections of a dn. So if a dn
  is made up of 4 attributes, and 2 of those are case insensitive and 2
  are case sensitive, then all the attribute names are uppercases, but
  only the values of the case insensitive attributes are uppercased when
  forming the tdb key.

- added code to canonicalise the dn, removing leading and trailing
  spaces from attribute names and values

- when the @ATTRIBUTES record changes, fix the dn keys of any records that should now have new
  dn keys due to changes in the case sensitivity of the record

I really did this to allow me to make the WINS database properly case
insensitive, but it is also the correct general fix for ldb, as it
matches the LDAP specification (and w2k LDAP server behaviour)
(This used to be commit 0f034dc563)
2007-10-10 13:09:48 -05:00
Simo Sorce
a2f77f979d r4714: move the ldb code to the new talloc interface (eg remove _p suffix)
this helps standalone building of ldb

renew the schema module
split code into functions to improve readability and code reuse

add and modify works correctly but we need a proper testsuite

Simo
(This used to be commit a681ae365f)
2007-10-10 13:08:47 -05:00
Andrew Tridgell
1a988ec9af r4474: - converted ldb to use talloc internally
- added gcov flags to Makefile.ldb

- expanded ldb test suite to get more coverage
(This used to be commit 0ab98f50a7)
2007-10-10 13:07:55 -05:00
Volker Lendecke
b29b10e48e r4366: Fix ldb_modify_internal: Adding values to an existing attribute you could end
up with a corrupt data structure on disk, namely with two attribute structures
for the same attribute name.

Volker
(This used to be commit 284044b5b2)
2007-10-10 13:07:38 -05:00
Andrew Tridgell
cf4298874c r4281: fixed an ldb indexing bug in ldb found by volker.
index entries were not always being removed on modify
(This used to be commit 9c668e7b43)
2007-10-10 13:07:31 -05:00
Andrew Tridgell
a42dba94d0 r4071: - ldap does allow adding additional attribute values with a modify
operation, but not if the value already exists

- fixed syntax of test.ldif for ldap backend
(This used to be commit 29225d0bec)
2007-10-10 13:06:22 -05:00
Simo Sorce
a4de8cd6a5 r3897: add a locking infrastructure
(This used to be commit a99c0adb09)
2007-10-10 13:06:02 -05:00
Stefan Metzmacher
8a18778286 r3783: - don't use make proto for ldb anymore
- split ldh.h out of samba's includes.h

- make ldb_context and ldb_module private to the subsystem

- use ltdb_ prefix for all ldb_tdb functions

metze
(This used to be commit f5ee40d6ce)
2007-10-10 13:05:52 -05:00
Simo Sorce
679e95db03 r3754: merge in ldb modules support from the tmp branch ldbPlugins
(This used to be commit 71323f424b)
2007-10-10 13:05:51 -05:00
Stefan Metzmacher
6d18904b03 r3095: - fix a free'ing of msg.dn
- reenable index tests

metze
(This used to be commit 1e7e94fdb1)
2007-10-10 13:02:20 -05:00
Stefan Metzmacher
a9bd405497 r3093: - implment ldb_rename() and ldbrename
- add tests for ldbrename

- disable all tests which regenerate the index
  (this is broken for me...the process hangs,
   tridge we need to discuss that)

- link only the needed stuff to the ldb tools

- build ldbtest inside samba

metze
(This used to be commit 18552f4786)
2007-10-10 13:02:20 -05:00
Andrew Tridgell
37dc4e9bf7 r2192: removed an erroneous free() call on an error path
(This used to be commit c80d686f59)
2007-10-10 12:58:30 -05:00
Andrew Tridgell
6f47dec364 r1511: fixed a free() that should be ldb_free()
this might explain the tdb corruption that metze found - it caused heap corruption that affected tdb
(This used to be commit 31d55dfb44)
2007-10-10 12:57:37 -05:00
Tim Potter
34ca729f73 r1374: Fix signed/unsigned warnings (actually found by g++) after unsigned int
changes in r1018.
(This used to be commit 45b4016530)
2007-10-10 12:56:54 -05:00
Andrew Tridgell
054453b584 r811: make the ldb_modify REPLACE semantics better match LDAP (ie. no error
on the attribute not existing and allow an empty replace)
(This used to be commit 1418b667d9)
2007-10-10 12:53:51 -05:00
Andrew Tridgell
265023fafa r574: - another attempt at const cleanliness in ldb
- fixed a problem with searching for values containing an '=' sign

 - fixed the semantics of attempting an attribute deletion on an attribute that doesn't exist.

 - added some more ldb_msg_*() utilities
(This used to be commit 62b4ec367d)
2007-10-10 12:51:47 -05:00
Andrew Tridgell
d8ce7c6a2a r502: modified ldb to allow the use of an external pool memory
allocator. The way to use this is to call ldb_set_alloc() with a
function pointer to whatever memory allocator you like. It includes a
context pointer to allow for pool based allocators.
(This used to be commit 3955c482e6)
2007-10-10 12:51:45 -05:00
Andrew Tridgell
d6f20f8e92 r462: added an explanation about the rather complex ltdb_key() function
(This used to be commit 894e44022d)
2007-10-10 12:51:44 -05:00
Andrew Tridgell
b96695ca23 r454: allow a non-URL form of a filename to be used in ldb_connect(). This
makes it a little easier to work with the ldb tools
(This used to be commit 03df31cef0)
2007-10-10 12:51:43 -05:00
Andrew Tridgell
0dad5a3427 r435: a major upgrade for ldb
- added the ability to mark record attributes as being CASE_INSENSITIVE, WILDCARD or INTEGER.

 - added the ability to support objectclass subclasses, and to search by a parent class

 - added internal support for case insensitive versus case sensitive
   indexing (not UTF8 compliant yet)

 - cleaned up a number of const warnings

 - added a number of helper functions for fetching integers, strings and doubles

 - added a in-memory cache for important database properties, supported by a
   database sequence number

 - changed some variable names to avoid conflicts with C++
(This used to be commit f2bf06f25c)
2007-10-10 12:51:38 -05:00
Andrew Tridgell
6411aa483f r381: make the code more C++ friendly
(This used to be commit 8acecc7f27)
2007-10-10 12:51:36 -05:00
Andrew Tridgell
8882401382 r373: use a much larger default tdb hash size in ldb
(This used to be commit 54f47c45b8)
2007-10-10 12:51:35 -05:00
Andrew Tridgell
07882b5460 r343: added automatic reindexing of the database when the index list changes
(This used to be commit a811640ce4)
2007-10-10 12:51:33 -05:00
Andrew Tridgell
ac193579e7 r152: a quick airport commit ....
added ldbedit, a _really_ useful command

added ldbadd, ldbdel, ldbsearch and ldbmodify to build

solved lots of timezone issues, we now pass the torture tests with
client and server in different zones

fixed several build issues

I know this breaks the no-LDAP build. Wait till I arrive in San Jose for that
fix.
(This used to be commit af34710d4d)
2007-10-10 12:51:11 -05:00
Richard Sharpe
177777b055 r141: A number of changes to get things working on FreeBSD and reduce the breakage
caused by someone recently ...

1. Add configure check HAVE_COMPARISON_FN_T to see if this is defined. I
have not checked this on Linux yet, but will do so soon.

2. Add the definitions of malloc_p, realloc_p etc.

3. Check for LDAP and don't build stuff that depends on LDAP if we don't\
have it.

It currently builds on FreeBSD but there is one warning printed out at the end.
(This used to be commit 7b34fbe0f2)
2007-10-10 12:51:11 -05:00
Andrew Tridgell
ee44733f94 added the rest of the ldb_modify() code, which required a fairly large
change in the ldb API. The API is now much closer to LDAP.
(This used to be commit e9e85c4644)
2004-04-03 12:29:21 +00:00
Andrew Tridgell
58d50a614f make a more recent snapshot of ldb available to interested
people. Note that I decided to make it LGPL.

ldb is not finished yet, but enough of it is there for people to get
an idea of what it does, and quite a few simple tests work
(This used to be commit dc6f41f9e7)
2004-03-31 06:45:39 +00:00