Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37913565
en ru br
ALT Linux repositórios
S:2.1.1.0.3.g6c0f75cca-alt1
5.0: 1.4.2.3-alt3
4.1: 1.4.2.3-alt1
4.0: 1.4.2.3-alt1
3.0: 1.4.2.1i-alt4

Group :: Rede/E-Mail
RPM: mutt

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: mutt-1.4-alt-tmp.patch
Download


diff -uprk.orig mutt-1.4.orig/compress.c mutt-1.4/compress.c
--- mutt-1.4.orig/compress.c	2003-01-24 13:28:22 +0300
+++ mutt-1.4/compress.c	2003-01-24 15:09:30 +0300
@@ -129,12 +129,21 @@ static COMPRESS_INFO *set_compress_info 
 static void set_path (CONTEXT* ctx)
 {
   char tmppath[_POSIX_PATH_MAX];
+  FILE *fp;
+
+  /* XXX: Create the temporary file and reopen it w/out O_EXCL, this method
+   * has it's problems: see Zalewski's paper about tmp cleaners, but
+   * we call compressor with the filename ... */
+  if ((fp = mutt_mktempfile (tmppath, sizeof (tmppath), "w")) == NULL)
+  {
+    mutt_perror ("could not create temporary folder");
+    return;
+  }
+  fclose (fp);
+  fp = NULL;
 
   /* Setup the right paths */
   ctx->realpath = ctx->path;
-
-  /* Uncompress to /tmp */
-  mutt_mktemp (tmppath);
   ctx->path = safe_malloc (strlen (tmppath) + 1);
   strcpy (ctx->path, tmppath);
 }
diff -uprk.orig mutt-1.4.orig/nntp.c mutt-1.4/nntp.c
--- mutt-1.4.orig/nntp.c	2003-01-24 13:28:22 +0300
+++ mutt-1.4/nntp.c	2003-01-24 15:12:53 +0300
@@ -403,9 +403,11 @@ static int nntp_read_header (CONTEXT *ct
   int ret;
   HEADER *h = ctx->hdrs[ctx->msgcount];
 
-  mutt_mktemp (tempfile);
-  if (!(f = safe_fopen (tempfile, "w+")))
+  if (!(f = mutt_mktempfile (tempfile, sizeof (tempfile), "w+")))
+  {
+    mutt_perror ("mutt_mktempfile");
     return -1;
+  }
 
   if (!msgid)
     snprintf (buf, sizeof (buf), "HEAD %d\r\n", article_num);
@@ -893,13 +895,12 @@ int nntp_fetch_message (MESSAGE *msg, CO
   mutt_message (m);
 
   cache->index = ctx->hdrs[msgno]->index;
-  mutt_mktemp (path);
-  cache->path = safe_strdup (path);
-  if (!(msg->fp = safe_fopen (path, "w+")))
+  if (!(msg->fp = mutt_mktempfile (path, sizeof (path), "w+")))
   {
-    FREE (&cache->path);
+    mutt_perror ("mutt_mktempfile");
     return -1;
   }
+  cache->path = safe_strdup (path);
 
   if (ctx->hdrs[msgno]->article_num == 0)
     snprintf (buf, sizeof (buf), "ARTICLE %s\r\n",
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009