From owner-freebsd-hackers Sat Dec 21 9:52:19 2002 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 60E5137B401 for ; Sat, 21 Dec 2002 09:52:17 -0800 (PST) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5C1D43ED8 for ; Sat, 21 Dec 2002 09:52:15 -0800 (PST) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id E17B73ABB63; Sat, 21 Dec 2002 18:52:26 +0100 (CET) Date: Sat, 21 Dec 2002 18:52:26 +0100 From: Pawel Jakub Dawidek To: Terry Lambert Cc: freebsd-hackers@freebsd.org Subject: Re: Syscall number. Message-ID: <20021221175226.GP11475@garage.freebsd.pl> References: <20021220184337.GD11475@garage.freebsd.pl> <20021221032233.GG11475@garage.freebsd.pl> <3E04A8D2.C6CDBF6A@mindspring.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="00hq2S6J2Jlg6EbK" Content-Disposition: inline In-Reply-To: <3E04A8D2.C6CDBF6A@mindspring.com> X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.7-STABLE i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --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