summaryrefslogtreecommitdiff
path: root/x11-apps/radeon-profile-daemon/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-06-16 21:23:20 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-06-16 21:23:20 +0100
commitfab849d1daed0ba7f2ac497d07985c3dbb692543 (patch)
tree10baa743a5340b42ad538dd19d48669ccac209b1 /x11-apps/radeon-profile-daemon/files
parent73c318acdaf6f8309d68bd266051e6dd1f1bd787 (diff)
gentoo resync : 16.06.2019
Diffstat (limited to 'x11-apps/radeon-profile-daemon/files')
-rw-r--r--x11-apps/radeon-profile-daemon/files/radeon-profile-daemon-20190603-secure_socket.patch26
-rw-r--r--x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd-r119
2 files changed, 45 insertions, 0 deletions
diff --git a/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon-20190603-secure_socket.patch b/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon-20190603-secure_socket.patch
new file mode 100644
index 000000000000..951e7d12e28f
--- /dev/null
+++ b/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon-20190603-secure_socket.patch
@@ -0,0 +1,26 @@
+From 47ddfbb7b85c3e99eb0d132078c989c0dfa2ea9b Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Thu, 13 Jun 2019 15:58:44 +0200
+Subject: [PATCH] Don't make the socket world writable
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ radeon-profile-daemon/rpdthread.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/radeon-profile-daemon/rpdthread.cpp b/radeon-profile-daemon/rpdthread.cpp
+index 8785efa..94a0d6f 100644
+--- a/radeon-profile-daemon/rpdthread.cpp
++++ b/radeon-profile-daemon/rpdthread.cpp
+@@ -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 | QFile::ReadGroup);
+ }
+
+ void rpdThread::closeConnection()
+--
+2.22.0
+
diff --git a/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd-r1 b/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd-r1
new file mode 100644
index 000000000000..813ab9515aeb
--- /dev/null
+++ b/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd-r1
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Daemon for radeon-profile GUI"
+
+command="/usr/sbin/radeon-profile-daemon"
+command_background="true"
+pidfile="/run/${SVCNAME}.pid"
+
+radeon_socket="/run/radeon-profile-daemon-server"
+
+start_post() {
+ if ewaitfile 10 ${radeon_socket} ; then
+ chgrp video ${radeon_socket}
+ else
+ eerror "Failed to find socket file ${radeon_socket}"
+ fi
+}