Date: Mon, 26 Oct 2015 18:25:20 -0700 From: Xin Li <delphij@delphij.net> To: Adrian Chadd <adrian.chadd@gmail.com>, Bryan Drewery <bdrewery@freebsd.org> Cc: Xin LI <delphij@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r289269 - head/usr.sbin/tzsetup Message-ID: <562ED280.2030307@delphij.net> In-Reply-To: <CAJ-Vmok_7jffkuaV_LJPcHU6QQkeDwn77_j0fOhbfC_DdYM83A@mail.gmail.com> References: <201510132255.t9DMtHpe000697@repo.freebsd.org> <562EC8D6.6050609@FreeBSD.org> <CAJ-Vmok_7jffkuaV_LJPcHU6QQkeDwn77_j0fOhbfC_DdYM83A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4fHAqkBBRaXfFUoEPB2lxEwUlX5kUpdr6 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/26/15 18:07, Adrian Chadd wrote: > Hi, >=20 > Please don't break non-root builds. I may get stabby. >=20 > :) Will revert now. > -adrian >=20 >=20 > On 26 October 2015 at 19:44, Bryan Drewery <bdrewery@freebsd.org> wrote= : >> 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 >>> >>> Log: >>> Use chroot(2) instead of using prefixes for files. >>> >>> Previously, the code prefixes the chroot path to actual file paths = to >>> simulate the effect. This, however, will not work for tzset(3) whi= ch >>> expects the current system have a working set of timezone data file= s, >>> and that is not always the case. >>> >>> This changeset simplifies the handling of paths and use an actual >>> chroot(2) call to implement the effect. >>> >>> PR: bin/197313 >>> MFC after: 2 weeks >>> >>> Modified: >>> head/usr.sbin/tzsetup/tzsetup.c >>> >>> 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 <stdio.h> >>> #include <stdlib.h> >>> #include <string.h> >>> +#include <sysexits.h> >>> #include <time.h> >>> #include <unistd.h> >>> >>> @@ -944,23 +945,18 @@ main(int argc, char **argv) >>> if (argc - optind > 1) >>> usage(); >>> >>> - 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. >> >> -- >> Regards, >> Bryan Drewery >> >=20 --=20 Xin LI <delphij@delphij.net> https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die --4fHAqkBBRaXfFUoEPB2lxEwUlX5kUpdr6 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.1.8 (FreeBSD) iQIcBAEBCgAGBQJWLtKAAAoJEJW2GBstM+ns3VAP/RcaHOdnMYdpXtjzyifin0E7 PuCRJBZ/QLRG9jI+g6KkGQlXtj5DX8K33FBOoenolJAS1peZ3kNuO2Q8lOCLUr/L Feldx49gA50TQyPgvCWINWdSUVK+6Nc7rF7ETFM3RL9hCqZGJ8P1k2s7HmzgzxoJ UExXBzSgGprUVJFTh63oytcRYwhElvWa9XZOG8mMmL5GaAUziLeROqxi0vSExD33 cNdBsZKgTih087aFAvPENhNziULYWGrMaLKWnxlWA/xfNTXII53tlsAaJcVrVJdE hi/IhtmPDZr5fGS3+m9QLDoUcI4smVn+BnfAS/cQk7At8RB0kuYZ9En+jMB8pn/C MNn4OiP24DGKA/kk3okPJvcugLBLSEp1QfAAg2VUaK49AW3R2hkzcdmXYoXq4EXK 62Xvahz58UcjTl0GWiJu9bi0eMPdlKyE+LvWszd3RVjV5r+31FsCe8sp0hCVevsk JCjWBgeJgpXzsg2L+yv/1ORWhbIMvFFFQwOPCojMv0MpuCQz5SYRB3UAX0FEr489 myEQOLiircnhNesKO1FuBt5lJTvMBbBMSR9z/v8t/onmiyXjrAm1olH5CnButK+A v/TcZEHcUoYvh1LcH4Tu7rfY9vtUZgz162aen+deVO8pwrIXvOnCSJbSRP/KYD6q Thi8fzr03QBjDmRLRb1L =jT3W -----END PGP SIGNATURE----- --4fHAqkBBRaXfFUoEPB2lxEwUlX5kUpdr6--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?562ED280.2030307>