summaryrefslogtreecommitdiffstats
path: root/patches/source/dbus/dbus.set.home.diff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/source/dbus/dbus.set.home.diff')
-rw-r--r--patches/source/dbus/dbus.set.home.diff22
1 files changed, 22 insertions, 0 deletions
diff --git a/patches/source/dbus/dbus.set.home.diff b/patches/source/dbus/dbus.set.home.diff
new file mode 100644
index 000000000..5c0f7976a
--- /dev/null
+++ b/patches/source/dbus/dbus.set.home.diff
@@ -0,0 +1,22 @@
+Set HOME environment variable when switching user.
+
+2011-08-05 Egor Y. Egorov
+
+References:
+https://bugs.freedesktop.org/show_bug.cgi?id=39857
+https://bugs.kde.org/show_bug.cgi?id=249217#c27
+
+diff --git a/bus/activation-helper.c b/bus/activation-helper.c
+index baba8f0..b75ea7c 100644
+--- a/bus/activation-helper.c
++++ b/bus/activation-helper.c
+@@ -344,6 +344,8 @@ switch_user (char *user, DBusError *error)
+ "cannot setuid user %i", pw->pw_uid);
+ return FALSE;
+ }
++
++ _dbus_setenv ("HOME", pw->pw_dir);
+ #endif
+ return TRUE;
+ }
+