lkml.org 
[lkml]   [2002]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: faking time
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/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:1.492 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site