<<< Date Index >>>     <<< Thread Index >>>

Re: Patch for freebsd mail/mutt port



Hi,

Can a patch similar to the one attached be committed to the main mutt
source? (See email trail below)


On 09-Feb-2004 Udo Schweigert wrote:
| On Sun, Feb 08, 2004 at 23:53:16 -0500, Mike Heffner wrote:
|> I admin a server that has several users who use mutt on a regular
|> basis.
|> When the server has been up for quite awhile and PID's wrap, there are
|> occasionally problems with conflicting mutt tempfiles which require me
|> going in as root and clearing out /tmp. The attached patch uses
|> mktemp()
|> to build the temp file names so there will hopefully be no conflicts.
|> Can
|> you look into adding the patch to the freebsd port?
|> 
|> Thanks,
|> 
| 
| Mike,
| 
| thanks for that, that was really helpful. I submitted a patch which
| should
| showup as PORTREVISION=6 in the ports tree. I think it will also be
| useful if
| you submit that to the mutt source maintainers, or should I do that?
| 
| 
| Best regards
| 
| --
| Udo Schweigert, Siemens AG   | Voice      : +49 89 636 42170
| CT IC CERT, Siemens CERT     | Fax        : +49 89 636 41166
| D-81730 Muenchen / Germany   | email      : udo.schweigert@xxxxxxxxxxx
| 
| 


Mike

-- 
  Mike Heffner       <mheffner@[acm.]vt.edu>
                         <mikeh@xxxxxxxxxxx>

--- muttlib.c.orig      Sun Feb  8 23:38:38 2004
+++ muttlib.c   Sun Feb  8 23:39:00 2004
@@ -656,7 +656,8 @@
 
 void mutt_mktemp (char *s)
 {
-  snprintf (s, _POSIX_PATH_MAX, "%s/mutt-%s-%d-%d", NONULL (Tempdir), NONULL(Ho
stname), (int) getpid (), Counter++);
+  snprintf (s, _POSIX_PATH_MAX, "%s/mutt-%s-XXXXXXXX", NONULL (Tempdir), NONULL
(Hostname));
+  mktemp (s);
   unlink (s);
 }