Re: trouble writing a setuid script



On Aug 30, 1:20 am, magloca <magl...@xxxxxxxxxxxxxx> wrote:
Peter Michaux @ Saturday 30 August 2008 09:07:



Hi,

I'm trying to write a setuid script and can't make it happen. I've
trimmed it down to the very simple example below trying to have a
logger.pl script add a message to a log file. This is my Bash
transcript with all the pertinent details.
[code snipped]
(I don't run into any errors when writing the same program in C.)

Yeah, I tried to do something like that once, too. Turned out the setuid
flag is ignored on scripts; it's only allowed on (binary) executables.
So that's also why your compiled C program works.

It seems it must be possible to write a setuid script because there is
a lot of fuss about it in "perldoc perlsec" which is also part of the
camel book.

Peter
.



Relevant Pages

  • Re: running a script as the owner - admin bit - chmod 6774
    ... > the script can be forced to run as the file's owner. ... > with execute and read to the file I run it. ... With HP-UX 10.20 if there was a setuid script you wanted to exploit you could ...
    (comp.sys.hp.hpux)
  • Re: trouble writing a setuid script
    ... I'm trying to write a setuid script and can't make it happen. ... flag is ignored on scripts; it's only allowed on executables. ...
    (comp.lang.perl.misc)
  • Re: trouble writing a setuid script
    ... This is my Bash ... transcript with all the pertinent details. ... It seems it must be possible to write a setuid script because there is ...
    (comp.lang.perl.misc)
  • Re: setuid shell scripts in Solaris 10
    ... Solaris 8 does not exhibit this behavior in our environment. ... The setuid script and any child scripts are ...
    (comp.unix.solaris)
  • Re: [ Attn: Randy ] Ad-hoc Parsing?
    ... > 1) They were out of context quotes, as the quotes came with no context. ... embed cpu instructions within a DOS/Windows batch script. ... that this also is possible with bash scripts. ... statement "It can execute the .com file as easily as a command.com ...
    (alt.lang.asm)