Bug 96483 - xinit/startx should set DISPLAY=unix/:0 rather than just :0
Summary: xinit/startx should set DISPLAY=unix/:0 rather than just :0
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/xinit (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-10 16:50 UTC by Josh Triplett
Modified: 2018-08-10 20:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Josh Triplett 2016-06-10 16:50:10 UTC
When xinit/startx starts an X server that listens only on UNIX socket, not TCP, it should set DISPLAY=unix/:0 (or unix/:N in general) rather than DISPLAY=:0.  That will prevent applications from ever falling back to TCP if the UNIX socket connection fails (such as with the X server stopped or crashed).

Doing so prevents several kinds of problems.  In particular, if an application uses seccomp, pledge, or similar to lock itself down and prevent access to AF_INET sockets, the fallback would hit that and kill the application, preventing it from gracefully handling connection failure.  (We received a report of this on the XCB list from a BSD developer.)  For that matter, since unprivileged users can listen on port 6000, this would avoid connecting to an unexpected different server (perhaps run from a different sandbox/container).
Comment 1 GitLab Migration User 2018-08-10 20:30:54 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/app/xinit/issues/10.


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.