From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 9 05:51:03 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C1C6216A4B3 for ; Thu, 9 Oct 2003 05:51:03 -0700 (PDT) Received: from host.server-23.net (host.server-23.net [64.191.95.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBA7543FEC for ; Thu, 9 Oct 2003 05:51:02 -0700 (PDT) (envelope-from samy@kerneled.com) Received: from dial36-239.sbm.net.sa ([212.46.36.239] helo=beastie.freebsd.local) by host.server-23.net with asmtp (Exim 4.24) id 1A7aFs-0004kB-97; Thu, 09 Oct 2003 05:50:57 -0700 Date: Thu, 9 Oct 2003 15:52:21 +0300 From: Samy Al Bahra To: earthman Message-Id: <20031009155221.3b29fb82.samy@kerneled.com> In-Reply-To: <1197083983.20031009074645@inbox.ru> References: <1197083983.20031009074645@inbox.ru> Organization: Kerneled X-Mailer: Sylpheed version 0.9.5-gtk2-20030906 (GTK+ 2.2.1; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.server-23.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - kerneled.com cc: freebsd-hackers@freebsd.org Subject: Re: On-line judgment kernel module X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2003 12:51:03 -0000 On Thu, 9 Oct 2003 07:46:45 +0300 earthman wrote: > Now I'm thinking how to do this. > Possibly it would be easy to point p->sv_sysent > to the structure that points sv_prepsyscall > to some function that denies some system calls. > (kill process, make some record in module about > restricted call That would work. If you prefer more granularity you may change individual sysent entries as well to point to your own functions/system calls. > But I don't understand how to cancel syscall > out of those function. Maybe it's possible > to change code parameter to something else. You may return a value (from the system call) that designates an error. Please consult the errno man page for more information. -- +-----------------------------------+ | Samy Al Bahra | samy@kerneled.com | |-----------------------------------| | B3A7 F5BE B2AE 67B1 AC4B | | 0983 956D 1F4A AA54 47CB | |-----------------------------------| | http://www.kerneled.com | +-----------------------------------+