Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 67854
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: Nobody in particular
Requestors: ping.liang [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Test t/tmpdir.t fails at the 3rd test...
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 407
Download (untitled) / with headers
text/plain 407b
When using CPAN to install CGI under user root in Fedora, test t/tmpdir.t fails at the 3rd test, where CGITempFile->new is supposed to skip the directory that is not writeable. The problem is user root can always write to the $test_dir, even after chmod 0500. In other words, if ( -w $CGITempFile::TMPDIRECTORY ) { # root always comes here. } This code never has problem when the user is not root.
From mark [...] summersault.com Thu May 5 16: 12:54 2011
MIME-Version: 1.0
X-Spam-Status: No, score=-6.864 tagged_above=-99.9 required=10 tests=[AWL=-0.629, BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_SOFTFAIL=0.665] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-18809-1304124911-1130.67854-4-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-67854 [...] rt.cpan.org> <rt-3.8.HEAD-18809-1304124911-1130.67854-4-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <4DC304BE.7090805 [...] summersault.com>
Content-Type: text/plain; charset=UTF-8
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.864
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 205F6241A2B for <cpan-bug+CGI.pm [...] hipster.bestpractical.com>; Thu, 5 May 2011 16:12:54 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aQqEFR1eLpof for <cpan-bug+CGI.pm [...] hipster.bestpractical.com>; Thu, 5 May 2011 16:12:52 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 23F70241A2A for <bug-CGI.pm [...] rt.cpan.org>; Thu, 5 May 2011 16:12:51 -0400 (EDT)
Received: (qmail 20915 invoked by uid 103); 5 May 2011 20:12:51 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 5 May 2011 20:12:51 -0000
Received: from tanagra.summersault.com (HELO tanagra.summersault.com) (12.161.105.149) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Thu, 05 May 2011 13:12:49 -0700
Received: (qmail 22567 invoked from network); 5 May 2011 20:12:46 -0000
Received: from simba.summersault.com (192.168.97.182) by tanagra.summersault.com with SMTP; 5 May 2011 20:12:46 -0000
Delivered-To: cpan-bug+CGI.pm [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8
Subject: Re: [rt.cpan.org #67854] Test t/tmpdir.t fails at the 3rd test...
Return-Path: <mark [...] summersault.com>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+CGI.pm [...] hipster.bestpractical.com
X-RT-Mail-Extension: cgi.pm
Date: Thu, 05 May 2011 16:12:46 -0400
X-Spam-Level:
To: bug-CGI.pm [...] rt.cpan.org
X-Enigmail-Version: 1.1.1
Content-Transfer-Encoding: 7bit
From: Mark Stosberg <mark [...] summersault.com>
RT-Message-ID: <rt-3.8.HEAD-18812-1304626374-655.67854-0-0 [...] rt.cpan.org>
Content-Length: 569
Download (untitled) / with headers
text/plain 569b
Show quoted text
> > When using CPAN to install CGI under user root in Fedora, test t/tmpdir.t > fails at the 3rd test, where CGITempFile->new is supposed to skip the > directory that is not writeable. > > The problem is user root can always write to the $test_dir, even after > chmod 0500. In other words, > > if ( -w $CGITempFile::TMPDIRECTORY ) { > # root always comes here. > } > > This code never has problem when the user is not root.
Thanks for figuring this out! If you'd like to contribute a patch, I'll be happy to credit you for it in the next release. Mark
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-9938-1358648121-1307.67854-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 89
I think this was a dupe of RT#67854, for a which a fix was already released. Resolving.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.