summaryrefslogtreecommitdiff
path: root/imap/src/c-client/mail.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2021-09-09 21:01:09 -0600
committerEduardo Chappa <chappa@washington.edu>2021-09-09 21:01:09 -0600
commit7feb75607413687c38c51197a73611cb30d39127 (patch)
treed8da4994dcd377360494775f5c1a666a30676e47 /imap/src/c-client/mail.c
parent68ac2c9a0ed6d3b0aa1f14c1b5efc9a44e9d871f (diff)
downloadalpine-7feb75607413687c38c51197a73611cb30d39127.tar.xz
* Alpine will delete passwords that do not work from internal memory
and the local password cache (password file or system local cache.)
Diffstat (limited to 'imap/src/c-client/mail.c')
-rw-r--r--imap/src/c-client/mail.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/imap/src/c-client/mail.c b/imap/src/c-client/mail.c
index 730201c2..471269c0 100644
--- a/imap/src/c-client/mail.c
+++ b/imap/src/c-client/mail.c
@@ -58,6 +58,8 @@ static mailcache_t mailcache = mm_cache;
static rfc822out_t mail822out = NIL;
/* RFC-822 output generator (new style) */
static rfc822outfull_t mail822outfull = NIL;
+ /* Erase password (client side) */
+static deletepwd_t erase_password = NIL;
/* SMTP verbose callback */
static smtpverbose_t mailsmtpverbose = mm_dlog;
/* proxy copy routine */
@@ -581,6 +583,11 @@ void *mail_parameters (MAILSTREAM *stream,long function,void *value)
case GET_SENDCOMMAND:
ret = (void *) mailsendcommand;
break;
+ case SET_ERASEPASSWORD:
+ erase_password = (deletepwd_t) value;
+ case GET_ERASEPASSWORD:
+ ret = (void *) erase_password;
+ break;
case SET_SERVICENAME:
servicename = (char *) value;
@@ -6242,7 +6249,12 @@ unsigned int mail_lookup_auth_name (char *mechanism,long flags)
return i;
return 0;
}
-
+/* Client side callback warning to delete wrong password */
+void delete_password(NETMBX *mb, char *user)
+{
+ deletepwd_t ep = mail_parameters(NULL, GET_ERASEPASSWORD, NULL);
+ if (ep) (ep)(mb, user);
+}
/* Standard TCP/IP network driver */
static NETDRIVER tcpdriver = {