summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include
AgeCommit message (Collapse)AuthorFilesLines
2010-10-23ldb:ldb.h - include a comment that the relax control is mainly used by the ↵Matthias Dieter Wallnöfer1-0/+2
OpenLDAP backend Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sat Oct 23 16:40:04 UTC 2010 on sn-devel-104
2010-10-23s4/ldb:introduce the LDB_CONTROL_PROVISION_OID controlMatthias Dieter Wallnöfer1-0/+6
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-19s4-ldb: added ldb_req_mark_untrusted() and ldb_req_is_untrusted()Andrew Tridgell2-0/+13
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-18Revert "s4:dsdb - make the RELAX control private"Andrew Bartlett1-6/+8
This must be available to the OpenLDAP backend, to set the GUID values in some situations. We need a proper ACL mechanism to control the use or abuse of this control. This reverts commit 10adee89367cee9add993869280542418fb3d370.
2010-10-16s4:dsdb - make the RELAX control privateMatthias Dieter Wallnöfer1-8/+6
This makes our LDAP much more secure and less error-prone. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sat Oct 16 19:43:36 UTC 2010 on sn-devel-104
2010-10-16ldb:ldb.h - reorder controls/extended operationsMatthias Dieter Wallnöfer1-27/+28
This makes it easier to read
2010-10-13s4-ldb: take advantage of ldb_match_msg_error() in more placesAndrew Tridgell1-0/+7
this gives better error checking
2010-10-13s4-ldb: added an optional operator_fn in the schema syntaxAndrew Tridgell1-0/+5
this function takes the operator being invoked, which will allow schema functions to provide more fine grained control over comparisons. The key bug this was introduced to fix is the incorrect handling of the LDB_OP_PRESENT test for deleted linked attributes. The backends are unaware of the deleted state of these links, so they cannot do a LDB_OP_PRESENT test on their own. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-27s4-ldb: Added ldb_request_replace_controlNadezhda Ivanova1-0/+12
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/+11
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-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 Tridgell1-0/+5
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-07-29s4-ldb: use TALLOC_CTX type instead of 'void'Kamen Mazdrashki2-5/+5
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-ldb: Add ldb_msg_normalize() to accept a memory context from clientKamen Mazdrashki1-0/+5
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: Implement ldb_msg_difference() function to accept a memory context ↵Kamen Mazdrashki1-0/+20
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-07s4-ldb: added ldb_error() and ldb_operr()Andrew Tridgell1-1/+5
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 Tridgell1-0/+6
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-20ldb:controls - add the "TREE_DELETE" control for allowing subtree deletesMatthias Dieter Wallnöfer1-0/+7
2010-06-20ldb:ldb.h - add classifications to the control declarationsMatthias Dieter Wallnöfer1-7/+13
This makes it easier to understand which standard specifies which control.
2010-06-20ldb: add a new control bypassioperationnalMatthieu Patou1-0/+9
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-13Support system talloc/tevent headers.Jelmer Vernooij1-2/+2
2010-05-31ldb: Remove unexisting and mistyped function from headerSimo Sorce1-2/+0
2010-05-04s4/rodc: Support read-only databaseAnatoliy Atanasov1-0/+1
Check on modify if we are RODC and return referral. On the ldap backend side now we pass context and ldb_modify_default_callback to propagate the referral error to the client.
2010-02-22LDB related spelling fixes.Brad Hards1-1/+1
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-14s4-ldb: use TYPESAFE_QSORT() in the rest of the ldb codeAndrew Tridgell1-0/+11
2010-02-13s4-ldb: added LDB_TYPESAFE_QSORT()Andrew Tridgell1-0/+18
Like TYPESAFE_QSORT() but for the ldb_qsort() function
2010-02-10util: rewrite dlinklist.h so that DLIST_ADD_END() is O(1)Andrew Tridgell1-59/+111
This changes the meaning of the ->prev pointer in our doubly linked lists to point at the end of the list from the front of the list. That allows us to implement DLIST_ADD_END() and related functions in O(1) time, which can be a huge saving in many places in Samba. This also means that the 'type' argument to various DLIST_*() macros is no longer needed, but I have left it in for now to keep the patchset small, which will make it easier to revert if any problems are found. In the future we should remove the 'type' arguments. (jra. Move the one use of DLIST_TAIL over to the new macros).
2010-02-10Temporary changes to dlinklist to keep the implementation static whilstJeremy Allison1-0/+16
uses of (list)->prev are moved over to DLIST_PREV. This will be replaced when the final (new) version of the dlinklist.h header is added. Jeremy.
2010-01-02s4-ldb: declate ldb_val_to_time()Andrew Tridgell1-0/+6
2010-01-02s4-ldb: added ldb_module_get_ops()Andrew Tridgell1-0/+1
This is needed to support DSDB_FLAG_OWN_MODULE Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-18Added oid for AS_SYSTEM control, used to bypass access checks for system ↵Nadezhda Ivanova1-0/+6
operations.
2009-12-18s4-dsdb: declare ldb_dn_update_components()Andrew Tridgell1-0/+1
2009-12-15Removed ldb_modify_ctrl from ldb, implemented as a static in ldap_backend.Nadezhda Ivanova1-18/+0
2009-12-14s4-ldb: added a new "reveal" controlAndrew Tridgell1-1/+9
This control will allow inspection of internal ldb values, which would normally be stripped before being presented to users. The first use will be stripping linked attribute meta data extended components.
2009-12-07s4:ldb Add a function to match a message against an objectClassAndrew Bartlett1-0/+3
(as objectClass will always be a case insensitive ascii string, we can make a much simpler match function here than for the general case). Andrew Bartlett
2009-11-30s4-ldb: changed ldb_msg_add_dn() to ldb_msg_add_linearized_dn()Crístian Deives1-2/+2
this makes the usage clearer Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-28s4: fix SD update and password change in upgrade scriptMatthieu Patou1-0/+6
- reserve a new Samba OID for recalculate SD control - fix the update SD function - fix handling of kvno in the update_machine_account_password function - fix handling of handles in RPC winreg server Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-20Some changes to allow processing of ldap controls on modify requests.Nadezhda Ivanova1-0/+18
ldap_backend used to filter out ldap controls on modify. Also, modified python binding for ldap_modify to allow writing tests for such controls.
2009-11-20added new function "ldb_msg_add_dn"Crístian Deives1-0/+2
a helper function to a DN element to an ldb_msg using ldb_msg_add_string. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-12s4:ldb Add a helper function for 'canonicalise' both strings base comparesAndrew Bartlett1-0/+6
This will help simplify boilerplate comparison functions where we don't have a shortcut way to compare. Andrew Bartlett
2009-10-23s4-ldb: added ldb_transaction_cancel_noerr()Andrew Tridgell1-0/+6
This will be used to allow cancelling of transactions in a child after a fork()
2009-10-22s4-ldb: ldb_oom() for modulesAndrew Tridgell1-0/+1
2009-10-21s4:ldb Add new function to create a cut down list of controlsAndrew Bartlett1-0/+6
This I hope will be useful for removing controls from the ldb_reply Andrew Bartlett
2009-10-21s4:ldb Add function to add controls to an LDB replyAndrew Bartlett1-0/+11
2009-10-18s4:ldb_msg_check_string_attribute - add a comment about the result valuesMatthias Dieter Wallnöfer1-0/+9
2009-10-03s4:ldb.h - add constant for LDAP EXOP password changeMatthias Dieter Wallnöfer1-4/+21
Also enhance some other comments.