summaryrefslogtreecommitdiffstats
path: root/source4/lib/ldb/common
Commit message (Collapse)AuthorAgeFilesLines
...
* s4/ldb:introduce the LDB_CONTROL_PROVISION_OID controlMatthias Dieter Wallnöfer2010-10-231-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.
* ldb:rename LDB_CONTROL_BYPASSOPERATIONAL_OID into ↵Matthias Dieter Wallnöfer2010-10-231-1/+1
| | | | | | LDB_CONTROL_BYPASS_OPERATIONAL_OID It's nicer to have this consistent with "BYPASS_PASSWORD_HASH".
* ldb:ldb_modules.c - "dlclose" could cause inference on "dlerror"Matthias Dieter Wallnöfer2010-10-211-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
* s4-ldb: make ldb_options_find() publicAndrew Tridgell2010-10-211-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
* ldb:ldb_modules.c - if we don't find the associated dynamic object then ↵Matthias Dieter Wallnöfer2010-10-211-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
* ldb:"ldb_schema_attribute_by_name_internal" - support the whole unsigned int ↵Matthias Dieter Wallnöfer2010-10-191-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
* s4-ldb: cope with NULL oid in controlsAndrew Tridgell2010-10-192-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>
* s4-ldb: added ldb_req_mark_untrusted() and ldb_req_is_untrusted()Andrew Tridgell2010-10-191-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>
* ldb:"ldb_schema_attribute_by_name_internal" - switch back to 32bit countersMatthias Dieter Wallnöfer2010-10-181-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
* ldb:"ldb_dn_compare_base" - use "unsigned int" countersMatthias Dieter Wallnöfer2010-10-161-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
* ldb:"ldb_dn_add_child" - use "unsigned int" countersMatthias Dieter Wallnöfer2010-10-161-2/+3
|
* ldb:"ldb_dn_remove_base_components" - use an "unsigned int" counterMatthias Dieter Wallnöfer2010-10-161-6/+6
|
* ldb:"ldb_dn_canonical" - use an "unsigned int" counterMatthias Dieter Wallnöfer2010-10-161-3/+3
| | | | | Convert it to use an "unsigned int" counter which represents the exact length of the DN components.
* ldb:ldb_match.c - fix a counter typeMatthias Dieter Wallnöfer2010-10-131-1/+1
|
* s4-ldb: use operator_fn syntax function in ldb_match codeAndrew Tridgell2010-10-131-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>
* ldb The use of a private event context isn't a hackAndrew Bartlett2010-10-111-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
* s4-ldb Don't use talloc_autofree_context() in ldbAndrew Bartlett2010-10-111-1/+1
| | | | | | The private event context only needs to live as long as ldb itself. Andrew Bartlett
* s4:ldb_modules.c - fix a typoMatthias Dieter Wallnöfer2010-10-051-1/+1
|
* ldb-dn: don't crash on NULL in ldb_binary_encode_string()Andrew Tridgell2010-09-281-0/+3
| | | | Thanks to Nadya for finding this one!
* s4-ldb: Added ldb_request_replace_controlNadezhda Ivanova2010-09-271-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
* ldb: added request location trackingAndrew Tridgell2010-09-252-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.
* ldb:ldb_match.c - fix counter variable typeMatthias Dieter Wallnöfer2010-09-241-1/+1
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* ldb:ldb_msg_add_linearized_dn - handle NULL DNsMatthias Dieter Wallnöfer2010-09-241-2/+8
| | | | | | Don't let the routine crash Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4-ldb: added support for rodc_control in ldbAndrew Tridgell2010-08-201-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>
* s4-ldb: added LDB_FLAG_INTERNAL_MASKAndrew Tridgell2010-08-171-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>
* s4-ldb: use TALLOC_CTX type instead of 'void'Kamen Mazdrashki2010-07-297-44/+44
|
* s4-dsdb: use ldb_msg_normalize() in ldb_msg_difference()Kamen Mazdrashki2010-07-191-6/+8
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4-dsdb: use ldb_msg_normalize() in source4/lib/ldb/common/ldb.cKamen Mazdrashki2010-07-191-5/+7
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4-ldb: Add ldb_msg_normalize() to accept a memory context from clientKamen Mazdrashki2010-07-191-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>
* s4-ldb: Use _ldb_msg_add_el() in ldb_msg_add()Kamen Mazdrashki2010-07-191-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>
* s4-ldb: Use _ldb_msg_add_el() in ldb_msg_add_empty()Kamen Mazdrashki2010-07-191-22/+17
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4-ldb: Add separate function to add empty element into ldb_msgKamen Mazdrashki2010-07-191-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>
* s4-ldb: Write more explanatory comment for ldb_msg_add()Kamen Mazdrashki2010-07-191-3/+8
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4-ldb: Implement ldb_msg_difference() function to accept a memory context ↵Kamen Mazdrashki2010-07-191-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>
* ldb:common/ldb_dn.c - "ldb_dn_get_parent" - no need to manipulate the real DNMatthias Dieter Wallnöfer2010-07-091-6/+0
| | | | Since the parent DN is a duplication of the passed DN parameter.
* s4: fix warning: unused variable ‘i’Kamen Mazdrashki2010-07-091-1/+0
|
* s4-ldb: added ldb_error() and ldb_operr()Andrew Tridgell2010-07-071-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;
* s4-ldb: added ldb_options_find()Andrew Tridgell2010-07-072-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
* ldb:ldb_modules.c - "ldb_dso_load_symbol" - remove unneeded caste before "dlsym"Matthias Dieter Wallnöfer2010-06-291-2/+1
|
* s4:ldb - "ldb_dn_update_components" - fix free of invalid DN partsMatthias Dieter Wallnöfer2010-06-291-4/+3
| | | | | Use "LDB_FREE" for such free operations and in addition wipe also the casefolded DN out.
* ldb:ldb_dn.c - "ldb_dn_set_extended_component" - free the linearized string ↵Matthias Dieter Wallnöfer2010-06-291-2/+4
| | | | when the components change
* s4:ldb_dn.c - make the code parts which free extended components consistentMatthias Dieter Wallnöfer2010-06-291-9/+7
| | | | Cosmetic
* ldb:ldb_dn - "ldb_dn_explode" - move the "dn->comp_num" initalisation ↵Matthias Dieter Wallnöfer2010-06-291-3/+3
| | | | | | upwards and use "LDB_FREE" for freeing "dn->components" Mostly cosmetic - no behaviour change
* ldb:controls - add the "TREE_DELETE" control for allowing subtree deletesMatthias Dieter Wallnöfer2010-06-201-0/+27
|
* ldb: add a new control bypassioperationnalMatthieu Patou2010-06-201-0/+27
| | | | Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
* ldb:ldb_dn.c - don't support "ldb_dn_add_child" on a "" parent DNMatthias Dieter Wallnöfer2010-06-191-0/+7
| | | | It's meaningless and could end in DNs as "cn=child,".
* ldb: Fix included ldb build.Jelmer Vernooij2010-06-151-0/+4
|
* ldb:ldb_msg_remove_attr - provide a better implementationMatthias Dieter Wallnöfer2010-06-061-2/+3
| | | | | We can have some special (bad) messages which contain multiple message elements for the same attribute. The AD password change ones are such an example.
* s4:ldb_msg_element_compare - fix typo in commentMatthias Dieter Wallnöfer2010-06-021-1/+1
|
* ldb:ldb_msg_add_steal_string - prevent also there the addition of strings ↵Matthias Dieter Wallnöfer2010-05-311-0/+5
| | | | with length 0