summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2020-07-03 12:07:54 -0600
committerEduardo Chappa <chappa@washington.edu>2020-07-03 12:07:54 -0600
commitf720e89f631da58c355ead60b35225e43d0d9d33 (patch)
tree5b715785837e912a0c784bbfe78f394db5e5454a
parentf6a3f80237f4b565e97aa72130444d8262c723b8 (diff)
downloadalpine-f720e89f631da58c355ead60b35225e43d0d9d33.tar.xz
* When Alpine is built without smime, password file functionality
might fail. Reported by Andres Fehr.
-rw-r--r--alpine/imap.c17
-rw-r--r--pith/pine.hlp5
2 files changed, 12 insertions, 10 deletions
diff --git a/alpine/imap.c b/alpine/imap.c
index bd15b26..e9e1600 100644
--- a/alpine/imap.c
+++ b/alpine/imap.c
@@ -3192,6 +3192,7 @@ read_passfile(pinerc, l)
int i, j, n, rv = 0;
size_t len;
char *tmptext = NULL;
+ struct stat sbuf;
#ifdef SMIME
char tmp2[MAILTMPLEN];
char *text = NULL, *text2 = NULL;
@@ -3210,7 +3211,13 @@ read_passfile(pinerc, l)
return(using_passfile);
};
-#ifdef SMIME
+#ifndef SMIME
+ if(our_stat(tmp, &sbuf) == 0)
+ len = sbuf.st_size;
+ else
+ len = 0;
+ fp = our_fopen(tmp, "rb"); /* reopen to read data */
+#else
/* the next call initializes the key/certificate pair used to
* encrypt and decrypt a password file. The details of how this is
* done is in the file pith/smime.c. During this setup we might call
@@ -3295,14 +3302,6 @@ read_passfile(pinerc, l)
default: break;
}
}
- else{
- struct stat sbuf;
- if(our_stat(tmp, &sbuf) == 0)
- len = sbuf.st_size;
- else
- len = 0;
- fp = our_fopen(tmp, "rb"); /* reopen to read data */
- }
#endif /* SMIME */
if(using_passfile == 0){
diff --git a/pith/pine.hlp b/pith/pine.hlp
index c5f4257..08f02ce 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 479 2020-07-03 02:14:30
+Alpine Commit 480 2020-07-03 11:34:14
============= h_news =================
<HTML>
<HEAD>
@@ -252,6 +252,9 @@ Bugs addressed:
<LI> URLs that are surrounded by white space are not cleaned by Alpine before
passing them to the browser, resulting in no display of the URL when Alpine
tries to open it. Reported by Gregory Heytings.
+
+<LI> When Alpine is built without smime, password file functionality might
+ fail. Reported by Andres Fehr.
</UL>
<P>