summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include/ldb_module.h
AgeCommit message (Collapse)AuthorFilesLines
2011-07-05ldb: make ldb a top level library for Samba 4.0Andrew Bartlett1-344/+0
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-21ldb: add custom flags and functions for the application that wants to ↵Matthieu Patou1-0/+14
manipulate them Signed-off-by: Simo Sorce <idra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-03-15ldb: use include <> form for public headersAndrew Tridgell1-1/+1
2011-02-14s4-ldb: added LDB_FLAG_INTERNAL_FORCE_SINGLE_VALUE_CHECKAndrew Tridgell1-0/+3
this allows a ldb module to force an element as single valued
2011-01-17ldb: added ldb_req_mark_trusted()Andrew Tridgell1-0/+5
this is used to mark a ldb child request trusted, if the caller has validated all inputs. This will be used when creating new child requests with trusted inputs. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-12-18ldb: Rename controls_except_specified -> ldb_controls_except_specified.Jelmer Vernooij1-1/+1
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Dec 18 01:33:24 CET 2010 on sn-devel-104
2010-12-18ldb: Add prototype for ldb_init_module.Jelmer Vernooij1-0/+5
2010-12-18ldb: Rename two exported functions so they match abi_match.Jelmer Vernooij1-3/+2
2010-12-08s4-acl: Fixed incorrect value of LDB_FLAG_INTERNAL_INACCESSIBLE_ATTRIBUTENadezhda Ivanova1-1/+1
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org> Autobuild-Date: Wed Dec 8 13:31:48 CET 2010 on sn-devel-104
2010-12-08s4-acl: Added a flag to mark an element as failing an access check.Nadezhda Ivanova1-0/+3
2010-11-04s4-ldb_module.h: use LDB error code for ldb_error() macro rather than ↵Kamen Mazdrashki1-1/+1
LDB_DEBUG_FATAL We end up calling ldb_error_at() which expects an LDB error, but LDB_DEBUG_FATAL is not such code. It is actually equal to LDB_SUCCESS. Thus the effect is that we report a *fatal* error, but return LDB_SUCCESS in many places. Autobuild-User: Kamen Mazdrashki <kamenim@samba.org> Autobuild-Date: Thu Nov 4 12:57:33 UTC 2010 on sn-devel-104
2010-11-04s4-ldb: implement LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECKAndrew Tridgell1-0/+3
this disables the single value checking for one attribute. It is much more specific than a general RELAX control, and also more efficient. I think we should try to have more precise overrides like this, rather than using RELAX as a general purpose override
2010-11-03s4-ldb: expose some more ldb module functionsAndrew Tridgell1-0/+50
this exposes enough functions for s4 to not need ldb_private.h any more.
2010-11-01s4-ldb: added support for ldb module version checkingAndrew Tridgell1-0/+7
2010-11-01s4-ldb: added support for general ldb hooks in modulesAndrew Tridgell1-1/+20
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: removed the old ldb module loading styleAndrew Tridgell1-0/+3
this gets rid of some particularly obscure cpp macros for module lists
2010-11-01s4-ldb: support a new type of ldb module loadingAndrew Tridgell1-0/+3
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-19s4-ldb: added ldb_req_mark_untrusted() and ldb_req_is_untrusted()Andrew Tridgell1-0/+11
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-13s4-ldb: take advantage of ldb_match_msg_error() in more placesAndrew Tridgell1-0/+7
this gives better error checking
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-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-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-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-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-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-09-22s4-ldb: don't show timestamps on every line of ldb tracesAndrew Tridgell1-0/+2
This adds ldb_debug_add() and ldb_debug_end() to format multiline messages
2009-09-08s4/ldb: added --show-binary command line optionAndrew Tridgell1-1/+1
This add --show-binary to ldbsearch. When this flag is set, binary blobs will be shown as-is, instead of base64 encoded. This is useful for some XML encoded attributes, and will also be used as part of some NDR print formatting for attributes like repsTo.
2009-09-03always use prepare_commit in ldb transaction commits if possibleAndrew Tridgell1-0/+1
The reason we need this is to make multi-tdb transactions safe, with the partition module. The linked_attributes and repl_meta_data modules now do extra processing when the transaction ends, and that processing can fail. When it fails we need to cancel the transaction, which we can only do if the hook is on the prepare commit instead of the end transaction call. Otherwise the partition module cannot ensure that no commit has been done on another partition.
2009-06-30s4:ldb Allow rootdse module to build without ldb_private.hAndrew Bartlett1-0/+2
It seems quite reasonable to allow modules to re-initialise the set of cached DNs on the ldb context. Andrew Bartlett
2009-04-02major upgrade to the ldb attribute handlingAndrew Tridgell1-0/+7
This is all working towards supporting the full WSPP schema without a major performance penalty. We now use binary searches when looking up classes and attributes. We also avoid the loop loading the attributes into ldb, by adding a hook to override the ldb attribute search function in a module. The attributes can thus be loaded once, and then saved as part of the global schema. Also added support for a few more key attribute syntaxes, as needed for the full schema.
2009-03-31added support for a prepare_commit() op in ldb modulesAndrew Tridgell1-0/+1
This op will be used by the partition module to give us good transaction semantics across the 4 partitions that sam.ldb uses.
2009-01-30Add helper function to get a module name, may be useful for debugging.Simo Sorce1-1/+2
2009-01-30Fix the mess with ldb includes.Simo Sorce1-0/+160
Separate again the public from the private headers. Add a new header specific for modules. Also add service function for modules as now ldb_context and ldb_module are opaque structures for them.