guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is the default $HOME /homeless-shelter?


From: Ludovic Courtès
Subject: Re: Why is the default $HOME /homeless-shelter?
Date: Sat, 23 Nov 2019 18:33:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi Clément,

Thanks for researching this!

address@hidden (Clément Lassieur) skribis:

> https://github.com/NixOS/nix/blob/258897c265a6d6575f1669a896ab6f5ab92337c3/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/a88144215c263e62528108dfae1e781058344ef2

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]