setuid script changed

I

ittay.dror

Hi,

I have the following script:
#!/usr/bin/perl -w

while($line = <>){
if($line =~ /^ENDMDL/){
print $line;
exit(0);
}
print $line;
}

simple right?

and it works with 'cat <somefile> | <script>' (meaning, it prints the
lines from 'somefile')

now i do 'chmod a+s <script>'

now when i run as in the above, perl complains 'setuid script changed',
and the script doesn't run. meaning, nothing is printed to the screen.

please help,
thanx,
ittay
 
M

Martin Kissner

Hi,

I have the following script:
#!/usr/bin/perl -w

while($line = <>){
if($line =~ /^ENDMDL/){
print $line;
exit(0);
}
print $line;
}

simple right?

and it works with 'cat <somefile> | <script>' (meaning, it prints the
lines from 'somefile')

now i do 'chmod a+s <script>'

now when i run as in the above, perl complains 'setuid script changed',
and the script doesn't run. meaning, nothing is printed to the screen.

AFAIK many shells don't allow SUID for scripts.
I have never needed a Perl SUID Skript, but I have read, that you could
do this with perlsuid.

HTH
martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top