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

Issue 18: Fixed - properly locating the socket under /run with appropriate #1

Merged
merged 3 commits into from
Jan 20, 2023
Merged

Conversation

Oxalin
Copy link
Owner

@Oxalin Oxalin commented Jan 20, 2023

Fixes marazmista#18

Move socket under /run
Set appropriate rights
Add a .tmpfiles so the path for the socket is created if/when needed

Lars Wendler and others added 3 commits December 25, 2020 03:09
…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 marazmista#18

Signed-off-by: Stijn Tintel <[email protected]>
@Oxalin Oxalin merged commit 3cbaefe into Oxalin:master Jan 20, 2023
@stintel stintel deleted the issue-18 branch July 15, 2023 16:17
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