On Sat, Dec 21, 2002 at 09:45:54AM -0800, Terry Lambert wrote:
+> This is actually a bad way to do things.
+> 
+> There is a system call loadable module type, and you should
+> use that instead of directly accessing the system call entry
+> table and stomping on values without asserting appropriate
+> locks.

But I want to operate on existing syscalls.

        tmp = sysent[SYS_execve].sy_call;
        sysent[SYS_execve].sy_call = myfunc;

        int
        myfunc(struct proc *p, execve_args *uap)
        {
                /* Do some checks, etc. */

                return (tmp(p, uap));
        }

-- 
Pawel Jakub Dawidek
UNIX Systems Administrator
http://garage.freebsd.pl
Am I Evil? Yes, I Am.

Attachment: msg38801/pgp00000.pgp
Description: PGP signature

Reply via email to