Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • libxtrans libxtrans
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • xorgxorg
  • lib
  • libxtranslibxtrans
  • Merge requests
  • !8

Draft: UNIX sockets: Don't unlink an existing socket before binding a new one

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Olivier Certner requested to merge OlCe/libxtrans:issue-4 into master Feb 15, 2021
  • Overview 3
  • Commits 1
  • Pipelines 0
  • Changes 1

Running the X server as root makes the unlink operation always succeed, as well as the subsequent socket binding (socket creation in the file system). But success in binding a new socket is used to detect in-use displays when specifying "-displayfd". So, when running as root, :0 is never detected as been used and its socket is systematically crushed, rendering the existing :0 session stale.

Moreover, sockets are cleaned up by the X server, even in case of abnormal termination.

For issue #4.

If you find this change too drastic, I may instead be able to fix the problem in the server directly, see related issue xorg/xserver#1139.

Edited Mar 15, 2021 by Olivier Certner
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: issue-4