All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5/6] gatchat: support for auth NONE
@ 2018-10-03  3:32 Giacinto Cifelli
  2018-10-03 16:45 ` Denis Kenzior
  0 siblings, 1 reply; 5+ messages in thread
From: Giacinto Cifelli @ 2018-10-03  3:32 UTC (permalink / raw)
  To: ofono

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

Added authentication method G_AT_PPP_AUTH_METHOD_NONE and its handling.
---
 gatchat/gatppp.c  | 3 ++-
 gatchat/gatppp.h  | 1 +
 gatchat/ppp_lcp.c | 3 +++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c
index 4a80b4b3..141e2746 100644
--- a/gatchat/gatppp.c
+++ b/gatchat/gatppp.c
@@ -615,7 +615,8 @@ const char *g_at_ppp_get_password(GAtPPP *ppp)
 gboolean g_at_ppp_set_auth_method(GAtPPP *ppp, GAtPPPAuthMethod method)
 {
 	if (method != G_AT_PPP_AUTH_METHOD_CHAP &&
-					method != G_AT_PPP_AUTH_METHOD_PAP)
+					method != G_AT_PPP_AUTH_METHOD_PAP &&
+					method != G_AT_PPP_AUTH_METHOD_NONE)
 		return FALSE;
 
 	ppp->auth_method = method;
diff --git a/gatchat/gatppp.h b/gatchat/gatppp.h
index 213f7e90..dd203c28 100644
--- a/gatchat/gatppp.h
+++ b/gatchat/gatppp.h
@@ -46,6 +46,7 @@ typedef enum _GAtPPPDisconnectReason {
 typedef enum _GAtPPPAuthMethod {
 	G_AT_PPP_AUTH_METHOD_CHAP,
 	G_AT_PPP_AUTH_METHOD_PAP,
+	G_AT_PPP_AUTH_METHOD_NONE,
 } GAtPPPAuthMethod;
 
 typedef void (*GAtPPPConnectFunc)(const char *iface, const char *local,
diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c
index df9cd0ef..3fe38217 100644
--- a/gatchat/ppp_lcp.c
+++ b/gatchat/ppp_lcp.c
@@ -279,6 +279,9 @@ static enum rcr_result lcp_rcr(struct pppcp_data *pppcp,
 				*new_len = 4;
 
 				return RCR_NAK;
+
+			case G_AT_PPP_AUTH_METHOD_NONE:
+				return RCR_REJECT;
 			}
 			break;
 		}
-- 
2.17.1


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

* Re: [PATCH 5/6] gatchat: support for auth NONE
  2018-10-03  3:32 [PATCH 5/6] gatchat: support for auth NONE Giacinto Cifelli
@ 2018-10-03 16:45 ` Denis Kenzior
  2018-10-03 18:22   ` Giacinto Cifelli
  0 siblings, 1 reply; 5+ messages in thread
From: Denis Kenzior @ 2018-10-03 16:45 UTC (permalink / raw)
  To: ofono

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

On 10/02/2018 10:32 PM, Giacinto Cifelli wrote:
> Added authentication method G_AT_PPP_AUTH_METHOD_NONE and its handling.
> ---
>   gatchat/gatppp.c  | 3 ++-
>   gatchat/gatppp.h  | 1 +
>   gatchat/ppp_lcp.c | 3 +++
>   3 files changed, 6 insertions(+), 1 deletion(-)
> 

I went ahead and applied this one.  I'll look at the other 5 patches 
again soon.

Regards,
-Denis


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

* Re: [PATCH 5/6] gatchat: support for auth NONE
  2018-10-03 16:45 ` Denis Kenzior
@ 2018-10-03 18:22   ` Giacinto Cifelli
  0 siblings, 0 replies; 5+ messages in thread
From: Giacinto Cifelli @ 2018-10-03 18:22 UTC (permalink / raw)
  To: ofono

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

Hi Denis,

On Wed, Oct 3, 2018 at 6:45 PM Denis Kenzior <denkenz@gmail.com> wrote:
>
> On 10/02/2018 10:32 PM, Giacinto Cifelli wrote:
> > Added authentication method G_AT_PPP_AUTH_METHOD_NONE and its handling.
> > ---
> >   gatchat/gatppp.c  | 3 ++-
> >   gatchat/gatppp.h  | 1 +
> >   gatchat/ppp_lcp.c | 3 +++
> >   3 files changed, 6 insertions(+), 1 deletion(-)
> >
>
> I went ahead and applied this one.  I'll look at the other 5 patches
> again soon.

thank you, I'll look forward to it.

>
> Regards,
> -Denis
>

Regards,
Giacinto

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

* Re: [PATCH 5/6] gatchat: support for auth NONE
  2018-10-02  6:26 ` [PATCH 5/6] gatchat: support for auth NONE Giacinto Cifelli
@ 2018-10-02 23:26   ` Denis Kenzior
  0 siblings, 0 replies; 5+ messages in thread
From: Denis Kenzior @ 2018-10-02 23:26 UTC (permalink / raw)
  To: ofono

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

Hi Giacinto,

On 10/02/2018 01:26 AM, Giacinto Cifelli wrote:
> Added authentication method G_AT_PPP_AUTH_METHOD_NONE and its handling.
> 
> This method is already used in the code, and

Hmm, I don't think so?

> the patch is just allowing its explicit use, on top of the implicit
> selection done when username is empty.

I do not see how this is true?  Even if username / password is empty, 
the CHAP/PAP authentication method applies.  We just hash the empty 
password for CHAP / send it plaintext for PAP.

There is of course the possibility that the PPP server can simply not 
ask us for the AUTH_PROTO option, in which case we would find that 
acceptable and the auth protocol would not be used.

> ---
>   gatchat/gatppp.c  | 3 ++-
>   gatchat/gatppp.h  | 1 +
>   gatchat/ppp_lcp.c | 3 +++
>   3 files changed, 6 insertions(+), 1 deletion(-)
> 

<snip>

> diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c
> index df9cd0ef..258ae763 100644
> --- a/gatchat/ppp_lcp.c
> +++ b/gatchat/ppp_lcp.c
> @@ -279,6 +279,9 @@ static enum rcr_result lcp_rcr(struct pppcp_data *pppcp,
>   				*new_len = 4;
>   
>   				return RCR_NAK;
> +
> +			case G_AT_PPP_AUTH_METHOD_NONE:
> +				return RCR_ACCEPT;

Should this not be RCR_REJECT ?  Otherwise we're accepting a server 
proposed auth protocol when we're explicitly configured not to use one.

>   			}
>   			break;
>   		}
> 

Regards,
-Denis

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

* [PATCH 5/6] gatchat: support for auth NONE
  2018-10-02  6:26 [PATCH 1/6] connman-api: added "none" auth_method Giacinto Cifelli
@ 2018-10-02  6:26 ` Giacinto Cifelli
  2018-10-02 23:26   ` Denis Kenzior
  0 siblings, 1 reply; 5+ messages in thread
From: Giacinto Cifelli @ 2018-10-02  6:26 UTC (permalink / raw)
  To: ofono

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

Added authentication method G_AT_PPP_AUTH_METHOD_NONE and its handling.

This method is already used in the code, and
the patch is just allowing its explicit use, on top of the implicit
selection done when username is empty.
---
 gatchat/gatppp.c  | 3 ++-
 gatchat/gatppp.h  | 1 +
 gatchat/ppp_lcp.c | 3 +++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c
index 4a80b4b3..141e2746 100644
--- a/gatchat/gatppp.c
+++ b/gatchat/gatppp.c
@@ -615,7 +615,8 @@ const char *g_at_ppp_get_password(GAtPPP *ppp)
 gboolean g_at_ppp_set_auth_method(GAtPPP *ppp, GAtPPPAuthMethod method)
 {
 	if (method != G_AT_PPP_AUTH_METHOD_CHAP &&
-					method != G_AT_PPP_AUTH_METHOD_PAP)
+					method != G_AT_PPP_AUTH_METHOD_PAP &&
+					method != G_AT_PPP_AUTH_METHOD_NONE)
 		return FALSE;
 
 	ppp->auth_method = method;
diff --git a/gatchat/gatppp.h b/gatchat/gatppp.h
index 213f7e90..dd203c28 100644
--- a/gatchat/gatppp.h
+++ b/gatchat/gatppp.h
@@ -46,6 +46,7 @@ typedef enum _GAtPPPDisconnectReason {
 typedef enum _GAtPPPAuthMethod {
 	G_AT_PPP_AUTH_METHOD_CHAP,
 	G_AT_PPP_AUTH_METHOD_PAP,
+	G_AT_PPP_AUTH_METHOD_NONE,
 } GAtPPPAuthMethod;
 
 typedef void (*GAtPPPConnectFunc)(const char *iface, const char *local,
diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c
index df9cd0ef..258ae763 100644
--- a/gatchat/ppp_lcp.c
+++ b/gatchat/ppp_lcp.c
@@ -279,6 +279,9 @@ static enum rcr_result lcp_rcr(struct pppcp_data *pppcp,
 				*new_len = 4;
 
 				return RCR_NAK;
+
+			case G_AT_PPP_AUTH_METHOD_NONE:
+				return RCR_ACCEPT;
 			}
 			break;
 		}
-- 
2.17.1


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

end of thread, other threads:[~2018-10-03 18:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-03  3:32 [PATCH 5/6] gatchat: support for auth NONE Giacinto Cifelli
2018-10-03 16:45 ` Denis Kenzior
2018-10-03 18:22   ` 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 5/6] gatchat: support for auth NONE Giacinto Cifelli
2018-10-02 23:26   ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.