From owner-svn-src-all@freebsd.org Tue Oct 27 00:44:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84D5384CF; Tue, 27 Oct 2015 00:44:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 6D33E1A10; Tue, 27 Oct 2015 00:44:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 668111BE7; Tue, 27 Oct 2015 00:44:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 1C18C1602A; Tue, 27 Oct 2015 00:44:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 0aUM0HZv6Tcp; Tue, 27 Oct 2015 00:44:10 +0000 (UTC) Subject: Re: svn commit: r289269 - head/usr.sbin/tzsetup DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 06FB716024 To: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510132255.t9DMtHpe000697@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <562EC8D6.6050609@FreeBSD.org> Date: Mon, 26 Oct 2015 17:44:06 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201510132255.t9DMtHpe000697@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BVVRFqB6ueBHfBQxpkoU7GcQ5aCFx2u66" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 00:44:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BVVRFqB6ueBHfBQxpkoU7GcQ5aCFx2u66 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/13/2015 3:55 PM, Xin LI wrote: > Author: delphij > Date: Tue Oct 13 22:55:17 2015 > New Revision: 289269 > URL: https://svnweb.freebsd.org/changeset/base/289269 >=20 > Log: > Use chroot(2) instead of using prefixes for files. > =20 > Previously, the code prefixes the chroot path to actual file paths to= > simulate the effect. This, however, will not work for tzset(3) which= > expects the current system have a working set of timezone data files,= > and that is not always the case. > =20 > This changeset simplifies the handling of paths and use an actual > chroot(2) call to implement the effect. > =20 > PR: bin/197313 > MFC after: 2 weeks >=20 > Modified: > head/usr.sbin/tzsetup/tzsetup.c >=20 > Modified: head/usr.sbin/tzsetup/tzsetup.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/tzsetup/tzsetup.c Tue Oct 13 21:34:54 2015 (r289268) > +++ head/usr.sbin/tzsetup/tzsetup.c Tue Oct 13 22:55:17 2015 (r289269) > @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > =20 > @@ -944,23 +945,18 @@ main(int argc, char **argv) > if (argc - optind > 1) > usage(); > =20 > - if (chrootenv =3D=3D NULL) { I would think there would be a reason for not really using chroot(2) here, such as preparing images as non-root. --=20 Regards, Bryan Drewery --BVVRFqB6ueBHfBQxpkoU7GcQ5aCFx2u66 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWLsjWAAoJEDXXcbtuRpfP3vQH/1VDHyBu7YdV38ANcjTUxFCe t7yn8PvvWIAoobcrBteZfoPY2r1pXcx1S2tmn0aP1+F1/MEsL1lSbYAerkXHk+ts OF/KLTKyKLr39LfveuN2t9hKJ1ek1bXT5XeJInIhcan4RaqqhMFLhmR1IJ0xnRyr 0zyqifmgISBsvVUFQNLHt+HhpyxDr4eB5LmxJgVPtf8hqbgyMC07KxbLvXQaig3N vadOTKBhUFndNjJv0docfdnU1JuVLfKVdl0Wxqd62QqU345tFP3E+GHVHMtvFr6w 7dIwOwEmSy+Xxqzf8WL9uOzefWjcUc4MP+cd7OiPqN0zh0sLzaQfZUFKa8R1wFY= =SDfV -----END PGP SIGNATURE----- --BVVRFqB6ueBHfBQxpkoU7GcQ5aCFx2u66--