summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-07-09 13:07:28 +1000
committerDamien Miller <djm@mindrot.org>2014-07-09 13:07:28 +1000
commitd0bb950485ba121e43a77caf434115ed6417b46f (patch)
tree8bfaa4921f5ffbcaf1a64335ddf60653f735bf0d
parent0070776a038655c57f57e70cd05e4c38a5de9d84 (diff)
downloadopenssh-git-d0bb950485ba121e43a77caf434115ed6417b46f.tar.gz
- djm@cvs.openbsd.org 2014/07/09 03:02:15
[key.c] downgrade more error() to debug() to better match what old authfile.c did; suppresses spurious errors with hostbased authentication enabled
-rw-r--r--ChangeLog4
-rw-r--r--key.c17
2 files changed, 15 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 6fcb44bb..d6202287 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,10 @@
[sftp.c]
more useful error message when GLOB_NOSPACE occurs;
bz#2254, patch from Orion Poplawski
+ - djm@cvs.openbsd.org 2014/07/09 03:02:15
+ [key.c]
+ downgrade more error() to debug() to better match what old authfile.c
+ did; suppresses spurious errors with hostbased authentication enabled
20140706
- OpenBSD CVS Sync
diff --git a/key.c b/key.c
index 75327d49..70f4045c 100644
--- a/key.c
+++ b/key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key.c,v 1.119 2014/06/30 12:54:39 djm Exp $ */
+/* $OpenBSD: key.c,v 1.120 2014/07/09 03:02:15 djm Exp $ */
/*
* placed in the public domain
*/
@@ -345,7 +345,8 @@ key_load_cert(const char *filename)
if ((r = sshkey_load_cert(filename, &ret)) != 0) {
fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR);
- if (r == SSH_ERR_SYSTEM_ERROR && errno == ENOENT)
+ /* Old authfile.c ignored all file errors. */
+ if (r == SSH_ERR_SYSTEM_ERROR)
debug("%s: %s", __func__, ssh_err(r));
else
error("%s: %s", __func__, ssh_err(r));
@@ -363,7 +364,8 @@ key_load_public(const char *filename, char **commentp)
if ((r = sshkey_load_public(filename, &ret, commentp)) != 0) {
fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR);
- if (r == SSH_ERR_SYSTEM_ERROR && errno == ENOENT)
+ /* Old authfile.c ignored all file errors. */
+ if (r == SSH_ERR_SYSTEM_ERROR)
debug("%s: %s", __func__, ssh_err(r));
else
error("%s: %s", __func__, ssh_err(r));
@@ -381,7 +383,8 @@ key_load_private(const char *path, const char *passphrase,
if ((r = sshkey_load_private(path, passphrase, &ret, commentp)) != 0) {
fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR);
- if (r == SSH_ERR_SYSTEM_ERROR && errno == ENOENT)
+ /* Old authfile.c ignored all file errors. */
+ if (r == SSH_ERR_SYSTEM_ERROR)
debug("%s: %s", __func__, ssh_err(r));
else
error("%s: %s", __func__, ssh_err(r));
@@ -400,7 +403,8 @@ key_load_private_cert(int type, const char *filename, const char *passphrase,
if ((r = sshkey_load_private_cert(type, filename, passphrase,
&ret, perm_ok)) != 0) {
fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR);
- if (r == SSH_ERR_SYSTEM_ERROR && errno == ENOENT)
+ /* Old authfile.c ignored all file errors. */
+ if (r == SSH_ERR_SYSTEM_ERROR)
debug("%s: %s", __func__, ssh_err(r));
else
error("%s: %s", __func__, ssh_err(r));
@@ -419,7 +423,8 @@ key_load_private_type(int type, const char *filename, const char *passphrase,
if ((r = sshkey_load_private_type(type, filename, passphrase,
&ret, commentp, perm_ok)) != 0) {
fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR);
- if ((r == SSH_ERR_SYSTEM_ERROR && errno == ENOENT) ||
+ /* Old authfile.c ignored all file errors. */
+ if (r == SSH_ERR_SYSTEM_ERROR ||
(r == SSH_ERR_KEY_WRONG_PASSPHRASE))
debug("%s: %s", __func__, ssh_err(r));
else