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: 80659
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: MARKSTOS [...] cpan.org
Requestors: sb10 [...] sanger.ac.uk
Cc:
AdminCc:

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



Subject: t/tmpdir.t failures
Broken in 3.61 (for some reason the "Broken in" list ends at 3.48). Previously some broken tests were TODO'd away: https://github.com/markstos/CGI.pm/commit/cc73dc9807b0fabb56b3cdf1a9726588b2eda 0f7#t/tmpdir.t For some reason they were re-enabled in 3.61: https://github.com/markstos/CGI.pm/blob/3460215fc0d95e4b5d0320b6376403517b79f94 5/t/tmpdir.t The problem is that the tests do "chmod 500" and then try and confirm lack of writability using "-w $testdir". However, root can write to a 500 directory! Show quoted text
> mkdir foo > chmod 500 foo > perl -e '$w = -w "foo" ? "writable" : "not writable"; print "$w\n";'
not writable Show quoted text
> su > perl -e '$w = -w "foo" ? "writable" : "not writable"; print "$w\n";'
writable So now CGI will fail this test for everyone trying to install it with root privileges.
Show quoted text
> 5/t/tmpdir.t > > The problem is that the tests do "chmod 500" and then try and confirm > lack of writability > using "-w $testdir". However, root can write to a 500 directory! >
> > mkdir foo > > chmod 500 foo > > perl -e '$w = -w "foo" ? "writable" : "not writable"; print "$w\n";'
> not writable
> > su > > perl -e '$w = -w "foo" ? "writable" : "not writable"; print "$w\n";'
> writable > > So now CGI will fail this test for everyone trying to install it with > root privileges.
Thanks for the report. The test were re-enabled because the successful TODO tests were causing problems for the core Perl team. Since the issue is now understood as having to do with root users, would you be willing to provide a patch that that works for both root and non-root users, or skips the tests if they are run as root? Mark
Fixing now with 3.62 release.