jamesrleu has asked for the wisdom of the Perl Monks concerning the following question:
I'm confused about status of running setuid script with perl 5.16
I see in 5.12 delta
suidperl is no longer part of Perl. It used to provide a mechanism to emulate setuid permission bits on systems that don't support it properly.
I read this as systems that properly support setuid bits should not be affected, but my experience does not match.
Summary
-------
God awful old RedHat 8.0 perl 5.8.8 setting setuid on script works as expected. New Centos 7 perl 5.16 setting setuid on script does not work as expected.
example
-------
On Centos 7 Perl 5.16
sudo -i cat > /tmp/setuid.pl #!/usr/bin/perl use English; print "UID:$UID EUID:$EUID\n"; ctrl D chmod a+rx /tmp/setuid.pl chmod u+s /tmp/setuid.pl exit /tmp/setuid.pl UID:1334 EUID:1334
On RedHat 8.0 perl 5.8.8
sudo -s cat > /tmp/setuid.pl #!/usr/bin/perl use English; print "UID:$UID EUID:$EUID\n"; ctrl D chmod a+rx /tmp/setuid.pl chmod u+s /tmp/setuid.pl exit /tmp/setuid.pl UID:1334 EUID:0
Have I overlooked something on Centos 7 setup to allow setuid?
Or did all setuid functionality get killed in 5.12?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl 5.16 setuid
by afoken (Chancellor) on Oct 13, 2016 at 21:13 UTC | |
by Corion (Patriarch) on Oct 14, 2016 at 12:23 UTC | |
by Anonymous Monk on Apr 30, 2018 at 19:00 UTC | |
by Anonymous Monk on May 01, 2018 at 12:02 UTC |