diff options
author | Jan Cholasta <jcholast@redhat.com> | 2012-05-28 06:58:16 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-05-31 15:53:31 -0400 |
commit | 8e911f93054c410cfbec3c3b71f74081468451de (patch) | |
tree | fe67765df4bb5849906be4fa47068b6790aec6de /src/sss_client | |
parent | 6b81b6ada1010e65b447fc74453e236fb8791813 (diff) | |
download | sssd-8e911f93054c410cfbec3c3b71f74081468451de.tar.gz sssd-8e911f93054c410cfbec3c3b71f74081468451de.tar.xz sssd-8e911f93054c410cfbec3c3b71f74081468451de.zip |
SSH: Supress error message output in sss_ssh_knownhostsproxy
Diffstat (limited to 'src/sss_client')
-rw-r--r-- | src/sss_client/ssh/sss_ssh_client.c | 8 | ||||
-rw-r--r-- | src/sss_client/ssh/sss_ssh_knownhostsproxy.c | 15 |
2 files changed, 8 insertions, 15 deletions
diff --git a/src/sss_client/ssh/sss_ssh_client.c b/src/sss_client/ssh/sss_ssh_client.c index 8520cd1b1..645f29289 100644 --- a/src/sss_client/ssh/sss_ssh_client.c +++ b/src/sss_client/ssh/sss_ssh_client.c @@ -146,14 +146,14 @@ sss_ssh_get_ent(TALLOC_CTX *mem_ctx, rd.len = req_len; req_ret = sss_ssh_make_request(command, &rd, &rep, &rep_len, &req_errno); - if (req_ret != SSS_STATUS_SUCCESS) { - ret = EFAULT; - goto done; - } if (req_errno != EOK) { ret = req_errno; goto done; } + if (req_ret != SSS_STATUS_SUCCESS) { + ret = EFAULT; + goto done; + } /* parse reply */ c = 0; diff --git a/src/sss_client/ssh/sss_ssh_knownhostsproxy.c b/src/sss_client/ssh/sss_ssh_knownhostsproxy.c index e45ef45f1..a96faae39 100644 --- a/src/sss_client/ssh/sss_ssh_knownhostsproxy.c +++ b/src/sss_client/ssh/sss_ssh_knownhostsproxy.c @@ -73,7 +73,6 @@ connect_socket(int family, struct sockaddr *addr, size_t addr_len) ret = errno; DEBUG(SSSDBG_OP_FAILURE, ("socket() failed (%d): %s\n", ret, strerror(ret))); - ERROR("Failed to open a socket\n"); goto done; } @@ -83,7 +82,6 @@ connect_socket(int family, struct sockaddr *addr, size_t addr_len) ret = errno; DEBUG(SSSDBG_OP_FAILURE, ("connect() failed (%d): %s\n", ret, strerror(ret))); - ERROR("Failed to connect to the server\n"); goto done; } @@ -176,7 +174,6 @@ connect_proxy_command(char **args) ret = errno; DEBUG(SSSDBG_OP_FAILURE, ("execv() failed (%d): %s\n", ret, strerror(ret))); - ERROR("Failed to execute proxy command\n"); return ret; } @@ -213,14 +210,13 @@ int main(int argc, const char **argv) if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, ("set_locale() failed (%d): %s\n", ret, strerror(ret))); - ERROR("Error setting the locale\n"); ret = EXIT_FAILURE; goto fini; } mem_ctx = talloc_new(NULL); if (!mem_ctx) { - ERROR("Not enough memory\n"); + DEBUG(SSSDBG_CRIT_FAILURE, ("Not enough memory\n")); ret = EXIT_FAILURE; goto fini; } @@ -260,7 +256,6 @@ int main(int argc, const char **argv) if (ret) { DEBUG(SSSDBG_CRIT_FAILURE, ("getaddrinfo() failed (%d): %s\n", ret, gai_strerror(ret))); - ERROR("Host name cannot be resolved\n"); ret = EXIT_FAILURE; goto fini; } @@ -270,8 +265,7 @@ int main(int argc, const char **argv) canonhost, NI_MAXHOST, NULL, 0, NI_NAMEREQD); if (ret) { DEBUG(SSSDBG_CRIT_FAILURE, - ("getaddrinfo() failed (%d): %s\n", ret, gai_strerror(ret))); - ERROR("Reverse lookup failed\n"); + ("getnameinfo() failed (%d): %s\n", ret, gai_strerror(ret))); ret = EXIT_FAILURE; goto fini; } @@ -280,7 +274,7 @@ int main(int argc, const char **argv) if (pc_domain) { host = talloc_asprintf(mem_ctx, "%s@%s", canonhost, pc_domain); if (!host) { - ERROR("Not enough memory\n"); + DEBUG(SSSDBG_CRIT_FAILURE, ("Not enough memory\n")); ret = EXIT_FAILURE; goto fini; } @@ -292,9 +286,8 @@ int main(int argc, const char **argv) ret = sss_ssh_get_ent(mem_ctx, SSS_SSH_GET_HOST_PUBKEYS, host, pc_host, &ent); if (ret != EOK) { - DEBUG(SSSDBG_CRIT_FAILURE, + DEBUG(SSSDBG_OP_FAILURE, ("sss_ssh_get_ent() failed (%d): %s\n", ret, strerror(ret))); - ERROR("Error looking up public keys\n"); } /* connect to server */ |