Return-Path: <hartmans@MIT.EDU>
Received: from central-city-carrier-station.mit.edu by po11.mit.edu (8.9.2/4.7) id NAA20326; Thu, 29 Nov 2001 13:26:02 -0500 (EST)
Received: from manawatu-mail-centre.mit.edu (MANAWATU-MAIL-CENTRE.MIT.EDU [18.7.21.85])
	by central-city-carrier-station.mit.edu (8.9.2/8.9.2) with ESMTP id NAA06992;
	Thu, 29 Nov 2001 13:25:56 -0500 (EST)
Received: from tir-na-nogth.mit.edu (TIR-NA-NOGTH.MIT.EDU [18.18.1.6])
	by manawatu-mail-centre.mit.edu (8.9.2/8.9.2) with ESMTP id NAA13681;
	Thu, 29 Nov 2001 13:25:55 -0500 (EST)
Received: (from hartmans@localhost) by tir-na-nogth.mit.edu (8.9.3)
	id NAA25138; Thu, 29 Nov 2001 13:25:55 -0500 (EST)
Sender: hartmans@TIR-NA-NOGTH.MIT.EDU
To: Greg Hudson <ghudson@MIT.EDU>
Cc: karlm@MIT.EDU, sipb@MIT.EDU
Subject: Re: ldpreload questions
References: <200111290458.XAA05042@no-knife.mit.edu> <1007011739.14196.7.camel@egyptian-gods>
From: Sam Hartman <hartmans@MIT.EDU>
Date: 29 Nov 2001 13:25:55 -0500
In-Reply-To: Greg Hudson's message of "29 Nov 2001 00:28:59 -0500"
Message-ID: <tslitbt5t8s.fsf@tir-na-nogth.mit.edu>
Lines: 12
X-Mailer: Gnus v5.7/Emacs 20.7

>>>>> "Greg" == Greg Hudson <ghudson@MIT.EDU> writes:


    Greg> Using LD_PRELOAD per se is pretty easy; you just create a
    Greg> shared object which defines the symbols you want (connect,
    Greg> send, etc.).  The hard part is making calls to the
    Greg> underlying functions which you've overridden.  To do that,
    Greg> you'll have to make calls to the dynamic linker library.

Hmm, I think fakeroot mostly avoids this by using more Elf magic.  You
may also want to take a look at fakeroot from
ftp://ftp.debian.org/debian/pool/main/f/fakeroot/
