Use Nix's restricted evaluation mode

This commit is contained in:
Eelco Dolstra 2015-04-14 15:16:00 +02:00
parent 5d8a563e90
commit 5a61aefe4f

View file

@ -242,6 +242,10 @@ int main(int argc, char * * argv)
return true;
});
/* Prevent access to paths outside of the Nix search path and
to the environment. */
settings.set("restrict-eval", "true");
if (releaseExpr == "") throw UsageError("no expression specified");
if (gcRootsDir == "") printMsg(lvlError, "warning: `--gc-roots-dir' not specified");