From 3b625d6f3fd6c378917a20c378ca2c95e0981cce163406c03cf8e97ad9915f91 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Thu, 10 Nov 2016 15:19:48 +0000 Subject: [PATCH] - Add unset-xdg-runtime-dir.diff to unset XDG_RUNTIME_DIR in processes run with kdesu. This fixes the problem which made most kde applications (like dolphin or kate) not usable when run as another user with kdesu. kdesu worked to run those applications as root, but then, sockets were created in / . This patch also fixes the creation of those files which will be created on /tmp/runtime-/ (boo#1009510). OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kdesu?expand=0&rev=106 --- kdesu.changes | 10 ++++++++++ kdesu.spec | 3 +++ unset-xdg-runtime-dir.diff | 13 +++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 unset-xdg-runtime-dir.diff diff --git a/kdesu.changes b/kdesu.changes index f628168..1cfd49a 100644 --- a/kdesu.changes +++ b/kdesu.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Nov 10 12:55:50 UTC 2016 - alarrosa@suse.com + +- Add unset-xdg-runtime-dir.diff to unset XDG_RUNTIME_DIR in processes + run with kdesu. This fixes the problem which made most kde applications + (like dolphin or kate) not usable when run as another user with kdesu. + kdesu worked to run those applications as root, but then, sockets + were created in / . This patch also fixes the creation of those files + which will be created on /tmp/runtime-/ (boo#1009510). + ------------------------------------------------------------------- Sat Nov 5 22:04:03 UTC 2016 - hrvoje.senjan@gmail.com diff --git a/kdesu.spec b/kdesu.spec index eeb2e56..67e6e79 100644 --- a/kdesu.spec +++ b/kdesu.spec @@ -41,6 +41,8 @@ Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-% Source1: baselibs.conf # PATCH-FIX-OPENSUSE fpie.patch -- make kdesud compile/link with -(f)pie flags Patch0: fpie.patch +# PATCH-FIX-UPSTREAM unset-xdg-runtime-dir.diff alarrosa@suse.com -- unset XDG_RUNTIME_DIR so applications run under kdesu don't try to use an inaccesible runtime dir +Patch1: unset-xdg-runtime-dir.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -80,6 +82,7 @@ Development files. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %cmake_kf5 -d build diff --git a/unset-xdg-runtime-dir.diff b/unset-xdg-runtime-dir.diff new file mode 100644 index 0000000..5551a3b --- /dev/null +++ b/unset-xdg-runtime-dir.diff @@ -0,0 +1,13 @@ +Index: kdesu-5.26.0/src/kdesu_stub.c +=================================================================== +--- kdesu-5.26.0.orig/src/kdesu_stub.c ++++ kdesu-5.26.0/src/kdesu_stub.c +@@ -258,6 +258,8 @@ int main() + unsetenv("LC_ALL"); + } + ++ unsetenv("XDG_RUNTIME_DIR"); ++ + /* Do we need to change uid? */ + + pw = getpwnam(params[P_USER].value);