develooper Front page | perl.perl5.porters | Postings from May 2012

[perl #7758] FindBin.pm fails for setuid script on solaris

Thread Previous | Thread Next
From:
Brian Fraser via RT
Date:
May 26, 2012 23:18
Subject:
[perl #7758] FindBin.pm fails for setuid script on solaris
Message ID:
rt-3.6.HEAD-7788-1338099480-1580.7758-15-0@perl.org
On Thu Sep 27 08:23:30 2001, psfales@ihgp.ih.lucent.com wrote:
> 
> -----------------------------------------------------------------
> When a perl script is marked setuid on recent versions of solaris, $0
> is passed in as /dev/fd/3.  I understand that this is a feature of the
> OS, but it breaks the FindBin.pm module.  Perhaps there is no way to
> around this, but perhaps FindBin.pm could at least check for this case
> and produce an error message that would help explain what is going on.
> Here's the test program:
> 
>         #!/usr/bin/perl -w
>         print "\$0 = $0\n";
> 
>         use FindBin qw($Bin);
>         print "$Bin\n";
> 
> 
> When this program is run, we get:
> 
> Cannot find current script '/dev/fd/3' at
> /opt/exp/perl/lib/5.6.1/FindBin.pm line 166
> BEGIN failed--compilation aborted at
> /opt/exp/perl/lib/5.6.1/FindBin.pm
> line 16!
> 6.
> 
> Compilation failed in require at /dev/fd/3 line 4.
> BEGIN failed--compilation aborted at /dev/fd/3 line 4.
> 
> 

Still present in 5.16.0. Should this be marked as Won't Fix?

Tangentially related, it's worth pointing out that this bug wasn't
entirely abandoned;
http://www.nntp.perl.org/group/perl.perl5.porters/2001/09/msg44435.html
shows that there were at least two replies, which I assume weren't
imported into rt.

--hugmeir


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=7758

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About