summaryrefslogtreecommitdiffstats
path: root/server/providers/dp_backend.h
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-07-14 21:12:30 +0200
committerSimo Sorce <ssorce@redhat.com>2009-07-20 09:49:54 -0400
commitc0a1d64228042c3d4bbf62447a49d085fd30fda1 (patch)
tree3a823b5bdbd50c86cd040b25ccbef5973c00197c /server/providers/dp_backend.h
parent686a0778e173aa19a8136672e786281fd69cdeb0 (diff)
downloadsssd-c0a1d64228042c3d4bbf62447a49d085fd30fda1.tar.gz
sssd-c0a1d64228042c3d4bbf62447a49d085fd30fda1.tar.xz
sssd-c0a1d64228042c3d4bbf62447a49d085fd30fda1.zip
add infrastructure to handle new backend targets
Diffstat (limited to 'server/providers/dp_backend.h')
-rw-r--r--server/providers/dp_backend.h49
1 files changed, 33 insertions, 16 deletions
diff --git a/server/providers/dp_backend.h b/server/providers/dp_backend.h
index 27f79eb7a..66bc87185 100644
--- a/server/providers/dp_backend.h
+++ b/server/providers/dp_backend.h
@@ -26,16 +26,41 @@
#include "db/sysdb.h"
struct be_ctx;
-struct be_id_ops;
-struct be_auth_ops;
+struct bet_ops;
struct be_req;
-typedef int (*be_id_init_fn_t)(TALLOC_CTX *, struct be_id_ops **, void **);
-typedef int (*be_auth_init_fn_t)(TALLOC_CTX *, struct be_auth_ops **, void **);
+typedef int (*bet_init_fn_t)(TALLOC_CTX *, struct bet_ops **, void **);
typedef void (*be_shutdown_fn)(void *);
typedef void (*be_req_fn_t)(struct be_req *);
typedef void (*be_async_callback_t)(struct be_req *, int, const char *);
+enum bet_type {
+ BET_NULL = 0,
+ BET_ID,
+ BET_AUTH,
+ BET_ACCESS,
+ BET_CHPASS,
+ BET_MAX
+};
+
+struct bet_data {
+ enum bet_type bet_type;
+ const char *option_name;
+ const char *mod_init_fn_name_fmt;
+};
+
+struct loaded_be {
+ char *be_name;
+ void *handle;
+};
+
+struct bet_info {
+ enum bet_type bet_type;
+ struct bet_ops *bet_ops;
+ void *pvt_bet_data;
+};
+
+
struct be_ctx {
struct tevent_context *ev;
struct confdb_ctx *cdb;
@@ -47,21 +72,13 @@ struct be_ctx {
const char *identity;
const char *conf_path;
- struct be_id_ops *id_ops;
- void *pvt_id_data;
-
- struct be_auth_ops *auth_ops;
- void *pvt_auth_data;
+ struct loaded_be loaded_be[BET_MAX];
+ struct bet_info bet_info[BET_MAX];
};
-struct be_id_ops {
+struct bet_ops {
be_req_fn_t check_online;
- be_req_fn_t get_account_info;
- be_req_fn_t finalize;
-};
-
-struct be_auth_ops {
- be_req_fn_t pam_handler;
+ be_req_fn_t handler;
be_req_fn_t finalize;
};