Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Oct 2015 21:41:22 -0500
From:      Adrian Chadd <adrian.chadd@gmail.com>
To:        Xin LI <d@delphij.net>
Cc:        Bryan Drewery <bdrewery@freebsd.org>, 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:  <CAJ-Vmom6M3zNj4yw%2BHiSB=moqkV7W7PcgiGJNfpA2nsG0mDcbA@mail.gmail.com>
In-Reply-To: <562ED280.2030307@delphij.net>
References:  <201510132255.t9DMtHpe000697@repo.freebsd.org> <562EC8D6.6050609@FreeBSD.org> <CAJ-Vmok_7jffkuaV_LJPcHU6QQkeDwn77_j0fOhbfC_DdYM83A@mail.gmail.com> <562ED280.2030307@delphij.net>

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

I would really love to see a non-terrible way to do this stuff. :(


-a


On 26 October 2015 at 20:25, Xin Li <delphij@delphij.net> wrote:
> On 10/26/15 18:07, Adrian Chadd wrote:
>> Hi,
>>
>> Please don't break non-root builds. I may get stabby.
>>
>> :)
>
> Will revert now.
>
>> -adrian
>>
>>
>> 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) 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
>>>
>>
>
>
> --
> Xin LI <delphij@delphij.net>    https://www.delphij.net/
> FreeBSD - The Power to Serve!           Live free or die
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmom6M3zNj4yw%2BHiSB=moqkV7W7PcgiGJNfpA2nsG0mDcbA>