All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ppp authentication bug fixes
@ 2010-03-25 20:04 Kristen Carlson Accardi
  2010-03-25 20:04 ` [PATCH 1/2] ppp: allow empty secret for chap challenge Kristen Carlson Accardi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kristen Carlson Accardi @ 2010-03-25 20:04 UTC (permalink / raw)
  To: ofono

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

Here are a couple bug fixes for the PPP authentication.  First patch
fixes the seg fault when the secret is empty, as reported by marcel.
Second, if we do fail to authenticate, we need to change ppp phases
to terminate the link.

Kristen Carlson Accardi (2):
  ppp: allow empty secret for chap challenge
  ppp: send PPP_FAIL when authentication fails

 gatchat/ppp_auth.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


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

* [PATCH 1/2] ppp: allow empty secret for chap challenge
  2010-03-25 20:04 [PATCH 0/2] ppp authentication bug fixes Kristen Carlson Accardi
@ 2010-03-25 20:04 ` Kristen Carlson Accardi
  2010-03-25 20:04 ` [PATCH 2/2] ppp: send PPP_FAIL when authentication fails Kristen Carlson Accardi
  2010-03-26 17:20 ` [PATCH 0/2] ppp authentication bug fixes Marcel Holtmann
  2 siblings, 0 replies; 4+ messages in thread
From: Kristen Carlson Accardi @ 2010-03-25 20:04 UTC (permalink / raw)
  To: ofono

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

Just do a checksum over the identifier if we have an empty password
for our chap secret.
---
 gatchat/ppp_auth.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gatchat/ppp_auth.c b/gatchat/ppp_auth.c
index 6c3913e..95b2f96 100644
--- a/gatchat/ppp_auth.c
+++ b/gatchat/ppp_auth.c
@@ -83,7 +83,8 @@ static void chap_process_challenge(struct auth_data *auth, guint8 *packet)
 	if (!checksum)
 		return;
 	g_checksum_update(checksum, &header->identifier, 1);
-	g_checksum_update(checksum, (guchar *) secret, strlen(secret));
+	if (secret)
+		g_checksum_update(checksum, (guchar *) secret, strlen(secret));
 	g_checksum_update(checksum, &header->data[1], header->data[0]);
 
 	/* transmit a response packet */
-- 
1.6.6.1


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

* [PATCH 2/2] ppp: send PPP_FAIL when authentication fails
  2010-03-25 20:04 [PATCH 0/2] ppp authentication bug fixes Kristen Carlson Accardi
  2010-03-25 20:04 ` [PATCH 1/2] ppp: allow empty secret for chap challenge Kristen Carlson Accardi
@ 2010-03-25 20:04 ` Kristen Carlson Accardi
  2010-03-26 17:20 ` [PATCH 0/2] ppp authentication bug fixes Marcel Holtmann
  2 siblings, 0 replies; 4+ messages in thread
From: Kristen Carlson Accardi @ 2010-03-25 20:04 UTC (permalink / raw)
  To: ofono

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

---
 gatchat/ppp_auth.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gatchat/ppp_auth.c b/gatchat/ppp_auth.c
index 95b2f96..fe3c501 100644
--- a/gatchat/ppp_auth.c
+++ b/gatchat/ppp_auth.c
@@ -128,7 +128,8 @@ static void chap_process_failure(struct auth_data *data, guint8 *packet)
 {
 	struct chap_header *header = (struct chap_header *) packet;
 
-	g_print("Failed to authenticate, message %s\n", header->data);
+	ppp_generate_event(data->ppp, PPP_FAIL);
+	g_printerr("Failed to authenticate, message %s\n", header->data);
 }
 
 /*
-- 
1.6.6.1


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

* Re: [PATCH 0/2] ppp authentication bug fixes
  2010-03-25 20:04 [PATCH 0/2] ppp authentication bug fixes Kristen Carlson Accardi
  2010-03-25 20:04 ` [PATCH 1/2] ppp: allow empty secret for chap challenge Kristen Carlson Accardi
  2010-03-25 20:04 ` [PATCH 2/2] ppp: send PPP_FAIL when authentication fails Kristen Carlson Accardi
@ 2010-03-26 17:20 ` Marcel Holtmann
  2 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2010-03-26 17:20 UTC (permalink / raw)
  To: ofono

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

Hi Kristen,

> Here are a couple bug fixes for the PPP authentication.  First patch
> fixes the seg fault when the secret is empty, as reported by marcel.
> Second, if we do fail to authenticate, we need to change ppp phases
> to terminate the link.
> 
> Kristen Carlson Accardi (2):
>   ppp: allow empty secret for chap challenge
>   ppp: send PPP_FAIL when authentication fails
> 
>  gatchat/ppp_auth.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)

I am still not seeing patch 1/2. Can you re-sent both patches.

Regards

Marcel



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

end of thread, other threads:[~2010-03-26 17:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-25 20:04 [PATCH 0/2] ppp authentication bug fixes Kristen Carlson Accardi
2010-03-25 20:04 ` [PATCH 1/2] ppp: allow empty secret for chap challenge Kristen Carlson Accardi
2010-03-25 20:04 ` [PATCH 2/2] ppp: send PPP_FAIL when authentication fails Kristen Carlson Accardi
2010-03-26 17:20 ` [PATCH 0/2] ppp authentication bug fixes Marcel Holtmann

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.