dateshift.o - Kernel module for system time shifting
Are you tired from changing system date every time you want to run some trial applications for more time, or just want to install an old demo program? Or do you code your new super-system and want to test it with various dates and times? If so, this module for you. It shifts time to the past or the future from the current system time for some programms, leaving normal time for all other processes.
The author does not pretend for this idea to be new, - he wrote it for his own use and fun. All wishes, ideas or patches are welcome. This module should work with all 2.x kernel versions (it has not been tested with all of them though; and it is completely untested with the 2.5.x line of kernels).
How it works
The module overtakes time(3) system call and checks the name of every process according to /etc/dateshift.conf file. If the name matches, the process pid is registering in the internal list of processes. Then each time() call is checked in sequence. If it lies in the required from-to range, process receives a new (shifted) time (in seconds from the Epoch). The shift value may be absolute (=), positive (+) or negative (-). By default this shift is absolute (=). On very busy systems there could be a lot of processes launched, which require such a shift, so module also takes care of exit(3) system call, when per-process memory structure is freed. In such way module tries not to use much of kernel memory. ("Freeing" in the module means using memory reusably).
Author does not take any responsibility for using module for illegal actions (and no responsibility for everything else).
This module was born with GPL license, because it uses the Linux kernel structures