1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
Description: some applications launched with the activation helper
may need DBUS_STARTER_ADDRESS. Fix by hardcoding the starter address to
the default system bus address.
Origin: upstream, http://cgit.freedesktop.org/dbus/dbus/commit/?id=57ae3670508bbf4ec57049de47c9cae727a64802
Origin: upstream, http://cgit.freedesktop.org/dbus/dbus/commit/?id=f68dbdc3e6f895012ce33939fb524accf31bcca5
Origin: upstream, https://bugs.freedesktop.org/attachment.cgi?id=67977
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dbus/+bug/1058517
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=52202
Index: dbus-1.6.4/bus/activation-helper.c
===================================================================
--- dbus-1.6.4.orig/bus/activation-helper.c 2012-10-03 14:40:09.571872090 -0400
+++ dbus-1.6.4/bus/activation-helper.c 2012-10-03 14:40:58.819873351 -0400
@@ -140,21 +140,12 @@
return desktop_file;
}
-/* Cleares the environment, except for DBUS_VERBOSE and DBUS_STARTER_x */
+/* Clears the environment, except for DBUS_STARTER_x,
+ * which we hardcode to the system bus.
+ */
static dbus_bool_t
clear_environment (DBusError *error)
{
- const char *starter_env = NULL;
-#ifdef DBUS_ENABLE_VERBOSE_MODE
- const char *debug_env = NULL;
-
- /* are we debugging */
- debug_env = _dbus_getenv ("DBUS_VERBOSE");
-#endif
-
- /* we save the starter */
- starter_env = _dbus_getenv ("DBUS_STARTER_ADDRESS");
-
#ifndef ACTIVATION_LAUNCHER_TEST
/* totally clear the environment */
if (!_dbus_clearenv ())
@@ -163,20 +154,11 @@
"could not clear environment\n");
return FALSE;
}
-#endif
-#ifdef DBUS_ENABLE_VERBOSE_MODE
- /* restore the debugging environment setting if set */
- if (debug_env)
- _dbus_setenv ("DBUS_VERBOSE", debug_env);
-#endif
-
- /* restore the starter */
- if (starter_env)
- _dbus_setenv ("DBUS_STARTER_ADDRESS", starter_env);
-
- /* set the type, which must be system if we got this far */
+ /* Ensure the bus is set to system */
+ _dbus_setenv ("DBUS_STARTER_ADDRESS", DBUS_SYSTEM_BUS_DEFAULT_ADDRESS);
_dbus_setenv ("DBUS_STARTER_BUS_TYPE", "system");
+#endif
return TRUE;
}
|