summaryrefslogtreecommitdiffstats
path: root/server/providers/dp_backend.h
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-04-04 12:21:18 -0400
committerSimo Sorce <ssorce@redhat.com>2009-04-07 14:27:18 -0400
commitee762f9b709224a7dc7460fc535ee992045168b8 (patch)
treedaa6d444d6c52868c0a9109d360a4fe64b333df3 /server/providers/dp_backend.h
parent2df2e775612734712b72dcf0adf6c66ce530a319 (diff)
downloadsssd_unused-ee762f9b709224a7dc7460fc535ee992045168b8.tar.gz
sssd_unused-ee762f9b709224a7dc7460fc535ee992045168b8.tar.xz
sssd_unused-ee762f9b709224a7dc7460fc535ee992045168b8.zip
Split modules types in Identity and Authenticator
The same module may implement both types, but initializatrion will be nonetheless performed separately, once for the identity module and once for the authenticator module. Also change the proxy module to retireve the pam target name from the domain configuration so that it is possibile to create per-domain pam stacks. With this modification it is actually possibile to use normal nss and pam modules to perform a successful authentication (tested only with sudo so far) Update exmples.
Diffstat (limited to 'server/providers/dp_backend.h')
-rw-r--r--server/providers/dp_backend.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/server/providers/dp_backend.h b/server/providers/dp_backend.h
index 12cfb3a5..2d1cd83e 100644
--- a/server/providers/dp_backend.h
+++ b/server/providers/dp_backend.h
@@ -27,10 +27,15 @@
#include "responder/pam/pamsrv.h"
struct be_ctx;
+struct be_id_ops;
+struct be_auth_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 void (*be_shutdown_fn)(void *);
-
-struct be_mod_ops;
+typedef void (*be_req_fn_t)(struct be_req *);
+typedef void (*be_async_callback_t)(struct be_req *, int, const char *);
struct be_ctx {
struct tevent_context *ev;
@@ -42,14 +47,24 @@ struct be_ctx {
const char *domain;
const char *identity;
const char *conf_path;
- struct be_mod_ops *ops;
- void *pvt_data;
- be_shutdown_fn shutdown;
+
+ struct be_id_ops *id_ops;
+ void *pvt_id_data;
+
+ struct be_auth_ops *auth_ops;
+ void *pvt_auth_data;
};
-struct be_req;
+struct be_id_ops {
+ be_req_fn_t check_online;
+ be_req_fn_t get_account_info;
+ be_req_fn_t finalize;
+};
-typedef void (*be_async_callback_t)(struct be_req *, int, const char *);
+struct be_auth_ops {
+ be_req_fn_t pam_handler;
+ be_req_fn_t finalize;
+};
struct be_req {
struct be_ctx *be_ctx;
@@ -70,19 +85,4 @@ struct be_online_req {
int online;
};
-struct be_pam_handler {
- int pam_status;
- const char *domain;
- struct pam_data *pd;
-};
-
-typedef void (*be_req_fn_t)(struct be_req *);
-
-struct be_mod_ops {
- be_req_fn_t check_online;
- be_req_fn_t get_account_info;
- be_req_fn_t pam_handler;
- be_req_fn_t finalize;
-};
-
#endif /* __DP_BACKEND_H___ */