WARNING: Do not use these packages.
suidperl
had been removed in perl-5.12
for reason
(see perl5120delta(1), in perl-doc package).
Write a wrapper in C language, then setuid it.
These packages are just a bait for those who needs the deprecated and insecure functionality. That said ...
The package provided on this page is a recompile of
perl-5.10 package to run on CentOS Linux 9 / Red Hat Enterprise Linux 9.
You will have the deprecated suidperl
functionality.
It will be handy to run scripts which was running on CentOS 6
migrate to CentOS 9.
(2022-06)
$Keywords: perl-5.10 CentOS Linux 9 RHEL 9 el9 rpm suidperl bison-2.4 $
Download perl510.el9.repo and drop it
into /etc/yum.repos.d/
.
perl510
repository will becomes available, so you will just invoke
# dnf install perl510-suidperlto pull in the remaining packages.
The packages are located below repo/RPMS/ directory. You can browse and download and install the individual .rpm files if in need.
To coexist with system default perl-5.32, these packages are
named perl510-*
instead of perl-*
, and installs into
/opt/perl510/
directory.
The package does not provide /usr/bin/suidperl
.
It is likely to be in hash-bang line
#!/usr/bin/suidperlof the existing scripts. If you do not want to update the line to
#!/opt/perl510/bin/suidperl
,
create a symlink by yourself:
lrwxrwxrwx. 1 root root 30 Nov 14 19:17 /usr/bin/suidperl -> ../../opt/perl510/bin/suidperl
The repository also includes
bison-2.4 bison24
package,
needed to compile perl-5.10.
(you don't need it unless you want to build the perl510 package by yourself)
suidperl
is very picky about the execution environment.
The existing code may or may not work. Some adjustments may be needed.
Insecure $ENV{PATH} while running setuid at prog.pl line 5.Resolution: explicitly set PATH to safe paths, like
$ENV{"PATH"}="/bin:/usr/bin:/sbin:/usr/sbin";
Insecure $ENV{BASH_ENV} while running setuid at prog.pl line 5.Resolution: explicitly set to empty, like
undef $ENV{"ENV"}; undef $ENV{"BASH_ENV"};