Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Mar 2010 21:55:20 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Subbsd <subbsd@gmail.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: check for jailed environment for adjkerntz
Message-ID:  <20100301205520.GB1946@garage.freebsd.pl>
In-Reply-To: <8237b2241002281515q5e953a48l4ac8a981fed407ab@mail.gmail.com>
References:  <8237b2241002281515q5e953a48l4ac8a981fed407ab@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--LpQ9ahxlCli8rRTG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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
>=20
> adjkerntz [46733]: sysctl (set: "machdep.wall_cmos_clock"): Operation not
> permitted
>=20
> 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 ] && adjkernt=
z -a

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--LpQ9ahxlCli8rRTG
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAkuMKbcACgkQForvXbEpPzQCVwCcDMWOLge0JqM+CIsuKEtCpy3u
EgYAoLn569cpfALq/AsMhoY45oAm3/Sh
=u3mY
-----END PGP SIGNATURE-----

--LpQ9ahxlCli8rRTG--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100301205520.GB1946>