evms> I wrote this a while ago, but, if anyone is interested, please
evms> take a look: this module implements a system call that takes
evms> a u_int_32t. This system call, named killjail, kills all processes
evms> which belong to the jail which uses that particular IP address.

evms> I included it in a tar with a makefile and with a program
evms> that uses it. (Eg: ./killjail 1.2.3.4)

evms> http://www.sekt7.org/kjs.tar

evms> Works on 4.4 but can be easily ported to 5.0.

This can be done in userland without kernel interaction:

#!/bin/sh

EX_OK=0
EX_USAGE=64

if [ "$1" = "" ]
then
        echo "Usage: $0 jailname"
        exit ${EX_USAGE}
fi

pids=`grep -l " $1\$" /proc/*/status | awk -F/ '{print $3}'`
if [ "$pids" != "" ]
then
        kill -15 $pids 2> /dev/null
fi
exit ${EX_OK}

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to