[hotssh] libgssh: Always wait in preauth



commit 5e076b046eecc77796635041069fb885b90bfaa7
Author: Colin Walters <walters verbum org>
Date:   Thu Nov 14 16:32:37 2013 -0500

    libgssh: Always wait in preauth
    
    If USERAUTH_NONE were to succeed, we'd skip to AUTHENTICATED.  But
    this is broken; the whole idea of waiting in preauth is to allow apps
    to check the fingerprint.

 libgssh/gssh-connection.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/libgssh/gssh-connection.c b/libgssh/gssh-connection.c
index 0a01db4..d05bcbe 100644
--- a/libgssh/gssh-connection.c
+++ b/libgssh/gssh-connection.c
@@ -412,6 +412,13 @@ gssh_connection_iteration_internal (GSshConnection   *self,
     case GSSH_CONNECTION_STATE_PREAUTH:
       {
         int method;
+
+        if (!self->preauth_continue)
+          {
+            self->paused = TRUE;
+            break;
+          }
+
         if (!self->tried_userauth_none)
           {
             /* Now try the NONE authentication; if it succeeds we jump
@@ -458,12 +465,6 @@ gssh_connection_iteration_internal (GSshConnection   *self,
 
         g_ptr_array_add (self->authschemes, NULL);
 
-        if (!self->preauth_continue)
-          {
-            self->paused = TRUE;
-            break;
-          }
-
         state_transition (self, GSSH_CONNECTION_STATE_AUTHENTICATION_REQUIRED);
         /* Fall through */
       }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]