[systemd-bugs] [Bug 90818] New: logind: Save the user’s state when a session enters SESSION_ACTIVE
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Jun 2 06:24:46 PDT 2015
https://bugs.freedesktop.org/show_bug.cgi?id=90818
Bug ID: 90818
Summary: logind: Save the user’s state when a session enters
SESSION_ACTIVE
Product: systemd
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: general
Assignee: systemd-bugs at lists.freedesktop.org
Reporter: bugzilla at tecnocode.co.uk
QA Contact: systemd-bugs at lists.freedesktop.org
Patch coming to fix login’s STATE tracking for users to be correct when
starting a new session on a VT switch. This is important for PolicyKit
decisions about whether the user is active or online, as it affects the return
value of sd_uid_get_state().
See the commit message for full details.
See also: bug #90769, bug #67728, bug #76358.
---
The incorrect behaviour can be tested by:
1. In an X11 terminal, `cat /run/systemd/users/$uid` gives SESSIONS=1
STATE=active.
2. Switch VT, log in, `cat /run/systemd/users/$uid` gives SESSIONS="c2 1"
STATE=online.
3. Switch back to X11 and cat again, gives SESSIONS="c2 1" STATE=active.
4. Switch back to VT and cat again, gives SESSIONS="c2 1" STATE=active.
With some debugging logging added to logind, it seems that when switching to
the VT (step #2 above):
A. Session 1 is switched from SESSION_ACTIVE to SESSION_ONLINE because of the
VT change.
B. A new session (c2) is created, with initial state SESSION_OPENING.
C. user_save() is called, which takes the maximum state of sessions 1 and c2,
which is SESSION_ONLINE.
D. user_save() is not called again after session c2 switches from
SESSION_OPENING to SESSION_ACTIVE.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20150602/aa0725f4/attachment.html>
More information about the systemd-bugs
mailing list