summaryrefslogtreecommitdiffstats
path: root/lib/ldb/ldb_tdb
Commit message (Collapse)AuthorAgeFilesLines
* lib/ldb: fix compiler warnings in ldb_tdb.cStefan Metzmacher2014-11-141-3/+11
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* ldb: Return LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS rather than OPERATIONS_ERROR ↵Andrew Bartlett2014-02-051-2/+5
| | | | | | | | | | | | on EACCES and EPERM This makes provision errors clearer in Samba. Andrew Bartlett Reviewed-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* ldb_tdb: Warn when reindexing is doneMatthieu Patou2013-05-202-1/+12
| | | | | | | | | Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon May 20 15:47:33 CEST 2013 on sn-devel-104
* ldb-tdb: Document ltdb_index_add1 for more clarityMatthieu Patou2013-02-081-3/+20
| | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ldb-tdb: Fix a wrong parameter in ltdb_storeMatthieu Patou2013-02-081-1/+2
| | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ldb_tdb: raise level of full index scan message so that it starts to be ↵Matthieu Patou2013-02-081-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>
* ldb: fixed callers for ldb_pack_data() and ldb_unpack_data()Andrew Tridgell2012-11-014-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>
* ldb: move ldb_pack.c into commonAndrew Tridgell2012-11-011-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>
* ldb: Remove no-longer-existing ltdb_unpack_data_free from ldb_tdb.hAndrew Bartlett2012-10-311-2/+0
|
* ldb: Change ltdb_unpack_data to take an ldb_contextAndrew Bartlett2012-10-315-9/+7
| | | | | | It always de-references the module to find the ldb anyway. Andrew Bartlett
* LDB:ldb_tdb.c - deny multi-valued attributes manipulation with doubletsMatthias Dieter Wallnöfer2012-08-221-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>
* lib/ldb: Use tdb_parse_record and a callback rather than tdb_fetch()Andrew Bartlett2012-08-101-16/+38
| | | | | | | This avoid allocation at the tdb layer as we will allocate this with talloc right away anyway. Andrew Bartlett
* lib/ldb: Use tdb_exists() rather than tdb_fetch()/talloc_free()Andrew Bartlett2012-08-091-7/+7
| | | | | | | This avoids pulling the record and doing an allocation when we just want to know if it exists. Andrew Bartlett
* lib/ldb: Ensure rename target does not exist before deleting old recordAndrew Bartlett2012-07-311-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
* ldb: use tdb directly, not tdb_compat.Rusty Russell2012-06-195-10/+14
| | | | | Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* TDB2: make SAMBA use tdb1 again for the moment.Rusty Russell2012-06-192-31/+0
| | | | | | | Otherwise the following surgery will break the SAMBA build and testsuite. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* LDB:ldb_tdb/ldb_tdb.c - allow LDB modify replaces with different value orderingMatthias Dieter Wallnöfer2012-04-181-3/+10
| | | | | | This is essential for fixing up wrong ordered "objectClass" attributes. Signed-off-by: Andrew Tridgell <tridge@samba.org>
* LDB/s4 - deny the "(dn=...)" syntax on search filters when in AD modeMatthias Dieter Wallnöfer2012-03-263-2/+19
| | | | | | | Achieve this by introducing a "disallowDNFilter" flag. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* ldb:ldb_tdb.c - fix warnings in "ltdb_init_rootdse"Matthias Dieter Wallnöfer2011-12-231-7/+1
| | | | | | We should ignore the LDB result. Signed-off-by: Stefan Metzmacher <metze@samba.org>
* ldb: Output more error information when a connect failsAndrew Bartlett2011-10-181-0/+5
|
* ldb: fixed a race in ldb initialisationAndrew Tridgell2011-10-181-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
* tdb_compat: adapt to tdb2 API change.Rusty Russell2011-09-141-1/+3
| | | | | | | Add the ecode arg to all the log functions, and log it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* ldb: make the 'spy' code more paranoidAndrew Tridgell2011-09-012-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
* ldb: Remove use after free in error caseAndrew Bartlett2011-08-131-1/+0
| | | | | Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Sat Aug 13 13:49:44 CEST 2011 on sn-devel-104
* ldb-tdb: Introduce a flag on ltdb_add_internal to indicate whether unique ↵Matthieu Patou2011-07-131-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
* ldb: make ldb a top level library for Samba 4.0Andrew Bartlett2011-07-057-0/+4822
Signed-off-by: Andrew Tridgell <tridge@samba.org>