aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-04-07 14:01:51 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-04-07 14:01:51 +0000
commitc815aff21b668f5fe7bbd04086a988df51281840 (patch)
tree8532d7fab1ab916c99d9034cfa2167b73726aba4 /src/libexpr
parent57d023a184bdc2f30cd7052c157e43ba1bca8288 (diff)
* `nix-store --add-fixed' to preload the outputs of fixed-output
derivations. This is mostly to simplify the implementation of nix-prefetch-{url, svn}, which now work properly in setuid installations. * Enforce valid store names in `nix-store --add / --add-fixed'.
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/primops.cc12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index a2f27b4dc..03d36638d 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -267,17 +267,7 @@ static Expr primDerivation(EvalState & state, const ATermVector & _args)
/* Check the derivation name. It shouldn't contain whitespace,
but we are conservative here: we check whether only
alphanumerics and some other characters appear. */
- string validChars = "+-._?=";
- for (string::iterator i = drvName.begin(); i != drvName.end(); ++i)
- if (!((*i >= 'A' && *i <= 'Z') ||
- (*i >= 'a' && *i <= 'z') ||
- (*i >= '0' && *i <= '9') ||
- validChars.find(*i) != string::npos))
- {
- throw Error(format("invalid character `%1%' in derivation name `%2%'")
- % *i % drvName);
- }
-
+ checkStoreName(drvName);
if (isDerivation(drvName))
throw Error(format("derivation names are not allowed to end in `%1%'")
% drvExtension);