diff options
author | Eduardo Chappa <chappa@washington.edu> | 2021-09-09 21:01:09 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2021-09-09 21:01:09 -0600 |
commit | 7feb75607413687c38c51197a73611cb30d39127 (patch) | |
tree | d8da4994dcd377360494775f5c1a666a30676e47 /imap/src/c-client/mail.c | |
parent | 68ac2c9a0ed6d3b0aa1f14c1b5efc9a44e9d871f (diff) | |
download | alpine-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.c | 14 |
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 = { |