From owner-freebsd-current@FreeBSD.ORG Mon Mar 1 21:17:03 2010 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 DB818106566C; Mon, 1 Mar 2010 21:17:03 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id 8327E8FC1D; Mon, 1 Mar 2010 21:17:03 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 6B740A5AE76; Tue, 2 Mar 2010 05:17:01 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id zxLohh8S5k-J; Tue, 2 Mar 2010 05:16:55 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 5C99FA5AEA0; Tue, 2 Mar 2010 05:16:54 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=uH0wtfqCJFMQOeM0hPRYKh2L4iEs/Z4tBuNTwwSCy/7r7L2q9TOorWWN0XWFvWa2M Y5ZNZ8hTaUDl+qQHwVHSw== Message-ID: <4B8C2EC2.8070200@delphij.net> Date: Mon, 01 Mar 2010 13:16:50 -0800 From: Xin LI Organization: The Geek China Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.7) Gecko/20100207 Thunderbird/3.0.1 ThunderBrowse/3.2.8.1 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <8237b2241002281515q5e953a48l4ac8a981fed407ab@mail.gmail.com> <20100301205520.GB1946@garage.freebsd.pl> In-Reply-To: <20100301205520.GB1946@garage.freebsd.pl> X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, Subbsd Subject: Re: check for jailed environment for adjkerntz X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2010 21:17:03 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, On 2010/03/01 12:55, Pawel Jakub Dawidek wrote: > On Mon, Mar 01, 2010 at 02:15:41AM +0300, Subbsd wrote: >> jail with "complete" type have standard crontab a file of tasks. However not >> all standard task are adapted for work in jail an environment. For example >> adjkerntz which generates >> >> adjkerntz [46733]: sysctl (set: "machdep.wall_cmos_clock"): Operation not >> permitted >> >> I suggest to give adjkerntz concept about jail in which to it it is not >> necessary to work: > [...] > > I also always was finding that annoying, but only your e-mail made me to > think about ways to fix it and that maybe simple patch like the one > below will do? > > --- etc/crontab (wersja 204363) > +++ etc/crontab (kopia robocza) > @@ -22,4 +22,4 @@ > # > # Adjust the time zone if the CMOS clock keeps local time, as opposed to > # UTC time. See adjkerntz(8) for details. > -1,31 0-5 * * * root adjkerntz -a > +1,31 0-5 * * * root [ `sysctl -n security.jail.jailed` -eq 0 ] && adjkerntz -a I wouldn't mind if someone is willing to teach adjkerntz about the knowledge but I really think we should document explicitly somewhere that a jail host machine should have CMOS time set to UTC, which would avoid the whole codepath. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAEBAgAGBQJLjC7CAAoJEATO+BI/yjfBMvoIALhi3ByqQUWUKT7Ebjaqro6f tvm5ZMc/S0ao67qbAqEfLuhKw+mdD0FFwRK5V02wrFk6WA/505fHWbO16FwNlsq0 5QoTEwM5NGkjouAPE8rk5cMH2Tx3/ImsAcNczqlQbEluwPx57fvp4mc06OEYMTQw IPYs756f71nBfmE8c4I7RKRXAFtiUJEhPH2g0LpeOi7AUhjcmpNBpTlQdzOuy4GK og0xL1+0GRC9ooYFMwd6RlsXOPZAkdvSt2PiCNnyN5+giQcK3ZvWo6+StGZwOB/z fS4bF6zJxJ2kfj/QPEBj54Axb9+IQbHlTA1rp6lRkMLi4NomCaZCWiD7FIAhaTs= =fPoZ -----END PGP SIGNATURE-----