Date: Sat, 21 Dec 2002 18:52:26 +0100 From: Pawel Jakub Dawidek <nick@garage.freebsd.pl> To: Terry Lambert <tlambert2@mindspring.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Syscall number. Message-ID: <20021221175226.GP11475@garage.freebsd.pl> In-Reply-To: <3E04A8D2.C6CDBF6A@mindspring.com> References: <20021220184337.GD11475@garage.freebsd.pl> <20021221032233.GG11475@garage.freebsd.pl> <3E04A8D2.C6CDBF6A@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--00hq2S6J2Jlg6EbK
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sat, Dec 21, 2002 at 09:45:54AM -0800, Terry Lambert wrote:
+> This is actually a bad way to do things.
+>=20
+> 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 =3D sysent[SYS_execve].sy_call;
sysent[SYS_execve].sy_call =3D myfunc;
int
myfunc(struct proc *p, execve_args *uap)
{
/* Do some checks, etc. */
return (tmp(p, uap));
}
--=20
Pawel Jakub Dawidek
UNIX Systems Administrator
http://garage.freebsd.pl
Am I Evil? Yes, I Am.
--00hq2S6J2Jlg6EbK
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)
iQCVAwUBPgSqWj/PhmMH/Mf1AQHNZQQAoQ7Man7sw3TXqfySPvCalcq7uwPki3+o
FVFfaTWQGKP+SlRU51y5AcRv+BKxWES7t8Ui26VlSScrefBUJU7rLpS0Qneoxz3E
T1iaTluOJYfRw2oXCDj4dZNeUF2hAO6X1k8HTUg6IYkS8eoEIddSG2F5wIQz0CAq
yZJCVfR7Gy8=
=FpJf
-----END PGP SIGNATURE-----
--00hq2S6J2Jlg6EbK--
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021221175226.GP11475>
