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...
|
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);
|