Repository navigation
use private runtime dir for IPC socket and cava config - #1039
Merged
MalpenZibo merged 1 commit intoOct 9, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The visualizer config was written to a fixed, shared, predictable path:
$TMPDIR/ashell_cava.cfg. Any local user could pre-create it (thevisualizer then dies with a write error), collide with another user's
file, or, where
fs.protected_symlinks/fs.protected_regularare off,replace it with a symlink or pre-planted file.
This reuses the private-directory machinery from the IPC socket fix
(#1034), extracted into a shared helper:
xdg::private_dir(create):$XDG_RUNTIME_DIRwhen it validates,else
$TMPDIR/ashell-<uid>, created with mode0700and alwayschecked to be a real directory owned by the effective user with mode
0700(no symlink, no squatting). The fallback warning now firesonce per process, since the cava subscription restarts on every
pause/play and menu toggle.
ipc::socket_path()delegates to the helper; behavior and errormessages are unchanged.
ashell_cava.cfginside thatdirectory. Truncate-write is kept: the subscription restarts
in-process, so
create_newwould fail withAlreadyExists.After this, the remaining attacks all require write access to a
0700directory owned by the victim.