summaryrefslogtreecommitdiff
path: root/alpine/imap.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2013-05-31 17:16:44 -0600
committerEduardo Chappa <chappa@washington.edu>2013-05-31 17:16:44 -0600
commita46157ba61f2c65f88b42abb31db60c4a714f87b (patch)
treee37bc41ad2f57b3fd2bad310576cc155a58ca6b7 /alpine/imap.c
parent81e994d7907f850506ddc248f84761a54995e58c (diff)
downloadalpine-a46157ba61f2c65f88b42abb31db60c4a714f87b.tar.xz
* somehow all.patch got here. Reversing.
Diffstat (limited to 'alpine/imap.c')
-rw-r--r--alpine/imap.c79
1 files changed, 0 insertions, 79 deletions
diff --git a/alpine/imap.c b/alpine/imap.c
index e43d3e2e..074b9f6d 100644
--- a/alpine/imap.c
+++ b/alpine/imap.c
@@ -2040,83 +2040,6 @@ passfile_name(char *pinerc, char *path, size_t len)
#endif /* PASSFILE */
-void
-pine_delete_pwd(NETMBX *mb, char *user)
-{
- char hostlist0[MAILTMPLEN], hostlist1[MAILTMPLEN];
- char port[20], non_def_port[20], insecure[20];
- STRLIST_S hostlist[2];
- MMLOGIN_S *l;
- struct servent *sv;
-
-
- dprint((9, "pine_delete_pwd\n"));
-
- /* do not invalidate password on cancel */
- if(ps_global->user_says_cancel != 0)
- return;
-
- /* setup hostlist */
- non_def_port[0] = '\0';
- if(mb->port && mb->service &&
- (sv = getservbyname(mb->service, "tcp")) &&
- (mb->port != ntohs(sv->s_port))){
- snprintf(non_def_port, sizeof(non_def_port), ":%lu", mb->port);
- non_def_port[sizeof(non_def_port)-1] = '\0';
- dprint((9, "mm_login: using non-default port=%s\n",
- non_def_port ? non_def_port : "?"));
- }
-
- if(*non_def_port){
- strncpy(hostlist0, mb->host, sizeof(hostlist0)-1);
- hostlist0[sizeof(hostlist0)-1] = '\0';
- strncat(hostlist0, non_def_port, sizeof(hostlist0)-strlen(hostlist0)-1);
- hostlist0[sizeof(hostlist0)-1] = '\0';
- hostlist[0].name = hostlist0;
- if(mb->orighost && mb->orighost[0] && strucmp(mb->host, mb->orighost)){
- strncpy(hostlist1, mb->orighost, sizeof(hostlist1)-1);
- hostlist1[sizeof(hostlist1)-1] = '\0';
- strncat(hostlist1, non_def_port, sizeof(hostlist1)-strlen(hostlist1)-1);
- hostlist1[sizeof(hostlist1)-1] = '\0';
- hostlist[0].next = &hostlist[1];
- hostlist[1].name = hostlist1;
- hostlist[1].next = NULL;
- }
- else
- hostlist[0].next = NULL;
- }
- else{
- hostlist[0].name = mb->host;
- if(mb->orighost && mb->orighost[0] && strucmp(mb->host, mb->orighost)){
- hostlist[0].next = &hostlist[1];
- hostlist[1].name = mb->orighost;
- hostlist[1].next = NULL;
- }
- else
- hostlist[0].next = NULL;
- }
-
- /* delete it from all lists */
-
- for(l = mm_login_list; l; l = l->next)
- if(imap_same_host(l->hosts, hostlist)
- && !strcmp(l->user, user ? user : "")
- && l->passwd){
- l->invalidpwd = 1;
- break;
- }
-
-#ifdef LOCAL_PASSWD_CACHE
- for(l = passfile_cache; l; l = l->next)
- if(imap_same_host(l->hosts, hostlist)
- && !strcmp(l->user, user ? user : "")
- && l->passwd){
- l->invalidpwd = 1;
- break;
- }
- write_passfile(ps_global->pinerc, passfile_cache); /* blast it from passfile */
-#endif
-}
#ifdef LOCAL_PASSWD_CACHE
@@ -2679,8 +2602,6 @@ write_passfile(pinerc, l)
#endif /* SMIME */
for(n = 0; l; l = l->next, n++){
- if(l->invalidpwd == 1) /* if password is invalid, do not save it */
- continue;
/*** do any necessary ENcryption here ***/
snprintf(tmp, sizeof(tmp), "%s\t%s\t%s\t%d%s%s\n", l->passwd, l->user,
l->hosts->name, l->altflag,