On-line judgment kernel module
Samy Al Bahra
samy at kerneled.com
Thu Oct 9 05:51:03 PDT 2003
On Thu, 9 Oct 2003 07:46:45 +0300
earthman <earthman at inbox.ru> 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 at kerneled.com |
|-----------------------------------|
| B3A7 F5BE B2AE 67B1 AC4B |
| 0983 956D 1F4A AA54 47CB |
|-----------------------------------|
| http://www.kerneled.com |
+-----------------------------------+
More information about the freebsd-hackers
mailing list