1
0
Fork 0
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:
Eelco Dolstra 2015-04-16 18:46:17 +02:00
parent 1e4a4a2e9f
commit 035aeb9547
4 changed files with 9 additions and 0 deletions

View file

@ -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_);
}