[systemd-bugs] [Bug 90769] New: user_elect_display() overwrites DISPLAY with TTY session when switching VT away from a graphical session
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri May 29 03:05:49 PDT 2015
https://bugs.freedesktop.org/show_bug.cgi?id=90769
Bug ID: 90769
Summary: user_elect_display() overwrites DISPLAY with TTY
session when switching VT away from a graphical
session
Product: systemd
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: major
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 logind’s user_elect_display() to be more stable when
switching VT from a graphical session to a TTY session, while still keeping the
graphical session open.
See the commit message for full details.
This is important because it affects the session returned by
sd_uid_get_display(), which will be used by PolicyKit to find the correct
session context to make policy decisions in. Hence this may (depending on the
particular udisks2 policy in force) break auto-mounting of USB disks if the
user starts a remote session after their X11 session, for example.
See also: bug #67728, bug #76358.
---
The incorrect behaviour can be tested by:
1. In an X11 terminal, `cat /run/systemd/users/$uid` gives SESSIONS=c1
DISPLAY=c1.
2. Switch VT, log in, `cat /run/systemd/users/$uid` gives SESSIONS="c2 c1"
DISPLAY=c2. Here, DISPLAY is incorrect and will result in the wrong return
value from sd_uid_get_display().
3. Switch back to X11 and cat again; details are the same.
4. Log out of the VT and cat again; DISPLAY=c1 SESSIONS=c1 again (correct).
--
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/20150529/cbe8e285/attachment.html>
More information about the systemd-bugs
mailing list