summaryrefslogtreecommitdiffstats
path: root/src/responder/ssh
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-02-03 13:57:00 +0100
committerStephen Gallagher <sgallagh@redhat.com>2012-02-29 12:53:47 -0500
commitb7b50b21d2254a079b1b1c299909483d23db1512 (patch)
treec2c9b2bff77dfadb9d70d348ad6ffb06c60e8d2b /src/responder/ssh
parentd2d2d6ae0c436461bcc8f881df059eb036314c44 (diff)
downloadsssd-b7b50b21d2254a079b1b1c299909483d23db1512.tar.gz
sssd-b7b50b21d2254a079b1b1c299909483d23db1512.tar.xz
sssd-b7b50b21d2254a079b1b1c299909483d23db1512.zip
Remove sysdb_get_ctx_from_list()
Diffstat (limited to 'src/responder/ssh')
-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 be79f0c9c..77ffd80c1 100644
--- a/src/responder/ssh/sshsrv_cmd.c
+++ b/src/responder/ssh/sshsrv_cmd.c
@@ -258,7 +258,6 @@ static errno_t
ssh_user_pubkeys_search_next(struct ssh_cmd_ctx *cmd_ctx)
{
errno_t ret;
- struct cli_ctx *cctx = cmd_ctx->cctx;
struct sysdb_ctx *sysdb;
const char *attrs[] = { SYSDB_NAME, SYSDB_SSH_PUBKEY, NULL };
struct ldb_result *res;
@@ -267,8 +266,8 @@ ssh_user_pubkeys_search_next(struct ssh_cmd_ctx *cmd_ctx)
("Requesting SSH user public keys for [%s@%s]\n",
cmd_ctx->name, cmd_ctx->domain->name));
- ret = sysdb_get_ctx_from_list(cctx->rctx->db_list, cmd_ctx->domain, &sysdb);
- if (ret != EOK) {
+ sysdb = cmd_ctx->domain->sysdb;
+ if (sysdb == NULL) {
DEBUG(SSSDBG_FATAL_FAILURE,
("Fatal: Sysdb CTX not found for this domain!\n"));
return EFAULT;
@@ -393,7 +392,6 @@ static errno_t
ssh_host_pubkeys_search_next(struct ssh_cmd_ctx *cmd_ctx)
{
errno_t ret;
- struct cli_ctx *cctx = cmd_ctx->cctx;
struct sysdb_ctx *sysdb;
const char *attrs[] = { SYSDB_NAME, SYSDB_SSH_PUBKEY, NULL };
@@ -401,8 +399,8 @@ ssh_host_pubkeys_search_next(struct ssh_cmd_ctx *cmd_ctx)
("Requesting SSH host public keys for [%s@%s]\n",
cmd_ctx->name, cmd_ctx->domain->name));
- ret = sysdb_get_ctx_from_list(cctx->rctx->db_list, cmd_ctx->domain, &sysdb);
- if (ret != EOK) {
+ sysdb = cmd_ctx->domain->sysdb;
+ if (sysdb == NULL) {
DEBUG(SSSDBG_FATAL_FAILURE,
("Fatal: Sysdb CTX not found for this domain!\n"));
return EFAULT;
@@ -504,8 +502,8 @@ ssh_host_pubkeys_update_known_hosts(struct ssh_cmd_ctx *cmd_ctx)
}
while (dom) {
- ret = sysdb_get_ctx_from_list(cctx->rctx->db_list, dom, &sysdb);
- if (ret != EOK) {
+ sysdb = dom->sysdb;
+ if (sysdb == NULL) {
DEBUG(SSSDBG_FATAL_FAILURE,
("Fatal: Sysdb CTX not found for this domain!\n"));
ret = EFAULT;