diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2013-02-13 17:29:02 +0200 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-02-19 12:51:44 +0200 |
commit | a7717e3ea2abc8e702e29230857eed8ed0b99115 (patch) | |
tree | 23c7f1f213c7fe719c3b00d0f0669a63ec71777a /vpn | |
parent | 5052b3acb5d041ed9dd00397a36563850faacf00 (diff) | |
download | connman-a7717e3ea2abc8e702e29230857eed8ed0b99115.tar.gz connman-a7717e3ea2abc8e702e29230857eed8ed0b99115.tar.bz2 connman-a7717e3ea2abc8e702e29230857eed8ed0b99115.zip |
pptp: Set the username/password before starting daemon
This is required in order to avoid free memory access that
is happening if we call vpn_provider_set_string() with same
string that is already in the settings db.
Diffstat (limited to 'vpn')
-rw-r--r-- | vpn/plugins/pptp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vpn/plugins/pptp.c b/vpn/plugins/pptp.c index c0d7c003..01b5e2ba 100644 --- a/vpn/plugins/pptp.c +++ b/vpn/plugins/pptp.c @@ -441,10 +441,6 @@ static int run_connect(struct vpn_provider *provider, goto done; } - vpn_provider_set_string(provider, "PPTP.User", username); - vpn_provider_set_string_hide_value(provider, "PPTP.Password", - password); - DBG("username %s password %p", username, password); str = g_strdup_printf("%s %s --nolaunchpppd --loglevel 2", @@ -520,6 +516,10 @@ static void request_input_cb(struct vpn_provider *provider, else if (error != NULL) DBG("error %s", error); + vpn_provider_set_string(provider, "PPTP.User", username); + vpn_provider_set_string_hide_value(provider, "PPTP.Password", + password); + run_connect(provider, data->task, data->if_name, data->cb, data->user_data, username, password); |