summaryrefslogtreecommitdiff
path: root/daemon/gvfsbackendsftp.c
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2015-08-10 12:11:12 +0200
committerOndrej Holy <oholy@redhat.com>2015-11-26 14:41:01 +0100
commitec40e26ac69896e91c128e86b11cddc76e892d12 (patch)
tree3884570b984efd96724a90244d2baa0f5a50c8a5 /daemon/gvfsbackendsftp.c
parent15e0ecfc15748f4080f572f74b3c7a4401b02307 (diff)
downloadgvfs-ec40e26ac69896e91c128e86b11cddc76e892d12.tar.gz
sftp: Handle "Too many authentication failures" error
"Too many authentication failures" error isn't handled and generic "Connection failed" error is returned instead. Let user know what happened and return correct error message.
Diffstat (limited to 'daemon/gvfsbackendsftp.c')
-rw-r--r--daemon/gvfsbackendsftp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/daemon/gvfsbackendsftp.c b/daemon/gvfsbackendsftp.c
index a9dc7814..79b880dd 100644
--- a/daemon/gvfsbackendsftp.c
+++ b/daemon/gvfsbackendsftp.c
@@ -374,6 +374,13 @@ look_for_stderr_errors (Connection *conn, GError **error)
_("Host key verification failed"));
return;
}
+ else if (strstr (line, "Too many authentication failures") != NULL)
+ {
+ g_set_error_literal (error,
+ G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Too many authentication failures"));
+ return;
+ }
g_free (line);
}