[X2go-Commits] x2goclient.git - master (branch) updated: 3.99.2.1-7-g5e5eb0c

X2Go dev team git-admin at x2go.org
Thu Jul 26 11:08:04 CEST 2012


The branch, master has been updated
       via  5e5eb0cfffc514ee419a116a78f25ff98728c746 (commit)
      from  d4d0fe38610d3e514dc2e4e259ce8f103e4ac535 (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 5e5eb0cfffc514ee419a116a78f25ff98728c746
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Jul 26 11:06:53 2012 +0200

    Allow x2goclient to connect to user accounts that have other shells than /bin/sh and alike configured as default shell. Also: removal bashisms in shell execution commands.

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

Summary of changes:
 debian/changelog        |    3 +++
 onmainwindow.cpp        |   10 +++++-----
 sshmasterconnection.cpp |    1 +
 sshprocess.cpp          |    6 +++++-
 4 files changed, 14 insertions(+), 6 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 27b94f4..42e7bb6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,9 @@ x2goclient (3.99.2.2-0~x2go1) UNRELEASED; urgency=low
       (see http://wiki.debian.org/Hardening).
     - Provide CPPFLAGS for QMAKE_CFLAGS _and_ QMAKE_CXXFLAGS. Provide them as
       first build parameters.
+    - Allow x2goclient to connect to user accounts that have other shells than
+      /bin/sh and alike configured as default shell. Also: removal bashisms in
+      shell execution commands.
 
   [ Oleksandr Shneyder ]
   * Fixing X2Go Plugin
diff --git a/onmainwindow.cpp b/onmainwindow.cpp
index f68696a..b385360 100644
--- a/onmainwindow.cpp
+++ b/onmainwindow.cpp
@@ -5506,7 +5506,7 @@ void ONMainWindow::runCommand()
             resumingSession.agentPid + " " +
             resumingSession.sessionId+" "+
             resumingSession.sndPort+ " "+ command+" nosnd "+
-            sessionType +">& /dev/null & exit";
+            sessionType +" 1> /dev/null 2>/dev/null & exit";
         if ( startSessSndSystem ==PULSE )
         {
             cmd="PULSE_CLIENTCONFIG=~/.x2go/C-"+
@@ -5525,7 +5525,7 @@ void ONMainWindow::runCommand()
                 resumingSession.sessionId+" "+
                 resumingSession.sndPort+ " "+
                 command+" esd "+
-                sessionType +">& /dev/null & exit";
+                sessionType +" 1> /dev/null 2>/dev/null & exit";
             break;
         case ARTS:
             cmd="setsid x2goruncommand "+
@@ -5534,7 +5534,7 @@ void ONMainWindow::runCommand()
                 resumingSession.sessionId+" "+
                 resumingSession.sndPort+ " "+
                 command+" arts "+
-                sessionType +">& /dev/null & exit";
+                sessionType +" 1> /dev/null 2>/dev/null & exit";
             break;
 
         }
@@ -5564,7 +5564,7 @@ void ONMainWindow::runApplication(QString exec)
     proc->startNormal ("PULSE_CLIENTCONFIG=~/.x2go/C-"+
                        resumingSession.sessionId+"/.pulse-client.conf DISPLAY=:"+
                        resumingSession.display+
-                       " setsid "+exec+">& /dev/null & exit");
+                       " setsid "+exec+" 1> /dev/null 2>/dev/null & exit");
 }
 
 void ONMainWindow::slotRetRunCommand ( bool result, QString output,
@@ -10272,7 +10272,7 @@ void ONMainWindow::slotStartParec ()
     QString scmd="PULSE_CLIENTCONFIG=~/.x2go/C-"+
                  resumingSession.sessionId+
                  "/.pulse-client.conf "+
-                 "parec > /dev/null &sleep 1 && kill %1";
+                 "parec 1> /dev/null & sleep 1 && kill %1";
 
     paProc=new SshProcess ( sshConnection, this );
     paProc->startNormal ( scmd );
diff --git a/sshmasterconnection.cpp b/sshmasterconnection.cpp
index 9eba130..bac6bf8 100644
--- a/sshmasterconnection.cpp
+++ b/sshmasterconnection.cpp
@@ -498,6 +498,7 @@ void SshMasterConnection::addChannelConnection ( SshProcess* creator, int sock,
 
 void SshMasterConnection::addChannelConnection ( SshProcess* creator, QString cmd )
 {
+
     ChannelConnection con;
     con.channel=NULL;
     con.sock=-1;
diff --git a/sshprocess.cpp b/sshprocess.cpp
index e8f0ea6..a0734ba 100644
--- a/sshprocess.cpp
+++ b/sshprocess.cpp
@@ -130,7 +130,11 @@ void SshProcess::tunnelLoop()
 
 void SshProcess::startNormal(const QString& cmd)
 {
-    masterCon->addChannelConnection(this, cmd);
+    QString shcmd = "sh -c \""+cmd+"\"";
+// #ifdef DEBUG
+    x2goDebug<<"executing remote command: "<<shcmd<<endl;
+// #endif
+    masterCon->addChannelConnection(this, shcmd);
     connect(masterCon,SIGNAL(stdOut(SshProcess*,QByteArray)),this,SLOT(slotStdOut(SshProcess*,QByteArray)));
     connect(masterCon,SIGNAL(channelClosed(SshProcess*)), this,SLOT(slotChannelClosed(SshProcess*)));
 }


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