Devuan bug report logs - #540
slim fails to get logind session if logout/login cycle is rapid

version graph

Package: slim; Maintainer for slim is Devuan Dev Team <devuan-dev@lists.dyne.org>; Source for slim is src:slim.

Reported by: Frank <fbug@xs4all.nl>

Date: Mon, 18 Jan 2021 20:33:01 UTC

Severity: normal

Fixed in version 1.3.6-5.2+devuan1

Done: dak@devuan.org

Forwarded to https://github.com/elogind/elogind/issues/95

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.devuan.org
Subject: bug#540: elogind unmounts /run/user/$UID tmpfs filesystem after logging in again
Reply-To: Frank <fbug@xs4all.nl>, 540@bugs.devuan.org
Resent-From: Frank <fbug@xs4all.nl>
Resent-To: devuan-bugs@lists.dyne.org
Resent-CC: Devuan Dev Team <devuan-dev@lists.dyne.org>
X-Loop: owner@bugs.devuan.org
Resent-Date: Thu, 21 Jan 2021 14:33:02 +0000
Resent-Message-ID: <handler.540.B540.161123940316255@bugs.devuan.org>
Resent-Sender: owner@bugs.devuan.org
X-Devuan-PR-Message: followup 540
X-Devuan-PR-Package: slim
X-Devuan-PR-Keywords: 
References: <799226dc9af49ffdf449c54e013032e1@xs4all.nl> <YAbC59HtYZjxzfBo@hindley.org.uk> <799226dc9af49ffdf449c54e013032e1@xs4all.nl> <0d28c7c8b0ca461ef8376eee0c5ec18e@xs4all.nl> <YAcjg31ZR9ilODdY@hindley.org.uk> <7b2bac156d658c49f638856d445a3b3b@xs4all.nl> <85c8573180e595ee5805d973cc6b1cfa@xs4all.nl> <YAhkQkGH3fTAAHdP@hindley.org.uk> <a15165161f13c160ee428ad13b24eb6d@xs4all.nl> <2a8c1d6c190c0213201a9f496e9363e0@xs4all.nl> <YAlQqj7R/L1rZj2x@hindley.org.uk> <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
Received: via spool by 540-submit@bugs.devuan.org id=B540.161123940316255
          (code B ref 540); Thu, 21 Jan 2021 14:33:02 +0000
Received: (at 540) by bugs.devuan.org; 21 Jan 2021 14:30:03 +0000
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by doc.devuan.org with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Thu, 21 Jan 2021 14:30:03 +0000 (UTC)
Received: from lb1-smtp-cloud7.xs4all.net (lb1-smtp-cloud7.xs4all.net [194.109.24.24])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id 82ED3F606F6
	for <540@bugs.devuan.org>; Thu, 21 Jan 2021 15:19:58 +0100 (CET)
Authentication-Results: vm6.ganeti.dyne.org;
	dkim=pass (2048-bit key; secure) header.d=xs4all.nl header.i=@xs4all.nl header.b="GN76V54n";
	dkim-atps=neutral
Received: from webmail.xs4all.nl ([IPv6:2001:888:0:22:194:109:20:217])
	by smtp-cloud7.xs4all.net with ESMTPA
	id 2aoVlboRMyutM2aoVlhRH9; Thu, 21 Jan 2021 15:19:57 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2;
	t=1611238797; bh=CtRVzVoMyeTB5WUJQQ0K8EGQThf20BUYwmLi9mEUsxg=;
	h=MIME-Version:Date:From:To:Subject:Message-ID:Content-Type:From:
	 Subject;
	b=GN76V54nddjUIX/GNoiNQSnpityCaA5JPusPv0zqdAMw5rPHx5lysxp98qkTBYLNE
	 IMVsXu1wV6XOirNm1oxjTY6djJJuD/BAjTz4C65Ve3CqXug5Weo7u+caRFNac0AcOY
	 QbZyVWETCBy16/DQfC8fEEVFyVvdrnqEDbuzc72EJz4R9Fq4B3jm63U4v7tJZlf3fj
	 hmnZ/nXrW5H2+BJ07pZ201411U6WAqUNGBwR70jHDs4+zEVNMbRgrbcK0AJYWZhSe/
	 M3gfFutoFlIzb8bSR1TVhPoB11eyw8WfRfTwQMR5e/IGj6gLQJUPSYinzo8IbJqwA3
	 /bQFhMAfgDmmg==
Received: from roothub.nl ([83.68.19.244])
 by webmail.xs4all.nl
 with HTTP (HTTP/1.1 POST); Thu, 21 Jan 2021 15:19:55 +0100
MIME-Version: 1.0
Date: Thu, 21 Jan 2021 15:19:55 +0100
From: Frank <fbug@xs4all.nl>
To: Mark Hindley <mark@hindley.org.uk>
Cc: 540@bugs.devuan.org
In-Reply-To: <YAlQqj7R/L1rZj2x@hindley.org.uk>
Message-ID: <dea0a4184a5362e4dc11341ce8ded9b0@xs4all.nl>
X-Sender: fbug@xs4all.nl
User-Agent: XS4ALL Webmail
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
X-CMAE-Envelope: MS4xfJ3w8o9ugSW2LygZZYlo0tLV/hY0uMkHHtfHG9teMrfPywpVKt9Fu4MP8dO8zz4NyavOpRJCboVelm6aghV4LnQz1yRw2DKv9tplfs891RdXdY/GPgTI
 NspNUkjYYvuCT3fic3FFwHTEUJ9N6X+cAYthTfsiKMYU9FTc3IY19/l5SKL8/zp/HVnIyQ8fJx70jkLJnODuvsw9rPeDG2VG1ycgKQ2+NEPB1IMOW+NseI5Q
 h6Ri4CM55NZpJVRhdB+MtA==
X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,
	RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=disabled
	version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org
Hi Mark,

Cmd "loginctl session-status" shows that class "greeter" is a property 
of service "slim". It looks fine to me since slim does not fork a helper 
process like, for example, lightdm does.

XDG_SESSION_CLASS is set by PAM module pam_elogind.so. Unsetting 
XDG_SESSION_CLASS / changing it to "user" again before pam.open_session 
breaks the fix. Overriding the environment variable by adding 
"pam.setenv("XDG_SESSION_CLASS", "greeter");" to app.cpp (line 560) 
won't change the class, just the variable (see below).

----------------- snip ---------------
devuan@devuan:~$ loginctl session-status | grep Service; set | grep 
XDG_SESSION
	 Service: slim; type x11; class greeter
XDG_SESSION_CLASS=user
XDG_SESSION_ID=1
XDG_SESSION_TYPE=x11
----------------- snip ---------------

I did a quick check in the logind source code and as far as I can see a 
greeter session does not have any additional privileges compared to a 
user session. There is only have_multiple_sessions() in logind-dbus.c 
that checks if there are multiple sessions; greeter sessions are not 
counted.

Slim is a single process (class "greeter") without a helper (class 
"user"). Changing the class to greeter is the best you can do.

Regards,
Frank

Mark Hindley schreef op 2021-01-21 11:00:
> It certainly makes sense for the slim login screen to be greeter class. 
> But,
> semantically, I would also expect the subsequent user login to be class 
> user. I
> don't yet know what other effects (if any) having the user login as 
> class
> greeter has.
> 
> Maybe we unset XDG_SESSION_CLASS again before pam.open_session? But 
> maybe that
> would no longer fix the issue you came across?
> 
>> Writing Display Managers (HOWTO):
>> https://www.freedesktop.org/wiki/Software/systemd/writing-display-managers/
> 
> This seems to confirm that the user login itself should not be class 
> greeter.
> 
> Mark

Send a report that this bug log contains spam.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Sat Apr 27 19:42:09 2024;