[X2go-Commits] x2goclient.git - master (branch) updated: 3.99.3.0-10-g76b7b5b

X2Go dev team git-admin at x2go.org
Thu Nov 29 14:56:16 CET 2012


The branch, master has been updated
       via  76b7b5bbc335e23ad7bb22847af4d82579bf8b93 (commit)
       via  a6226808a2a7063e52dfaf922f8d8f69c2e7450d (commit)
      from  ff0b4c63ad7cfb3a1e3c51470c5f76d8dd5a4497 (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 76b7b5bbc335e23ad7bb22847af4d82579bf8b93
Author: Oleksandr Shneyder <o.shneyder at phoca-gmbh.de>
Date:   Thu Nov 29 14:56:12 2012 +0100

    fixed displaying ssh proxy box in session settings if sessions type changed

commit a6226808a2a7063e52dfaf922f8d8f69c2e7450d
Author: Oleksandr Shneyder <o.shneyder at phoca-gmbh.de>
Date:   Thu Nov 29 14:46:17 2012 +0100

    add support for pgp cards in broker mode

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

Summary of changes:
 debian/changelog     |    2 ++
 httpbrokerclient.cpp |   26 ++++++++++++++++++--------
 onmainwindow.cpp     |   17 ++++++++++++++++-
 onmainwindow.h       |    8 ++++++++
 sessionwidget.cpp    |    2 +-
 5 files changed, 45 insertions(+), 10 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index c2b59f2..eb45f48 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,8 @@ x2goclient (3.99.3.1-0~x2go1) UNRELEASED; urgency=low
   * New upstream version (3.99.3.1):
     - Translation files updated.
     - Russian translation updated.
+  * add support for pgp cards in broker mode
+  * fixed displaying ssh proxy box in session settings if sessions type changed
 
   [ Ricardo Diaz ]
   * New upstream version (3.99.3.1):
diff --git a/httpbrokerclient.cpp b/httpbrokerclient.cpp
index ca4bbec..3788600 100644
--- a/httpbrokerclient.cpp
+++ b/httpbrokerclient.cpp
@@ -82,7 +82,6 @@ void HttpBrokerClient::createSshConnection()
     connect ( sshConnection, SIGNAL ( connectionError(QString,QString)), this,
               SLOT ( slotSshConnectionError ( QString,QString ) ) );
     sshConnection->start();
-
 }
 
 void HttpBrokerClient::slotSshConnectionError(QString message, QString lastSessionError)
@@ -214,13 +213,16 @@ void HttpBrokerClient::slotSshUserAuthError(QString error)
 
 void HttpBrokerClient::getUserSessions()
 {
+    QString brokerUser=config->brokerUser;
+    if(mainWindow->getUsePGPCard())
+        brokerUser=mainWindow->getCardLogin();
     config->sessiondata=QString::null;
     if(!sshBroker)
     {
         QString req;
         QTextStream ( &req ) <<
                              "task=listsessions&"<<
-                             "user="<<config->brokerUser<<"&"<<
+                             "user="<<brokerUser<<"&"<<
                              "password="<<config->brokerPass<<"&"<<
                              "authid="<<config->brokerUserId;
         QUrl lurl ( config->brokerurl );
@@ -235,20 +237,24 @@ void HttpBrokerClient::getUserSessions()
             createSshConnection();
             return;
         }
-        sshConnection->executeCommand ( config->sshBrokerBin+" --authid "+config->brokerUserId+ " --task listsessions",
+        sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --authid "+config->brokerUserId+ " --task listsessions",
                                         this, SLOT ( slotListSessions ( bool, QString,int ) ));
     }
 }
 
 void HttpBrokerClient::selectUserSession(const QString& session)
 {
+      QString brokerUser=config->brokerUser;
+    if(mainWindow->getUsePGPCard())
+        brokerUser=mainWindow->getCardLogin();
+
     if(!sshBroker)
     {
         QString req;
         QTextStream ( &req ) <<
                              "task=selectsession&"<<
                              "sid="<<session<<"&"<<
-                             "user="<<config->brokerUser<<"&"<<
+                             "user="<<brokerUser<<"&"<<
                              "password="<<config->brokerPass<<"&"<<
                              "authid="<<config->brokerUserId;
         QUrl lurl ( config->brokerurl );
@@ -258,7 +264,7 @@ void HttpBrokerClient::selectUserSession(const QString& session)
     }
     else
     {
-        sshConnection->executeCommand ( config->sshBrokerBin+" --authid "+config->brokerUserId+ " --task selectsession --sid "+session,
+        sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --authid "+config->brokerUserId+ " --task selectsession --sid "+session,
                                         this,SLOT ( slotSelectSession(bool,QString,int)));
     }
 
@@ -267,13 +273,17 @@ void HttpBrokerClient::selectUserSession(const QString& session)
 void HttpBrokerClient::changePassword(QString newPass)
 {
     newBrokerPass=newPass;
+        QString brokerUser=config->brokerUser;
+    if(mainWindow->getUsePGPCard())
+        brokerUser=mainWindow->getCardLogin();
+
     if(!sshBroker)
     {
         QString req;
         QTextStream ( &req ) <<
                              "task=setpass&"<<
                              "newpass="<<newPass<<"&"<<
-                             "user="<<config->brokerUser<<"&"<<
+                             "user="<<brokerUser<<"&"<<
                              "password="<<config->brokerPass<<"&"<<
                              "authid="<<config->brokerUserId;
         QUrl lurl ( config->brokerurl );
@@ -283,8 +293,8 @@ void HttpBrokerClient::changePassword(QString newPass)
     }
     else
     {
-        sshConnection->executeCommand ( config->sshBrokerBin+" --authid "+config->brokerUserId+ " --task setpass --newpass "+newPass, this,
-	  SLOT ( slotPassChanged(bool,QString,int)));
+        sshConnection->executeCommand ( config->sshBrokerBin+" --user "+ brokerUser +" --authid "+config->brokerUserId+ " --task setpass --newpass "+newPass, this,
+                                        SLOT ( slotPassChanged(bool,QString,int)));
     }
 }
 
diff --git a/onmainwindow.cpp b/onmainwindow.cpp
index bdd8a55..76f8ba9 100644
--- a/onmainwindow.cpp
+++ b/onmainwindow.cpp
@@ -2147,6 +2147,15 @@ void ONMainWindow::slotReadSessions()
                  SLOT ( slotUnameChanged ( const QString& ) ) );
     connect ( uname,SIGNAL ( textEdited ( const QString& ) ),this,
               SLOT ( slotSnameChanged ( const QString& ) ) );
+
+    if(usePGPCard &&brokerMode&&cardReady)
+    {
+        if(sessions.count()==1)
+        {
+            slotSelectedFromList(sessions[0]);
+        }
+    }
+
     if ( !defaultSession&& startHidden )
     {
         startHidden=false;
@@ -7873,6 +7882,10 @@ void ONMainWindow::slotGpgAgentFinished ( int , QProcess::ExitStatus )
         QString sshout ( sshadd.readAllStandardOutput() );
         sshout=sshout.simplified();
         x2goDebug<<"SSH-ADD out:"<<sshout<<endl;
+        if(brokerMode)
+        {
+            broker->getUserSessions();
+        }
     }
     else
     {
@@ -7890,6 +7903,7 @@ void ONMainWindow::slotGpgAgentFinished ( int , QProcess::ExitStatus )
             x2goDebug<<"SSH-ADD out:"<<sshout<<endl;
             return;
         }
+
         if ( passForm->isVisible() )
             slotClosePass();
         uname->setText ( cardLogin );
@@ -10807,7 +10821,8 @@ void ONMainWindow::slotStartBroker()
     setStatStatus ( tr ( "Connecting to broker" ) );
     stInfo->insertPlainText ( "broker url: "+config.brokerurl );
     setEnabled ( false );
-    broker->getUserSessions();
+    if(!usePGPCard)
+        broker->getUserSessions();
 }
 
 void ONMainWindow::slotGetBrokerSession()
diff --git a/onmainwindow.h b/onmainwindow.h
index ae8ac77..7c1b2a5 100644
--- a/onmainwindow.h
+++ b/onmainwindow.h
@@ -381,6 +381,14 @@ public:
     {
         return config.showextconfig;
     }
+    bool getUsePGPCard()
+    {
+        return usePGPCard;
+    }
+    QString getCardLogin()
+    {
+        return cardLogin;
+    }
     QString getDefaultCmd()
     {
         return defaultCmd;
diff --git a/sessionwidget.cpp b/sessionwidget.cpp
index 4da9bcd..715c332 100644
--- a/sessionwidget.cpp
+++ b/sessionwidget.cpp
@@ -350,7 +350,7 @@ void SessionWidget::slot_rdpDirectClicked()
     rdpPort->setVisible(isDirectRDP);
 
     cbProxy->setVisible(!isDirectRDP);
-    proxyBox->setVisible(!isDirectRDP);
+    proxyBox->setVisible(!isDirectRDP && cbProxy->isChecked());
 
     if (isDirectRDP)
     {


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