Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH 4/6] plugins/provisioning and mbpi: support for auth NONE
@ 2018-10-04  5:05 Giacinto Cifelli
  2018-10-04  5:05 ` [PATCH 6/6] drivers: " Giacinto Cifelli
  0 siblings, 1 reply; 20+ messages in thread
From: Giacinto Cifelli @ 2018-10-04  5:05 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1765 bytes --]

support of 'none' in file-provisioning and in mbpi.
The default authentication method is set to 'none'.
---
 plugins/file-provision.c | 6 +++++-
 plugins/mbpi.c           | 5 ++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/plugins/file-provision.c b/plugins/file-provision.c
index d4846a65..2bd516ff 100644
--- a/plugins/file-provision.c
+++ b/plugins/file-provision.c
@@ -97,14 +97,18 @@ static int config_file_provision_get_settings(const char *mcc,
 	value = g_key_file_get_string(key_file, setting_group,
 					"internet.AuthenticationMethod", NULL);
 
+	/* select default authentication method */
+	(*settings)[0].auth_method = OFONO_GPRS_AUTH_METHOD_NONE;
+
 	if (value != NULL) {
+
 		if (g_strcmp0(value, "chap") == 0)
 			(*settings)[0].auth_method =
 						OFONO_GPRS_AUTH_METHOD_CHAP;
 		else if (g_strcmp0(value, "pap") == 0)
 			(*settings)[0].auth_method =
 						OFONO_GPRS_AUTH_METHOD_PAP;
-		else
+		else if (g_strcmp0(value, "none") != 0)
 			DBG("Unknown auth method: %s", value);
 
 		g_free(value);
diff --git a/plugins/mbpi.c b/plugins/mbpi.c
index ae92c762..d101085f 100644
--- a/plugins/mbpi.c
+++ b/plugins/mbpi.c
@@ -148,11 +148,14 @@ static void authentication_start(GMarkupParseContext *context,
 		return;
 	}
 
+	/* select default authentication method */
+	*auth_method = OFONO_GPRS_AUTH_METHOD_NONE;
+
 	if (strcmp(text, "chap") == 0)
 		*auth_method = OFONO_GPRS_AUTH_METHOD_CHAP;
 	else if (strcmp(text, "pap") == 0)
 		*auth_method = OFONO_GPRS_AUTH_METHOD_PAP;
-	else
+	else if (strcmp(text, "none") != 0)
 		mbpi_g_set_error(context, error, G_MARKUP_ERROR,
 					G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
 					"Unknown authentication method: %s",
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 20+ messages in thread
* [PATCH 1/6] connman-api: added "none" auth_method
@ 2018-10-02  6:26 Giacinto Cifelli
  2018-10-02  6:26 ` [PATCH 6/6] drivers: support for auth NONE Giacinto Cifelli
  0 siblings, 1 reply; 20+ messages in thread
From: Giacinto Cifelli @ 2018-10-02  6:26 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 566 bytes --]

---
 doc/connman-api.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/connman-api.txt b/doc/connman-api.txt
index 9220d0de..578b9755 100644
--- a/doc/connman-api.txt
+++ b/doc/connman-api.txt
@@ -192,7 +192,8 @@ Properties	boolean Active [readwrite]
 
 		string AuthenticationMethod [readwrite]
 			Holds the PPP authentication method to use.  Valid
-			values are "pap" and "chap".  Defaults to "chap".
+			values are "pap", "chap" and "none".
+			Defaults to "chap".
 
 		string Username [readwrite]
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2018-10-05  4:13 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-04  5:05 [PATCH 4/6] plugins/provisioning and mbpi: support for auth NONE Giacinto Cifelli
2018-10-04  5:05 ` [PATCH 6/6] drivers: " Giacinto Cifelli
  -- strict thread matches above, loose matches on Subject: below --
2018-10-02  6:26 [PATCH 1/6] connman-api: added "none" auth_method Giacinto Cifelli
2018-10-02  6:26 ` [PATCH 6/6] drivers: support for auth NONE Giacinto Cifelli
2018-10-03 21:29   ` Denis Kenzior
2018-10-04  3:44     ` Giacinto Cifelli
2018-10-04  4:40       ` Denis Kenzior
2018-10-04  4:51         ` Giacinto Cifelli
2018-10-05  2:04           ` Denis Kenzior
2018-10-05  2:07             ` Giacinto Cifelli
2018-10-04  4:43     ` Giacinto Cifelli
2018-10-05  2:20       ` Denis Kenzior
2018-10-05  2:23         ` Giacinto Cifelli
2018-10-05  2:47           ` Denis Kenzior
2018-10-05  2:51             ` Giacinto Cifelli
2018-10-05  3:23               ` Denis Kenzior
2018-10-05  3:30                 ` Giacinto Cifelli
2018-10-05  3:37                   ` Denis Kenzior
2018-10-05  3:54                     ` Giacinto Cifelli
2018-10-05  4:09                       ` Denis Kenzior
2018-10-05  4:13                         ` Giacinto Cifelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox