Maemo: Listen for a special "Start" D-BUS call.
authorTobias Brunner <tobias@strongswan.org>
Tue, 21 Sep 2010 13:36:50 +0000 (15:36 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 14 Oct 2010 15:36:18 +0000 (17:36 +0200)
This call is made on the system D-BUS so that charon is started as root.

src/libcharon/plugins/maemo/maemo_plugin.c

index 5b921d5..3ce15f6 100644 (file)
@@ -220,7 +220,11 @@ static gint dbus_req_handler(const gchar *interface, const gchar *method,
                                                         GArray *arguments, private_maemo_plugin_t *this,
                                                         osso_rpc_t *retval)
 {
-       if (streq(method, "Connect"))
+       if (streq(method, "Start"))
+       {       /* void start (void), dummy function to start charon as root */
+               return OSSO_OK;
+       }
+       else if (streq(method, "Connect"))
        {       /* bool connect (name, host, cert, user, pass) */
                retval->value.b = initiate_connection(this, arguments);
                retval->type = DBUS_TYPE_BOOLEAN;