public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* per-chroot clock module ?
@ 2010-11-27 18:21 Jason Vas Dias
  2010-11-27 18:57 ` Ben Gamari
  2010-12-03 19:36 ` Pavel Machek
  0 siblings, 2 replies; 10+ messages in thread
From: Jason Vas Dias @ 2010-11-27 18:21 UTC (permalink / raw)
  To: linux-kernel

Greetings -

Sorry in advance if this is a stupid idea, but -

I'd really like to be able to set a distinct "clock" for a specific chroot environment, 
such that the super-user could call :
   const char *my_chroot_directory = "/some_chroot";
   struct stat st;
   if(stat( my_chroot_directory, &st) ==0)
         sys_clock_settime ((clockid_t) st.st_inode,  (struct timespec *)tp)
   ( from glibc )
and there would be a real-time clock offset association in the kernel between the 
inode number of the directory to which a "chroot" has succeeded,  and a real-time
clock offset , so that ALL processes that run with their "root" directory of such
chroot directories can get the same values for time() or gettimeofday() which would be
offset from the real-time clock by the current offset of the last "clock_settime(inode, timespec)" 
second parameter for that directory inode (first parameter). 
Eventually,  the coreutils "date(1)" command could be extended to support setting the system 
date and time for different chroot() root directories.

Does anyone know of a module that does this ?

If not, and if no-one convinces me this is a stupid idea, I'm going to write one.

Thanks in advance for any replies,
All the best,
Jason Vas Dias (a software engineer) <jason.vas.dias@gmail.com>




^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <fTxH4-2pP-5@gated-at.bofh.it>]

end of thread, other threads:[~2011-01-02  5:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-27 18:21 per-chroot clock module ? Jason Vas Dias
2010-11-27 18:57 ` Ben Gamari
2010-11-27 19:22   ` Jason Vas Dias
2010-11-27 23:51     ` Andre Tomt
2010-11-27 19:27   ` Elias Gabriel Amaral da Silva
2010-12-03 19:36 ` Pavel Machek
2010-12-30 20:31   ` webmaster
2011-01-02  5:32     ` Pavel Machek
     [not found] <fTxH4-2pP-5@gated-at.bofh.it>
     [not found] ` <fTya5-30n-9@gated-at.bofh.it>
     [not found]   ` <fTyD7-3UB-11@gated-at.bofh.it>
2010-11-28 11:15     ` Bodo Eggert
2010-11-29 12:52       ` Jason Vas Dias

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox