Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move server socket to subdirectory and drop world read/execute perrmissions #23

Closed
wants to merge 3 commits into from

Conversation

stintel
Copy link

@stintel stintel commented Dec 25, 2020

See individual commit messages for explanation. Fixes #18.

…er /run

The rationale here is that QT has no methods to run chown on some
files but we do not want the socket being world readable. So instead of
writing lenghty C++-code using chown, we simply move the socket file into a
subdir which we can put our preferred permissions on during startup of the
daemon.

Signed-off-by: Lars Wendler <[email protected]>
This file can be used by opentmpfiles or systemd-tmpfiles to make sure
the /run/radeon-profile-daemon directory exists with the correct
ownership and permissions, effectively making the socket no longer world
writeable.

Signed-off-by: Stijn Tintel <[email protected]>
In Linux, UNIX sockets honor the permissions of the directory they are
in. Now that the UNIX socket was moved to its own subdirectory in /run,
which is not accessible by other, the socket is no longer world
writeable.

However, this is not enough to make the socket writeable by the group
that owns the subdirectory. Make the socket group writeable. This way,
it will be writeable by the group owning the directory the socket is in.

Closes #18

Signed-off-by: Stijn Tintel <[email protected]>
@stintel
Copy link
Author

stintel commented Sep 21, 2021

Ping @marazmista

@Oxalin
Copy link

Oxalin commented Jan 20, 2023

Since the development seems to have stalled, I applied it to my fork. Thank you.

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.

Socket is world writable
2 participants