From 6f21f556c1e9a6df9f7dc00aa1e270ff91ffd850 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Wed, 10 Aug 2011 13:46:34 +1000 Subject: passdb: Add a function to expose loaded backend list. This function is used in python wrapper to list available python backends. --- source3/passdb/pdb_interface.c | 6 ++++++ source3/passdb/proto.h | 1 + 2 files changed, 7 insertions(+) (limited to 'source3/passdb') diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index c92b22ae99..bc79459245 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -99,6 +99,12 @@ struct pdb_init_function_entry *pdb_find_backend_entry(const char *name) return NULL; } +const struct pdb_init_function_entry *pdb_get_backends(void) +{ + return backends; +} + + /* * The event context for the passdb backend. I know this is a bad hack and yet * another static variable, but our pdb API is a global thing per diff --git a/source3/passdb/proto.h b/source3/passdb/proto.h index 3699efe799..e84ece7497 100644 --- a/source3/passdb/proto.h +++ b/source3/passdb/proto.h @@ -201,6 +201,7 @@ uint32_t pdb_build_fields_present(struct samu *sampass); NTSTATUS smb_register_passdb(int version, const char *name, pdb_init_function init) ; struct pdb_init_function_entry *pdb_find_backend_entry(const char *name); +const struct pdb_init_function_entry *pdb_get_backends(void); struct event_context *pdb_get_event_context(void); NTSTATUS make_pdb_method_name(struct pdb_methods **methods, const char *selected); struct pdb_domain_info *pdb_get_domain_info(TALLOC_CTX *mem_ctx); -- cgit