Skip to content

Commit

Permalink
Make UNIX socket group writeable
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
stintel committed Dec 25, 2020
1 parent ae53549 commit 011e290
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion radeon-profile-daemon/rpdthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void rpdThread::createServer()

QLocalServer::removeServer(serverSocketPath);
daemonServer.listen(serverSocketPath);
QFile::setPermissions(serverSocketPath, QFile(serverSocketPath).permissions() | QFile::WriteOther | QFile::ReadOther);
QFile::setPermissions(serverSocketPath, QFile(serverSocketPath).permissions() | QFile::WriteGroup);
}

void rpdThread::closeConnection()
Expand Down

0 comments on commit 011e290

Please sign in to comment.