Blob Blame History Raw
From 6fb0be2f774fab9e40d601ca33f2f57803b11dd7 Mon Sep 17 00:00:00 2001
From: Mike DePaulo <mikedep333@gmail.com>
Date: Sun, 18 Feb 2018 19:52:22 -0500
Subject: [PATCH] Do not attempt to perform Interaction with SSH Server

(e.g. for changing expired password) when using GSSAPI/Kerberos
because the interaction code does not support it yet.

Conflicts:
	debian/changelog
---
 src/sshmasterconnection.cpp | 38 ++++++++++++++++++++++----------------
 1 file changed, 22 insertions(+), 16 deletions(-)

diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index d62485a..5093f5d 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -722,23 +722,29 @@ void SshMasterConnection::run()
 #ifdef DEBUG
         x2goDebug<<"User authentication OK.";
 #endif
-	if(checkLogin())
-	{
-	    x2goDebug<<"Login Check - OK";
+        // checkLogin() is currently specific to libssh.
+        if(kerberos)
             emit connectionOk(host);
-	}
-	else
-	{
-	    x2goDebug<<"Login Check - Failed";
-// 	    if(!interactionInterrupt)
-	    {
-	      emit finishInteraction(this);
-	    }
-	    ssh_disconnect ( my_ssh_session );
-            ssh_free ( my_ssh_session );
-	    quit();
-	    return;
-	}
+        else
+        {
+            if(checkLogin())
+            {
+                x2goDebug<<"Login Check - OK";
+                emit connectionOk(host);
+            }
+            else
+            {
+                x2goDebug<<"Login Check - Failed";
+//          if(!interactionInterrupt)
+                {
+                  emit finishInteraction(this);
+                }
+                ssh_disconnect ( my_ssh_session );
+                ssh_free ( my_ssh_session );
+                quit();
+                return;
+            }
+        }
     }
     else
     {
-- 
1.8.3.1