summaryrefslogtreecommitdiffstats
path: root/lib/ldb
Commit message (Collapse)AuthorAgeFilesLines
* ldb: make the successful ldb_transaction_start() message clearerAndrew Bartlett2014-05-031-4/+8
| | | | | | | | | | | Change-Id: I00d0705484c3b53f55c4a8ec2953e92329b7408e Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat May 3 10:20:52 CEST 2014 on sn-devel-104
* ldb: change version to 1.1.17Stefan Metzmacher2014-05-023-1/+265
| | | | | | | | This adds some pyldb methods for ldb.Dn. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ldb:pyldb: add some more helper functions for LdbDnStefan Metzmacher2014-05-021-0/+112
| | | | | | | | This adds [g|s]et_component[|_name|_value]() and get_rdn_[name|value](). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ldb:pyldb: fix doc string for set_extended_component()Stefan Metzmacher2014-05-021-1/+1
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ldb:pyldb: add some const to PyObject_FromLdbValue()Stefan Metzmacher2014-05-021-1/+1
| | | | | | | | PyString_FromStringAndSize() makes a copy of the value... Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ldb: Add a env variable to disable RTLD_DEEPBIND.Andreas Schneider2014-04-171-6/+19
| | | | | | | | | | | | | | We need a way to disable this in order to allow the ldb_*ldap modules to work with a preloaded socket wrapper. The only known user is the bind_dlz module, but symbol versioniong might be enough... So in future we may remove this completely or at least invert the default behavior. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* dlinklist: Fix a typoVolker Lendecke2014-04-021-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Apr 2 17:11:37 CEST 2014 on sn-devel-104
* lib/ldb: explicitly use allow_warnings=TrueStefan Metzmacher2014-04-021-0/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ldb: pass module init errors back to the callerAndrew Bartlett2014-02-051-2/+3
| | | | | | | | | | | This makes provision errors clearer in Samba, as we can now get permission denied errors presented from LDB modules. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Jelmer Vernooij <jelmer@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>
* samba:python - Py_RETURN_NONE remove compatibility code for releases < 2.4Matthias Dieter Wallnöfer2014-01-092-9/+0
| | | | | | | | | http://www.python.org/doc//current/c-api/none.html Reviewed-By: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date(master): Thu Jan 9 16:27:47 CET 2014 on sn-devel-104
* ldb: Fix 1138330 Dereference null return valueVolker Lendecke2013-12-171-0/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/ldb fix compiler warningsChristian Ambach2013-12-121-2/+2
| | | | | | | about potentially uninitialized variables Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/ldb fix compiler warningsChristian Ambach2013-12-121-2/+2
| | | | | | | about potentially uninitialized variables Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* ldb: bad if test in ldb_comparison_fold()Jeremy Allison2013-12-071-1/+1
| | | | | | | | | | | | Found by David Binderman <dcb314@hotmail.com> BUG: https://bugzilla.samba.org/show_bug.cgi?id=10305 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Sat Dec 7 11:10:47 CET 2013 on sn-devel-104
* ldb: use of NULL pointer bugfixPavel Reichl2013-12-031-2/+2
| | | | | Autobuild-User(master): Simo Sorce <idra@samba.org> Autobuild-Date(master): Tue Dec 3 21:13:53 CET 2013 on sn-devel-104
* ldb: Fix CID 241329 Array compared against 0Volker Lendecke2013-11-111-1/+1
| | | | | | | u.generate.remote_names is an array, not a pointer Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* ldb: Fix CID 240798 Uninitialized pointer readVolker Lendecke2013-10-221-1/+1
| | | | | | | | | | | Not called right now, because nobody tries multiple sort attributes. But if someone did, build_response would have looked at the uninitialized controls. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Oct 22 03:28:20 CEST 2013 on sn-devel-104
* ldb:rdn_name: reject 'distinguishedName' depending of the MOD flagsStefan Metzmacher2013-10-101-2/+8
| | | | | | | | | | | | This is what Windows 2008 R2 returns: LDB_MOD_ADD => LDB_ERR_UNWILLING_TO_PERFORM LDB_MOD_REPLACE => LDB_ERR_CONSTRAINT_VIOLATION LDB_MOD_DEL => LDB_ERR_UNWILLING_TO_PERFORM Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-openldap: Remove use of talloc_reference in ldb_map_outbound.cNadezhda Ivanova2013-09-231-9/+13
| | | | | | | | | | Instead of referencing the values array of the element to the new element, copy them, to avoid use of talloc_reference and remove a warning of talloc_steal with reference. The issue is only relevant when openldap backend is used. Signed-off-by: Nadezhda Ivanova <nivanova@symas.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Add LDB_MAP_RENDROP optionHoward Chu2013-09-234-8/+23
| | | | | | | | | | Like LDB_MAP_RENAME, but drop the attribute if it occurs in an Add request. Used for distinguishedName attribute, is read-only and generated but for some bizarre reason AD allows it in an Add request. Signed-off-by: Howard Chu <hyc@symas.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
* Fix SEGV from improperly formed SUBSTRING/PRESENCE filterHoward Chu2013-09-191-1/+1
| | | | | | | | | | Signed-off-by: Howard Chu <hyc@symas.com> Reviewed-by: Simo Sorce <idra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Sep 19 01:42:43 CEST 2013 on sn-devel-104
* Cleanup map return codesHoward Chu2013-09-171-18/+17
| | | | | | | | | | -1 was never a valid LDB return code, just use OPERATIONS_ERROR Signed-off-by: Howard Chu <hyc@symas.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org> Autobuild-Date(master): Tue Sep 17 07:51:45 CEST 2013 on sn-devel-104
* ldb: Show the type of failing operation in default error messageAndrew Bartlett2013-09-161-1/+26
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ldb: Do not build libldb-cmdline when using system ldb.Jeroen Dekkers2013-09-101-4/+4
| | | | | | | | | | | | | | Cleanup leftover include and linking of libldb-cmdline in oLschema2ldif. Do not build libldb-cmdline anymore when using the system ldb, oLschema2ldif was the only reason for building libldb-cmdline. Signed-off-by: Jeroen Dekkers <jeroen@dekkers.ch> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Sep 10 12:52:26 CEST 2013 on sn-devel-104
* ldb_map: Fix CID 1034791 Dereference null return valueVolker Lendecke2013-08-191-0/+6
| | | | | | | | Add NULL checks Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pyldb: Fix CID 1034792 Dereference null return valueVolker Lendecke2013-08-191-0/+4
| | | | | | | | Add a NULL check Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ldb: Fix CID 1034793 Dereference null return valueVolker Lendecke2013-08-191-0/+4
| | | | | | | | Add a proper NULL check Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ldb: Fix a const warningVolker Lendecke2013-08-182-3/+3
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sun Aug 18 10:26:27 CEST 2013 on sn-devel-104
* pyldb: decrement ref counters on py_results and quiet warningsMatthieu Patou2013-08-061-0/+4
| | | | | | | | Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Matthieu Patou <mat@samba.org> Autobuild-Date(master): Tue Aug 6 00:32:46 CEST 2013 on sn-devel-104
* ldb: bump version to allow a depencency on the substring crash fixAndrew Bartlett2013-06-243-1/+265
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* ldb: Cope with substring match with no chunks in ldb_filter_from_treeAndrew Bartlett2013-06-241-1/+1
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* ldb: Ensure not to segfault on a filter such as (mail=)Andrew Bartlett2013-06-221-0/+5
| | | | | | | | | | | | | As reported by Robin McCorkell <xenopathic@gmail.com> triggered by Mozilla Thunderbird as an LDAP client. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Matthieu Patou <mat@matws.net> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Jun 22 09:33:14 CEST 2013 on sn-devel-104
* 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
* More generic check for OpenBSD platformVadim Zhukov2013-05-171-1/+1
| | | | | | | | | | | | | | | | OpenBSD versioning is different from many other projects, and, say, 5.0 does not differ from 4.9 more than from 5.1. So the right approach will be to check that platform name starts with "openbsd" instead. This is also the thing OpenBSD developers do when patching other software, so this patch is consistent with already existing practicies. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9888 Reviewed-by: Lars Müller <lars@samba.org> Reviewed-by: Björn Jacke <bj@sernet.de> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Fri May 17 17:58:16 CEST 2013 on sn-devel-104
* ldb: Add missing dependency on replace for ldbAndrew Bartlett2013-02-221-1/+1
| | | | | | | | This brings in rep_timegm() on Solaris for example. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ldb: Add more data test data for one level test casesMatthieu Patou2013-02-081-0/+14
| | | | | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Feb 8 06:46:40 CET 2013 on sn-devel-104
* ldb: Add tests for the python apiMatthieu Patou2013-02-081-0/+8
| | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ldb: Add more tests related to onelevel searchMatthieu Patou2013-02-082-0/+14
| | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ldb: use strncmp instead of strcmp when comparing the val partMatthieu Patou2013-02-081-2/+2
| | | | | | | val part of a DN's component is DATA_BLOB and nothing insure that it will be finished by a '\0' Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ldb: make test output more readableMatthieu Patou2013-02-081-4/+2
| | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* 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: Ensure to decrement the transaction_active whenever we delete a transactionAndrew Bartlett2013-01-264-1/+266
| | | | | | | | | | | | | | | | | This is in the error path for prepare_commit, which rarely fails, but when it does we need to ensure that when a new transaction is opened, that it really starts a new transaction. We bump the version to recognise critical fix for the AD DC Without this fix, a single invalid inbound replicated link disables all subsequent replication as we operate without a transaction (which is refused by ldb_tdb). Andrew Bartlett Reviewed-by: Matthieu Patou <mat@matws.net> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ldb: fix a warning by converting from TDB_DATA to struct ldb_valStefan Metzmacher2013-01-261-1/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* docs: ldbsearch.1.xml: Correct meta data.Karolin Seeger2013-01-241-3/+3
| | | | | | | | | | | Signed-off-by: Karolin Seeger <kseeger@samba.org> Karolin Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Jan 24 16:09:37 CET 2013 on sn-devel-104
* docs: ldbrename.1.xml: Correct meta data.Karolin Seeger2013-01-241-3/+3
| | | | | | | | Signed-off-by: Karolin Seeger <kseeger@samba.org> Karolin Reviewed-by: Stefan Metzmacher <metze@samba.org>
* docs: ldbmodify.1.xml: Correct meta data.Karolin Seeger2013-01-241-3/+3
| | | | | | | | Signed-off-by: Karolin Seeger <kseeger@samba.org> Karolin Reviewed-by: Stefan Metzmacher <metze@samba.org>
* docs: ldbedit.1.xml: Correct meta data.Karolin Seeger2013-01-241-3/+3
| | | | | | | | Signed-off-by: Karolin Seeger <kseeger@samba.org> Karolin Reviewed-by: Stefan Metzmacher <metze@samba.org>