From owner-freebsd-hackers Fri Aug 4 5:52:35 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from viper.dmpriest.com (viper.dmpriest.com [195.188.177.3]) by hub.freebsd.org (Postfix) with ESMTP id 670C137BAA7 for ; Fri, 4 Aug 2000 05:52:29 -0700 (PDT) (envelope-from kpielorz@tdx.co.uk) Received: from tdx.co.uk (lorca.tdx.co.uk [195.188.177.195]) by viper.dmpriest.com (8.9.3/8.9.3/Kp) with ESMTP id NAA63570; Fri, 4 Aug 2000 13:52:11 +0100 (BST) Message-ID: <398ABC7B.8322EE58@tdx.co.uk> Date: Fri, 04 Aug 2000 13:52:11 +0100 From: Karl Pielorz Organization: The Digital eXchange X-Mailer: Mozilla 4.73 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Bjoern Fischer Cc: hackers@FreeBSD.ORG Subject: Re: LD_PRELOAD odities / Documentation? References: <39894897.79E14398@tdx.co.uk> <20000803234951.B267@frolic.no-support.loc> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Bjoern Fischer wrote: > To wrap libc functions you have to use dlsym() with the special > handle RTLD_NEXT to get the next incarnation of your function. > E.g. you want to wrap fchmod(), so write your own fchmod() and > after you `corrected' the params you may have to call the `real' > fchmod(). You will get this with dlsym(RTLD_NEXT, "fchmod"). Thanks! - That fixed it... Linux doesn't have such a handle (and seems to work fine without it)... I hadn't strayed enough through the man page for dlsym to notice the difference... Regards, Karl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message