Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via email, send a message with subject or
body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. [PATCH] vpnc: Do not lose credentials with VPN agent timeouts
(Jussi Laakkonen)
2. RE: [PATCH] Fix time synchronization after updating timeservers
(VAUTRIN Emmanuel (Canal Plus Prestataire))
----------------------------------------------------------------------
Date: Thu, 17 Dec 2020 13:32:43 +0200
From: Jussi Laakkonen <[email protected]>
Subject: [PATCH] vpnc: Do not lose credentials with VPN agent timeouts
To: [email protected]
Message-ID: <[email protected]>
Return ENOENT in case the VPN agent timeouts or there is some other
error that does not indicate an error with login credentials. By doing
this change the credentials are not reset with authentication error
added to the VPN agent query. Approach here is similar to openvpn.c
plugin.
---
vpn/plugins/vpnc.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/vpn/plugins/vpnc.c b/vpn/plugins/vpnc.c
index 60d8266e..d11b9111 100644
--- a/vpn/plugins/vpnc.c
+++ b/vpn/plugins/vpnc.c
@@ -674,8 +674,10 @@ static void request_input_credentials_reply(DBusMessage
*reply, void *user_data)
DBG("provider %p", data->provider);
- if (!reply)
+ if (!reply) {
+ err = ENOENT;
goto err;
+ }
err = vpn_agent_check_and_process_reply_error(reply, data->provider,
data->task, data->cb, data->user_data);
@@ -686,8 +688,10 @@ static void request_input_credentials_reply(DBusMessage
*reply, void *user_data)
return;
}
- if (!vpn_agent_check_reply_has_dict(reply))
+ if (!vpn_agent_check_reply_has_dict(reply)) {
+ err = ENOENT;
goto err;
+ }
dbus_message_iter_init(reply, &iter);
dbus_message_iter_recurse(&iter, &dict);
@@ -742,17 +746,22 @@ static void request_input_credentials_reply(DBusMessage
*reply, void *user_data)
dbus_message_iter_next(&dict);
}
- if (!secret || !username || !password)
+ if (!secret || !username || !password) {
+ vpn_provider_indicate_error(data->provider,
+ VPN_PROVIDER_ERROR_AUTH_FAILED);
+ err = EACCES;
goto err;
+ }
- err = run_connect(data);
- if (err != -EINPROGRESS)
+ /* vpn_provider.c:connect_cb() expects positive errors */
+ err = -run_connect(data);
+ if (err != EINPROGRESS)
goto err;
return;
err:
- vc_connect_done(data, EACCES);
+ vc_connect_done(data, err);
}
static int request_input_credentials(struct vc_private_data *data,
--
2.20.1
------------------------------
Date: Thu, 17 Dec 2020 13:44:16 +0000
From: "VAUTRIN Emmanuel (Canal Plus Prestataire)"
<[email protected]>
Subject: RE: [PATCH] Fix time synchronization after updating
timeservers
To: Daniel Wagner <[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID: <[email protected]
prd02.prod.outlook.com>
Content-Type: multipart/alternative; boundary="_000_PR1PR02MB47942A
DC575A57DAA2F5642193C40PR1PR02MB4794eurp_"
--_000_PR1PR02MB47942ADC575A57DAA2F5642193C40PR1PR02MB4794eurp_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Daniel,
I have tried to reply via the posting activity, but it seems that the messa=
ge has been lost. So I directly answer to this email.
When the time servers are set (timeserver_start(), __connman_timeserver_sys=
tem_set), a call to __connman_timeserver_sync(NULL) is done to require a ma=
ndatory time synchronization.
Or, in this case, usually we have service =3D=3D ts_service, so the synchro=
nization is not done, contrary to what was expected.
Adding a check to default_service, enables to know if a synchronisation is =
mandatory.
Best Regards,
Emmanuel
________________________________
De : Daniel Wagner <[email protected]>
Envoy=E9 : vendredi 11 d=E9cembre 2020 12:25
=C0 : VAUTRIN Emmanuel (Canal Plus Prestataire) <Emmanuel.VAUTRIN@cpexterne=
.org>
Cc : [email protected] <[email protected]>
Objet : Re: [PATCH] Fix time synchronization after updating timeservers
Hi Emmanuel,
On Fri, Dec 04, 2020 at 08:54:17AM -0000, Emmanuel Vautrin wrote:
> Hello everyone,
>
> Please find below the patch fixing this issue:
Can you explain what this is fixing? I don't understand why you need to
check default_service there again?
If default_service is valid we use it. If not we ask
connman_service_get_default() to return a default gateway. If that fails
we return -EINVAL.
Thanks,
Daniel
--_000_PR1PR02MB47942ADC575A57DAA2F5642193C40PR1PR02MB4794eurp_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
Hi Daniel,</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
I have tried to reply via the posting activity, but it seems that the messa=
ge has been lost. So I directly answer to this email.</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
When the time servers are set (timeserver_start(), __connman_timeserver_sys=
tem_set), a call to __connman_timeserver_sync(NULL) is done to require a ma=
ndatory time synchronization.</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
Or, in this case, usually we have service =3D=3D ts_service, so the synchro=
nization is not done, contrary to what was expected.</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
Adding a check to default_service, enables to know if a synchronisation is =
mandatory.<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
Best Regards,</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
Emmanuel<br>
</div>
<div id=3D"appendonsend"></div>
<hr style=3D"display:inline-block;width:98%" tabindex=3D"-1">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" st=
yle=3D"font-size:11pt" color=3D"#000000"><b>De :</b> Daniel Wagner <wagi=
@monom.org><br>
<b>Envoy=E9 :</b> vendredi 11 d=E9cembre 2020 12:25<br>
<b>=C0 :</b> VAUTRIN Emmanuel (Canal Plus Prestataire) <Emmanuel.VAUTRIN=
@cpexterne.org><br>
<b>Cc :</b> [email protected] <[email protected]><br>
<b>Objet :</b> Re: [PATCH] Fix time synchronization after updating timeserv=
ers</font>
<div> </div>
</div>
<div class=3D"BodyFragment"><font size=3D"2"><span style=3D"font-size:11pt;=
">
<div class=3D"PlainText">Hi Emmanuel,<br>
<br>
On Fri, Dec 04, 2020 at 08:54:17AM -0000, Emmanuel Vautrin wrote:<br>
> Hello everyone,<br>
> <br>
> Please find below the patch fixing this issue:<br>
<br>
Can you explain what this is fixing? I don't understand why you need to<br>
check default_service there again?<br>
<br>
If default_service is valid we use it. If not we ask<br>
connman_service_get_default() to return a default gateway. If that fails<br=
>
we return -EINVAL.<br>
<br>
Thanks,<br>
Daniel<br>
</div>
</span></font></div>
</body>
</html>
--_000_PR1PR02MB47942ADC575A57DAA2F5642193C40PR1PR02MB4794eurp_--
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list -- [email protected]
To unsubscribe send an email to [email protected]
------------------------------
End of connman Digest, Vol 62, Issue 23
***************************************