X2Go Bug report logs - #438
x2goserver and rhel6.4 / selinux Problem

version graph

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

Reported by: Frank Knoben <admin@igpm.rwth-aachen.de>

Date: Thu, 27 Feb 2014 09:10:02 UTC

Severity: normal

Tags: moreinfo, not-a-bug

Found in version

Done: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

Bug is archived. No further changes may be made.

Full log

🔗 View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#438: x2goserver and rhel6.4 / selinux Problem
Reply-To: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>, 438@bugs.x2go.org
Resent-From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Resent-To: x2go-dev@lists.berlios.de
Resent-CC: X2Go Developers <x2go-dev@lists.berlios.de>
X-Loop: owner@bugs.x2go.org
Resent-Date: Fri, 28 Feb 2014 09:25:02 +0000
Resent-Message-ID: <handler.438.B438.1393579488369@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: followup 438
X-X2Go-PR-Package: x2goserver
X-X2Go-PR-Keywords: moreinfo
Received: via spool by 438-submit@bugs.x2go.org id=B438.1393579488369
          (code B ref 438); Fri, 28 Feb 2014 09:25:02 +0000
Received: (at 438) by bugs.x2go.org; 28 Feb 2014 09:24:48 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED
	autolearn=ham version=3.3.2
Received: from freya.das-netzwerkteam.de (freya.das-netzwerkteam.de [])
	by ymir (Postfix) with ESMTPS id 8AA105DB16
	for <438@bugs.x2go.org>; Fri, 28 Feb 2014 10:24:47 +0100 (CET)
Received: from grimnir.das-netzwerkteam.de (grimnir.das-netzwerkteam.de [])
	by freya.das-netzwerkteam.de (Postfix) with ESMTPS id 2519D1EC49;
	Fri, 28 Feb 2014 10:24:47 +0100 (CET)
Received: from localhost (localhost [])
	by grimnir.das-netzwerkteam.de (Postfix) with ESMTP id 078CB3BF19;
	Fri, 28 Feb 2014 10:24:47 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at grimnir.das-netzwerkteam.de
Received: from grimnir.das-netzwerkteam.de ([])
	by localhost (grimnir.das-netzwerkteam.de []) (amavisd-new, port 10024)
	with ESMTP id 1C15Trb2izK1; Fri, 28 Feb 2014 10:24:46 +0100 (CET)
Received: from grimnir.das-netzwerkteam.de (localhost [])
	by grimnir.das-netzwerkteam.de (Postfix) with ESMTPSA id CD9BE3B9D5;
	Fri, 28 Feb 2014 10:24:46 +0100 (CET)
Received: from nocatv2.tng.de (nocatv2.tng.de []) by
 mail.das-netzwerkteam.de (Horde Framework) with HTTP; Fri, 28 Feb 2014
 09:24:46 +0000
Date: Fri, 28 Feb 2014 09:24:46 +0000
Message-ID: <20140228092446.Horde.K_uiZqFdCvK-Jq-K84gzwg6@mail.das-netzwerkteam.de>
From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
To: Frank Knoben <admin@igpm.rwth-aachen.de>
Cc: 438@bugs.x2go.org
References: <20140227153048.Horde.6X5oZyCn2oTDQtFl7KQMCQ1@mail.das-netzwerkteam.de>
In-Reply-To: <53104757.1030306@igpm.rwth-aachen.de>
User-Agent: Internet Messaging Program (IMP) H5 (6.1.4)
Accept-Language: en,de
X-Remote-Browser: Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101
 Firefox/26.0 Iceweasel/26.0
Content-Type: multipart/signed; boundary="=_1YsruPhz3iYmUJ7kc8FAuA1";
 protocol="application/pgp-signature"; micalg=pgp-sha1
MIME-Version: 1.0
[Message part 1 (text/plain, inline)]
Hi Frank,

On  Fr 28 Feb 2014 09:22:47 CET, Frank Knoben wrote:

> Hello Mike,
> the problem is, that I'm not an expert on selinux too.
> But I did some more tests.
> Interactive Session - first login, the ~/.Xauthority file is created
> and stays after logout with the permissions *system_u:object_r:default_t:s0*
> I am still able to login in interactively again.
> But with this permissions, I got the Cookie mismatch problem, when  
> using the x2goclient.
> And when I login with ssh to the computer, I got a xauth error message:
> /usr/bin/xauth:  ~/.Xauthority not writable, changes will be ignored
> Now I  remove all .Xauthority* files. Then a login with ssh will  
> create the ~/.Xauthority file
> with the *system_u:object_r:xauth_home_t:s0* permissions and the  
> files stays with
> these permissions after logout.
> Now when I use the x2goclient, the file permissions change during  
> the login process from
> *system_u:object_r:xauth_home_t:s0* to  
> *system_u:object_r:default_t:s0 *and stay
> that way after logout. The same, as it is with interactive sessions.
> So I guess, everything is fine with the x2goserver software and
> this is not a bug.
> My problem is, that ssh is not able to overwrite the .Xauthority  
> file, when it has the
> default permissions of *system_u:object_r:default_t:s0* . Therefore  
> the x2goclient is
> not able to start a successful session and gets the Cookie mismatch error.
> So I think, you can close this bugreport.

Nonono... I actually think there is something wrong with X2Go Server.

X2Go Client / PyHoca-GUI (another X2Go client app) should immitate  
what SSH does.

As the X2Go clients call the script /usr/bin/x2gostartagent and this  
script fiddles with the .Xauthority files via xauth, we should make  
sure that after modifying the .Xauthority file the SELinux permissions  
stay intact.

Can you please add your proposed chcon command into x2gostartagent  
(near line 268, there is another position further up for shadow  
sessions) after xauth has been called and see it that fixes your  

Next step: please provide me with an if clause that will test if  
SELinux is in use or not, so we can call chcon only if SELinux is in  
use on that system.



mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de

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

Send a report that this bug log contains spam.

X2Go Developers <owner@bugs.x2go.org>. Last modified: Thu Feb 29 03:11:27 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.