summaryrefslogtreecommitdiff
path: root/pith/smime.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2015-09-05 14:35:41 -0600
committerEduardo Chappa <chappa@washington.edu>2015-09-05 14:35:41 -0600
commita433ae52981e7eb9dc5a90a3afc25f53bc782032 (patch)
tree4ca510a72a931563caaad74ebb1fa4d0ef4c2270 /pith/smime.c
parent68647b2a05590f509f3b50c0605151ff537eefdd (diff)
downloadalpine-a433ae52981e7eb9dc5a90a3afc25f53bc782032.tar.xz
* S/MIME: fix a bug that did not allow users to transfer certificates to
remote containers. Reported by Matthias Rieber.
Diffstat (limited to 'pith/smime.c')
-rw-r--r--pith/smime.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/pith/smime.c b/pith/smime.c
index e4829dd2..40e8d671 100644
--- a/pith/smime.c
+++ b/pith/smime.c
@@ -1643,18 +1643,17 @@ copy_dir_to_container(WhichCerts which, char *contents)
ret = -1;
}
else ret = -1;
-
- if(!ret){
- if(rename_file(tempfile, fpath) < 0){
- q_status_message2(SM_ORDER, 3, 3,
- _("Can't rename %s to %s"), tempfile, fpath);
- ret = -1;
- } else q_status_message1(SM_ORDER, 3, 3,
- _("saved container to %s"), fpath);
- }
- /* if the container is remote, copy it */
- if(!ret && IS_REMOTE(configpath)){
+ if(!ret){
+ if(!IS_REMOTE(configpath)){
+ if(rename_file(tempfile, fpath) < 0){
+ q_status_message2(SM_ORDER, 3, 3,
+ _("Can't rename %s to %s"), tempfile, fpath);
+ ret = -1;
+ } else q_status_message1(SM_ORDER, 3, 3,
+ _("saved container to %s"), fpath);
+ }
+ else { /* if the container is remote, copy it */
int e;
char datebuf[200];
@@ -1687,8 +1686,9 @@ copy_dir_to_container(WhichCerts which, char *contents)
}
rd_close_remdata(&rd);
- }
- }
+ } /* else */
+ } /* if(!ret) */
+ } /* if(!ret) */
}
if(tempfile)