summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
AgeCommit message (Collapse)AuthorFilesLines
2010-09-09pyldb: expose PyLdbDn_FromDn()Andrew Tridgell2-18/+29
This is needed by the dsdb python interface Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-05python-ldb: allow ldb_rename to take optional control(s)Matthieu Patou1-4/+50
2010-09-04ldb: Add missing aliases for ldb_ildap.Jelmer Vernooij1-0/+1
2010-09-01s4/ldb: fix standalone buildBjörn Jacke1-2/+6
2010-08-31s4/ldb: use monotonic clock for time deltas in ldbtestBjörn Jacke1-4/+4
2010-08-22pyldb: do type checking on the list form of ldb addAndrew Tridgell1-0/+6
Pair-Programmed-With: Jelmer Vernooij <jelmer@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: ensure element flags are zero in ldb search returnAndrew Tridgell1-0/+2
the distinguishedName element was getting an uninitialised flags value
2010-08-17s4-ldb: added LDB_FLAG_INTERNAL_DISABLE_VALIDATIONAndrew Tridgell1-0/+6
When this flag is set on an element in an add/modify request then the normal validate_ldb() call that checks the element against schema constraints is disabled Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17s4-ldb: added LDB_FLAG_INTERNAL_MASKAndrew Tridgell2-0/+31
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-08-17s4-ldb: use LDB_FLAG_MOD_TYPE() to extract element type from messagesAndrew Tridgell1-0/+5
The flags field of message elements is part of a set of flags. We had LDB_FLAG_MOD_MASK for extracting the type, but it was only rarely being used (only 1 call used it correctly). This adds LDB_FLAG_MOD_MASK() to make it more obvious what is going on. This will allow us to use some of the other flags bits for internal markers on elements Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17s4-dsdb: added support for LDB_CONTROL_RODC_DCPROMO_OIDAndrew Tridgell1-0/+6
this control adds a unique msDS-SecondaryKrbTgtNumber attribute to a user object. There is some 'interesting' interaction with the rangeLower and rangeUpper attributes and this add. We don't implementat rangeLower/rangeUpper yet, but when we do we'll need an override for this control (or be careful about module ordering). Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17s4-ldb: test the 'displayName=a,b' bugAndrew Tridgell1-0/+6
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17s4-ldb: fixed the ldb 'displayName=a,b' indexing bugAndrew Tridgell1-2/+4
the problem was the inconsistency between the key form of DNs between the itdb used for indexing and the on disk form Thanks to Matthieu Patou for finding this bug! Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-08-17s4-ldb: add some comments explaining the ltdb_index_idxptr() functionAndrew Tridgell1-0/+8
this function copes with alignment sensitive CPUs Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-29s4-ldb: use TALLOC_CTX type instead of 'void'Kamen Mazdrashki9-49/+49
2010-07-19s4: Remove trailing whitespacesKamen Mazdrashki2-13/+13
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19ldb: Mark _DEPRECATED_ ldb_msg_diff() and ldb_msg_canonicalize() functionsKamen Mazdrashki1-2/+28
They are not quite safe to use (requires caller to steal resulting message in own context) and may lead to holding memory for too long. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
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-test: Use ldb_msg_normalize() in sqlite3 backendKamen Mazdrashki1-4/+13
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19s4-dsdb: use ldb_msg_normalize() in ldbadd-process_file()Kamen Mazdrashki1-1/+9
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 Mazdrashki2-12/+46
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-pyldb: Use ldb_msg_difference() in py_ldb_msg_diff()Kamen Mazdrashki1-2/+10
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19s4-tools: use ldb_msg_difference() in ldbedit - modify_record()Kamen Mazdrashki1-6/+10
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19s4-ldb: Implement ldb_msg_difference() function to accept a memory context ↵Kamen Mazdrashki2-23/+92
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-15s4:pyldb whitespace fixAndrew Bartlett1-1/+1
2010-07-15s4:pyldb Fix memory handling for ldb_message_elementAndrew Bartlett1-5/+10
The problem here is that we need to use the array, not the individual message element as the memory context. Andrew Bartlett
2010-07-15ldb: allow ldb_sequence_number to be called in pythonMatthieu Patou1-0/+26
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 Tridgell3-2/+22
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 support for simple binds on ldb_ldap backendAndrew Tridgell1-0/+50
this uses the options[] array to pass in bindMech, bindID and bindSecret. Currently only "simple" is supported.
2010-07-07s4-ldb: added ldb_options_find()Andrew Tridgell6-7/+85
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-07-02s4-ldb: fixed error handling in openldap backendAndrew Tridgell1-5/+15
fixed several bugs in error handling. the ldb context was used without being initialised in the error paths, and several error paths did not set an ldb error string.
2010-07-02s4-ldb: fixed the parsing of references in the openldap backendAndrew Tridgell1-5/+6
We need to use ldap_parse_reference() not ldap_parse_result()
2010-06-30s4:dsdb: move dsdb python tests from lib/ldb/ to dsdb/Stefan Metzmacher8-7680/+0
metze
2010-06-30s4:ldb/python: make it possible to run tests standaloneStefan Metzmacher8-3/+22
metze
2010-06-29ldb:ldb_map_outbound.c - "ldb_parse_tree_collect_attrs" - remove unneeded ↵Matthias Dieter Wallnöfer1-2/+0
return value
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-28Implementation of self membership validated right.Nadezhda Ivanova1-5/+103
When this right is granted, the user can add or remove themselves from a group even if they dont have write property right.
2010-06-25ldb: Fix a wrong changetype in unit testMatthieu Patou1-1/+1
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>