suidperl problems

godoy on 2002-08-31T23:35:00

I'm trying to run a SUID (owner is root) perl script without success for the last 30 minutes.

I've already done this before and I've already fixed prior packages errors with regards to sperl/suidperl permissions. Now, I'm not being able to find what the problem is.

I have this: [godoy@wintermute ~/desenvolvimento/perl]$ l suid-script -rwsrwsr-x 1 root root 4549 Ago 31 19:51 suid-script [godoy@wintermute ~/desenvolvimento/perl]$ l /usr/bin/suidperl /usr/bin/sperl -rws--s--x 1 root root 715888 Ago 31 19:53 /usr/bin/sperl -rws--s--x 1 root root 715888 Ago 31 20:29 /usr/bin/suidperl [godoy@wintermute ~/desenvolvimento/perl]$

and Perl only says this:

[godoy@wintermute ~/desenvolvimento/perl]$ sperl -wT suid-script Can't do setuid [godoy@wintermute ~/desenvolvimento/perl]$ perl -wT suid-script Can't do setuid [godoy@wintermute ~/desenvolvimento/perl]$

I don't know where else should I look. Maybe I'll write some C wrapper just to have this SUID thing sorted out once and for all...

If you have any hint, I'd like hearing it. I'm not as good in C as in Perl.

Oh, I was forgetting it... Perl is 5.6.1.


did you check...

hfb on 2002-09-01T01:40:18

...if the filesystem this program resides on or acts upon is NFS mounted did you check to make sure there is no 'nosuid' bit set on the mount. Also, you can run trace/truss/strace/etc on your unix variant to see what it's doing at the time of failure. That message is less esoteric and opaque than the usual perl error messages so I'm guessing that it's something at the system level rather than perl.

Re:did you check...

godoy on 2002-09-01T02:05:56

It can run SUID scripts. It's a local filesystem.

I'm trying to find out what's happening (with the help of people on #perl). I've putten a copy of the full strace output here.

Recompiling perl.

godoy on 2002-09-01T02:34:34

After a few tests with C programs and SUID bits, we think there are problems with this suidperl. I'll rebuild it.

Tomorrow, when I see the compilation results, I'll tell you what happened.

Thanks for your help.