Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 12 Feb 2002 03:56:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 12 Feb 2002 03:56:46 -0500 Received: from line103-203.adsl.actcom.co.il ([192.117.103.203]:4112 "HELO alhambra.merseine.nu") by vger.kernel.org with SMTP id ; Tue, 12 Feb 2002 03:56:37 -0500 Date: Tue, 12 Feb 2002 10:56:17 +0200 (IST) From: mulix X-X-Sender: To: Andreas Ferber Cc: , Theodore Tso , SA products , Subject: Re: faking time In-Reply-To: <20020212093355.A29445@devcon.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Feb 2002, Andreas Ferber wrote: > On Mon, Feb 11, 2002 at 10:47:23PM -0500, Theodore Tso wrote: > > > > Here's an LD_PRELOAD shared library that will do the trick... just > > export the environment variable FAKETIME with the time that you'd > > like, and then export the LD_PRELOAD environment variable to point > > that the faketime.so library, and then execute your program. All > > programs that have these two environment variables set will have their > > time faked out accordingly. > > But note that this doesn't work with programs linked statically. If > you must fool one of those, ptrace() is the only way to do it without > some sort of kernel patch or module I think. luckily, someone wrote such a kernel module - syscalltrack, http://syscalltrack.sf.net. it's in alpha stages right now, but it seems pretty stable so far (It Works For Me - i run it regularly on all of my machines). note that we currently support only logging system calls (a-la strace) and failing them with a user given parameter- rewriting system call parameters will require additional hackery, but not too much of it - on the order of one day of work. volunteers are welcome. -- mulix http://vipe.technion.ac.il/~mulix/ http://syscalltrack.sf.net/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/