Date: Mon, 26 Oct 2015 17:44:06 -0700 From: Bryan Drewery <bdrewery@FreeBSD.org> To: Xin LI <delphij@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289269 - head/usr.sbin/tzsetup Message-ID: <562EC8D6.6050609@FreeBSD.org> In-Reply-To: <201510132255.t9DMtHpe000697@repo.freebsd.org> References: <201510132255.t9DMtHpe000697@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] 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) which > expects the current system have a working set of timezone data files, > 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 > ============================================================================== > --- 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 == 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 [-- Attachment #2 --] -----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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?562EC8D6.6050609>
