James G. Sack (jim) wrote:
Michael O'Keefe wrote:
I think it's actually that the interpreter itself is not setuid.
I think if you set /bin/sh to be setuid, it might work.
Or you might have to run the setuid enabled /bin/sh to execute the
script rather than relying on the kernel to call out the interpreter itself


Nope, any hashbanger, I think.

Try this
- - -
cat >whoami.pl <<EOF
#!/usr/bin/perl -w
print "real:<=$< (=$(  eff: >=$> )=$)\n";
print "ENV{user}=$ENV{USER}\n";
EOF

chmod +x,u+s,g+s whoami.pl

sudo ./whoami.pl
- - -

Regards,
..jim

His point was that you would also probably have to set:

chmod +x,u+s,g+s /usr/bin/perl

-a


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to