This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch bugfix/x2goplugin-patch in repository x2goclient. from a4196bf onmainwindow.cpp: also make the message about a non-running sshd non-modal. new 33a93ff src/{onmainwindow,sshmasterconnection}.cpp: enable use of SSH proxy configuration with x2goplugin. Fixes: #798. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 6 ++ src/onmainwindow.cpp | 149 +++++++++++++++++++++++++++++-------------- src/sshmasterconnection.cpp | 5 +- 3 files changed, 112 insertions(+), 48 deletions(-) -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/x2goplugin-patch in repository x2goclient. commit 33a93ff30452d2147f89c4878693f3142e14e49c Author: Nicolas Husson <nicolas.husson@tactualities.com> Date: Tue Mar 10 06:03:28 2015 +0100 src/{onmainwindow,sshmasterconnection}.cpp: enable use of SSH proxy configuration with x2goplugin. Fixes: #798. v2: refactor patch, fix whitespace issues. (Mihai Moldovan) --- debian/changelog | 6 ++ src/onmainwindow.cpp | 149 +++++++++++++++++++++++++++++-------------- src/sshmasterconnection.cpp | 5 +- 3 files changed, 112 insertions(+), 48 deletions(-) diff --git a/debian/changelog b/debian/changelog index a2b3ba1..a918f65 100644 --- a/debian/changelog +++ b/debian/changelog @@ -193,6 +193,12 @@ x2goclient (4.0.4.0-0x2go1) UNRELEASED; urgency=low - onmainwindow.cpp: also make the message about a non-running sshd non-modal. + [ Nicolas Husson ] + * New upstream release (4.0.4.0): + - src/{onmainwindow,sshmasterconnection}.cpp: enable use of SSH proxy + configuration with x2goplugin. Fixes: #798. + + v2: refactor patch, fix whitespace issues. (Mihai Moldovan) + -- X2Go Release Manager <git-admin@x2go.org> Thu, 19 Feb 2015 13:25:28 +0100 x2goclient (4.0.3.2-0x2go1) unstable; urgency=medium diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index fad2cb7..f14b79d 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -3300,50 +3300,53 @@ bool ONMainWindow::startSession ( const QString& sid ) currentKey=findSshKeyForServer(user, host, sshPort); } - useproxy=(st->setting()->value ( - sid+"/usesshproxy", - false - ).toBool() ); + if (!embedMode) { + useproxy = (st->setting ()->value (sid + "/usesshproxy", + false).toBool ()); - QString prtype= st->setting()->value ( - sid+"/sshproxytype", - "SSH" - ).toString() ; + QString prtype = (st->setting ()->value (sid + "/sshproxytype", + "SSH").toString ()); + if (prtype.toLower () == "http") { + proxyType = SshMasterConnection::PROXYHTTP; + } + else { + proxyType = SshMasterConnection::PROXYSSH; + } - if(prtype=="HTTP") - { - proxyType=SshMasterConnection::PROXYHTTP; - } - else - { - proxyType=SshMasterConnection::PROXYSSH; - } + proxylogin = (st->setting ()->value (sid + "/sshproxyuser", + QString ()).toString ()); - proxylogin=(st->setting()->value ( - sid+"/sshproxyuser", - QString() - ).toString() ); + proxyKey = (st->setting ()->value (sid + "/sshproxykeyfile", + QString ()).toString ()); + proxyKey = expandHome (proxyKey); - proxyKey=(st->setting()->value ( - sid+"/sshproxykeyfile", - QString() - ).toString() ); - proxyKey=expandHome(proxyKey); + proxyserver = (st->setting ()->value (sid + "/sshproxyhost", + QString ()).toString ()); - proxyserver=(st->setting()->value ( - sid+"/sshproxyhost", - QString() - ).toString() ); + proxyport = (st->setting ()->value (sid + "/sshproxyport", + 22).toInt ()); - proxyport=(st->setting()->value ( - sid+"/sshproxyport", - 22 - ).toInt() ); - if(proxyserver.indexOf(":")!=-1) - { - QStringList parts=proxyserver.split(":"); - proxyserver=parts[0]; - proxyport=parts[1].toInt(); + proxyAutologin = (st->setting ()->value (sid + "/sshproxyautologin", + false).toBool ()); + + proxyKrbLogin = (st->setting ()->value (sid + "/sshproxykrblogin", + false).toBool ()); + } + else { + useproxy = config.useproxy; + proxyType = config.proxyType; + proxylogin = config.proxylogin; + proxyKey = config.proxyKey; + proxyserver = config.proxyserver; + proxyport = config.proxyport; + proxyAutologin = config.proxyAutologin; + proxyKrbLogin = config.proxyKrbLogin; + } + + if (proxyserver.indexOf (":") != -1) { + QStringList parts = proxyserver.split (":"); + proxyserver = parts[0]; + proxyport = parts[1].toInt (); } bool proxySamePass=(st->setting()->value ( @@ -3354,15 +3357,6 @@ bool ONMainWindow::startSession ( const QString& sid ) sid+"/sshproxysameuser", false ).toBool() ); - proxyAutologin=(st->setting()->value ( - sid+"/sshproxyautologin", - false - ).toBool() ); - - proxyKrbLogin=(st->setting()->value ( - sid+"/sshproxykrblogin", - false - ).toBool() ); if(proxyKey.length()<=0 && proxyType==SshMasterConnection::PROXYSSH) { @@ -10706,6 +10700,67 @@ void ONMainWindow::processCfgLine ( QString line ) config.connectionts=lst[1]; return; } + if (lst[0] == "usesshproxy") + { + config.useproxy = true; + if (lst[1].toLower () == "true") { + config.useproxy = true; + } + else { + config.useproxy = false; + } + return; + } + if (lst[0] == "sshproxytype") + { + if (lst[1].toLower () == "http") { + config.proxyType = SshMasterConnection::PROXYHTTP; + } + else { + config.proxyType = SshMasterConnection::PROXYSSH; + } + return; + } + if (lst[0] == "sshproxyuser") + { + config.proxylogin = lst[1]; + return; + } + if (lst[0] == "sshproxyhost") + { + config.proxyserver = lst[1]; + return; + } + if (lst[0] == "sshproxyport") + { + config.proxyport = lst[1].toInt (); + return; + } + if (lst[0] == "sshproxyautologin") + { + if (lst[1].toLower () == "true") { + config.proxyAutologin = true; + } + else { + config.proxyAutologin = false; + } + return; + } + if (lst[0] == "sshproxykrblogin") + { + if (lst[1].toLower () == "true") { + config.proxyKrbLogin = true; + } + else { + config.proxyKrbLogin = false; + } + return; + } + if (lst[0] == "sshproxykeyfile") + { + config.proxyKey = lst[1]; + return; + } } void ONMainWindow::slotChangeKbdLayout(const QString& layout) diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp index e9a7008..1e11c62 100644 --- a/src/sshmasterconnection.cpp +++ b/src/sshmasterconnection.cpp @@ -165,6 +165,9 @@ SshMasterConnection::SshMasterConnection (QObject* parent, QString host, int por breakLoop=false; kerberosDelegation=false; + x2goDebug << "SshMasterConnection, host " << host << "port " << port << "user " << user + << "useproxy " << useproxy << "proxyserver " << proxyserver + << "proxyport " << proxyport; this->host=host; this->port=port; this->user=user; @@ -443,7 +446,7 @@ void SshMasterConnection::run() #endif if(useproxy && proxytype==PROXYSSH) { - + x2goDebug << "proxyserver: " << proxyserver << "proxyport: " << proxyport << "proxylogin: " << proxylogin; sshProxy=new SshMasterConnection (0, proxyserver, proxyport,acceptUnknownServers, proxylogin, proxypassword, proxykey, proxyautologin, proxyKrbLogin, false); connect ( sshProxy, SIGNAL ( connectionOk(QString) ), this, SLOT ( slotSshProxyConnectionOk() ) ); -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git