From c024a78dbaa9b42db7f18b0fea1894c41e2b0d67 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sat, 4 May 2019 12:41:11 -0600 Subject: * Initial release of XOAUTH2 authentication support in Alpine for Gmail. --- imap/src/ipopd/ipop2d.c | 11 ++++++++--- imap/src/ipopd/ipop3d.c | 12 ++++++++---- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'imap/src/ipopd') diff --git a/imap/src/ipopd/ipop2d.c b/imap/src/ipopd/ipop2d.c index 58d4d2d5..48844b3c 100644 --- a/imap/src/ipopd/ipop2d.c +++ b/imap/src/ipopd/ipop2d.c @@ -646,12 +646,17 @@ void mm_dlog (char *string) * trial count */ -void mm_login (NETMBX *mb,char *username,char *password,long trial) +void mm_login (NETMBX *mb,char *username,char **password,long trial) { /* set user name */ strncpy (username,*mb->user ? mb->user : user,NETMAXUSER-1); - strncpy (password,pass,255); /* and password */ - username[NETMAXUSER] = password[255] = '\0'; + *password = cpystr(pass); /* and password */ + username[NETMAXUSER] = (*password)[255] = '\0'; +} + +void mm_login_method (NETMBX *mb,char *username,void *password,long trial, char *method) +{ + password = NULL; } /* About to enter critical code diff --git a/imap/src/ipopd/ipop3d.c b/imap/src/ipopd/ipop3d.c index 9cb8bffc..2be17afb 100644 --- a/imap/src/ipopd/ipop3d.c +++ b/imap/src/ipopd/ipop3d.c @@ -1013,18 +1013,22 @@ void mm_dlog (char *string) * trial count */ -void mm_login (NETMBX *mb,char *username,char *password,long trial) +void mm_login (NETMBX *mb,char *username,char **password,long trial) { /* set user name */ strncpy (username,*mb->user ? mb->user : user,NETMAXUSER-1); if (pass) { - strncpy (password,pass,255);/* and password */ + *password = cpystr(pass);/* and password */ + (*password)[255] = '\0'; fs_give ((void **) &pass); } - else memset (password,0,256); /* no password to send, abort login */ - username[NETMAXUSER] = password[255] = '\0'; + username[NETMAXUSER] = '\0'; } +void mm_login_method (NETMBX *mb,char *username,void *password,long trial, char *method) +{ + password = NULL; +} /* About to enter critical code * Accepts: stream */ -- cgit v1.2.3-70-g09d2