On Fri, 31 Jan 2003, Stas Bekman wrote:
> [EMAIL PROTECTED] wrote:
> > stas 2003/01/30 16:53:45
> >
> > Modified: perl-framework/Apache-Test/lib/Apache TestRun.pm
> > Log:
> > # handle the cases when the test suite is run under 'root':
> > #
> > # 1. When user 'bar' is chosen to run Apache with, files and dirs
> > # created by 'root' might be not writable/readable by 'bar'
> > #
> > # 2. when the source is extracted as user 'foo', and the chosen user
> > # to run Apache under is 'bar', in which case normally 'bar' won't
> > # have the right permissions to write into the fs created by 'foo'.
> > #
> > # We solve that by 'chown -R bar.bar t/' in a portable way.
> > #
> > # at the end of the run we restore the perms to the original ones
>
> Randy, can you please check that this handles the win32 case as well? I've no
> clue whether the concept of 'root' applies there.
Hi Stas,
On Win32, I get an error about getpwuid($>) being
unimplemented. This diff
==============================================================
Index: Apache-Test/lib/Apache/TestRun.pm
===================================================================
RCS file:
/home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
retrieving revision 1.100
diff -u -r1.100 TestRun.pm
--- Apache-Test/lib/Apache/TestRun.pm 31 Jan 2003 00:53:45 -0000 1.100
+++ Apache-Test/lib/Apache/TestRun.pm 31 Jan 2003 04:38:35 -0000
@@ -667,7 +667,7 @@
my $self = shift;
%original_t_perms = (); # reset global
- my $user = getpwuid($>) || '';
+ my $user = Apache::TestConfig::WIN32 ? '' : (getpwuid($>) || '');
if ($user eq 'root') {
my $vars = $self->{test_config}->{vars};
my $user = $vars->{user};
=======================================================================
allows things to run.
--
best regards,
randy