diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1998-09-06 10:05:41 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1998-09-06 10:05:41 +0000 |
commit | 90b1730bf76a468f9a9ad10078650bb01c63d9cd (patch) | |
tree | 71aea34d571b450a6f52c74164879a9757401bdb /attach.c | |
parent | db280634a64dddee807065a6c8fc841dcfae5ff7 (diff) |
[patch-0.94.5i.tlr.safe_symlink.1] Introduce
safe_symlink() for /tmp-safe symlinking in the
nametemplate code.
Diffstat (limited to 'attach.c')
-rw-r--r-- | attach.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -106,7 +106,7 @@ int mutt_compose_attachment (BODY *a) { dprint(1, (debugfile, "oldfile: %s\t newfile: %s\n", a->filename, newfile)); - if (symlink (a->filename, newfile) == -1) + if (safe_symlink (a->filename, newfile) == -1) { if (!mutt_yesorno ("Can't match nametemplate, continue?", 1)) goto bailout; @@ -228,7 +228,7 @@ int mutt_edit_attachment (BODY *a) { dprint(1, (debugfile, "oldfile: %s\t newfile: %s\n", a->filename, newfile)); - if (symlink (a->filename, newfile) == -1) + if (safe_symlink (a->filename, newfile) == -1) { if (!mutt_yesorno ("Can't match nametemplate, continue?", 1)) goto bailout; @@ -360,7 +360,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag) if (fp == NULL) { /* send case: the file is already there */ - if (symlink (a->filename, tempfile) == -1) + if (safe_symlink (a->filename, tempfile) == -1) { if (mutt_yesorno ("Can't match nametemplate, continue?", 1) == M_YES) strfcpy (tempfile, a->filename, sizeof (tempfile)); @@ -807,7 +807,7 @@ int mutt_print_attachment (FILE *fp, BODY *a) { if (!fp) { - if (symlink(a->filename, newfile) == -1) + if (safe_symlink(a->filename, newfile) == -1) { if (mutt_yesorno ("Can't match nametemplate, continue?", 1) != M_YES) { |