From unknown Sun Apr 26 10:33:34 2026
X-Loop: owner@bugs.x2go.org
Subject: Bug#409: x2goruncommand quoting errors sometimes create file "=" in users home directory.
Reply-To: Harald Nordgard-Hansen <hhansen@pvv.org>, 409@bugs.x2go.org
Resent-From: Harald Nordgard-Hansen <hhansen@pvv.org>
Resent-To: x2go-dev@lists.berlios.de
Resent-CC: X2Go Developers <x2go-dev@lists.berlios.de>
X-Loop: owner@bugs.x2go.org
Resent-Date: Thu, 23 Jan 2014 14:25:01 +0000
Resent-Message-ID: <handler.409.B.139048708114628@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: report 409
X-X2Go-PR-Package: x2goserver
X-X2Go-PR-Keywords: 
Received: via spool by submit@bugs.x2go.org id=B.139048708114628
          (code B); Thu, 23 Jan 2014 14:25:01 +0000
Received: (at submit) by bugs.x2go.org; 23 Jan 2014 14:24:41 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	version=3.3.2
X-Greylist: delayed 478 seconds by postgrey-1.34 at ymir; Thu, 23 Jan 2014 15:24:40 CET
Received: from asav21.altibox.net (asav21.altibox.net [109.247.116.8])
	by ymir (Postfix) with ESMTPS id 4CCF45DA79
	for <submit@bugs.x2go.org>; Thu, 23 Jan 2014 15:24:40 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
	by asav21.altibox.net (Postfix) with ESMTP id D293580402
	for <submit@bugs.x2go.org>; Thu, 23 Jan 2014 15:16:41 +0100 (CET)
X-Amavis-Alert: BAD HEADER SECTION, Improper folded header field made up
	entirely of whitespace (char 20 hex): X-Spam_report: ...that system
	for details.\n \n Content previ[...]
Received: from asav21.altibox.net ([127.0.0.1])
	by localhost (asav21.lysetele.net [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id OLbRpsl5O3yO for <submit@bugs.x2go.org>;
	Thu, 23 Jan 2014 15:16:41 +0100 (CET)
Received: from srv.nordgard-hansen.net (82.79-160-147.customer.lyse.net [79.160.147.82])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by asav21.altibox.net (Postfix) with ESMTPS id 768C480357
	for <submit@bugs.x2go.org>; Thu, 23 Jan 2014 15:16:41 +0100 (CET)
Received: from srv.nordgard-hansen.net ([192.168.42.5])
	by srv.nordgard-hansen.net with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.76)
	(envelope-from <hhansen@pvv.org>)
	id 1W6L5F-0004Fy-G5
	for submit@bugs.x2go.org; Thu, 23 Jan 2014 15:16:42 +0100
Message-ID: <52E12448.3080309@pvv.org>
Date: Thu, 23 Jan 2014 15:16:40 +0100
From: Harald Nordgard-Hansen <hhansen@pvv.org>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080502 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: submit@bugs.x2go.org
Content-Type: multipart/mixed;
 boundary="------------050201050508010407060501"
X-Spam_score: -2.9
X-Spam_score_int: -28
X-Spam_bar: --
X-Spam_report: Spam detection software, running on the system "srv.nordgard-hansen.net", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Package: x2goserver Version: 4.0.1.13 Tag: patch Some of the
    tests against $DISTRIB_RELEASE in x2goruncommand are badly quoted, causing
    them to report the wrong result and to create a file called "=" in the user
    home directory. Aligning all tests to use the same style of quoting fixes
    this. [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]

This is a multi-part message in MIME format.
--------------050201050508010407060501
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Package: x2goserver
Version: 4.0.1.13
Tag: patch

Some of the tests against $DISTRIB_RELEASE in x2goruncommand are badly
quoted, causing them to report the wrong result and to create a file
called "=" in the user home directory.  Aligning all tests to use the
same style of quoting fixes this.

Regards,
Harald Nordgård-Hansen

--------------050201050508010407060501
Content-Type: text/x-patch;
 name="x2goruncommand.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="x2goruncommand.diff"

--- /usr/bin/x2goruncommand	2014-01-20 18:34:03.000000000 +0100
+++ x2goruncommand	2014-01-23 14:57:50.792160698 +0100
@@ -108,13 +108,13 @@
 
 elif ([ "$cmd" == "UNITY" ] || [ "$cmd" == "unity" ]); then
 	cmd="/usr/bin/gnome-session"
-	if [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE" >= 12.10 | bc)" == "1" ]; then
+	if [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE >= 12.10" | bc)" == "1" ]; then
 		export DESKTOP_SESSION="ubuntu"
 		args=" --session=$DESKTOP_SESSION"
-	elif [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE" == 11.10 | bc)" == "1" -o "$(echo $DISTRIB_RELEASE == 12.04 | bc)" == "1" ]; then
+	elif [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE == 11.10" | bc)" == "1" -o "$(echo "$DISTRIB_RELEASE == 12.04" | bc)" == "1" ]; then
 		export DESKTOP_SESSION="ubuntu-2d"
 		args=" --session=$DESKTOP_SESSION"
-	elif [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE" == 11.04 | bc)" == "1" ]; then
+	elif [ "$DISTRIB_ID" == "Ubuntu" ] && [ "$(echo "$DISTRIB_RELEASE == 11.04" | bc)" == "1" ]; then
 		export DESKTOP_SESSION="2d-ubuntu"
 		args=" --session=$DESKTOP_SESSION"
 	fi

--------------050201050508010407060501--
