From a5ce26e98ae27f28006e812f2448c8ac5b012dde Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 25 Mar 2009 08:32:17 -0400 Subject: Refactor nss_ctx to resp_ctx in responders --- server/responder/pam/pam_LOCAL_domain.c | 4 ++-- server/responder/pam/pamsrv_cmd.c | 16 ++++++++-------- server/responder/pam/pamsrv_dp.c | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'server/responder/pam') diff --git a/server/responder/pam/pam_LOCAL_domain.c b/server/responder/pam/pam_LOCAL_domain.c index c307a1b9..49a06ff3 100644 --- a/server/responder/pam/pam_LOCAL_domain.c +++ b/server/responder/pam/pam_LOCAL_domain.c @@ -377,12 +377,12 @@ int LOCAL_pam_handler(struct cli_ctx *cctx, pam_dp_callback_t callback, DEBUG(4, ("LOCAL pam handler.\n")); - lreq->domain_info = btreemap_get_value(lreq->cctx->nctx->domain_map, + lreq->domain_info = btreemap_get_value(lreq->cctx->rctx->domain_map, lreq->pd->domain); NULL_CHECK_OR_JUMP(lreq->domain_info, ("Domain info not found.\n"), ret, EINVAL, done); - lreq->dbctx = lreq->cctx->nctx->sysdb; + lreq->dbctx = lreq->cctx->rctx->sysdb; ret = sysdb_get_user_attr(lreq, lreq->dbctx, lreq->domain_info, lreq->pd->user, attrs, diff --git a/server/responder/pam/pamsrv_cmd.c b/server/responder/pam/pamsrv_cmd.c index c13a5b53..1f7be166 100644 --- a/server/responder/pam/pamsrv_cmd.c +++ b/server/responder/pam/pamsrv_cmd.c @@ -97,7 +97,7 @@ static void pam_reply_delay(struct tevent_context *ev, struct tevent_timer *te, static void pam_reply(struct pam_data *pd) { struct cli_ctx *cctx; - struct sss_cmd_ctx *nctx; + struct sss_cmd_ctx *rctx; uint8_t *body; size_t blen; int ret; @@ -134,13 +134,13 @@ static void pam_reply(struct pam_data *pd) } cctx = pd->cctx; - nctx = talloc_zero(cctx, struct sss_cmd_ctx); - if (!nctx) { + rctx = talloc_zero(cctx, struct sss_cmd_ctx); + if (!rctx) { err = ENOMEM; goto done; } - nctx->cctx = cctx; - nctx->check_expiration = true; + rctx->cctx = cctx; + rctx->check_expiration = true; ret = sss_packet_new(cctx->creq, 0, sss_packet_get_cmd(cctx->creq->in), &cctx->creq->out); @@ -196,7 +196,7 @@ static void pam_reply(struct pam_data *pd) done: talloc_free(pd); - sss_cmd_done(nctx); + sss_cmd_done(rctx); } static int pam_forwarder(struct cli_ctx *cctx, int pam_cmd) @@ -228,8 +228,8 @@ static int pam_forwarder(struct cli_ctx *cctx, int pam_cmd) pd->resp_list = NULL; if (pd->domain == NULL) { - if (cctx->nctx->default_domain != NULL) { - pd->domain = cctx->nctx->default_domain; + if (cctx->rctx->default_domain != NULL) { + pd->domain = cctx->rctx->default_domain; } else { pd->domain = talloc_strdup(pd, "LOCAL"); } diff --git a/server/responder/pam/pamsrv_dp.c b/server/responder/pam/pamsrv_dp.c index 2d5d9799..9bd249e2 100644 --- a/server/responder/pam/pamsrv_dp.c +++ b/server/responder/pam/pamsrv_dp.c @@ -117,7 +117,7 @@ int pam_dp_send_req(struct cli_ctx *cctx, return EINVAL; } - conn = sbus_get_connection(cctx->nctx->dp_ctx->scon_ctx); + conn = sbus_get_connection(cctx->rctx->dp_ctx->scon_ctx); dbus_error_init(&dbus_error); msg = dbus_message_new_method_call(NULL, -- cgit