From owner-freebsd-current@FreeBSD.ORG Wed Jul 20 02:09:25 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31DB1106566C; Wed, 20 Jul 2011 02:09:25 +0000 (UTC) (envelope-from grarpamp@gmail.com) Received: from mail-pz0-f49.google.com (mail-pz0-f49.google.com [209.85.210.49]) by mx1.freebsd.org (Postfix) with ESMTP id 0662A8FC12; Wed, 20 Jul 2011 02:09:24 +0000 (UTC) Received: by pzk33 with SMTP id 33so7340544pzk.8 for ; Tue, 19 Jul 2011 19:09:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=JCJQzPeto3MvLVj/X/mTMTk2hls4fFeaE69gfSjI75g=; b=rAEAYPTxZ7+ExxG2RqOrv33ibD5yY5vsntUo8FSoNquv8JOKtka6q6z2wnsylpw/nf ZgA3dq5mDoMYBwG8Haz4Iz0yqOpSOue4dkM6LAkeCj6Jw6o/9MSh7mcstSNJO4K5ryI2 t37o43T/pESiEkuHIEVBJs0IJ9RrWXfm11Bys= MIME-Version: 1.0 Received: by 10.143.97.26 with SMTP id z26mr3707178wfl.81.1311127764402; Tue, 19 Jul 2011 19:09:24 -0700 (PDT) Received: by 10.142.172.16 with HTTP; Tue, 19 Jul 2011 19:09:24 -0700 (PDT) In-Reply-To: <55627D64-E412-4D04-AA17-3D912EEE6589@bsdimp.com> References: <4E11ECE2.9050402@freebsd.org> <55627D64-E412-4D04-AA17-3D912EEE6589@bsdimp.com> Date: Tue, 19 Jul 2011 22:09:24 -0400 Message-ID: From: grarpamp To: Warner Losh Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Wed, 20 Jul 2011 02:37:20 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: Jails: Setting different times in jails X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2011 02:09:25 -0000 > Why on earth would you want this? Hi. Since your quote of my note was not to the original, I'll repost it here. Kurt Lidl also posted useful situations on these lists. Also, being able to have time tick backwards in jails could be interesting fuzzing too :-) Enjoy. Would be nice to be able to set different times in different jails. All jails would tick in step with the system. But each jail could have it's birthtime set specifically via jail(8), jail(2), etc. Either by specification of a specific time, or an offset from the current true system time. ie: jail(8): -t [-|+] Child jails would offset from their parent, not the system. Internally, gettimeofday, filesystem timestamps, and any other userland interfaces would be hooked and adjusted by referencing a table of jail ID's and their offsets. Similar to how setting TZ or /etc/localtime effects a timezone offset. But transparent and undetectable to the jail unless set as visible by the invoker. Useful for creating alternate histories, testing time dependant protocols and applications, forensics, pen testing, etc.