mirror of
https://github.com/NixOS/nix.git
synced 2025-12-14 04:51:05 +01:00
Restore isAllowed check in ChrootLinuxDerivationBuilder
This early return was lost ind4ef822add. By doing some https://en.wikipedia.org/wiki/Non-virtual_interface_pattern, we can ensure that we don't make this mistake again --- implementations are no longer responsible for implementing the caching/memoization mechanism. (cherry picked from commit496e43ec72)
This commit is contained in:
parent
5b8c24fb31
commit
46a43dede9
3 changed files with 21 additions and 7 deletions
|
|
@ -703,8 +703,11 @@ struct ChrootLinuxDerivationBuilder : ChrootDerivationBuilder, LinuxDerivationBu
|
|||
DerivationBuilderImpl::killSandbox(getStats);
|
||||
}
|
||||
|
||||
void addDependency(const StorePath & path) override
|
||||
void addDependencyImpl(const StorePath & path) override
|
||||
{
|
||||
if (isAllowed(path))
|
||||
return;
|
||||
|
||||
auto [source, target] = ChrootDerivationBuilder::addDependencyPrep(path);
|
||||
|
||||
/* Bind-mount the path into the sandbox. This requires
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue