[X2go-Commits] x2goclient.git - master (branch) updated: 4.0.0.0-28-gbfa63c3

X2Go dev team git-admin at x2go.org
Wed Mar 6 13:29:17 CET 2013


The branch, master has been updated
       via  bfa63c366057f870f71fa0686aa913db6525df0b (commit)
      from  3b0e209049bf4794d4dc58475b9614b6bb1baf10 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bfa63c366057f870f71fa0686aa913db6525df0b
Author: Oleksandr Shneyder <o.shneyder at phoca-gmbh.de>
Date:   Wed Mar 6 13:29:10 2013 +0100

    set passphrase for key to reverse ssh connection fix closing client after getting passphrase (Fixes #137)

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog        |    2 ++
 onmainwindow.cpp        |   10 ++++-----
 sshmasterconnection.cpp |   54 +++++++++++++++++++++++++++--------------------
 3 files changed, 38 insertions(+), 28 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 0ba65b7..74ef78e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ x2goclient (4.0.1.0-0~x2go1) UNRELEASED; urgency=low
     - Launching parec to init pulseaudio input only on Windows.
     - Hide profilecard area on broker authentication
     - fix ONMainWindow layout in broker mode
+    - set passphrase for key to reverse ssh connection
+      fix closing client after getting passphrase (Fixes #137) 
 
   [ Mike Gabriel ]
   * New upstream version (4.0.1.0):
diff --git a/onmainwindow.cpp b/onmainwindow.cpp
index 574ffa7..c9741f8 100644
--- a/onmainwindow.cpp
+++ b/onmainwindow.cpp
@@ -2891,6 +2891,11 @@ void ONMainWindow::slotSshServerAuthPassphrase(SshMasterConnection* connection)
             phrase="";
     }
     connection->setKeyPhrase(phrase);
+    if(isHidden())
+    {
+        show();
+        QTimer::singleShot(1, this, SLOT(hide()));
+    }
 }
 
 
@@ -8243,11 +8248,6 @@ void ONMainWindow::slotExecXmodmap()
 
 void ONMainWindow::check_cmd_status()
 {
-    QString passwd;
-    QString user=getCurrentUname();
-    QString host=resumingSession.server;
-    passwd=getCurrentPass();
-
     x2goDebug<<"check command message"<<endl;
     sshConnection->executeCommand ( "x2gocmdexitmessage "+
                                     resumingSession.sessionId , this, SLOT(slotCmdMessage(bool, QString, int)));
diff --git a/sshmasterconnection.cpp b/sshmasterconnection.cpp
index a93064f..0db4077 100644
--- a/sshmasterconnection.cpp
+++ b/sshmasterconnection.cpp
@@ -261,6 +261,8 @@ SshMasterConnection* SshMasterConnection::reverseTunnelConnection ( SshProcess*
     connect ( con,SIGNAL ( ioErr ( SshProcess*,QString,QString ) ),this,SIGNAL ( ioErr ( SshProcess*,QString,QString ) ) );
     connect ( con,SIGNAL ( stdErr ( SshProcess*,QByteArray ) ),this,SIGNAL ( stdErr ( SshProcess*,QByteArray ) ) );
     connect ( con,SIGNAL ( reverseListenOk ( SshProcess* ) ), this, SIGNAL ( reverseListenOk ( SshProcess* ) ) );
+    con->keyPhrase=keyPhrase;
+    con->keyPhraseReady=true;
     con->start();
     reverseTunnelConnectionsMutex.lock();
     reverseTunnelConnections.append ( con );
@@ -536,7 +538,7 @@ SshMasterConnection::~SshMasterConnection()
     if(!reverseTunnel)
         wait(15000);
     else
-        wait(3000);
+        wait(5000);
 #ifdef DEBUG
     x2goDebug<<"SshMasterConnection, instance "<<this<<" thread finished";
 #endif
@@ -694,18 +696,21 @@ bool SshMasterConnection::userAuthAuto()
     int i=0;
     while(rc != SSH_AUTH_SUCCESS)
     {
-        keyPhraseReady=false;
-        emit needPassPhrase(this);
-        for(;;)
+        if(!reverseTunnel)
         {
-            bool ready=false;
-            this->usleep(200);
-            keyPhraseMutex.lock();
-            if(keyPhraseReady)
-                ready=true;
-            keyPhraseMutex.unlock();
-            if(ready)
-                break;
+            keyPhraseReady=false;
+            emit needPassPhrase(this);
+            for(;;)
+            {
+                bool ready=false;
+                this->usleep(200);
+                keyPhraseMutex.lock();
+                if(keyPhraseReady)
+                    ready=true;
+                keyPhraseMutex.unlock();
+                if(ready)
+                    break;
+            }
         }
         if(keyPhrase==QString::null)
             break;
@@ -766,18 +771,21 @@ bool SshMasterConnection::userAuthWithKey()
     int i=0;
     while(!prkey)
     {
-        keyPhraseReady=false;
-        emit needPassPhrase(this);
-        for(;;)
+        if(!reverseTunnel)
         {
-            bool ready=false;
-            this->usleep(200);
-            keyPhraseMutex.lock();
-            if(keyPhraseReady)
-                ready=true;
-            keyPhraseMutex.unlock();
-            if(ready)
-                break;
+            keyPhraseReady=false;
+            emit needPassPhrase(this);
+            for(;;)
+            {
+                bool ready=false;
+                this->usleep(200);
+                keyPhraseMutex.lock();
+                if(keyPhraseReady)
+                    ready=true;
+                keyPhraseMutex.unlock();
+                if(ready)
+                    break;
+            }
         }
         if(keyPhrase==QString::null)
             break;


hooks/post-receive
-- 
x2goclient.git (X2Go Client)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2goclient.git" (X2Go Client).




More information about the x2go-commits mailing list