The branch, master has been updated via 70f0699c0ae5b8f26938d8cfa6c05d2cd5741070 (commit) from 059c0d8f4ea1275a66dda707a3de79dbfc35dd8c (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 70f0699c0ae5b8f26938d8cfa6c05d2cd5741070 Author: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> Date: Fri Jan 3 12:36:08 2014 +0100 Enables forwarding (delegation) of GSSAPI credentials to the server. ----------------------------------------------------------------------- Summary of changes: debian/changelog | 1 + onmainwindow.cpp | 14 +++++++++++--- sshprocess.cpp | 35 ++++++++++++++++++++++++++++++++--- sshprocess.h | 4 ++++ 4 files changed, 48 insertions(+), 6 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index cd4088b..dcc0433 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ x2goclient (4.0.1.3-0x2go1) UNRELEASED; urgency=low * New upstream version (4.0.1.3): - changed keyboard settings. Supported modes: auto, none and config with model/layout(variant) + - Enables forwarding (delegation) of GSSAPI credentials to the server. [ Orion Poplawski ] * New upstream version (4.0.1.3): diff --git a/onmainwindow.cpp b/onmainwindow.cpp index b49230c..1c8bd8b 100644 --- a/onmainwindow.cpp +++ b/onmainwindow.cpp @@ -6193,10 +6193,18 @@ void ONMainWindow::runCommand() QString cmd; command.replace ( " ","X2GO_SPACE_CHAR" ); + QString krbFwString; + + if(sshConnection->useKerberos()) + { + krbFwString="KRB5CCNAME=`echo $KRB5CCNAME |sed 's/FILE://g'` \ + KRBFL=~/.x2go/C-"+resumingSession.sessionId+"/krb5cc ;\ + cp -a $KRB5CCNAME $KRBFL;KRB5CCNAME=$KRBFL "; + } if ( !startSessSound || startSessSndSystem==PULSE ) { - cmd="setsid x2goruncommand "+resumingSession.display+" "+ + cmd=krbFwString+"setsid x2goruncommand "+resumingSession.display+" "+ resumingSession.agentPid + " " + resumingSession.sessionId+" "+ resumingSession.sndPort+ " "+ command+" nosnd "+ @@ -6213,7 +6221,7 @@ void ONMainWindow::runCommand() switch ( startSessSndSystem ) { case ESD: - cmd="setsid x2goruncommand "+ + cmd=krbFwString+"setsid x2goruncommand "+ resumingSession.display+" "+ resumingSession.agentPid + " " + resumingSession.sessionId+" "+ @@ -6222,7 +6230,7 @@ void ONMainWindow::runCommand() sessionType +" 1> /dev/null 2>/dev/null & exit"; break; case ARTS: - cmd="setsid x2goruncommand "+ + cmd=krbFwString+"setsid x2goruncommand "+ resumingSession.display+" "+ resumingSession.agentPid + " " + resumingSession.sessionId+" "+ diff --git a/sshprocess.cpp b/sshprocess.cpp index 2db1c51..b9f690a 100755 --- a/sshprocess.cpp +++ b/sshprocess.cpp @@ -162,6 +162,26 @@ void SshProcess::tunnelLoop() #endif } +#ifdef Q_OS_WIN +#include <QSettings> +void SshProcess::addPuttyReg(QString host, QString uuidStr) +{ + QSettings st("HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\Sessions\\"+uuidStr, + QSettings::NativeFormat); + st.setValue("HostName", host); + st.setValue("GssapiFwd", (uint) 1); + st.sync(); +} + +void SshProcess::rmPuttyReg(QString uuidStr) +{ + QSettings st("HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\Sessions", + QSettings::NativeFormat); + st.remove(uuidStr); + st.sync(); +} +#endif + void SshProcess::startNormal(const QString& cmd) { QUuid uuid = QUuid::createUuid(); @@ -181,15 +201,18 @@ void SshProcess::startNormal(const QString& cmd) } else { + QString host=masterCon->getHost(); QString shcmd = "echo X2GODATABEGIN:" + uuidStr + "; "+cmd+"; echo X2GODATAEND:" + uuidStr; proc=new QProcess(this); #ifdef Q_OS_WIN + addPuttyReg(host, uuidStr); + host = uuidStr; QString sshString="plink -batch -P "+ #else - QString sshString=QString::null+"ssh"+ KEEPALIVE_OPTION +"-o GSSApiAuthentication=yes -o PasswordAuthentication=no -p "+ + QString sshString=QString::null+"ssh"+ KEEPALIVE_OPTION +"-K -o GSSApiAuthentication=yes -o PasswordAuthentication=no -p "+ #endif - QString::number(masterCon->getPort())+" "+ - masterCon->getUser()+"@"+ masterCon->getHost() + " \""+shcmd+"\""; + QString::number(masterCon->getPort())+" -l "+ + masterCon->getUser()+" "+ host + " \""+shcmd+"\""; #ifdef DEBUG x2goDebug<<"running ssh:" <<sshString<<endl; #endif @@ -422,6 +445,12 @@ void SshProcess::slotSshProcFinished(int exitCode, QProcess::ExitStatus exitStat #ifdef DEBUG x2goDebug<<"ssh process exit code :"<<exitStatus; #endif +#ifdef Q_OS_WIN + if(masterCon->useKerberos()) + { + rmPuttyReg(procUuid); + } +#endif slotChannelClosed(this,procUuid); } diff --git a/sshprocess.h b/sshprocess.h index e28f435..d45624c 100644 --- a/sshprocess.h +++ b/sshprocess.h @@ -46,6 +46,10 @@ private: } void tunnelLoop(); +#ifdef Q_OS_WIN + void addPuttyReg(QString host, QString uuidStr); + void rmPuttyReg(QString uuidStr); +#endif private: SshMasterConnection* masterCon; 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).