httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm
Date Wed, 09 Apr 2003 01:39:19 GMT
stas        2003/04/08 18:39:19

  Modified:    perl-framework/Apache-Test/lib/Apache TestConfig.pm
  Log:
  avoid starting httpd with 'Group root' when running the test suite under
  root
  
  Revision  Changes    Path
  1.150     +13 -1     httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm
  
  Index: TestConfig.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
  retrieving revision 1.149
  retrieving revision 1.150
  diff -u -r1.149 -r1.150
  --- TestConfig.pm	4 Apr 2003 00:28:37 -0000	1.149
  +++ TestConfig.pm	9 Apr 2003 01:39:18 -0000	1.150
  @@ -448,7 +448,19 @@
       #use only first value if $) contains more than one
       $gid =~ s/^(\d+).*$/$1/;
   
  -    $ENV{APACHE_GROUP} || (getgrgid($gid) || "#$gid");
  +    my $group = $ENV{APACHE_GROUP} || (getgrgid($gid) || "#$gid");
  +
  +    if ($group eq 'root') {
  +        # similar to default_user, we want to avoid perms problems,
  +        # when the server is started with group 'root'. When running
  +        # under group root it may fail to create dirs and files,
  +        # writable only by user
  +        my $user = default_user();
  +        my $gid = $user ? (getpwnam($user))[3] : '';
  +        $group = (getgrgid($gid) || "#$gid") if $gid;
  +    }
  +
  +    $group;
   }
   
   sub default_user {
  
  
  

Mime
View raw message