Skip to content

Use XDG runtime dir for UDS sockets#2195

Merged
sourishkrout merged 1 commit intorunmedev:mainfrom
twz123:socket-path-runtime-dir
Oct 10, 2025
Merged

Use XDG runtime dir for UDS sockets#2195
sourishkrout merged 1 commit intorunmedev:mainfrom
twz123:socket-path-runtime-dir

Conversation

@twz123
Copy link
Contributor

@twz123 twz123 commented Sep 18, 2025

Storing the socket in XDG_RUNTIME_DIR places it in the user-specific, permission-locked runtime directory instead of the shared /tmp directory. This is more secure and adheres to the freedesktop specification.

Storing the socket in XDG_RUNTIME_DIR places it in the user-specific,
permission-locked runtime directory instead of the shared /tmp
directory. This is more secure and adheres to the freedesktop
specification.

Signed-off-by: Tom Wieczorek <tom@bibbu.net>
@sourishkrout sourishkrout self-requested a review September 19, 2025 20:48
@sourishkrout
Copy link
Contributor

One aspect, I will have to check is whether or not the Electron "sandbox" allows writes to these directories. When we first built the UDS vs TCP feature, I do remember we had trouble with writes being restricted. Turned out /tmp was exempt from this. Platforms to test would be: Linux, MacOS, WSL2 on Windows.

Copy link
Contributor

@sourishkrout sourishkrout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this on relevant platform, including WSL2. Works ✅.

@sourishkrout sourishkrout merged commit eb10223 into runmedev:main Oct 10, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants