X2Go Bug report logs - #1353
with dash as default shell, x2goagent.options are not being parsed correctly

version graph

Package: x2goserver-x2goagent; Maintainer for x2goserver-x2goagent is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goserver-x2goagent is src:x2goserver.

Reported by: Stefan Baur <X2Go-ML-1@baur-itcs.de>

Date: Mon, 10 Dec 2018 11:15:01 UTC

Severity: normal

Found in version 4.1.0.3

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1353; Package x2goserver-x2goagent. (Mon, 10 Dec 2018 11:15:01 GMT) (full text, mbox, link).


Acknowledgement sent to Stefan Baur <X2Go-ML-1@baur-itcs.de>:
New Bug report received and forwarded. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Mon, 10 Dec 2018 11:15:01 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
To: submit@bugs.x2go.org
Subject: with dash as default shell, x2goagent.options are not being parsed correctly
Date: Mon, 10 Dec 2018 12:00:56 +0100
package: x2goserver-x2goagent
version: 4.1.0.3

According to a user, when dash is set as the default shell,
x2goagent.options are not being parsed correctly, as dash does not
understand the "+=" syntax used in this file to concatenate various
options.  The particular piece of code that sources/runs this file
should be calling bash explicitly to avoid this.

-Stefan

-- 
BAUR-ITCS UG (haftungsbeschränkt)
Geschäftsführer: Stefan Baur
Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243


Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1353; Package x2goserver-x2goagent. (Mon, 10 Dec 2018 14:35:01 GMT) (full text, mbox, link).


Acknowledgement sent to Mike Gabriel <mike.gabriel@das-netzwerkteam.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Mon, 10 Dec 2018 14:35:01 GMT) (full text, mbox, link).


Message #10 received at 1353@bugs.x2go.org (full text, mbox, reply):

From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
To: Stefan Baur <X2Go-ML-1@baur-itcs.de>, 1353@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1353: with dash as default shell, x2goagent.options are not being parsed correctly
Date: Mon, 10 Dec 2018 14:29:54 +0000
[Message part 1 (text/plain, inline)]
Hi Stefan,

On  Mo 10 Dez 2018 12:00:56 CET, Stefan Baur wrote:

> package: x2goserver-x2goagent
> version: 4.1.0.3
>
> According to a user, when dash is set as the default shell,
> x2goagent.options are not being parsed correctly, as dash does not
> understand the "+=" syntax used in this file to concatenate various
> options.  The particular piece of code that sources/runs this file
> should be calling bash explicitly to avoid this.
>
> -Stefan

The x2goagent.options file is sourced by x2gostartagent and that uses  
/bin/bash as shebang.

I am inclined to close this bug unless you have more info. Even if you  
user as /bin/dash as default shell, the x2goagent.options file should  
be sourced by bash.

MIke
-- 

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
mobile: +49 (1520) 1976 148
landline: +49 (4354) 8390 139

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de

[Message part 2 (application/pgp-signature, inline)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1353; Package x2goserver-x2goagent. (Mon, 10 Dec 2018 14:40:03 GMT) (full text, mbox, link).


Acknowledgement sent to Stefan Baur <X2Go-ML-1@baur-itcs.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Mon, 10 Dec 2018 14:40:03 GMT) (full text, mbox, link).


Message #15 received at 1353@bugs.x2go.org (full text, mbox, reply):

From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
To: 1353@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1353: with dash as default shell, x2goagent.options are not being parsed correctly
Date: Mon, 10 Dec 2018 15:32:09 +0100
[Message part 1 (text/plain, inline)]
Am 10.12.18 um 15:29 schrieb Mike Gabriel:
>>
> 
> The x2goagent.options file is sourced by x2gostartagent and that uses
> /bin/bash as shebang.
> 
> I am inclined to close this bug unless you have more info. Even if you
> user as /bin/dash as default shell, the x2goagent.options file should be
> sourced by bash.

Interesting.  Please keep it open for now; I will check back with the
affected user.  For some reason, their session wasn't picking up the
x2goagent.options, and they had /bin/dash as their default shell.

Kind Regards,
Stefan Baur

-- 
BAUR-ITCS UG (haftungsbeschränkt)
Geschäftsführer: Stefan Baur
Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1353; Package x2goserver-x2goagent. (Mon, 10 Dec 2018 19:35:02 GMT) (full text, mbox, link).


Acknowledgement sent to Stefan Baur <X2Go-ML-1@baur-itcs.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Mon, 10 Dec 2018 19:35:03 GMT) (full text, mbox, link).


Message #20 received at 1353@bugs.x2go.org (full text, mbox, reply):

From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
To: 1353@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1353: with dash as default shell, x2goagent.options are not being parsed correctly
Date: Mon, 10 Dec 2018 20:32:14 +0100
[Message part 1 (text/plain, inline)]
Am 10.12.18 um 15:32 schrieb Stefan Baur:
>> The x2goagent.options file is sourced by x2gostartagent and that uses
>> /bin/bash as shebang.
>>
>> I am inclined to close this bug unless you have more info. Even if you
>> user as /bin/dash as default shell, the x2goagent.options file should be
>> sourced by bash.
> Interesting.  Please keep it open for now; I will check back with the
> affected user.  For some reason, their session wasn't picking up the
> x2goagent.options, and they had /bin/dash as their default shell.

The user says that not the individual accounts' shell was set to
/bin/dash, but the system-wide default shell.
And changing it to /bin/bash fixed the issue for them.
Grepping through the X2Go code, I found several instances where /bin/sh
is used (/usr/sbin/x2golistsessions_root, /usr/sbin/x2gocleansessions,
/usr/bin/x2gopath, /usr/bin/x2gobasepath, /etc/init.d/x2goserver,
/usr/bin/x2goprint).  There is also a match in the /usr/bin/x2goagent
binary.

Could it be that x2gostartagent itself is being called in a way that
skips the shebang line? (e.g. "/bin/sh -c /usr/bin/x2gostartagent")


Kind Regards,
Stefan Baur

-- 
BAUR-ITCS UG (haftungsbeschränkt)
Geschäftsführer: Stefan Baur
Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1353; Package x2goserver-x2goagent. (Thu, 13 Dec 2018 14:30:02 GMT) (full text, mbox, link).


Acknowledgement sent to Stefan Baur <X2Go-ML-1@baur-itcs.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Thu, 13 Dec 2018 14:30:02 GMT) (full text, mbox, link).


Message #25 received at 1353@bugs.x2go.org (full text, mbox, reply):

From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
To: 1353@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1353: with dash as default shell, x2goagent.options are not being parsed correctly
Date: Thu, 13 Dec 2018 15:27:53 +0100
[Message part 1 (text/plain, inline)]
Am 10.12.18 um 20:32 schrieb Stefan Baur:
> Am 10.12.18 um 15:32 schrieb Stefan Baur:
>>> The x2goagent.options file is sourced by x2gostartagent and that uses
>>> /bin/bash as shebang.
>>>
>>> I am inclined to close this bug unless you have more info. Even if you
>>> user as /bin/dash as default shell, the x2goagent.options file should be
>>> sourced by bash.
>> Interesting.  Please keep it open for now; I will check back with the
>> affected user.  For some reason, their session wasn't picking up the
>> x2goagent.options, and they had /bin/dash as their default shell.
> 
> The user says that not the individual accounts' shell was set to
> /bin/dash, but the system-wide default shell.
> And changing it to /bin/bash fixed the issue for them.

Unable to reproduce the issue on a fresh Debian 8 install, also unable
to reproduce the issue after upgrading to Debian 9.  Currently
investigating what might be different on the user's systems.

-Stefan

-- 
BAUR-ITCS UG (haftungsbeschränkt)
Geschäftsführer: Stefan Baur
Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1353; Package x2goserver-x2goagent. (Thu, 13 Dec 2018 19:30:02 GMT) (full text, mbox, link).


Acknowledgement sent to Mike Gabriel <mike.gabriel@das-netzwerkteam.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Thu, 13 Dec 2018 19:30:02 GMT) (full text, mbox, link).


Message #30 received at 1353@bugs.x2go.org (full text, mbox, reply):

From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
To: X2Go-ML-1@baur-itcs.de
Cc: 1353@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1353: Bug#1353: with dash as default shell, x2goagent.options are not being parsed correctly
Date: Thu, 13 Dec 2018 19:29:35 +0000
Hi Stefan,

On Monday, 10 December 2018, Stefan Baur wrote:
> Am 10.12.18 um 15:32 schrieb Stefan Baur:
> >> The x2goagent.options file is sourced by x2gostartagent and that uses
> >> /bin/bash as shebang.
> >>
> >> I am inclined to close this bug unless you have more info. Even if you
> >> user as /bin/dash as default shell, the x2goagent.options file should be
> >> sourced by bash.
> > Interesting.  Please keep it open for now; I will check back with the
> > affected user.  For some reason, their session wasn't picking up the
> > x2goagent.options, and they had /bin/dash as their default shell.
> 
> The user says that not the individual accounts' shell was set to
> /bin/dash, but the system-wide default shell.
> And changing it to /bin/bash fixed the issue for them.
> Grepping through the X2Go code, I found several instances where /bin/sh
> is used (/usr/sbin/x2golistsessions_root, /usr/sbin/x2gocleansessions,
> /usr/bin/x2gopath, /usr/bin/x2gobasepath, /etc/init.d/x2goserver,
> /usr/bin/x2goprint).  There is also a match in the /usr/bin/x2goagent
> binary.
> 
> Could it be that x2gostartagent itself is being called in a way that
> skips the shebang line? (e.g. "/bin/sh -c /usr/bin/x2gostartagent")
>  

Ouch! Good point. We should look at x2goclient debugging output and check how X2Go Client launches x2gostartagent. IIRC, it use such a call as you mentioned above....

Mike

-- 
Sent from my Jolla

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Fri Apr 26 22:00:12 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.