summaryrefslogtreecommitdiff
path: root/lib/ldb
AgeCommit message (Collapse)AuthorFilesLines
2014-07-15ldb:build: improve detection of srcdirMichael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit 09b991b79b28c9a88742e06021bb15997aba8988) The last 28 patches address bug #10693 - backport ldb-1.1.17 + changes from master.
2014-07-15ldb: make the successful ldb_transaction_start() message clearerAndrew Bartlett1-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 (cherry picked from commit d7c22d56d3f8be9b8293dd481fb450e3cf2343d3)
2014-07-15ldb: change version to 1.1.17Stefan Metzmacher3-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> (cherry picked from commit 7f03a94ffa3752ccdb28cc50033b4e2a26e2b3f2)
2014-07-15ldb:pyldb: add some more helper functions for LdbDnStefan Metzmacher1-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> (cherry picked from commit 771d7b8c0df9240a9638dbf06a9f04431767bbb8)
2014-07-15ldb:pyldb: fix doc string for set_extended_component()Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 094c39107c0abf4951e6f7012ac06b08cae1ea04)
2014-07-15ldb:pyldb: add some const to PyObject_FromLdbValue()Stefan Metzmacher1-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> (cherry picked from commit aae9da9803dd551364bc3c096e06601bb1c9ed50)
2014-07-15ldb: Add a env variable to disable RTLD_DEEPBIND.Andreas Schneider1-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> (cherry picked from commit 11e87cdbb694cf542f3b7633326005abd49e43f1)
2014-07-15ldb: pass module init errors back to the callerAndrew Bartlett1-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> (cherry picked from commit e76bbef8b796441985550c553db1ab48d6495709)
2014-07-15ldb: Return LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS rather than OPERATIONS_ERROR ↵Andrew Bartlett1-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> (cherry picked from commit 673d41503c6e391337df1b86e49108d58f1af6bd)
2014-07-15ldb: Fix 1138330 Dereference null return valueVolker Lendecke1-0/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit e8b0726411213acb133a25c14ab42020e4a8de68)
2014-07-15lib/ldb fix compiler warningsChristian Ambach1-2/+2
about potentially uninitialized variables Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 35b4ba0193d783d85283b07f520f0af8dc2c1260)
2014-07-15lib/ldb fix compiler warningsChristian Ambach1-2/+2
about potentially uninitialized variables Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 9784ed9fb75022fcd7eaef24108ed8c6acf7f86f)
2014-07-15ldb: use of NULL pointer bugfixPavel Reichl1-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 (cherry picked from commit 4b637c367fdda832e95208f49e8893b0a0cac4b4)
2014-07-15ldb: Fix CID 241329 Array compared against 0Volker Lendecke1-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> (cherry picked from commit d2731ad5aae9f1fb8c1c6a65a61ef787e993b248)
2014-07-15ldb: Fix CID 240798 Uninitialized pointer readVolker Lendecke1-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 (cherry picked from commit 4e06c61b41fdde21fafaeee3c4fb3366744de9d9)
2014-07-15ldb:rdn_name: reject 'distinguishedName' depending of the MOD flagsStefan Metzmacher1-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> (cherry picked from commit d2ff474766ebb104309bf1e801c54ce0f8ea0a64)
2014-07-15s4-openldap: Remove use of talloc_reference in ldb_map_outbound.cNadezhda Ivanova1-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> (cherry picked from commit 75705776929d87f1a694582261c07d1724574370)
2014-07-15Add LDB_MAP_RENDROP optionHoward Chu4-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> (cherry picked from commit 93f3aba5e083976a791b982b2064b619800ce110)
2014-07-15Fix SEGV from improperly formed SUBSTRING/PRESENCE filterHoward Chu1-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 (cherry picked from commit d9bf88dc749cdbc34f70345b156b0117ecf2932b)
2014-07-15Cleanup map return codesHoward Chu1-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 (cherry picked from commit 6ed5b1c159867466e54a54a10adcc6c49a0a7837)
2014-07-15ldb: Show the type of failing operation in default error messageAndrew Bartlett1-1/+26
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 347b2c65a4b8c219cfdae3306fdc3d793980cbed)
2014-07-15ldb: Do not build libldb-cmdline when using system ldb.Jeroen Dekkers1-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 (cherry picked from commit 0af09f0179c024099e0776d3794f4b3d7fb3f6f6)
2014-07-15ldb_map: Fix CID 1034791 Dereference null return valueVolker Lendecke1-0/+6
Add NULL checks Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit cb598ddab6935820975042a8a307c75dba9d7e31)
2014-07-15pyldb: Fix CID 1034792 Dereference null return valueVolker Lendecke1-0/+4
Add a NULL check Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit cbb5c1ce39640ffd01aeed6d87a57940e344792c)
2014-07-15ldb: Fix CID 1034793 Dereference null return valueVolker Lendecke1-0/+4
Add a proper NULL check Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 15bd82550dab7a4709e92d639ee563dbc4780366)
2014-07-15ldb: Fix a const warningVolker Lendecke2-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 (cherry picked from commit 06273504586733ac548ddadad6c7bc757d2d5e25)
2014-07-15pyldb: decrement ref counters on py_results and quiet warningsMatthieu Patou1-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 (cherry picked from commit 0602009b999142187d74b74be13de8c7f64c7b24)
2013-12-26ldb: bad if test in ldb_comparison_fold()Jeremy Allison1-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
2013-06-24ldb: bump version to allow a depencency on the substring crash fixAndrew Bartlett3-1/+265
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-06-24ldb: Cope with substring match with no chunks in ldb_filter_from_treeAndrew Bartlett1-1/+1
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-06-22ldb: Ensure not to segfault on a filter such as (mail=)Andrew Bartlett1-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
2013-05-20ldb_tdb: Warn when reindexing is doneMatthieu Patou2-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
2013-05-17More generic check for OpenBSD platformVadim Zhukov1-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
2013-02-22ldb: Add missing dependency on replace for ldbAndrew Bartlett1-1/+1
This brings in rep_timegm() on Solaris for example. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-08ldb: Add more data test data for one level test casesMatthieu Patou1-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
2013-02-08ldb: Add tests for the python apiMatthieu Patou1-0/+8
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-08ldb: Add more tests related to onelevel searchMatthieu Patou2-0/+14
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-08ldb: use strncmp instead of strcmp when comparing the val partMatthieu Patou1-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>
2013-02-08ldb: make test output more readableMatthieu Patou1-4/+2
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
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>
2013-01-26ldb: Ensure to decrement the transaction_active whenever we delete a transactionAndrew Bartlett4-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>
2013-01-26ldb: fix a warning by converting from TDB_DATA to struct ldb_valStefan Metzmacher1-1/+5
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-24docs: ldbsearch.1.xml: Correct meta data.Karolin Seeger1-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
2013-01-24docs: ldbrename.1.xml: Correct meta data.Karolin Seeger1-3/+3
Signed-off-by: Karolin Seeger <kseeger@samba.org> Karolin Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-24docs: ldbmodify.1.xml: Correct meta data.Karolin Seeger1-3/+3
Signed-off-by: Karolin Seeger <kseeger@samba.org> Karolin Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-24docs: ldbedit.1.xml: Correct meta data.Karolin Seeger1-3/+3
Signed-off-by: Karolin Seeger <kseeger@samba.org> Karolin Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-24docs: ldbdel.1.xml: Correct meta data.Karolin Seeger1-3/+3
Signed-off-by: Karolin Seeger <kseeger@samba.org> Karolin Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-24docs: ldbadd.1.xml: Correct meta data.Karolin Seeger1-3/+3
Signed-off-by: Karolin Seeger <kseeger@samba.org> Karolin Reviewed-by: Stefan Metzmacher <metze@samba.org>