summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2019-05-04 12:41:11 -0600
committerEduardo Chappa <chappa@washington.edu>2019-05-04 12:41:11 -0600
commitc024a78dbaa9b42db7f18b0fea1894c41e2b0d67 (patch)
tree441e7308e4577ac8766c44edda682704aa432262 /web
parent19cde66486e27063a9af8cfd79c6eb7f106b9111 (diff)
downloadalpine-c024a78dbaa9b42db7f18b0fea1894c41e2b0d67.tar.xz
* Initial release of XOAUTH2 authentication support in Alpine for
Gmail.
Diffstat (limited to 'web')
-rw-r--r--web/src/alpined.d/imap.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/web/src/alpined.d/imap.c b/web/src/alpined.d/imap.c
index d9512e86..a57e769d 100644
--- a/web/src/alpined.d/imap.c
+++ b/web/src/alpined.d/imap.c
@@ -235,7 +235,11 @@ mm_notify(MAILSTREAM *stream, char *string, long errflag)
3, 6, ps_global->last_error);
}
+void
+mm_login_method_work (NETMBX *mb,char *user,void *login,long trial, char *method, char *usethisprompt, char *altuserforcache)
+{
+}
/*----------------------------------------------------------------------
Do work of getting login and password from user for IMAP login
@@ -248,11 +252,12 @@ mm_notify(MAILSTREAM *stream, char *string, long errflag)
Result: username and password passed back to imap
----*/
void
-mm_login_work(NETMBX *mb, char *user, char *pwd, long trial, char *usethisprompt, char *altuserforcache)
+mm_login_work(NETMBX *mb, char *user, char **passwd, long trial, char *usethisprompt, char *altuserforcache)
{
STRLIST_S hostlist[2];
NETMBX cmb;
int l;
+ char *pwd = *passwd;
pwd[0] = '\0';
@@ -262,6 +267,7 @@ mm_login_work(NETMBX *mb, char *user, char *pwd, long trial, char *usethisprompt
if(trial){ /* one shot only! */
user[0] = '\0';
peCredentialError = 1;
+ *passwd = pwd;
return;
}
@@ -276,6 +282,7 @@ mm_login_work(NETMBX *mb, char *user, char *pwd, long trial, char *usethisprompt
else
user[0] = pwd[0] = '\0';
+ *passwd = pwd;
return;
}
#endif
@@ -284,6 +291,7 @@ mm_login_work(NETMBX *mb, char *user, char *pwd, long trial, char *usethisprompt
/* we *require* secure authentication */
if(!(mb->sslflag || mb->tlsflag) && strcmp("localhost",mb->host)){
user[0] = pwd[0] = '\0';
+ *passwd = pwd;
return;
}
#endif
@@ -307,6 +315,7 @@ mm_login_work(NETMBX *mb, char *user, char *pwd, long trial, char *usethisprompt
* don't blindly offer user/pass
*/
user[0] = pwd[0] = '\0';
+ *passwd = pwd;
return;
}
@@ -323,9 +332,10 @@ mm_login_work(NETMBX *mb, char *user, char *pwd, long trial, char *usethisprompt
hostlist[0].next = NULL;
/* try last working password associated with this host. */
- if(!imap_get_passwd(mm_login_list, pwd, user, hostlist, (mb->sslflag || mb->tlsflag))){
+ if(!imap_get_passwd(mm_login_list, passwd, user, hostlist, (mb->sslflag || mb->tlsflag))){
peNoPassword = 1;
user[0] = pwd[0] = '\0';
+ *passwd = pwd;
}
}