Re: Kernel hook for open

From: Michael Vines (mjvines@undergrad.math.uwaterloo.ca)
Date: Mon Nov 06 2000 - 12:40:26 EST


On Mon, 6 Nov 2000, Erik Mouw wrote:

> On Mon, Nov 06, 2000 at 10:11:11AM -0500, Michael Vines wrote:
> > On Mon, 6 Nov 2000, Erik Mouw wrote:
> > > Use LD_PRELOAD instead.
> >
> > You could also write a simple kernel module that replaces the open system
> > call. See the Linux Kernel Module Programming Guide for details.
> > http://www.linuxdoc.org/guides.html
> >
> > specifically http://www.linuxdoc.org/LDP/lkmpg/node20.html
>
> Why difficult when it can be done easy? To test the Y2K readiness of
> some programs (yeah, Y2K, remember?), I wrote a small library that
> overloaded the time() and gettimeofday() syscalls in about 100 lines of
> code. No kernel modules needed, no root privileges needed, just set the
> environment variable LD_PRELOAD and off you go.

Well the question was posted to the kernel mailing list and not the glibc
mailing list after all :)

        Michael

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Nov 07 2000 - 21:00:19 EST