aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2010-09-25 17:24:57 +0200
committerMatthias Andree <matthias.andree@gmx.de>2010-09-25 17:37:23 +0200
commit11a63571bc2ac5790d6e349d742d87b48a781e41 (patch)
tree48f521e4832c929333ad1cfd8e3666c6ef05382a
parent414cdcecacd0e573bbf542d73947bf2b3ae9870b (diff)
downloadfetchmail-11a63571bc2ac5790d6e349d742d87b48a781e41.tar.gz
fetchmail-11a63571bc2ac5790d6e349d742d87b48a781e41.tar.bz2
fetchmail-11a63571bc2ac5790d6e349d742d87b48a781e41.zip
Cancel SASL AUTH properly on GSSAPI errors.
-rw-r--r--gssapi.c4
-rw-r--r--imap.c1
2 files changed, 2 insertions, 3 deletions
diff --git a/gssapi.c b/gssapi.c
index 65582e52..67231505 100644
--- a/gssapi.c
+++ b/gssapi.c
@@ -179,9 +179,9 @@ int do_gssauth(int sock, const char *command, const char *service,
decode_status("gss_init_sec_context", maj_stat, min_stat);
(void)gss_release_name(&min_stat, &target_name);
- /* wake up server and await NO response */
+ /* wake up server and cancel authentication */
suppress_tags = TRUE;
- gen_send(sock, "");
+ gen_send(sock, "*");
suppress_tags = FALSE;
result = gen_recv(sock, buf1, sizeof buf1);
diff --git a/imap.c b/imap.c
index e22fea40..4738361d 100644
--- a/imap.c
+++ b/imap.c
@@ -574,7 +574,6 @@ static int imap_getauth(int sock, struct query *ctl, char *greeting)
ctl->server.truename, ctl->remotename)))
{
/* SASL cancellation of authentication */
- gen_send(sock, "*");
if (ctl->server.authenticate != A_ANY)
return ok;
} else {