summaryrefslogtreecommitdiffstats
path: root/attach.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-09-06 10:05:41 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-09-06 10:05:41 +0000
commit90b1730bf76a468f9a9ad10078650bb01c63d9cd (patch)
tree71aea34d571b450a6f52c74164879a9757401bdb /attach.c
parentdb280634a64dddee807065a6c8fc841dcfae5ff7 (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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/attach.c b/attach.c
index 5492d61a..e9ee861f 100644
--- a/attach.c
+++ b/attach.c
@@ -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)
{