Re: make test failed on solaris 8

[prev] [thread] [next] [Date index for 2005/01/27]

From: Stas Bekman
Subject: Re: make test failed on solaris 8
Date: 01:06 on 27 Jan 2005
Tulan, in the future please refrain from posting 1MB emails to the public 
mailing list. The best way to accomplish that is to upload the file 
somewhere and post a link here.

Besides there is no need to post a truss output to debug a perl error. 
(usually).

Tulan W. Hu wrote:
> I found a line in our private module
> AP_INIT_TAKE12("require",
> set_subscribe_slot,(void*)APR_XtOffsetOf(LN_auth_config_rec,
> auth_LNgrpfile),OR_AUTHCFG, "" ), ...
> I changed it to
> AP_INIT_RAW_ARGS("require",.....)

Hehe, nice :)

> The syntax error problem was solved but I'm still having the following:
> ..[Wed Jan 26 10:46:33 2005] [error] Insecure directory in $ENV{PATH}
> while running with -T switch at
> /s5/twh/papache/mod_perl-2.0.0-RC4/Apache-Test/lib/Apache/TestConfig.pm
> line 1062.\nCompilation failed in require at
> /s5/twh/papache/mod_perl-2.0.0-RC4/t/conf/modperl_startup.pl line
> 17.\n\t...propagated at
> /s5/twh/papache/mod_perl-2.0.0-RC4/t/conf/modperl_startup.pl line
> 18.\nBEGIN failed--compilation aborted at
> /s5/twh/papache/mod_perl-2.0.0-RC4/t/conf/modperl_startup.pl line
> 20.\nCompilation failed in require at (eval 2) line 1.\n

Please take a look at Apache-Test/lib/Apache/TestConfig.pm

sub open_cmd {
     my($self, $cmd) = @_;
     # untaint some %ENV fields
     local @ENV{ qw(IFS CDPATH ENV BASH_ENV) };
     local $ENV{PATH} = untaint_path($ENV{PATH});

     # launder for -T
     $cmd = $1 if $cmd =~ /(.*)/;

     my $handle = Symbol::gensym();
     open $handle, "$cmd|" or die "$cmd failed: $!";

     return $handle;
}

it calls untaint_path($ENV{PATH}) in the same file. Please take a look at 
that function and see if you can fix it.

If you don't figure out, please apply the patch below and post the console 
output at the server startup. Thanks.

Index: Apache-Test/lib/Apache/TestConfig.pm
===================================================================
--- Apache-Test/lib/Apache/TestConfig.pm        (revision 126051)
+++ Apache-Test/lib/Apache/TestConfig.pm        (working copy)
@@ -1053,7 +1053,9 @@
      my($self, $cmd) = @_;
      # untaint some %ENV fields
      local @ENV{ qw(IFS CDPATH ENV BASH_ENV) };
+    warn "PATH BEFORE: $ENV{PATH}\n";
      local $ENV{PATH} = untaint_path($ENV{PATH});
+    warn "PATH AFTER: $ENV{PATH}\n";

      # launder for -T
      $cmd = $1 if $cmd =~ /(.*)/;

        -- 
        __________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

(message missing)

Re: make test failed on solaris 8
Stas Bekman 00:53 on 22 Jan 2005

Re: make test failed on solaris 8
Tulan W. Hu 14:35 on 24 Jan 2005

Re: make test failed on solaris 8
Stas Bekman 01:38 on 25 Jan 2005

Re: make test failed on solaris 8
Tulan W. Hu 22:10 on 25 Jan 2005

Re: make test failed on solaris 8
Stas Bekman 23:45 on 25 Jan 2005

Re: make test failed on solaris 8
Tulan W. Hu 12:52 on 26 Jan 2005

Re: make test failed on solaris 8
Philippe M. Chiasson 23:54 on 25 Jan 2005

Re: make test failed on solaris 8
Tulan W. Hu 13:26 on 26 Jan 2005

Re: make test failed on solaris 8
Tulan W. Hu 16:44 on 26 Jan 2005

Re: make test failed on solaris 8
Stas Bekman 01:06 on 27 Jan 2005

Re: make test failed on solaris 8
Tulan W. Hu 20:56 on 27 Jan 2005

Re: make test failed on solaris 8
Stas Bekman 00:28 on 28 Jan 2005

Re: make test failed on solaris 8
Tulan W. Hu 16:22 on 28 Jan 2005

Re: make test failed on solaris 8
Stas Bekman 22:05 on 28 Jan 2005

Re: make test failed on solaris 8
Tulan W. Hu 22:42 on 28 Jan 2005

Re: make test failed on solaris 8
Stas Bekman 00:43 on 29 Jan 2005

Re: make test failed on solaris 8
Tulan W. Hu 14:22 on 31 Jan 2005

Re: make test failed on solaris 8
Stas Bekman 03:41 on 02 Feb 2005

Re: make test failed on solaris 8
Tulan W. Hu 13:19 on 02 Feb 2005

Re: make test failed on solaris 8
Stas Bekman 01:10 on 03 Feb 2005

Generated at 12:39 on 05 Feb 2005 by mariachi v0.52