URL: https://github.com/SSSD/sssd/pull/150
Author: pbrezina
 Title: #150: ssh: go to dp first when looking up host
Action: opened

PR body:
"""
There were three downstream test failures caused by not updating known_host 
files properly. Original code went to data provider prior to cache lookup but 
the changes I made went to cache first following our standard pattern.
"""

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/150/head:pr150
git checkout pr150
From 1dd1b7693f3e3999ba15b3f262b1a2f5d1e2cca5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrez...@redhat.com>
Date: Wed, 8 Feb 2017 13:22:11 +0100
Subject: [PATCH 1/2] ssh: fix typo

Those macros are the same so there is no functional difference.
---
 src/responder/ssh/ssh_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/responder/ssh/ssh_cmd.c b/src/responder/ssh/ssh_cmd.c
index a118828..1b9aff2 100644
--- a/src/responder/ssh/ssh_cmd.c
+++ b/src/responder/ssh/ssh_cmd.c
@@ -213,7 +213,7 @@ static void ssh_cmd_get_host_pubkeys_done(struct tevent_req *subreq)
     cmd_ctx = tevent_req_callback_data(subreq, struct ssh_cmd_ctx);
     ssh_ctx = talloc_get_type(cmd_ctx->cli_ctx->rctx->pvt_ctx, struct ssh_ctx);
 
-    ret = cache_req_user_by_name_attrs_recv(cmd_ctx, subreq, &result);
+    ret = cache_req_host_by_name_recv(cmd_ctx, subreq, &result);
     talloc_zfree(subreq);
 
     if (ret == EOK || ret == ENOENT) {

From 59845bde13ad219e43479ea911139fb61f07f83d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrez...@redhat.com>
Date: Wed, 8 Feb 2017 13:22:42 +0100
Subject: [PATCH 2/2] cache_req: always go to dp first when looking up host

We need to always lookup host in DP first to update host certificates so
we are consinstent during ssh authentication.
---
 src/responder/common/cache_req/plugins/cache_req_host_by_name.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/responder/common/cache_req/plugins/cache_req_host_by_name.c b/src/responder/common/cache_req/plugins/cache_req_host_by_name.c
index 18511e3..77b4683 100644
--- a/src/responder/common/cache_req/plugins/cache_req_host_by_name.c
+++ b/src/responder/common/cache_req/plugins/cache_req_host_by_name.c
@@ -77,7 +77,7 @@ const struct cache_req_plugin cache_req_host_by_name = {
     .attr_expiration = SYSDB_CACHE_EXPIRE,
     .parse_name = true,
     .ignore_default_domain = true,
-    .bypass_cache = false,
+    .bypass_cache = true,
     .only_one_result = true,
     .search_all_domains = false,
     .require_enumeration = false,
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to