* computeStorePathForText: take the references into account when
computing the store path (NIX-77). This is an important security property in multi-user Nix stores. Note that this changes the store paths of derivations (since the derivation aterms are added using addTextToStore), but not most outputs (unless they use builtins.toFile).
This commit is contained in:
@@ -624,7 +624,7 @@ static Expr prim_toFile(EvalState & state, const ATermVector & args)
|
||||
}
|
||||
|
||||
Path storePath = readOnlyMode
|
||||
? computeStorePathForText(name, contents)
|
||||
? computeStorePathForText(name, contents, refs)
|
||||
: store->addTextToStore(name, contents, refs);
|
||||
|
||||
/* Note: we don't need to add `context' to the context of the
|
||||
|
||||
Reference in New Issue
Block a user