Volker Kroll wrote:
[...]
Hmm, does not work for me, I modified it slightly:
use File::Spec::Functions qw(catfile);
my($uid, $gid) = (getpwnam(qq[nobody]))[2..3];
$( = $) = $gid+0;
die qq[failed to change gid to $gid] if $( != $gid;
$< = $> = $uid+0;
die qq[failed to change uid to $uid] if $< != $uid;
my $dir = qq[/root];
my $file = catfile $dir, qq[.apache-test-file-$$-].time.int(rand);
END { unlink $file };
# -w
open TEST, qq[>$file] or die qq[failed to open $file: $!];
# -x
-f $file or die qq[$file cannot be looked up];
close TEST;
# -r
opendir DIR, $dir or die qq[failed to open dir $dir: $!];
defined readdir DIR or die qq[failed to read dir $dir: $!];
close DIR;
# all tests passed
print q{OK};
perfect, I must have been dreaming ;)
and started it out of a file.
I got:
failed to open /root/.apache-test-file-8981-10712397220: Permission
denied at test line 11.
Great. I have now integrated this test into Apache-Test. Can you please verify
that modperl-2.0's 'make test' refuses to run when modperl-2.0 is checked out
under /root? Please use the latest cvs version:
http://perl.apache.org/download/source.html#Development_mod_perl_2_0_Source_Distribution
Thanks.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxxxxxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
|