Summary: | logind: Save the user’s state when a session enters SESSION_ACTIVE | ||
---|---|---|---|
Product: | systemd | Reporter: | Philip Withnall <bugzilla> |
Component: | general | Assignee: | systemd-bugs |
Status: | RESOLVED FIXED | QA Contact: | systemd-bugs |
Severity: | normal | ||
Priority: | medium | CC: | dh.herrmann |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | logind: Save the user’s state when a session enters SESSION_ACTIVE |
Description
Philip Withnall
2015-06-02 13:24:46 UTC
Created attachment 116244 [details] [review] logind: Save the user’s state when a session enters SESSION_ACTIVE When (for example) switching from X11 to a new VT and logging in there, creating a new session, the user state file (/run/systemd/users/$uid) is not updated after the session becomes active. The latest time it is saved is when the session is in SESSION_OPENING. This results in a /run/systemd/users/$uid file which contains STATE=online for the current user on the current active VT, which is obviously wrong. As functions like sd_uid_get_state() use this file to get the user’s state, this could result in things like PolicyKit making incorrect decisions about the user’s state. (See https://bugs.freedesktop.org/show_bug.cgi?id=76358.) Fix this by re-saving the state for a session’s user after completing the state_job for that session. Applied, thanks! (In reply to David Herrmann from comment #2) > Applied, thanks! (For posterity, the review is on https://github.com/systemd/systemd/pull/58.) |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.