This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: libc question
- From: Mark Seaborn <mseaborn at onetel dot com>
- To: libc-alpha at sourceware dot org
- Cc: David Brown <dmlb2000 at gmail dot com>
- Date: Tue, 01 Aug 2006 22:31:37 +0100 (BST)
- Subject: Re: libc question
- References: <9c21eeae0607311836w4d4960afvf11bac2f19d11c5c@mail.gmail.com>
- Reply-to: mrs at mythic-beasts dot com
"David Brown" <dmlb2000@gmail.com> wrote:
> I'm looking into using LD_PRELOAD to track filesystem access and I've
> run into a problem. It seems there are tons of filesystem interface
> functions in glibc that do various things, however, many of them (like
> mkstemp, mktemp, etc) don't seem to use open. They seem to use __open
> instead, an internal function that I can't seem to over-ride in
> LD_PRELOAD. So I'm stuck having to over-ride every function on the
> interface layer of glibc. It would be nice to be able to over-ride
> __open so that I only have to do the tracking once rather than the
> many times for all the functions that call __open internally.
Have you seen Plash (http://plash.beasts.org)? It builds a custom
version of glibc in order to do this sort of thing.
Do you need to track all filesystem accesses, including files opened
internally by libc and libraries opened by the dynamic linker?
Mark