mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Erik Mouw <J.A.K.Mouw@ITS.TUDelft.NL>
To: Catalin BOIE <util@deuroconsult.ro>
Cc: linux-kernel@vger.kernel.org, linux-admin@vger.kernel.org
Subject: Re: Kernel hook for open
Date: Mon, 6 Nov 2000 15:57:02 +0100	[thread overview]
Message-ID: <20001106155702.F12348@arthur.ubicom.tudelft.nl> (raw)
In-Reply-To: <Pine.LNX.4.20.0011061547590.1080-100000@marte.Deuroconsult.ro>
In-Reply-To: <Pine.LNX.4.20.0011061547590.1080-100000@marte.Deuroconsult.ro>; from util@deuroconsult.ro on Mon, Nov 06, 2000 at 03:55:41PM +0200

On Mon, Nov 06, 2000 at 03:55:41PM +0200, Catalin BOIE wrote:
> I wish to know if there is something like a kernel hook for open function.
> I want to monitor a file (someting like watchdog on Solaris) and to read
> from my own process (module?) and from the file.

I don't know what watchdog is, but maybe strace is what you want (man
strace for more info).

> I tried with LD_SO_PRELOAD but it haven't any effect on the so libraries.
> For example:
> If I use function getpwent (that is in a so library) and my home
> made .so library that overwrite "open" function and is in
> /etc/ld.so.preload file it doesn't work.
> Of course, if I use open ("/etc/hosts") the so library execute my
> function. 

Use LD_PRELOAD instead.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
-
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/

  reply	other threads:[~2000-11-06 14:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-06 13:55 Catalin BOIE
2000-11-06 14:57 ` Erik Mouw [this message]
2000-11-06 15:11   ` Michael Vines
2000-11-06 17:20     ` Erik Mouw
2000-11-06 17:40       ` Michael Vines
2000-11-07 10:58         ` Catalin BOIE
2000-11-07 10:53       ` Catalin BOIE
2000-11-07 11:06       ` Tigran Aivazian
2000-11-07 11:09         ` Tigran Aivazian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001106155702.F12348@arthur.ubicom.tudelft.nl \
    --to=j.a.k.mouw@its.tudelft.nl \
    --cc=linux-admin@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=util@deuroconsult.ro \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®