Hello all,

For my first Perl program I tried to do the following:

I've got a user, cctrl (with group cctrl, dev).
I've got a user, project (with group dev, obj).

The name of the cctrl user is in the Environment Variable
$CCTRL and its home directory in $CCTRL_HOME.

Project user launch a perl program, ccmkprj.pl, and this one
must create some directory in $CCTRL_HOME which will be
held by cctrl.

But I've got :
Insecure dependency in mkdir while running setuid at ....
.../File/Path.pm line 137


I've got this function in my script:

sub create_rcsdir
{
        local( $cctrl , $group ) = @_;
        local( $rcsdir ) = $ENV{ RCSDIR };

        mkpath( $rcsdir , 1 , 0750 );
}



I've got some other function, but I think it's this one
which raise the problem.

Could someone tell me how to enable user project to create
a directory into the cctrl home directory, or changing
effective user id while running the perl script or any other
way to create a directory into another user directory.

One more precision, my script belong to cctrl and the setuid
bit is set. So changing euid to cctrl uid could do the trick
but, I'm not a security expert and the perlsec man page is
really obscured to me.

Thank you very much

Reply via email to