aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/maemo/maemo_plugin.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2010-09-21 15:36:50 +0200
committerTobias Brunner <tobias@strongswan.org>2010-10-14 17:36:18 +0200
commitc0d9c1817b9231deff0ba749b0569be0ae11e0d0 (patch)
tree6566fb9f9ed8341fc2f5fe964cb4497da20adc09 /src/libcharon/plugins/maemo/maemo_plugin.c
parent174b31bce62f5e7cffe2bb4c90956d61220313b5 (diff)
downloadstrongswan-c0d9c1817b9231deff0ba749b0569be0ae11e0d0.tar.bz2
strongswan-c0d9c1817b9231deff0ba749b0569be0ae11e0d0.tar.xz
Maemo: Listen for a special "Start" D-BUS call.
This call is made on the system D-BUS so that charon is started as root.
Diffstat (limited to 'src/libcharon/plugins/maemo/maemo_plugin.c')
-rw-r--r--src/libcharon/plugins/maemo/maemo_plugin.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libcharon/plugins/maemo/maemo_plugin.c b/src/libcharon/plugins/maemo/maemo_plugin.c
index 5b921d556..3ce15f6d3 100644
--- a/src/libcharon/plugins/maemo/maemo_plugin.c
+++ b/src/libcharon/plugins/maemo/maemo_plugin.c
@@ -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;