Skip Menu |

This queue is for tickets about the Mail-Box CPAN distribution.

Report information
The Basics
Id: 35747
Status: resolved
Priority: 0/
Queue: Mail-Box

People
Owner: Nobody in particular
Requestors: rjmx [...] rjmx.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.081
Fixed in: (no value)



Subject: tmpnam broken under Windows
Mail::Message creates a temporary filename for building a message (possibly only under some circumstances), and currently uses tmpnam() for that purpose (see lib/Mail/Message/Body/File.pm). Unfortunately, tmpnam() is broken under Windows. It tries to create the file in the root of the current drive, a place for which the user may not (and, in fact, probably should not) have write permission. Under WinXP, for example, it seems to come up with filenames like '\s4e8.'. See Microsoft's tmpnam() documentation at http://msdn.microsoft.com/en-us/library/hs3e7355.aspx, but it's only going to confuse you. I also note that the perl tmpnam docs say: "For security reasons, which are probably detailed in your system's documentation for the C library tmpnam() function, this interface should not be used; instead see File::Temp." (http://perldoc.perl.org/POSIX.html). File::Temp seems to work fine; can you consider switching to that? (I could probably produce a patch if you think it would help). Result of 'perl -v': This is perl, v5.8.8 built for MSWin32-x86-multi-thread (with 18 registered patches, see perl -V for more detail) Copyright 1987-2007, Larry Wall Binary build 822 [280952] provided by ActiveState http://www.ActiveState.com Built Jul 31 2007 19:34:48
Subject: Re: [rt.cpan.org #35747] tmpnam broken under Windows
Date: Fri, 9 May 2008 16:19:04 +0200
To: Ron Murray via RT <bug-Mail-Box [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
* Ron Murray via RT (bug-Mail-Box@rt.cpan.org) [080509 14:09]: Show quoted text
> Fri May 09 10:08:37 2008: Request 35747 was acted upon. > Transaction: Ticket created by rjmx > Queue: Mail-Box > Subject: tmpnam broken under Windows
ok. Will be changed in 0.83 -- Thanks for the well documented report, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
2.083 will be released today. It will resolve your problem