Skip Menu |

This queue is for tickets about the HTTP-Server-Simple-Mason CPAN distribution.

Report information
The Basics
Id: 30113
Status: resolved
Priority: 0/
Queue: HTTP-Server-Simple-Mason

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

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



Subject: Cleaning up /tmp directory; predictable tmp filenames
Running 'make test' created the three directories for me with an index.html in each of them: drwxrwxr-x 2 sand sand 4096 Oct 19 03:10 mason-pages-31259/ drwxrwxr-x 2 sand sand 4096 Oct 19 03:10 mason-pages-31337/ drwxrwxr-x 2 sand sand 4096 Oct 19 03:10 mason-pages-31389/ Please do not use predictable filenames in /tmp, they have security implications if people run the tests as root, use File::Temp instead where possible (side effect: you get the CLEANUP=>1 option for free ;) Thanks,
Subject: Re: [rt.cpan.org #30113] Cleaning up /tmp directory; predictable tmp filenames
Date: Fri, 19 Oct 2007 12:39:25 +0100
To: bug-HTTP-Server-Simple-Mason [...] rt.cpan.org
From: Jesse Vincent <jesse [...] fsck.com>
Fixed in 0.10. thanks. On Oct 19, 2007, at 2:17 AM, Andreas Koenig via RT wrote: Show quoted text
> > Thu Oct 18 21:17:26 2007: Request 30113 was acted upon. > Transaction: Ticket created by ANDK > Queue: HTTP-Server-Simple-Mason > Subject: Cleaning up /tmp directory; predictable tmp filenames > Broken in: 0.09 > Severity: Normal > Owner: Nobody > Requestors: ANDK@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=30113 > > > > Running 'make test' created the three directories for me with an > index.html in each of them: > > drwxrwxr-x 2 sand sand 4096 Oct 19 03:10 mason-pages-31259/ > drwxrwxr-x 2 sand sand 4096 Oct 19 03:10 mason-pages-31337/ > drwxrwxr-x 2 sand sand 4096 Oct 19 03:10 mason-pages-31389/ > > Please do not use predictable filenames in /tmp, they have security > implications if people run the tests as root, use File::Temp instead > where possible (side effect: you get the CLEANUP=>1 option for free ;) > > Thanks, >
Download PGP.sig
application/pgp-signature 186b

Message body not shown because it is not plain text.

Is it possible that this ticket was closed erroneously? I just found again three fresh subdirectories in /tmp/ after the test: drwxr-xr-x 2 sand sand 4096 2008-11-30 19:37:46 mason-pages-18078/ drwxr-xr-x 2 sand sand 4096 2008-11-30 19:37:48 mason-pages-18086/ drwxr-xr-x 2 sand sand 4096 2008-11-30 19:37:49 mason-pages-18091/ I've re-opened. Thanks,
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #30113] Cleaning up /tmp directory; predictable tmp filenames
Date: Mon, 1 Dec 2008 09:50:23 -0500
To: Andreas Koenig via RT <bug-HTTP-Server-Simple-Mason [...] rt.cpan.org>
From: Jesse Vincent <jesse [...] fsck.com>
On Sun 30.Nov'08 at 13:41:02 -0500, Andreas Koenig via RT wrote: Show quoted text
> Queue: HTTP-Server-Simple-Mason > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=30113 > > > Is it possible that this ticket was closed erroneously? I just found > again three fresh subdirectories in /tmp/ after the test: > > drwxr-xr-x 2 sand sand 4096 2008-11-30 19:37:46 mason-pages-18078/ > drwxr-xr-x 2 sand sand 4096 2008-11-30 19:37:48 mason-pages-18086/ > drwxr-xr-x 2 sand sand 4096 2008-11-30 19:37:49 mason-pages-18091/ > > I've re-opened.
Thank you. I believe 0.11 resolves this, but I'm going to leave it open until we get confirmation :) Show quoted text
> > Thanks, >
--
Download (untitled)
application/pgp-signature 194b

Message body not shown because it is not plain text.

Subject: Cleaning up /tmp/ directory
Thank you! Now the temp directory names are not predictable anymore. I'll change the subject line: the three directories are not removed at the end of the test. The three tests t/0[145]* each creat one remaining directory in /tmp/.
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #30113] Cleaning up /tmp/ directory
Date: Mon, 1 Dec 2008 22:49:24 -0500
To: Andreas Koenig via RT <bug-HTTP-Server-Simple-Mason [...] rt.cpan.org>
From: Jesse Vincent <jesse [...] fsck.com>
Show quoted text
> the end of the test. The three tests t/0[145]* each creat one remaining > directory in /tmp/.
I'm confused: 31b:HTTP-Server-Simple-Mason jesse$ ack tempdir t/01live.t 29:use File::Temp qw/tempdir/; 31: my $root = tempdir( CLEANUP => 1 ); t/04unhandlederrors.t 28:use File::Temp qw/tempdir/; 31: my $root = tempdir( CLEANUP => 1 ); t/05handlederrors.t 28:use File::Temp qw/tempdir/; 31: my $root = tempdir(CLEANUP => 1); 31b:HTTP-Server-Simple-Mason jesse$ ack mkdir <nothing> --
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #30113] Cleaning up /tmp/ directory
Date: Tue, 02 Dec 2008 05:46:18 +0100
To: bug-HTTP-Server-Simple-Mason [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Mon, 01 Dec 2008 22:49:30 -0500, "Jesse via RT" <bug-HTTP-Server-Simple-Mason@rt.cpan.org> said:
Show quoted text
> I'm confused:
Show quoted text
> 31b:HTTP-Server-Simple-Mason jesse$ ack tempdir > t/01live.t > 29:use File::Temp qw/tempdir/; > 31: my $root = tempdir( CLEANUP => 1 );
Show quoted text
> t/04unhandlederrors.t > 28:use File::Temp qw/tempdir/; > 31: my $root = tempdir( CLEANUP => 1 );
Show quoted text
> t/05handlederrors.t > 28:use File::Temp qw/tempdir/; > 31: my $root = tempdir(CLEANUP => 1);
% grep kill t/0[145]* t/01live.t:is(kill(9,$pid),1,'Signaled 1 process successfully'); t/04unhandlederrors.t:is(kill(9,$pid),1,'Signaled 1 process successfully'); t/05handlederrors.t:is(kill(9,$pid),1,'Signaled 1 process successfully'); I could imagine these processes have no chance to cleanup. "Beware, I have only proved my program to be correct, I have never tried to run it" -- andreas
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #30113] Cleaning up /tmp/ directory
Date: Mon, 1 Dec 2008 23:49:36 -0500
To: "(Andreas J. Koenig) via RT" <bug-HTTP-Server-Simple-Mason [...] rt.cpan.org>
From: Jesse Vincent <jesse [...] fsck.com>
On Mon 1.Dec'08 at 23:46:41 -0500, (Andreas J. Koenig) via RT wrote: Show quoted text
> Queue: HTTP-Server-Simple-Mason > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=30113 > >
> >>>>> On Mon, 01 Dec 2008 22:49:30 -0500, "Jesse via RT" <bug-HTTP-Server-Simple-Mason@rt.cpan.org> said:
>
> > I'm confused:
>
> > 31b:HTTP-Server-Simple-Mason jesse$ ack tempdir > > t/01live.t > > 29:use File::Temp qw/tempdir/; > > 31: my $root = tempdir( CLEANUP => 1 );
>
> > t/04unhandlederrors.t > > 28:use File::Temp qw/tempdir/; > > 31: my $root = tempdir( CLEANUP => 1 );
>
> > t/05handlederrors.t > > 28:use File::Temp qw/tempdir/; > > 31: my $root = tempdir(CLEANUP => 1);
> > % grep kill t/0[145]* > t/01live.t:is(kill(9,$pid),1,'Signaled 1 process successfully'); > t/04unhandlederrors.t:is(kill(9,$pid),1,'Signaled 1 process successfully'); > t/05handlederrors.t:is(kill(9,$pid),1,'Signaled 1 process successfully'); > > I could imagine these processes have no chance to cleanup. > > "Beware, I have only proved my program to be correct, I have never > tried to run it" >
But, but, but I did test it and it cleaned up on me. *sigh* Thank you for pointing out my obvious failure. At least I didn't close the ticket. Show quoted text
> > > > -- > andreas >
--
Download (untitled)
application/pgp-signature 194b

Message body not shown because it is not plain text.

Hello, I've fixed this in the repository. On Mon Dec 01 23:46:39 2008, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote: Show quoted text
> >>>>> On Mon, 01 Dec 2008 22:49:30 -0500, "Jesse via RT" <bug-HTTP-
> Server-Simple-Mason@rt.cpan.org> said: >
> > I'm confused:
>
> > 31b:HTTP-Server-Simple-Mason jesse$ ack tempdir > > t/01live.t > > 29:use File::Temp qw/tempdir/; > > 31: my $root = tempdir( CLEANUP => 1 );
>
> > t/04unhandlederrors.t > > 28:use File::Temp qw/tempdir/; > > 31: my $root = tempdir( CLEANUP => 1 );
>
> > t/05handlederrors.t > > 28:use File::Temp qw/tempdir/; > > 31: my $root = tempdir(CLEANUP => 1);
> > % grep kill t/0[145]* > t/01live.t:is(kill(9,$pid),1,'Signaled 1 process successfully'); > t/04unhandlederrors.t:is(kill(9,$pid),1,'Signaled 1 process > successfully'); > t/05handlederrors.t:is(kill(9,$pid),1,'Signaled 1 process > successfully'); > > I could imagine these processes have no chance to cleanup. > > "Beware, I have only proved my program to be correct, I have never > tried to run it" > > > >
-- Best regards, Ruslan.