Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/config/modulesets/patches/telepathy-salut-olpc-no-dbus-uid-check.patch
blob: d876cd80c1251e5d5abdc27709a4df132387181c (plain)
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
diff -rN -up old-telepathy-salut/src/tube-dbus.c new-telepathy-salut/src/tube-dbus.c
--- old-telepathy-salut/src/tube-dbus.c	2007-11-15 13:33:51.902677010 -0500
+++ new-telepathy-salut/src/tube-dbus.c	2007-11-15 13:33:51.902677010 -0500
@@ -252,6 +252,14 @@ out:
   return DBUS_HANDLER_RESULT_HANDLED;
 }
 
+static dbus_bool_t
+allow_all_connections (DBusConnection *conn,
+                       unsigned long uid,
+                       void *data)
+{
+  return TRUE;
+}
+
 static void
 new_connection_cb (DBusServer *server,
                    DBusConnection *conn,
@@ -270,6 +278,13 @@ new_connection_cb (DBusServer *server,
   dbus_connection_ref (conn);
   dbus_connection_setup_with_g_main (conn, NULL);
   dbus_connection_add_filter (conn, filter_cb, tube, NULL);
+
+  /* OLPC have a security system making applications running under
+   * a different uid than Salut. So we have to explicitely allow connections
+   * from all uid. */
+  dbus_connection_set_unix_user_function (conn, allow_all_connections,
+      NULL, NULL);
+
   priv->dbus_conn = conn;
 }