Skip to content

Commit

Permalink
Merge pull request #11366 from Mic92/homeless-shelter
Browse files Browse the repository at this point in the history
Revert: Make $HOME=/proc/homeless-shelter instead of /homeless-shelter
  • Loading branch information
tomberek authored Aug 25, 2024
2 parents 85f1aa6 + 90560ee commit a30eb6d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
9 changes: 0 additions & 9 deletions doc/manual/rl-next/homeless-shelter-to-proc.md

This file was deleted.

3 changes: 1 addition & 2 deletions doc/manual/src/language/derivations.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,7 @@ The [`builder`](#attr-builder) is executed as follows:
- `PATH` is set to `/path-not-set` to prevent shells from
initialising it to their built-in default value.
- `HOME` is set to `/proc/homeless-shelter` on Linux and `/homeless-shelter`
on OSX, to prevent programs from
- `HOME` is set to `/homeless-shelter` to prevent programs from
using `/etc/passwd` or the like to find the user's home
directory, which could cause impurity. Usually, when `HOME` is
set, it is used as the location of the home directory, even if
Expand Down
7 changes: 0 additions & 7 deletions src/libstore/unix/build/local-derivation-goal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,7 @@ void handleDiffHook(
}
}

// We want $HOME to be un-creatable in the sandbox. On Linux,
// you can't create anything inside /proc since it's a virtual filesystem.
// On Darwin it seems that `/homeless-shelter` is good enough.
#if __linux__
const Path LocalDerivationGoal::homeDir = "/proc/homeless-shelter";
#else
const Path LocalDerivationGoal::homeDir = "/homeless-shelter";
#endif


LocalDerivationGoal::~LocalDerivationGoal()
Expand Down

0 comments on commit a30eb6d

Please sign in to comment.