[CentOS] Problem running a setuid Perl script on CentOS 4.5

Fri Nov 16 15:06:49 UTC 2007
James Olin Oden <james.oden at gmail.com>

On 11/16/07, Marc Wiatrowski <mwia at iglass.net> wrote:
>
> On Fri, 2007-11-16 at 09:42 -0500, Alfred von Campe wrote:
> > I'm trying to create a setuid Perl script (yes, I am aware about the
> > security implications), but am getting this error:
> >
> >    % cat testsetuid.pl
> >    #!/usr/bin/perl -UT
> >    print "My real user id is $< but my effective user id is $>\n";
> >    exit(0);
> >    % ./testsetuid.pl
> >    Can't do setuid (cannot exec sperl)
> >
> > I am using the stock Perl that came with CentOS 4.5.  The problem I
> > am trying to solve is to run a software build as a particular user.
> > We want any user to be able to submit a build job that runs on the
> > build machine as the designated build user.  If there is a better way
> > to do this, I'm open to suggestions.
> >
> > Alfred
>
> Being aware of the security implications, do you have
> perl-suidperl-X.rpm installed?

Yeah, its actually the interpreter that is setuid, as the script
doesn't actually execute per say, but its really "config" file for the
interpreter, at least from the OS perspective...james
perl-suidper-*.rpm contains the setuid interpreter...james