summaryrefslogtreecommitdiff
path: root/lib/ldb
AgeCommit message (Collapse)AuthorFilesLines
2011-11-02pyldb: Remove duplicate definition of SYNTAX_DN.Jelmer Vernooij1-1/+0
2011-11-02ldb: fix compiler warningDavid Disseldorp1-1/+1
Mixed declarations and code. Autobuild-User: David Disseldorp <ddiss@samba.org> Autobuild-Date: Wed Nov 2 16:51:24 CET 2011 on sn-devel-104
2011-10-27ldb:common/ldb_modules.c - fix a typo in commentMatthias Dieter Wallnöfer1-1/+1
Reviewed-by: abartlet
2011-10-20ldb: ldb_errstring() takes ldb_contxt as an argumentAmitay Isaacs1-1/+1
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-10-20dsdb: improve debug messageAndrew Tridgell2-6/+6
show the reply type in "Invalid reply type" messages Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Oct 20 00:57:05 CEST 2011 on sn-devel-104
2011-10-18ldb: Output more error information when a connect failsAndrew Bartlett2-1/+6
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-10-11ldb:ldb_autotransaction_request - error string shouldn't be set hereMatthias Dieter Wallnöfer1-5/+0
A generic error string should be set independently of the access mechanism to an LDB operation. Hence it should be handled in "ldb_wait" and "ldb_request" Signed-off-by: Andrew Tridgell <tridge@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Tue Oct 11 10:15:18 CEST 2011 on sn-devel-104
2011-10-11ldb:pyldb.c - py_ldb_* modification calls - error string shouldn't be set hereMatthias Dieter Wallnöfer1-17/+1
As discussed with Jelmer, we shouldn't be setting a generic LDB error string only for the Python bindings alone. This should be done in "ldb_request" and "ldb_wait" - the common place for all possible LDB access mechanisms. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-10-11ldb:ldb.c/"ldb_wait" - make "ldb_wait" always return an error stringMatthias Dieter Wallnöfer1-4/+39
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-10-11ldb:ldb.c/"ldb_wait" - change "ldb_wait" slightly in order to introduce ↵Matthias Dieter Wallnöfer1-3/+5
error messages In this occasion remove a redundant check for "LDB_ASYNC_DONE": if (handle->state == LDB_ASYNC_DONE || if (handle->state == LDB_ASYNC_DONE) handle->status != LDB_SUCCESS) { return handle->status; return handle->status; == if (handle->status != LDB_SUCCESS) } return handle->status; ... ... return LDB_SUCCESS; return LDB_SUCCESS; Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-10-11ldb:ldb.c/"ldb_request" - make "ldb_request" always return an error stringMatthias Dieter Wallnöfer1-1/+15
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-10-11ldb:ldb.c - "ldb_set_errstring" can be implemented by using ↵Matthias Dieter Wallnöfer1-10/+7
"ldb_asprintf_errstring" Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-10-11ldb:ldb_autotransaction_request - fix a typo in a commentMatthias Dieter Wallnöfer1-1/+1
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-10-10ldb: change version to 1.1.3 after pyldb changesStefan Metzmacher3-1/+259
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Oct 10 14:24:25 CEST 2011 on sn-devel-104
2011-10-07Revert "ldb: support raw OIDs in control string parsing"Stefan Metzmacher2-19/+0
This reverts commit ea41860d32d38448e08cefd79d30ee1150317a9e. This is not needed, because we already have the 'local_oid' magic. metze
2011-10-07ldb/ldb_controls: allow oid up to 255 charsStefan Metzmacher1-1/+1
We have char oid[256], so allow sscanf() to consume 255 chars. metze
2011-10-06ldb: support raw OIDs in control string parsingAndrew Tridgell2-0/+19
this makes it possible to use a raw OID string on the command line or in python scripts Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-06ldb: fixed memory leak in control string parsingAndrew Tridgell1-0/+24
if parsing fails, free ctrl Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-19ldb:"ldb_extended" -make the call more similar to "ldb_search"Matthias Dieter Wallnöfer1-2/+6
For example NULL out the LDB result pointer on failures. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-09-18pyldb: Drop unnecessary dependency on pytalloc-util.Jelmer Vernooij2-2/+1
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Sep 18 17:23:40 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-13ldb:pyldb.c - "py_ldb_rename" remove superflous "ldb" pointerMatthias Dieter Wallnöfer1-4/+2
Reviewed-by: Jelmer Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Tue Sep 13 18:11:18 CEST 2011 on sn-devel-104
2011-09-11ldb:ldb_controls.c - remove duplicate definition of "LDB_CONTROL_CMP"Matthias Dieter Wallnöfer1-11/+3
And fix the comment Reviewed-by: Jelmer
2011-09-11ldb:pyldb.c - point out that "PyLdbResult_AsResult" does not convert everythingMatthias Dieter Wallnöfer1-1/+4
Reviewed-by: Jelmer
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-09-01ldb: fixed ldbsearch when no baseDN specified and cross-ncs is usedAndrew Tridgell1-4/+24
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-01pyldb: added OID_COMPARATOR constantsAndrew Tridgell1-9/+11
This also changes the other constants to remove the LDB_ prefix, which is redundent Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25pyldb: fixed a warningAndrew Tridgell1-2/+2
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-21wafsamba: Only install .pc files if libraries are public.Jelmer Vernooij1-6/+2
2011-08-19ldb:ldb_controls.c - cosmetic indentation fixMatthias Dieter Wallnöfer1-5/+4
2011-08-19ldb - two cosmetic fixesMatthias Dieter Wallnöfer2-4/+2
@ldb.h: Removes an invalid comment line @pyldb.c: Fixes indentation
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-08-09ldb: fix the canonicalisation of booleansAndrew Tridgell1-3/+3
we were canonicalising "FALSE" to "FALS" Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-08pyldb: fix uninitialized memory bug in PyArg_ParseTuple() argumentStefan Metzmacher1-1/+1
"s#", &str, &len) required 'len' as 'int' not as 'Py_ssize_t'. With Py_ssize_t the 2nd half of a 64bit Py_ssize_t, will be uninitialized as 'int' is only 32bit. metze
2011-08-07pyldb: Generate ABI file.Jelmer Vernooij2-2/+6
2011-08-07pyldb: Consistently use pyldb_ prefix.Jelmer Vernooij3-125/+129
2011-08-04ldb: rule_id in ldb_parse_tree should be constAndrew Tridgell1-1/+1
this allows assignment to a constant string without allocation Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-04ldb: added a new always-fail ldap extended match OIDAndrew Tridgell2-1/+14
this is used when rewriting filter rules to replace a filter rule with one that is guaranteed not to match Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-04ldb: added signatures for 1.1.2Andrew Tridgell1-0/+256
2011-08-04ldb: raise minor versionAndrew Tridgell1-1/+1
needed for new module function ldb_dn_replace_components() Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-04ldb: added ldb_parse_tree_walk()Andrew Tridgell2-16/+77
this walks a ldb parse tree, calling a callback on each node Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-04ldb: added ldb_dn_replace_components()Andrew Tridgell2-0/+63
this allows you to replace the string part of a DN with the string part from another DN. This is useful when you want to fix a DN that has the right GUID but the wrong string part, because the target object has moved. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-03pyldb: return a copy of key constant DNs via python interfaceAndrew Tridgell1-4/+21
this prevents an easy coding error where the caller modifies one of the key DNs for the database, by using an add_child function or similar Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com> Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-29pyldb: added binary_encode() and binary_decode() methodsAndrew Tridgell2-0/+57
this gives access to RFC2254 encoding from python Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-29ldb: added a test for an invalid search expressionAndrew Tridgell1-0/+3
this tests the fix for invalid expressions in & and | expressions Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-29ldb: fixed a search expression parse bugAndrew Tridgell1-1/+11
when a secondary component of a & or | expression was invalid, it was ignored rather than giving an error. For example: (|(objectclass=user)(samaccountname=foo\blah)) was treated as being: (objectclass=user) whereas it should be an error, as foo\blah is invalid Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com> Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-28ldb: Expose ldb_handler_fold() funcionAmitay Isaacs1-6/+11
This allows creation of derived syntax handlers from the base directory string. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-21pyldb: use dn.is_child_of() instead of dn.compare_base()Andrew Tridgell2-9/+10
the compare_base() C API doesn't really fit well in python, as it returns 0 for true. Better to have a boolean function for the python interface. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21pyldb: add unit test for ldbDn.compare_baseMatthieu Patou1-0/+11