From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Why is the default $HOME /homeless-shelter? Date: Sat, 23 Nov 2019 18:33:52 +0100 Message-ID: <87r21y33b3.fsf@gnu.org> References: <87h832i3n3.fsf@gnu.org> <7321d3a52b24c3b44dd5c1241afffc0992192a88.camel@gmail.com> <87imnhl6sj.fsf@lassieur.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:37933) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYZID-0007td-LJ for guix-devel@gnu.org; Sat, 23 Nov 2019 12:33:58 -0500 In-Reply-To: <87imnhl6sj.fsf@lassieur.org> (=?utf-8?Q?=22Cl=C3=A9ment?= Lassieur"'s message of "Mon, 18 Nov 2019 13:15:24 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?utf-8?Q?Cl=C3=A9ment?= Lassieur Cc: guix-devel@gnu.org, Jesse Gibbons Hi Cl=C3=A9ment, Thanks for researching this! clement@lassieur.org (Cl=C3=A9ment Lassieur) skribis: > https://github.com/NixOS/nix/blob/258897c265a6d6575f1669a896ab6f5ab92337c= 3/src/libstore/build.cc#L1694 > > Set HOME to a non-existing path to prevent certain programs from using > /etc/passwd (or NIS, or whatever) to locate the home directory (for > example, wget looks for ~/.wgetrc). I.e., these tools use /etc/passwd > if HOME is not set, but they will just assume that the settings file > they are looking for does not exist if HOME is set but points to some > non-existing path. I think this rationale predates chrooted builds or at least their widespread use (last I checked chrooted builds were still not the default for Nix): https://github.com/NixOS/nix/commit/a88144215c263e62528108dfae1e781058344= ef2 Ludo=E2=80=99.