From owner-svn-src-head@freebsd.org Tue Oct 27 01:07:22 2015 Return-Path: Delivered-To: svn-src-head@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 56087897E; Tue, 27 Oct 2015 01:07:22 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com [IPv6:2607:f8b0:4001:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 223061452; Tue, 27 Oct 2015 01:07:22 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbkq10 with SMTP id kq10so71882244igb.0; Mon, 26 Oct 2015 18:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=XZgQZ3Xl9MfQ+P3W5W8NxOjYSkZZn+YZk6w1N8Zm0NI=; b=h+FPDkipJ3qgp5SQfveNNE6Dz13hTqatpax/sAHwXaZI8UKVKkKfvokV/glVf0jQQh cFfQIyjd2E4g+KBlrhh8JT8ecSbQGE/+ZVsLkjjrxggjoBVkxNDkCxhtDq6tD+V6gzIg 6TlQMV++feV5ihJaYhyK9rKas8/slLqAMJ7vI7jImoXXtk9/u1F8zX3eO7fmGyJucAVu q+l1j7c3sOXrE7cUK6nej4sn0ldY2Si9Df41rtKsARpmLiJKwDduyMAIme75QEyjZ9Ff w8eZ/BgxGWrDqAHHRpvblzjagNK0XbacnSwuP6Yw+er4Xx3V5hvNEKxULP6556DV8mRF uNbQ== MIME-Version: 1.0 X-Received: by 10.50.85.17 with SMTP id d17mr22510923igz.37.1445908041618; Mon, 26 Oct 2015 18:07:21 -0700 (PDT) Received: by 10.36.46.66 with HTTP; Mon, 26 Oct 2015 18:07:21 -0700 (PDT) In-Reply-To: <562EC8D6.6050609@FreeBSD.org> References: <201510132255.t9DMtHpe000697@repo.freebsd.org> <562EC8D6.6050609@FreeBSD.org> Date: Mon, 26 Oct 2015 20:07:21 -0500 Message-ID: Subject: Re: svn commit: r289269 - head/usr.sbin/tzsetup From: Adrian Chadd To: Bryan Drewery Cc: Xin LI , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 01:07:22 -0000 Hi, Please don't break non-root builds. I may get stabby. :) -adrian On 26 October 2015 at 19:44, Bryan Drewery 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 >> #include >> #include >> +#include >> #include >> #include >> >> @@ -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 >