summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common
AgeCommit message (Collapse)AuthorFilesLines
2010-11-01s4-ldb: added support for general ldb hooks in modulesAndrew Tridgell1-11/+45
this allows a ldb module to register a hook function called at various stages of processing. It will be initially used for ldb command line hooks, but should work generally. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-01s4-ldb: added an override flag to ldb_register_backend()Andrew Tridgell1-27/+30
this will be used to allow a system ldb build with an ldb backend to have its ldap handler overridden by the s4 one
2010-11-01s4-ldb: it is not an error for the modules directory to not existAndrew Tridgell1-0/+5
2010-11-01s4-ldb: removed the old ldb module loading styleAndrew Tridgell1-158/+31
this gets rid of some particularly obscure cpp macros for module lists
2010-11-01s4-ldb: support a new type of ldb module loadingAndrew Tridgell2-0/+195
this supports module loading in ldb which uses the approach of "load all modules in a directory". This is much more flexible than the current module loading, as it will allow us to load modules for command line parsing and authentication. Modules are loaded from a colon separated path, in the environment variable LDB_MODULES_PATH. If unset, it defaults to LDB_MODULESDIR. Within each directory modules are loaded recursively (traversing down the directory tree). The device/inode number of each module is remembered to prevent us loading a module twice. Each module is checked for a ldb_init_module() function with dlsym(). If found, it is called with the ldb module version as an argument.
2010-10-23s4/ldb:introduce the LDB_CONTROL_PROVISION_OID controlMatthias Dieter Wallnöfer1-0/+27
This control is exactly thought for the actions which previously were performed using the RELAX one. We agreed that the RELAX control will only remain for interactions with OpenLDAP.
2010-10-23ldb:rename LDB_CONTROL_BYPASSOPERATIONAL_OID into ↵Matthias Dieter Wallnöfer1-1/+1
LDB_CONTROL_BYPASS_OPERATIONAL_OID It's nicer to have this consistent with "BYPASS_PASSWORD_HASH".
2010-10-21ldb:ldb_modules.c - "dlclose" could cause inference on "dlerror"Matthias Dieter Wallnöfer1-1/+1
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Thu Oct 21 09:28:19 UTC 2010 on sn-devel-104
2010-10-21s4-ldb: make ldb_options_find() publicAndrew Tridgell1-1/+1
we need to make this symbol public to allow for -Wl,-no-undefined, as otherwise the pyldb module can't find the symbol when it creates the module
2010-10-21ldb:ldb_modules.c - if we don't find the associated dynamic object then ↵Matthias Dieter Wallnöfer1-0/+1
please close the handle Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Thu Oct 21 07:52:44 UTC 2010 on sn-devel-104
2010-10-19ldb:"ldb_schema_attribute_by_name_internal" - support the whole unsigned int ↵Matthias Dieter Wallnöfer1-7/+5
range Commit 8556602b048e825b35df314d6865f997823ec2bb wasn't quite right - it only restored the functionality on the positive integer range. This one however should now really support the whole unsigned range. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Tue Oct 19 10:52:08 UTC 2010 on sn-devel-104
2010-10-19s4-ldb: cope with NULL oid in controlsAndrew Tridgell2-9/+11
the ldap server will mark a control with a NULL oid in order to remove it. This prevents a O(n^2) cost in control handling. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-19s4-ldb: added ldb_req_mark_untrusted() and ldb_req_is_untrusted()Andrew Tridgell1-0/+17
these will be used to determine if a ldb request comes from an untrusted source. We want requests over ldap:// to be marked untrusted so we can reject unregistered controls Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-18ldb:"ldb_schema_attribute_by_name_internal" - switch back to 32bit countersMatthias Dieter Wallnöfer1-4/+5
Use the signed counter for the binary search but use an unsigned one for accessing the entry. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Mon Oct 18 19:01:31 UTC 2010 on sn-devel-104
2010-10-16ldb:"ldb_dn_compare_base" - use "unsigned int" countersMatthias Dieter Wallnöfer1-2/+2
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sat Oct 16 13:54:13 UTC 2010 on sn-devel-104
2010-10-16ldb:"ldb_dn_add_child" - use "unsigned int" countersMatthias Dieter Wallnöfer1-2/+3
2010-10-16ldb:"ldb_dn_remove_base_components" - use an "unsigned int" counterMatthias Dieter Wallnöfer1-6/+6
2010-10-16ldb:"ldb_dn_canonical" - use an "unsigned int" counterMatthias Dieter Wallnöfer1-3/+3
Convert it to use an "unsigned int" counter which represents the exact length of the DN components.
2010-10-13ldb:ldb_match.c - fix a counter typeMatthias Dieter Wallnöfer1-1/+1
2010-10-13s4-ldb: use operator_fn syntax function in ldb_match codeAndrew Tridgell1-92/+212
this also fixes error handling in case of bad syntax, memory error etc, which was previously conidered as a mismatch, but should return an error Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-11ldb The use of a private event context isn't a hackAndrew Bartlett1-2/+3
This is deliberate behaviour. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Mon Oct 11 13:45:14 UTC 2010 on sn-devel-104
2010-10-11s4-ldb Don't use talloc_autofree_context() in ldbAndrew Bartlett1-1/+1
The private event context only needs to live as long as ldb itself. Andrew Bartlett
2010-10-05s4:ldb_modules.c - fix a typoMatthias Dieter Wallnöfer1-1/+1
2010-09-28ldb-dn: don't crash on NULL in ldb_binary_encode_string()Andrew Tridgell1-0/+3
Thanks to Nadya for finding this one!
2010-09-27s4-ldb: Added ldb_request_replace_controlNadezhda Ivanova1-0/+22
It is the same as ldb_request_add_control, except it will replace an existing control. Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Mon Sep 27 19:00:38 UTC 2010 on sn-devel-104
2010-09-25ldb: added request location trackingAndrew Tridgell2-0/+28
this is used to help debug async ldb requests. The ldb request handle now contains a location string and the parent request pointer. This allows us to print a backtrace of ldb requests in the dsdb modules.
2010-09-24ldb:ldb_match.c - fix counter variable typeMatthias Dieter Wallnöfer1-1/+1
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-09-24ldb:ldb_msg_add_linearized_dn - handle NULL DNsMatthias Dieter Wallnöfer1-2/+8
Don't let the routine crash Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-08-20s4-ldb: added support for rodc_control in ldbAndrew Tridgell1-0/+27
this allows you to specify the RODC join control in python ldb calls or on the command line Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17s4-ldb: added LDB_FLAG_INTERNAL_MASKAndrew Tridgell1-0/+26
This ensures that internal bits for the element flags in add/modify requests are not set via the ldb API Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-07-29s4-ldb: use TALLOC_CTX type instead of 'void'Kamen Mazdrashki7-44/+44
2010-07-19s4-dsdb: use ldb_msg_normalize() in ldb_msg_difference()Kamen Mazdrashki1-6/+8
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19s4-dsdb: use ldb_msg_normalize() in source4/lib/ldb/common/ldb.cKamen Mazdrashki1-5/+7
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19s4-ldb: Add ldb_msg_normalize() to accept a memory context from clientKamen Mazdrashki1-12/+41
Previos implementation from ldb_msg_canonicalize() was moved into this function and now ldb_msg_canonicalize() is based on ldb_msg_normalize() Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19s4-ldb: Use _ldb_msg_add_el() in ldb_msg_add()Kamen Mazdrashki1-4/+10
Previous implementation was 'leaking' attribute name string, that is allocated by ldb_msg_add_empty() Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19s4-ldb: Use _ldb_msg_add_el() in ldb_msg_add_empty()Kamen Mazdrashki1-22/+17
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19s4-ldb: Add separate function to add empty element into ldb_msgKamen Mazdrashki1-0/+30
It just adds another element, nothing more. Caller is responsible to fill-in the added element and determine how to handle data allocation contexts. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19s4-ldb: Write more explanatory comment for ldb_msg_add()Kamen Mazdrashki1-3/+8
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19s4-ldb: Implement ldb_msg_difference() function to accept a memory context ↵Kamen Mazdrashki1-23/+72
from client Old implementation from ldb_msg_diff() was moved into this this function but with changed interface so that a memory context may be passed. ldb_msg_diff() function is now based on ldb_msg_difference(), which fixes a hidden leak - internal ldb_msg object (returned from ldb_msg_canonicalize) wasn't freed and stays attached to ldb_context for the connection lifetime. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-09ldb:common/ldb_dn.c - "ldb_dn_get_parent" - no need to manipulate the real DNMatthias Dieter Wallnöfer1-6/+0
Since the parent DN is a duplication of the passed DN parameter.
2010-07-09s4: fix warning: unused variable ‘i’Kamen Mazdrashki1-1/+0
2010-07-07s4-ldb: added ldb_error() and ldb_operr()Andrew Tridgell1-0/+16
These will be used to help avoid the problem we have with hundreds of places that do "return LDB_ERR_OPERATIONS_ERROR" without an explanation. It is very difficult to track down ldb errors which don't have any explanation. By replacing "return LDB_ERR_OPERATIONS_ERROR;" with "return ldb_operr(ldb);" we at least get a file:line message in the ldb error string. It isn't an ideal error message, but it is much better than just "operations error" This change also makes ldb_oom() return the error code (LDB_ERR_OPERATIONS_ERROR) so you can do: return ldb_oom(ldb); instead of: ldb_oom(ldb); return LDB_ERR_OPERATIONS_ERROR;
2010-07-07s4-ldb: added ldb_options_find()Andrew Tridgell2-4/+76
ldb_options_find() allows backends to find options in the options[] array passed to the connect operation. This will be used by the ldb_ldap bind code
2010-06-29ldb:ldb_modules.c - "ldb_dso_load_symbol" - remove unneeded caste before "dlsym"Matthias Dieter Wallnöfer1-2/+1
2010-06-29s4:ldb - "ldb_dn_update_components" - fix free of invalid DN partsMatthias Dieter Wallnöfer1-4/+3
Use "LDB_FREE" for such free operations and in addition wipe also the casefolded DN out.
2010-06-29ldb:ldb_dn.c - "ldb_dn_set_extended_component" - free the linearized string ↵Matthias Dieter Wallnöfer1-2/+4
when the components change
2010-06-29s4:ldb_dn.c - make the code parts which free extended components consistentMatthias Dieter Wallnöfer1-9/+7
Cosmetic
2010-06-29ldb:ldb_dn - "ldb_dn_explode" - move the "dn->comp_num" initalisation ↵Matthias Dieter Wallnöfer1-3/+3
upwards and use "LDB_FREE" for freeing "dn->components" Mostly cosmetic - no behaviour change
2010-06-20ldb:controls - add the "TREE_DELETE" control for allowing subtree deletesMatthias Dieter Wallnöfer1-0/+27
2010-06-20ldb: add a new control bypassioperationnalMatthieu Patou1-0/+27
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>