[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#483442: RFH: cvsweb - test -x fails with Perl 5.10

Am Samstag, den 31.05.2008, 00:57 +1000 schrieb Brendan O'Dea:
> On Fri, May 30, 2008 at 10:10 AM, Daniel Leidert
> <daniel.leidert.spam@gmx.net> wrote:
> > And real and effective UID are the same. So why does -x fail? Any idea?
> > It cannot be a general bug, because a small test script prints the
> > correct result.
> Right.  I've attempted pretty much every combination of user and/or
> other executable bits, running with $< == $> or $< != $> and I cannot
> discern any -x/-X behavioural difference b/w 5.8 and 5.10.
> More information required.  Can you replicate the problem outside of
> apache (i.e. calling the cvsweb.cgi from the command line)?

Yes. I added some DEBUG statements to the search_path() function. If I
run it from the command line (you can test it yourself), I receive:

DEBUG search_path(): command=cvs
DEBUG search_path(): euid=....
DEBUG search_path(): command=cvs, d=/bin
DEBUG search_path(): cmd=/bin/cvs
DEBUG search_path(): command=cvs, d=/usr/bin
DEBUG search_path(): cmd=/usr/bin/cvs
DEBUG search_path(): command=cvs, d=/usr/local/bin
DEBUG search_path(): cmd=/usr/local/bin/cvs
DEBUG search_path(): not successful for command=cvs

The last DEBUG statement is output after leaving the for-loop in
search_path. Here my debug-statements to be more verbose:

> sub search_path($)
> {
>   my ($command) = @_;
>   print STDERR "DEBUG search_path(): command=$command\n";
>   print STDERR "DEBUG search_path(): euid=$>, egid=$(, ruid=$<, rgid=$)\n";
>   for my $d (@command_path) {
>     print STDERR "DEBUG search_path(): command=$command, d=$d\n";
>     my $cmd = catfile($d, $command);
>     print STDERR "DEBUG search_path(): cmd=$cmd\n";
>     return $cmd if (-x $cmd && !-d _);
>   }
>   print STDERR "DEBUG search_path(): not successful for command=$command\n";
>   return '';
> }

Changing the -x to be -X works.

Regards, Daniel

Reply to: