diff options
author | Simo Sorce <simo@redhat.com> | 2013-01-11 12:25:53 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-01-21 22:17:34 +0100 |
commit | 8e5549e453558d4bebdec333a93e215d5d6ffaec (patch) | |
tree | a9004b07b800492ecb8bdaeb2019512c3fccb229 /src/providers/proxy/proxy_auth.c | |
parent | ccc2af010bbbe6d8a7496fb717216135bc4c1993 (diff) | |
download | sssd-8e5549e453558d4bebdec333a93e215d5d6ffaec.tar.gz sssd-8e5549e453558d4bebdec333a93e215d5d6ffaec.tar.bz2 sssd-8e5549e453558d4bebdec333a93e215d5d6ffaec.zip |
Introduce be_req_terminate() helper
Call it everywhere instead of directly dereferencing be_req->fn
This is in preparation of making be_req opaque.
Diffstat (limited to 'src/providers/proxy/proxy_auth.c')
-rw-r--r-- | src/providers/proxy/proxy_auth.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/providers/proxy/proxy_auth.c b/src/providers/proxy/proxy_auth.c index 02a95fe6..7b6a26f5 100644 --- a/src/providers/proxy/proxy_auth.c +++ b/src/providers/proxy/proxy_auth.c @@ -60,18 +60,18 @@ void proxy_pam_handler(struct be_req *req) case SSS_PAM_OPEN_SESSION: case SSS_PAM_CLOSE_SESSION: pd->pam_status = PAM_SUCCESS; - proxy_reply(req, DP_ERR_OK, EOK, NULL); + be_req_terminate(req, DP_ERR_OK, EOK, NULL); return; default: DEBUG(1, ("Unsupported PAM task.\n")); pd->pam_status = PAM_MODULE_UNKNOWN; - proxy_reply(req, DP_ERR_OK, EINVAL, "Unsupported PAM task"); + be_req_terminate(req, DP_ERR_OK, EINVAL, "Unsupported PAM task"); return; } client_ctx = talloc(req, struct proxy_client_ctx); if (client_ctx == NULL) { - proxy_reply(req, DP_ERR_FATAL, ENOMEM, NULL); + be_req_terminate(req, DP_ERR_FATAL, ENOMEM, NULL); return; } client_ctx->auth_ctx = ctx; @@ -85,7 +85,7 @@ void proxy_pam_handler(struct be_req *req) /* Could not queue request * Return an error */ - proxy_reply(req, DP_ERR_FATAL, EINVAL, "Could not queue request\n"); + be_req_terminate(req, DP_ERR_FATAL, EINVAL, "Could not queue request\n"); return; } tevent_req_set_callback(child_req, proxy_child_done, client_ctx); @@ -740,7 +740,7 @@ static void proxy_child_done(struct tevent_req *req) if (ret != EOK) { /* Pam child failed */ - proxy_reply(client_ctx->be_req, DP_ERR_FATAL, ret, + be_req_terminate(client_ctx->be_req, DP_ERR_FATAL, ret, "PAM child failed"); return; } @@ -770,7 +770,7 @@ static void proxy_child_done(struct tevent_req *req) } done: - proxy_reply(client_ctx->be_req, DP_ERR_OK, EOK, NULL); + be_req_terminate(client_ctx->be_req, DP_ERR_OK, EOK, NULL); } static void run_proxy_child_queue(struct tevent_context *ev, |