mirror of
https://github.com/NixOS/nix
synced 2025-06-26 07:31:15 +02:00
Fix using restricted mode with chroots
This commit is contained in:
parent
1e4a4a2e9f
commit
035aeb9547
4 changed files with 9 additions and 0 deletions
|
@ -292,6 +292,11 @@ Path EvalState::checkSourcePath(const Path & path_)
|
|||
if (path == i.second || isInDir(path, i.second))
|
||||
return path;
|
||||
|
||||
/* Hack to support the chroot dependencies of corepkgs (see
|
||||
corepkgs/config.nix.in). */
|
||||
if (path == settings.nixPrefix && isStorePath(settings.nixPrefix))
|
||||
return path;
|
||||
|
||||
throw RestrictedPathError(format("access to path ‘%1%’ is forbidden in restricted mode") % path_);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue