Slinger, didn't execute all commands

Hi everyone,

some new problem. Slinger is configured as:

configure and start the webserver

export HTTPD_ROOT_DIR=/usr/app/web
export HTTPD_ROOT_DOC=index.html
export HTTPD_SCRIPTALIAS=/usr/app/web/cgi-bin
export CMD_INT=/bin/sh

Everything work fine, in my sample file info.shtml:


System

Diskusage

Network configuration
Remotehost
:

so now the problem: I need to stop/kill a running process via the Webserver, so I have tried this:

and this

and this

where 1234, is the known Pid of the process. But it didn’t work, eveytime I will get:

kill (1234,15) Operation not permitted

hmm, I know what this mean, but why? Does slinger performs exec not as root? Is there any way to kill/stop a running process ?! The same effect will be, when I using Perl with system()!

Thanks for all ideas!
Matthias

The doc says “The slinger server listens on the TCP port 80. Since this port number is less than 1024, SLinger needs to run as root, As soon as it has attached to the HTTP port, it changes itself to run as ID -2, by calling setupd (-2)”

Try this
cp /bin/slay /bin/Slay
chmod +s Slay

and change your command to “Slay -f myapp”

BIG BIG BIG security hole as anybody that as access to the machine can kill any process ;)

  • Mario

Thanks Mario, for the tip. So but I have foun another way:

SLinger runs as (-2) and start a shellscript as root, for only this operation -all other will run as -2.