|
|
| <prev next> |
Choosing A Webhost: |
problems with Apache::Test when run under root: msg#00000apache.httpd.test.devel
Several people reported problems with the same test in mod_perl 2.0. Only now I've figured why: they run the test suite while logged as 'root', which was absolutly non-obvious. When this happens Apache::Test starts the server under user 'nobody' if such exists, or dies otherwise. When the server is started under that username, the test suite can't create dirs and files because they aren't owned by that user 'nobody'... the test suite fails. I suggest we kill that 'nobody' workaround, and just die if the test suite is started as root. Prompting for another username as suggested by XXX below will lead to the same problem. diff -b -u -r1.144 TestConfig.pm --- Apache-Test/lib/Apache/TestConfig.pm 2 Dec 2002 16:11:48 -0000 1.144 +++ Apache-Test/lib/Apache/TestConfig.pm 3 Dec 2002 14:20:50 -0000 @@ -444,16 +444,7 @@ my $user = $ENV{APACHE_USER} || (getpwuid($uid) || "#$uid"); - if ($user eq 'root') { - my $other = (getpwnam('nobody'))[0]; - if ($other) { - $user = $other; - } - else { - die "cannot run tests as User root"; - #XXX: prompt for another username - } - } + die "cannot run tests as User root" if $user eq 'root'; $user; } __________________________________________________________________ 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
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Next by Date: | RE: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfigPerl.pm, Geoffrey Young |
|---|---|
| Next by Thread: | RE: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfigPerl.pm, Geoffrey Young |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |