diff options
author | Sumit Bose <sbose@redhat.com> | 2009-03-18 17:07:17 +0100 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-03-19 09:59:15 -0400 |
commit | 87323686e57db9a767ff5c2f0e1c56e9944d9f9a (patch) | |
tree | 82642e557c301054f0d1fd623763717c2a49485d /server/providers/ldap_be.c | |
parent | e2e17b7a75e65b2db2eb484f24ecde4f7aa5566b (diff) | |
download | sssd-87323686e57db9a767ff5c2f0e1c56e9944d9f9a.tar.gz sssd-87323686e57db9a767ff5c2f0e1c56e9944d9f9a.tar.bz2 sssd-87323686e57db9a767ff5c2f0e1c56e9944d9f9a.zip |
use pam_data as main data structure for dbus communication
Diffstat (limited to 'server/providers/ldap_be.c')
-rw-r--r-- | server/providers/ldap_be.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/server/providers/ldap_be.c b/server/providers/ldap_be.c index 8967732f..d91e0792 100644 --- a/server/providers/ldap_be.c +++ b/server/providers/ldap_be.c @@ -96,7 +96,7 @@ static int schedule_next_task(struct ldap_req *lr, struct timeval tv, timeout.tv_usec += tv.tv_usec; - te = tevent_add_timer(lr->req->be_ctx->ev, lr, timeout, task, lr); + te = tevent_add_timer(lr->req->be_ctx->ev, lr, timeout, task, lr); if (te == NULL) { return EIO; } @@ -271,7 +271,7 @@ static void ldap_be_loop(struct tevent_context *ev, struct tevent_fd *te, int pam_status=PAM_SUCCESS; int ldap_ret; struct ldap_req *lr; - struct be_pam_handler *ph; + struct pam_data *pd; struct be_req *req; LDAPMessage *result=NULL; LDAPMessage *msg=NULL; @@ -281,7 +281,7 @@ static void ldap_be_loop(struct tevent_context *ev, struct tevent_fd *te, char *filter=NULL; char *attrs[] = { LDAP_NO_ATTRS, NULL }; - lr = talloc_get_type(pvt, struct ldap_req); + lr = talloc_get_type(pvt, struct ldap_req); switch (lr->next_op) { case LDAP_OP_INIT: @@ -533,8 +533,8 @@ done: talloc_free(filter); if (lr->ldap != NULL) ldap_unbind_ext(lr->ldap, NULL, NULL); req = lr->req; - ph = talloc_get_type(lr->req->req_data, struct be_pam_handler); - ph->pam_status = pam_status; + pd = talloc_get_type(lr->req->req_data, struct pam_data); + pd->pam_status = pam_status; talloc_free(lr); @@ -548,9 +548,9 @@ static void ldap_start(struct tevent_context *ev, struct tevent_timer *te, int pam_status; struct ldap_req *lr; struct be_req *req; - struct be_pam_handler *ph; + struct pam_data *pd; - lr = talloc_get_type(pvt, struct ldap_req); + lr = talloc_get_type(pvt, struct ldap_req); ret = ldap_be_init(lr); if (ret != EOK) { @@ -573,8 +573,8 @@ static void ldap_start(struct tevent_context *ev, struct tevent_timer *te, done: if (lr->ldap != NULL ) ldap_unbind_ext(lr->ldap, NULL, NULL); req = lr->req; - ph = talloc_get_type(lr->req->req_data, struct be_pam_handler); - ph->pam_status = pam_status; + pd = talloc_get_type(lr->req->req_data, struct pam_data); + pd->pam_status = pam_status; talloc_free(lr); @@ -587,12 +587,10 @@ static void ldap_pam_handler(struct be_req *req) int pam_status=PAM_SUCCESS; struct ldap_req *lr; struct ldap_ctx *ldap_ctx; - struct be_pam_handler *ph; struct pam_data *pd; struct timeval timeout; - ph = talloc_get_type(req->req_data, struct be_pam_handler); - pd = ph->pd; + pd = talloc_get_type(req->req_data, struct pam_data); ldap_ctx = talloc_get_type(req->be_ctx->pvt_data, struct ldap_ctx); @@ -620,7 +618,7 @@ static void ldap_pam_handler(struct be_req *req) done: talloc_free(lr); - ph->pam_status = pam_status; + pd->pam_status = pam_status; req->fn(req, pam_status, NULL); } |