summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2019-06-13 16:06:14 +0200
committerLars Wendler <polynomial-c@gentoo.org>2019-06-13 16:27:27 +0200
commit554169d137ed8565b7802bd3dcdf3d274f4ce4f1 (patch)
tree7bc03aa9c37c465f1ea9fb9138c9e92ae548e250 /x11-apps/radeon-profile-daemon/files
parentsys-fs/android-file-transfer-linux: Removed old. (diff)
downloadgentoo-554169d137ed8565b7802bd3dcdf3d274f4ce4f1.tar.gz
gentoo-554169d137ed8565b7802bd3dcdf3d274f4ce4f1.tar.bz2
gentoo-554169d137ed8565b7802bd3dcdf3d274f4ce4f1.zip
x11-apps/radeon-profile-daemon: Adjusted live ebuild
Package-Manager: Portage-2.3.67, Repoman-2.3.14 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
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
+}