summaryrefslogtreecommitdiffstats
path: root/src/responder/ssh/sshsrv_cmd.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-04-18 14:27:44 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-05-03 11:46:18 -0400
commitb42b5d5aaf4da165582e73ad985fdff6e34e61e4 (patch)
tree3628fa960f554e1971952e369ff3576ba6adef11 /src/responder/ssh/sshsrv_cmd.c
parentd226a2a0f8e6738507874f3e04bf281c2bf526b1 (diff)
downloadsssd_unused-b42b5d5aaf4da165582e73ad985fdff6e34e61e4.tar.gz
sssd_unused-b42b5d5aaf4da165582e73ad985fdff6e34e61e4.tar.xz
sssd_unused-b42b5d5aaf4da165582e73ad985fdff6e34e61e4.zip
SSH: Add dp_get_host_send to common responder code
Instead of using account_info request, creates a new ssh specific request. This improves code readability and will make the code more flexible in the future. https://fedorahosted.org/sssd/ticket/1176
Diffstat (limited to 'src/responder/ssh/sshsrv_cmd.c')
-rw-r--r--src/responder/ssh/sshsrv_cmd.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/responder/ssh/sshsrv_cmd.c b/src/responder/ssh/sshsrv_cmd.c
index 0740cd25..fa02025e 100644
--- a/src/responder/ssh/sshsrv_cmd.c
+++ b/src/responder/ssh/sshsrv_cmd.c
@@ -55,7 +55,6 @@ sss_ssh_cmd_get_user_pubkeys(struct cli_ctx *cctx)
return ENOMEM;
}
cmd_ctx->cctx = cctx;
- cmd_ctx->type = SSS_DP_USER;
ret = ssh_cmd_parse_request(cmd_ctx);
if (ret != EOK) {
@@ -98,7 +97,6 @@ sss_ssh_cmd_get_host_pubkeys(struct cli_ctx *cctx)
return ENOMEM;
}
cmd_ctx->cctx = cctx;
- cmd_ctx->type = SSS_DP_HOST;
ret = ssh_cmd_parse_request(cmd_ctx);
if (ret != EOK) {
@@ -139,9 +137,9 @@ ssh_dp_send_req_done(struct tevent_req *req)
dbus_uint32_t err_min;
char *err_msg;
- ret = sss_dp_get_account_recv(cb_ctx->mem_ctx, req,
- &err_maj, &err_min,
- &err_msg);
+ ret = sss_dp_get_ssh_host_recv(cb_ctx->mem_ctx, req,
+ &err_maj, &err_min,
+ &err_msg);
talloc_zfree(req);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
@@ -312,9 +310,9 @@ ssh_host_pubkeys_search(struct ssh_cmd_ctx *cmd_ctx)
/* refresh the host's cache entry */
if (NEED_CHECK_PROVIDER(cmd_ctx->domain->provider)) {
- req = sss_dp_get_account_send(cmd_ctx, cmd_ctx->cctx->rctx,
- cmd_ctx->domain, false, SSS_DP_HOST,
- cmd_ctx->name, 0, cmd_ctx->alias);
+ req = sss_dp_get_ssh_host_send(cmd_ctx, cmd_ctx->cctx->rctx,
+ cmd_ctx->domain, false,
+ cmd_ctx->name, cmd_ctx->alias);
if (!req) {
DEBUG(SSSDBG_CRIT_FAILURE,
("Out of memory sending data provider request\n"));