bugThe nmh Mail Handling System - Bugs: bug #9864, SASL not working

 
 

bug #9864: SASL not working

Submitter:  None
Submitted:  Tue 03 Aug 2004 11:22:06 PM UTC
   
 
Category:  Bug Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Works For Me
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 30 Apr 2008 06:50:38 PM UTC, comment #1: 

Ken Hornstein (who did the SASL stuff) said on nmh-workers:

"[this patch] puzzles me.  I mean, I use the GSSAPI code every day, and I don't see why that patch is necessary.  I'd like to talk to the original patch author and ask them some more questions about it."

So this patch shouldn't be applied (at least for the moment). Unfortunately the original submission was anonymous...

Peter Maydell <pm215>
Group administrator
Tue 03 Aug 2004 11:22:06 PM UTC, original submission:  

In pop_auth_sasl(), during a GSSAPI negotiation with a qpopper server, nmh appears to miss a step in acknowledging
the last string to the server after the negotiation has
been successful.

Below is a patch to keep continuing until either an '+OK' string is received from the server, or an error occurs:

--- uip/popsbr.c        2004/07/30 01:01:10     1.1
+++ uip/popsbr.c        2004/08/02 17:47:05
@@ -293,7 +307,9 @@
     } else
        status = command("AUTH %s", chosen_mech);

-    while (result == SASL_CONTINUE) {
+    while (1) {
+        int sasl_continue = result == SASL_CONTINUE;
+
        if (status == NOTOK)
            return NOTOK;

@@ -327,14 +343,16 @@
            return NOTOK;
        }

-       result = sasl_client_step(conn, outbuf, outlen, NULL,
+       if (sasl_continue) {
+           result = sasl_client_step(conn, outbuf, outlen, NULL,
                                  (const char **) &buf, &buflen);

-       if (result != SASL_OK && result != SASL_CONTINUE) {
-           command("*");
-           snprintf(response, sizeof(response), "SASL client negotiaton "
+           if (result != SASL_OK && result != SASL_CONTINUE) {
+               command("*");
+               snprintf(response, sizeof(response), "SASL client negotiaton "
                     "failed: %s", sasl_errdetail(conn));
-           return NOTOK;
+               return NOTOK;
+           }
        }

        status = sasl_encode64(buf, buflen, outbuf, sizeof(outbuf), NULL);

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by kenh (Updated the item)
  • -email is unavailable- added by pm215 (Posted a comment)
  •  

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-02-06 kenh StatusNone Works For Me
        Open/ClosedOpen Closed
    2008-12-29 pm215 Categorycompatibility Bug

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code