ProData & Linux  
   Dateshift module  


  Lithuanian version Lithuanian


dateshift.o - Kernel module for system time shifting

Introduction

   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 (although it has not been tested with all of them; also 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 diapazone, 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).


Installation

  • Download this tarball: dateshift-0.98.tar.gz
  • Unzip and untar it to your source directory (e.g. /usr/src)
  • Type 'make' to get loadable (with 'insmod') dateshift.o kernel module

Disclaimer (non-std)

   Author does not take any responsibility for using module for illegal actions (and no responsibility for everything else).

License

   This module was born with GPL license, because it uses the Linux kernel structures

Author

   Vladas Saulis
   vladas@prodata.lt

SourceForge.net Logo


Powered by PROGRESS

| ProData | PROGRESS | Linux | Programming | TROLIS.NET |

Last updated 2017-12-11