On Tue, 25 May 1999, you wrote: >Russel Coker wrote: > >> I intend to release a package of a little library I'm working on >> called "fakedate". This will wrap the time() system call and make >> applications think that they are running on a different date. > >You might also be interested in these two packages: > >http://www.aivazian.demon.co.uk/tt/tt.html >http://source.syr.edu/~jdimpson/proj/#timewarp > >They use different approach, but they may give you some ideas.
Thanks for the suggestion. The only thing I saw that I'd like to copy is the way timewarp sets dates using /proc (which I can't copy due to not writing a kernel module). However a user of my library can change the time by setting environment variables before running the process. What I am considering doing is creating a directory tree under /etc/faketime with a seperate file for each application/user for which the time is to be fiddled (similar in concept to the way authbind uses a tree of files under /etc/authbind). The question is which should take precedence if a fake time is set for a user and that user runs an application with a fake time setting. Should the user's time or the application's time take affect? Should I set it up to look at ~/.faketime to allow each user to conveniantly set their own time for their applications without the sys-admin having to do things first. Regardless of where the config files go etc the user can still run programs from the command line with an environment variable to control time faking. But if we also want to catch mailer daemon and pop server processes acting on behalf of the user then we need to do it without any environment variables. One issue that I have been thinking about is real vs effective UIDs. I have noticed when developing my library that innd does not seem to have a real UID of news. Does anyone know why this is, how I can find out the real UID of a process, and whether anything other than looking at the effective UID should be done by my library? -- I am in London and would like to meet any Linux users here. I plan to work in London until April and then move to another place where the pay is good.