diff options
author | Sumit Bose <sbose@redhat.com> | 2009-07-14 21:12:30 +0200 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-07-20 09:49:54 -0400 |
commit | c0a1d64228042c3d4bbf62447a49d085fd30fda1 (patch) | |
tree | 3a823b5bdbd50c86cd040b25ccbef5973c00197c /server/providers/ldap | |
parent | 686a0778e173aa19a8136672e786281fd69cdeb0 (diff) | |
download | sssd-c0a1d64228042c3d4bbf62447a49d085fd30fda1.tar.gz sssd-c0a1d64228042c3d4bbf62447a49d085fd30fda1.tar.bz2 sssd-c0a1d64228042c3d4bbf62447a49d085fd30fda1.zip |
add infrastructure to handle new backend targets
Diffstat (limited to 'server/providers/ldap')
-rw-r--r-- | server/providers/ldap/ldap_auth.c | 9 | ||||
-rw-r--r-- | server/providers/ldap/ldap_id.c | 10 |
2 files changed, 10 insertions, 9 deletions
diff --git a/server/providers/ldap/ldap_auth.c b/server/providers/ldap/ldap_auth.c index e3633857..2c530325 100644 --- a/server/providers/ldap/ldap_auth.c +++ b/server/providers/ldap/ldap_auth.c @@ -322,7 +322,7 @@ static void sdap_pam_auth_send(struct be_req *breq) struct tevent_req *subreq; struct pam_data *pd; - ctx = talloc_get_type(breq->be_ctx->pvt_auth_data, struct sdap_auth_ctx); + ctx = talloc_get_type(breq->be_ctx->bet_info[BET_AUTH].pvt_bet_data, struct sdap_auth_ctx); pd = talloc_get_type(breq->req_data, struct pam_data); pd->pam_status = PAM_SYSTEM_ERR; @@ -447,13 +447,14 @@ static void sdap_shutdown(struct be_req *req) req->fn(req, EOK, NULL); } -struct be_auth_ops sdap_auth_ops = { - .pam_handler = sdap_pam_auth_send, +struct bet_ops sdap_auth_ops = { + .check_online = NULL, + .handler = sdap_pam_auth_send, .finalize = sdap_shutdown }; int sssm_ldap_auth_init(struct be_ctx *bectx, - struct be_auth_ops **ops, + struct bet_ops **ops, void **pvt_data) { int ldap_opt_x_tls_require_cert; diff --git a/server/providers/ldap/ldap_id.c b/server/providers/ldap/ldap_id.c index 12180270..83d009ee 100644 --- a/server/providers/ldap/ldap_id.c +++ b/server/providers/ldap/ldap_id.c @@ -61,7 +61,7 @@ static void sdap_check_online(struct be_req *req) struct be_online_req *oreq; struct sdap_id_ctx *ctx; - ctx = talloc_get_type(req->be_ctx->pvt_id_data, struct sdap_id_ctx); + ctx = talloc_get_type(req->be_ctx->bet_info[BET_ID].pvt_bet_data, struct sdap_id_ctx); oreq = talloc_get_type(req->req_data, struct be_online_req); if (is_offline(ctx)) { @@ -674,7 +674,7 @@ static void sdap_get_account_info(struct be_req *breq) const char *err = "Unknown Error"; int ret = EOK; - ctx = talloc_get_type(breq->be_ctx->pvt_id_data, struct sdap_id_ctx); + ctx = talloc_get_type(breq->be_ctx->bet_info[BET_ID].pvt_bet_data, struct sdap_id_ctx); if (is_offline(ctx)) { return sdap_req_done(breq, EAGAIN, "Offline"); @@ -753,14 +753,14 @@ static void sdap_shutdown(struct be_req *req) sdap_req_done(req, EOK, NULL); } -struct be_id_ops sdap_id_ops = { +struct bet_ops sdap_id_ops = { .check_online = sdap_check_online, - .get_account_info = sdap_get_account_info, + .handler = sdap_get_account_info, .finalize = sdap_shutdown }; int sssm_ldap_init(struct be_ctx *bectx, - struct be_id_ops **ops, + struct bet_ops **ops, void **pvt_data) { int ldap_opt_x_tls_require_cert; |