summaryrefslogtreecommitdiff
path: root/lib/ldb/ldb_tdb
AgeCommit message (Collapse)AuthorFilesLines
2013-02-08ldb-tdb: Document ltdb_index_add1 for more clarityMatthieu Patou1-3/+20
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-08ldb-tdb: Fix a wrong parameter in ltdb_storeMatthieu Patou1-1/+2
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-08ldb_tdb: raise level of full index scan message so that it starts to be ↵Matthieu Patou1-1/+1
really visible We don't want to have to set log level to 4 or 5 AND set the environment variable to be able to see those log messages Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2012-11-01ldb: fixed callers for ldb_pack_data() and ldb_unpack_data()Andrew Tridgell4-14/+8
with ltdb_pack_data() and ltdb_unpack_data() now moved into common, we need to increase the minor version and fixup callers of the API Note that this relies on struct ldb_val being the same shape as TDB_DATA, in much the same way as we rely on ldb_val and DATA_BLOB being the same shape. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2012-11-01ldb: move ldb_pack.c into commonAndrew Tridgell1-290/+0
this code should not be tied to the ldb_tdb backend, both because it could be used for any record oriented backend, and because it should be exposed for use by diagnosis/repair tools such as the recently added ldbdump tool Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2012-10-31ldb: Remove no-longer-existing ltdb_unpack_data_free from ldb_tdb.hAndrew Bartlett1-2/+0
2012-10-31ldb: Change ltdb_unpack_data to take an ldb_contextAndrew Bartlett5-9/+7
It always de-references the module to find the ldb anyway. Andrew Bartlett
2012-08-22LDB:ldb_tdb.c - deny multi-valued attributes manipulation with doubletsMatthias Dieter Wallnöfer1-1/+18
This refers to LDB add operations as well, we have only to be careful on "@ATTRIBUTES" entries. E.g. dn: cn=testperson,cn=users,dc=...,dc=... objectClass: person url: www.example.com url: www.example.com should not work. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-10lib/ldb: Use tdb_parse_record and a callback rather than tdb_fetch()Andrew Bartlett1-16/+38
This avoid allocation at the tdb layer as we will allocate this with talloc right away anyway. Andrew Bartlett
2012-08-09lib/ldb: Use tdb_exists() rather than tdb_fetch()/talloc_free()Andrew Bartlett1-7/+7
This avoids pulling the record and doing an allocation when we just want to know if it exists. Andrew Bartlett
2012-07-31lib/ldb: Ensure rename target does not exist before deleting old recordAndrew Bartlett1-2/+40
This is all in a transaction, but when we are handling rename errors in the repl_meta_data module, we key off the error, and do not close the transaction. We found that the old record was gone and so could not try renaming it again to a conflict DN. Andrew Bartlett
2012-06-19ldb: use tdb directly, not tdb_compat.Rusty Russell5-10/+14
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-19TDB2: make SAMBA use tdb1 again for the moment.Rusty Russell2-31/+0
Otherwise the following surgery will break the SAMBA build and testsuite. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-04-18LDB:ldb_tdb/ldb_tdb.c - allow LDB modify replaces with different value orderingMatthias Dieter Wallnöfer1-3/+10
This is essential for fixing up wrong ordered "objectClass" attributes. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2012-03-26LDB/s4 - deny the "(dn=...)" syntax on search filters when in AD modeMatthias Dieter Wallnöfer3-2/+19
Achieve this by introducing a "disallowDNFilter" flag. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-12-23ldb:ldb_tdb.c - fix warnings in "ltdb_init_rootdse"Matthias Dieter Wallnöfer1-7/+1
We should ignore the LDB result. Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-18ldb: Output more error information when a connect failsAndrew Bartlett1-0/+5
2011-10-18ldb: fixed a race in ldb initialisationAndrew Tridgell1-1/+9
This fixes a race when two processes initialise the same ldb database at the same time. One of them could fail due to the other creating the @BASEINFO record first. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Tue Oct 18 03:54:42 CEST 2011 on sn-devel-104
2011-09-14tdb_compat: adapt to tdb2 API change.Rusty Russell1-1/+3
Add the ecode arg to all the log functions, and log it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-09-01ldb: make the 'spy' code more paranoidAndrew Tridgell2-10/+12
the spy code in ldb_tdb was added a while ago to overcome a memory hierarchy problem with async ldb errors. Recently we started to get valgrind errors related to the order of free in the spy code. This patch ensures that we don't try to use a freed spy pointer. This prevents the valgrind errors, although I suspect that the memory hierarchy we have here is more complex than it needs to be Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Sep 1 08:54:23 CEST 2011 on sn-devel-104
2011-08-13ldb: Remove use after free in error caseAndrew Bartlett1-1/+0
Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Sat Aug 13 13:49:44 CEST 2011 on sn-devel-104
2011-07-13ldb-tdb: Introduce a flag on ltdb_add_internal to indicate whether unique ↵Matthieu Patou1-4/+11
value test should be performed or not The function ltdb_add_internal is called either from ltdb_add or ltdb_rename. In case of add we enforce the unique test (unless it has been relaxed by a upper module through the LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK flag), but for rename as it is translated by a delete + a add we relax the test as we can have one or more attribute which are supposed to be single valued but that are not (ie. when we have a couple of deleted value on a single valued attribute), we have already done the tests on insert so make the assumption that the values are OK. Without this patch deleting a subnet that has been affected to more than one site fails as the delete is in fact a rename to GUID\0DEL ... with an attribute siteObject that has 1 active link value and 1 inactive link value Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Wed Jul 13 02:29:20 CEST 2011 on sn-devel-104
2011-07-05ldb: make ldb a top level library for Samba 4.0Andrew Bartlett7-0/+4822
Signed-off-by: Andrew Tridgell <tridge@samba.org>